Prela is an embedded query language based on Tarski's Algebra of Relations. Its queries are concise, clear, and fast. It is implemented by shallow embedding in a host programming language: Prela operators are regular functions in the host. The implementation follows continuation-passing style which compiles to efficient columnar execution.
SQL, JS, Excel are really hard to substitute because of how widely used they are by people. Even if something new comes up that it's objectively better, so far has always failed gaining traction because of this reality.
I wonder though, is such a dialect better for agents? Have you tried to measure if an agent performs better expressing queries in such a language instead of SQL?
Claude had no problem translating SQL into Prela, and because you have fine grained control over the query plan (a Prela query is a plan), it was able to optimize queries to be very fast
I'm more curious about going from text to Prela instead of going from text to SQL and measuring any difference in the performance there. On one hand models have been trained on a lot of SQL on the other hand they are really good in mathematical reasoning too so thinking in Perla might be a natural fit for them.
It seems to be assuming a familiarity with logic algebras in general. It's main operator is just the common math symbol for logical conjunction (∧) [0] and how familiar it feels versus how obscure it feels depends on your mathematical background (and how long it has been). But yeah, most programming languages tend to prefer operators like & or && or `and` for logical conjunction, so Prela chose the mathematical choice over the programming language choice. Which is perhaps easily explainable by Prela starting as trying to be a pure syntax of Relational Algebra [1] which does usually prefer the mathematical symbols, given it is the mathematical theory (underpinning things like SQL) for academic/mathematical discussion more than a working programming language. Though we live in a time of Unicode where that distinction starts to get blurry again and mathematical symbols are easier to use than prior eras without dedicated APL keyboards or things like that.
Morel is an ML dialect that can compile set-producing expressions into bytecode that Calcite can execute against databases
Sort of like "If you could query anything with SQL but it's ML instead"
I bring this up because the example query looks very similar to Morel queries
Neat xample of solving a combinatorial optimization problem with a single query that he posted recently to Twitter:
https://x.com/i/status/2062066151841321370
http://blog.hydromatic.net/2026/06/02/package-queries.html
reply