Christopher Lemmer Webber is a user on octodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.

boost for

(cat|girl|gay|boob|shark|emoj(i|o)|gargr?(on|amel))s?

hello i'm one of the seven (7) people in the world who apparently enjoys writing regular expressions enough to shitpost about it

@kellerfuchs @CobaltVelvet I enjoy complaining about how much better regular expressions could be if they were composable, ie synthcode.com/scheme/irregex/ (see also more-magic.net/posts/lispy-dsl and for why regexes aren't composable (read "stringly typed systems") see groups.csail.mit.edu/mac/users )

@cwebber @kellerfuchs @CobaltVelvet Shout-out to probably my favorite published paper ever, "A Play on Regular Expressions": sebfisch.github.io/haskell-reg

I used that library once to crack the cipher state of badly-encrypted files where the plaintext had a nice regular structure. Each observed byte constrained the possible cipher states a little more, in ways that fit the semiring construction nicely.

Christopher Lemmer Webber @cwebber

@grainloom @jamey @kellerfuchs @CobaltVelvet Don't know anything about that one but skimming the first page I think I'd say "yeah there should be no reason regexps are so line focused"
and then
"there should be no reason all our unix tooling should be line-focused"
and then
"imagine an alternate future where git merge operated on the AST level rather than on the line level"

· Web · 0 · 3

@cwebber @grainloom @jamey @CobaltVelvet
This, very much.

There was a FreeBSD GSoC project that attempted to do that (making all tools in the base system use a generic output lib that could spit out our current human-readable text, or JSON/XML/whatever), but AFAIK nothing came out of it and it's sad. ;_;

@cwebber @grainloom @kellerfuchs @CobaltVelvet I'm not sure I can stand to read a Rob Pike paper, but I'm a huge fan of applying language theory to things we don't currently have very good tools for. Not just non line oriented text, but also binary files, network protocols, etc. Somebody in the fediverse linked to a paper a couple weeks ago about context-free protocol serializer/deserializer generators which I gotta dig up again, so cool!

@jamey @grainloom @kellerfuchs @CobaltVelvet notably if the language used s-expressions it should be super straightforward :)

@CobaltVelvet @kellerfuchs @grainloom @jamey Likewise editing a lisp from emacs is just *the* *best* if you use a tool like paredit (or the a bit looser smartparens) because you aren't editing text, you're operating on the language AST emacsrocks.com/e14.html