Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python
81–82 of 82 posts
Re: Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python
#82Thanks to this post I learned about Lark, which looks like a really nice parser library for Python. The JSON tutorial on their site is excellent - shows how to build a basic parser for JSON, then goes into some great detail about how to improve its performance: https://lark-parser.readthedocs.io/en/latest/json_tutorial.h... Here's the grammar used for the RDBMS project: https://github.com/spandanb/learndb-py/blob/mas…
DSL in a string? Is that 'really nice'? I haven't used or needed this in Python that I can think of, but surely we can do better than that? Even a dict with expected keys and construction via the bitwise or operator (which would roughly match the form of a lot of the grammar) would be better wouldn't it? Imports could be imports, just mixed in somehow. This is just first thoughts at a glance, maybe I'm missing someth…
The rationale is that it's more terse and has less visual clutter than a DSL over Python, which makes it easier to read and write.