Live data from Hacker News

Limbo: A complete rewrite of SQLite in Rust

turso.tech

111–120 of 238 posts

Re: Limbo: A complete rewrite of SQLite in Rust

#111

Earlier quoted context omitted.

That was my take when LibSQL was announced. And it still is and would be my take if LibSQL remains C-coded. But a Rust-coded rewrite of SQLite3 or LibSQL is a different story. The SQLite3 business model is that SQLite3 is open source but the best test suite for it is proprietary, and they don't accept contributions to any of either. This incentivizes anyone who needs support and/or new features in SQLite3 to join the…

>> The SQLite3 business model is that SQLite3 is open source This is going to sound pedantic, but SQLite is not Open Source. It's Public Domain. The distinction is subtle, but it is important.

>This is going to sound pedantic, but SQLite is not Open Source. It's Public Domain.

Well, there are 2 different modes of communication:

(1) official language-lawyer pedantic communication: "open source" != "public domain"

(2) conversational casual chitchat : "open source" includes "public domain"

Yes, the SQLite home page does say "public domain". However, when people interview SQLite create, Richard Hipp, he himself calls it "open source". He also doesn't correct others when they also call it "open source". Excerpt of R Hipp:

  So, I thought, well, why can't I have a database that just
  reads directly off the disc? And I looked around and
  there were none available. I thought, “oh, I'll just write
  my own, how hard can that be?” Well, it turns out to be
  harder than you might think at first, but I didn't know
  that at the time. But we got it out there and I just put it
  out as open source. And before long, I started getting
  these phone calls from the big tech companies of the
  day, like Motorola and AOL, and, “Hey, can you
  support this?”, and “Sure!” And it's like, wow, you can
  make money by supporting open source software?
https://sigmodrecord.org/publications/sigmodRecord/1906/pdfs...

Re: Limbo: A complete rewrite of SQLite in Rust

#112

Given the code quality and rigid testing, SQLite is probably the last project that should be rewritten. It'd be great to see all other C code rewritten first!

Code quality is not the only thing to consider. Some people would love to see something like SQLite with 2 important changes: referential integrity that respects the DDL and strict tables that also respects the DDL.

They did add support for strict type checking fairly recently, and you can turn on foreign key checking I think.

Re: Limbo: A complete rewrite of SQLite in Rust

#114
post #56

Earlier quoted context omitted.

absolutely not. We're not fans of public domain, which is one of the things that led us to create libSQL in the first place. It is MIT.

What's wrong with public domain?

Public domain rights differ across countries. So someone could put a work into the public domain and sue you in the one or two major countries where copyright can’t be disclaimed by the original author without a license, or where there isn’t legal precedent for it (this is purely theoretical and has never actually occurred before, it would also not be likely to succeed if it did happen).

Also, it is technically possible for someone to claim public domain software as entirely their own work, while MIT requires attribution.

Re: Limbo: A complete rewrite of SQLite in Rust

#115

Earlier quoted context omitted.

You should read the text, it's not about calling elephants bananas but real issues with software in the public domain

I read the text: it's license hermenuetics at best and FUD at worst. Has there been a single instance in recorded history of the author of a public domain work trying to enforce usage, modification, or distribution permissions. Sure, you can point to theoretical variation in the precise semantics of the public domain in various jurisdictions, but it feels like a bar exam puzzle, not a real world practical concern. In…

Public Domain is not Free Software (in the FSF sense) because it has none of the encumbrances of a Free Software license.

In other words you don't use PD software "like Free Software". You can use it in many places where Free Software would not be permissible.

In terms of -developer- freedom, public domain is top of the pile, the Open Source, then Free Software.

In terms of -user- freedoms Free Software is top of the pile, OSS in the middle, public domain is similar to commercial software.

Re: Limbo: A complete rewrite of SQLite in Rust

#116
post #56

Earlier quoted context omitted.

absolutely not. We're not fans of public domain, which is one of the things that led us to create libSQL in the first place. It is MIT.

Why not do both? Release as public domain or MIT license. Take your pick.

The MIT license requires you to attribute the original authors, I would assume.

Re: Limbo: A complete rewrite of SQLite in Rust

#117
post #82
post #60

The license is "Copyright 2024 the Limbo authors". How is that possible if Limbo is based on a rewrite? Do they claim a clean room implementation? It seems wise of SQLite to close down their test suite. That's a great idea I wish I had heard about earlier.

SQLite is in the public domain. It is perfectly legal to create a derivative works from a public domain project and license it however you want. It's not cool and kind of a dick move to put it under a more restrictive license, but it's legal.

However that only really works for people who are satisfied with SQLite's public domain licensing. If you are in a jurisdiction that doesn't allow you to dedicate a work to the public domain and are worried about the SQLite developers suing you for infringement at some point, Limbo holds the exact same risk of SQLite suing you.

Re: Limbo: A complete rewrite of SQLite in Rust

#118
> To complete the puzzle, we wanted to deterministically test the behavior of the database when interacting with the operating system and other components. To do that, we are partnering with Antithesis

Are there any open source DST projects, even just getting started? I don't even know how/where to start if I would want to do the same on a small app, but can't afford nor want to depend long term on a commercial license.

Re: Limbo: A complete rewrite of SQLite in Rust

#119

Given the code quality and rigid testing, SQLite is probably the last project that should be rewritten. It'd be great to see all other C code rewritten first!

That was my take when LibSQL was announced. And it still is and would be my take if LibSQL remains C-coded. But a Rust-coded rewrite of SQLite3 or LibSQL is a different story. The SQLite3 business model is that SQLite3 is open source but the best test suite for it is proprietary, and they don't accept contributions to any of either. This incentivizes anyone who needs support and/or new features in SQLite3 to join the…

Bugs are fixed along with regression tests. Here's a recent example: https://www.sqlite.org/src/info/289daf6cee39625e

As far as I can see, these tests come with the same public domain dedication as the rest of the code.

You may be referring to the TH3 tests (https://sqlite.org/th3.html). The main goal (100% branch coverage, 100% MC/DC) would not be achievable for a Rust implementation (or at least an idiomatic Rust implementation …) because of the remaining dynamic run-time checks Rust requires for safety.

Post reply on HN