Loading video...

Video Failed to Load

Go Home

I wrote a blog post about all the weird programming language syntax I encountered while building a syntax highlighter for llamafile. Read

46,424 views • 2 years ago •via X (Twitter)

10 Comments

Kevin Newton's profile picture
Kevin Newton2 years ago

@llamafile I wrote the new Ruby parser, and can tell you you're absolutely correct. You can't lex Ruby code without also parsing it. Specifically, the state that controls << vs heredoc is a bit nuts. Lots and lots of edge cases.

All Talk's profile picture
All Talk2 years ago

@llamafile Your posts are always a delight to read. Are there any languages with underspecified or ambiguous specifications?

Justine Tunney's profile picture
Justine Tunney2 years ago

@llamafile Ruby.

Aaron Meurer's profile picture
Aaron Meurer2 years ago

@llamafile Nothing about Python?

Elon Musluk's profile picture
Elon Musluk2 years ago

@llamafile you are a genius

Asif Shaikat's profile picture
Asif Shaikat2 years ago

@llamafile new version is superfast.............tanks a lot even in my cpu

morphillogical 🔍's profile picture
morphillogical 🔍2 years ago

@llamafile every one of your posts is a joy, and I always learn things, so it's fun that I get to contribute back: `${expr}` syntax is in both JS and TS, (though TS people use it more)

gerooq 🍉's profile picture
gerooq 🍉2 years ago

@llamafile ahh i love ape and cosmo

Guilherme Espada's profile picture
Guilherme Espada2 years ago

@llamafile One thing I think you might have missed, from a quick skim of the java file, 1. Unicode escapes get handled before parsing, so you can end comments with the unicode escape of "*/" for example. 2. Java has goto style labels for break and continue

Hassan Abedi 📚🌿🦉's profile picture
Hassan Abedi 📚🌿🦉2 years ago

@llamafile 👀

Related Videos