Hacker News new | ask | show | jobs
by C-programmer 502 days ago
It's interesting to compare this series to the actual source code of sqlite. For example, sqlite uses a LALR parser generator: https://github.com/sqlite/sqlite/blob/master/src/parse.y#L19...

And queries itself to get the schema: https://github.com/sqlite/sqlite/blob/802b042f6ef89285bc0e72...

Lots of questions, but the main one is whether we have made any progress with these new toolchains and programming languages w/ respect to performance or robustness. And that may be unfair to ask of what is a genuinely useful tutorial.

3 comments

If you don’t know it already, you’ll probably be interested in limbo: https://github.com/tursodatabase/limbo

It’s much more ambitious/complete than the db presented in the tutorial.

If memory serves me correctly, it uses the same parser generator as SQLite, which may answer some your questions.

Is translation necessary to port the complete SQLite test suite?

sqlite/sqlite//test: https://github.com/sqlite/sqlite/tree/master/test

tursodatabase/limbo//testing: https://github.com/tursodatabase/limbo/tree/main/testing

I assume the point of these tutorials is not to show experts how to progress from the state of the art, but to show beginners how to get there. There are a few tutorials like this (build your own text editor, operating system, etc) and I think they are a great idea if done well.
The lemon parser generator is actually a delight to use if you're into that sort of thing. Paired with re2c you have a combination that rivals yacc/bison IMHO.