> We've spent decades building programming lang...
# share-your-work
g
We've spent decades building programming languages that try to do everything — general-purpose, Turing-complete, expressive, fast, safe, concurrent. ...
But the ambition to make one language handle every problem has a shadow side: it makes us reach for that one language even when a smaller, more targeted tool would serve us better.
Little Language Case Study - Generating Code for Simple State Machines
❤️ 4
f
Had a similar revelation recently and built markdown based state machine syntax that compiles to xstate. With language server and repl. Made me realize now with LLMs: inventing small programming languages for specific jobs is feasible!
Are these DSLs?
PSL? Purpose specific language :D
g
Yes! Actually, I find that I want a more precise syntax than English and tend to give up using LLM’s to generate code (that I care about) for me, especially when I’m going off of the beaten path where a no-code approach (e.g. LLMs) can’t be very helpful. I typically end up giving up on conversing with an LLM after about 3 tries. Currently my go-to tool is OhmJS plus Ohm-editor(brilliant) plus a little thingie I call RWR (I call the whole package ‘T2T’).
Are these DSLs?
My observation is that the word “DSL” has been misappropriated to mean something heavy-weight like a 20th century compiler. I’ve been using the term SCN (Solution Centric Notation), although I will keep your term PSL in the back of mind. I even have an allergy to the term “language” because it seems to automatically generate visions of text-only syntax. We can do better today. I routinely parse and compile 2D diagrams to running code… (I guess I was trying to quietly show how I do this in the above article/repo (along with some other articles/youtubes)) (@Florian Schulz)
f
OhmJS: Noted. Thanks for sharing! SCN. Notation is a good term! In German I can call it “Bildsprache” (picture language) :D
👍 1