Thursday, March 28, 2013

FlexVerb: A Serious Toy Language

These tweets prompted a fewinterestingresponses, but the discussion didn't really go anywhere. That's partly because I decided I'd rather make a real example than discuss hypotheticals.

Unfortunately, I didn't get as far as I would have liked. It turns out implementing a language is hard. But I did create a basic implementation, along with a Vim syntax file to enable syntax highlighting, and post it to GitHub as FlexVerb.

The readme contains 1,828 words. It starts like this:

FlexVerb is a barely-implemented programming language based on Latin and Ancient Greek. It is essentially a blog post, in executable code form, about an obscure linguistic quirk and its unexpected benefits.

Although I absolutely cannot recommend FlexVerb for production use, or even (in its current state) any programming tasks beyond the most utterly trivial, I can very confidently recommend reading its code — for anyone interested in parsing expression grammars, or a gentle introduction to language implementation and Vim syntax highlighting — and reading its readme, for anyone interested in programming language design or linguistics.

As far as I can tell, linguistics only concerns itself with the commonalities of human languages; I think my readme also implies a fairly compelling argument for the development of a linguistics which studies computer languages. Also, just to really push my eccentricity to new heights, I would love to see a linguistics which explored the commonalities between computer languages, human languages, bird calls, dolphin calls, primate communication, and the dancing of bees.