example.com/path/to/article
000 points · username · 0 hours ago
example.com175 points · 29 comments · 2 years ago · ashish01
ashton314
AstroJetson
Some of the same articles, but with updates and added reader comments.
(I posted Amazon, but there is a ton on the used market)
dang
“Little Languages” by Jon Bentley (1986) [pdf] - https://smackernews.com/item/17881705 HN - Aug 2018 (17 comments)
posix_monad
You need to create:
- Grammar, parser, compiler, interpreter (delete as appropriate)
- Editor plugins for nice syntax highlighting
- Language server
- Packages for common things
- Nice website (or no one will use it)
- etc...
So the pressure is always to shoe-horn a big existing language into you problem. Maybe you can build a nice library if your language has decent syntax (or little to no syntax). If you have an AST representation, you probably dump it to JSON etc.
I am curious if any projects are trying to make this easier.
LangChinBob
davidw
swatson741
rramadass
blirio
It's like SQL <-> RelationDB and jq <-> NonRelationalDB
- The language of regular expressions
- SQL queries
- In web frameworks, the language of routes
- etc.
Unfortunately we embed a lot of these languages as strings. This is problematic because the language usually sees just opaque strings—we can't apply any of our lovely static analysis tools to these little embedded languages.
I'm doing some research in this area. We just got a paper published at ECOOP. The big idea is that, with a little bit of clever metaprogramming, we can help the type checker understand these little languages better and give us more helpful hints or execute more efficiently. This isn't a new idea, but no one has given it a name before. Here's the blog post version: https://lambdaland.org/posts/2024-07-15_type_tailoring/
(HN discussion): https://smackernews.com/item/40990232 HN