Live data from Hacker News

Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python

github.com

21–30 of 82 posts

Re: Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python

#22
post #9

Earlier quoted context omitted.

Off topic but do you know of any good resources/talks/blog posts that cover how to create useful benchmarks?

Not OP, but Brendan Gregg has written a lot about performance and benchmarking. * https://www.brendangregg.com/activebenchmarking.html * https://www.brendangregg.com/blog/2018-06-30/benchmarking-ch...

Great, thank you!

Re: Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python

#23
post #17

Thank you for sharing My perspective is that writing this kind of system in a language such as Python is actually a great thing because for myself Python is more widely readable and approachable compared to C++ or C which is what databases are often programmed in. If someone wants to be serious they can port it to a low level language . As it stands it's educational and useful for studying. I wrote a distributed pseu…

I totally agree with that. I loved the ugit [1] build Git from scratch in Python series for that. [1] https://www.leshenko.net/p/ugit/

Thanks for sharing. This looks like another fun project to work through over a weekend.

Re: Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python

#24

Okay this seems like the perfect project to test out the various AI repo update solutions. Anyone want to do this for fun, you can have your own agenda, I'm just bored! https://github.com/paul-gauthier/aider https://www.mentat.codes/ https://www.gitwit.dev/ https://www.second.dev/

Why would you downvote this? Ive already turned it into a viable sqlite competitor. Shame on you.

my 2c:

Your comment seems to have nothing to do with the post and mostly has a bunch of links. If there is some relevance please make it clearer by editing your comment.

Your projects might be very cool in which case just submit them to HN on their own instead of commenting.

Commenting on other people's downvotes is usually not helpful. Accept the votes, learn from the experience and take that forward when participating in this community. The guidelines are pretty good, please read them as well: https://news.ycombinator.com/newsguidelines.html

Re: Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python

#26
post #20
post #13

Thanks 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…

It’s an existing, standard, language for describing grammars. Quite clearly the trade-off being made here. Seemingly not the one you would’ve made. Don’t act like it’s objectively bad.

Re: Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python

#27
Nice! it is good to see past blind spots e.g. "you must write this kind of app in this kind of language, pure Python is high level it is only for glue". I wouldn't have thought to do a project like this because of all of those kinds of heuristics. And as other have said, a hackable DB in the same language as the app can have a lot of advantages.

Re: Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python

#28

Nice! it is good to see past blind spots e.g. "you must write this kind of app in this kind of language, pure Python is high level it is only for glue". I wouldn't have thought to do a project like this because of all of those kinds of heuristics. And as other have said, a hackable DB in the same language as the app can have a lot of advantages.

[deleted]

Re: Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python

#29

In what way is this a "SQLite clone"?

Single file, embedded database with similar logical organization

Perhaps a more accurate claim would be "SQLite inspired". Calling it a clone is misleading.

Mad props to the author. Many Python programmers never had proper training in computer science, so it is encouraging to see people filling in the gaps of their knowledge.

Re: Show HN: I wrote a RDBMS (SQLite clone) from scratch in pure Python

#30
post #20
post #13

Thanks 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…

That's pretty standard for parsing libraries - have you seen any good ones (for Python or other languages) that don't use a DSL like this?

The only one I've seen is this one: https://parsy.readthedocs.io/en/latest/tutorial.html

Post reply on HN