Sigh, I recently got into stereo photography and saw there's a shortage of transparency film. I suppose the stock's not coming back up any time soon. We can't even take photos thanks to the clankers can we.
I agree there is a spectrum, but we at least have to be honest with ourselves: are we really sure AI generated code is following the spec? On the other hand, with progress in proof automation, it is now feasible to formally verify AI generated code, and that allows us to specify program behavior formally, and a formal specification is again a program in itself.
I think with the AI it's not only question about following the spec, but about the completness of the spec. Before the AI, if specification wasn't complete, then program would lack of a feature, won't start correctly or crash. Nowadays, agents will happily fill any missing specification parts with random stuff, often looking reasonable at the first glance. This random content can be different with every iteration of the LLM work.
To find the right position in this spectrum, I think we need to find a level of specification that we care about.
Then don't grade the homework! I have in-person quizzes in my class, and the students are motivated to do the homework anyways because it prepares them for the quiz.
So I spent some time poking at the released 0.4-beta code. Controversy aside, it is interesting to see an open source system that beats ClickHouse on ClickBench - 4 out of the 5 systems ahead of CH (Umbra, elosdb, Hyper, CedarDB) are all closed-source, while the only open one is pivotlake.
What makes pgrust fast? There's no one single reason, but a combination of techniques like dictionary encoding [1], zone maps [2], late materialization [3], vectorization [4], and a gazillion others. It's not unlike all the countless optimization passes in a compiler.
None of the optimizations are groundbreaking - in fact, I could find a counterpart of every optimization I checked in ClickHouse as well! So why is CH still slower?
I believe the difference is in when they decide to apply each optimization. Unlike compiler optimizations which are usually beneficial, DB optimizations are highly data-dependent, and the query planner needs to turn them on an off based on data statistics. For example, CH is more conservative in applying dictionary encoding, and it basically doesn't get used at all for ClickBench.
Turning off dictionary-related optimizations in pgrust immediately made it 5x slower (from 3.8s to 20.4s on my machine), while ClickHouse takes a total of 15.0s.
This points to one important nuance in benchmarking - when all you target is one single benchmark, you can be more aggressive during query planning, as plans that work well for one query probably also work well for others, due to characteristics shared among queries/datasets. But when you build a system that needs to support millions of users, you have to be conservative with optimizations.
Agreed. Though we still don't have a reason why they rushed a custom preview to a rigorous benchmark competition. Feels like too much hype, and now damage control.
Hang in there! What you can build knowing how to code is drastically different from what promptards can build. Imagine trying to build a car without knowing anything about car building - you’d just get the most generic boring clunker anyone can design.
Every verification needs a spec, and in this case the spec is the Postgres implementation. I think we can and should do a lot better than taking 2.6 million lines of C code as the spec.
In general, the spec must be human readable, and I believe to achieve that we must do away with SQL. Putting aside the thousands of pages of SQL standard, even the core subset has a gnarly semantics due to issues like nulls.
A simpler semantics is one of the main motivations behind Prela [1], and despite its simplicity, we now know it’s powerful enough to express thousands of queries in the wild [2], as well as run doom [3].
I always wondered about this. Software engineers always want a spec, and either complain about it being insufficiently specific or find some ambiguity and make it a reason to write their own text editor instead of shipping the fucking product. But if you hand them running code and say "make it do exactly this", they frown and don't wanna.
Yeah, that's the most impractical part of the original post.
Like, SQL was around before I was born, and barring the immanence of the Machine God (and potentially even then), will be around long after I die (unless civilisation collapses, I guess).
SQL is a lot more intellectually coherent than its syntax belies. It's easy to be attracted to things like SPARQL, which has a well-written simple public spec, or Datalog, which doesn't really have a spec but does CTE in a way that doesn't look so painfully half-baked, or to feel really queasy looking at triggers and other features... but SQL isn't that bad. Dialects like postgres actually have pretty good support for JSON.
SPARQL is cool, but fairly limited. For example, one cannot implement common graph operations like a BFS or a DFS in SPARQL, and SQL of course can (even though I wouldn't necessarily recommend it). I was fairly puzzled when I figured this out. This means SQL is strictly more expressive than SPARQL!
The semweb badly needs a SPARQL 2.0 but we won’t get it, not least because the community was burnt out by the standards process. Myself I am keen on facilities common in document databases to represent ordered collections because the culmination of my work on the semantic web was figuring out how to use (mostly) OWL to represent complex document schemas such as the ISO 20022 financial messaging standard. And order matters for that!
> I wrote a compiler that can translate both Rust and C code into Lean
How do you verify this compiler is correct? To do that, I think you at least need a formal semantics for both C and Rust in Lean, both sound like Herculean efforts
I haven't yet. My main goal has been to find as many bugs as possible. While bugs could still slip through because my compiler is incorrect, I'm still finding a good number, so I think it's worth it.
"Aeneas currently functionalizes a subset of safe Rust, and we are in the process of extending the functional model with reasoning based on separation logic to support unsafe code and concurrent code."
reply