Show HN: Prela – Purely Algebraic Relation Combinators

github.com

47 points by remywang 3 days ago


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.

gavinray - 2 hours ago

Julian Hyde (Apache Calcite author) has a side project called Morel

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

cpard - 2 hours ago

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?

chowells - an hour ago

The heading saying "Simple (SPJ)" caught my eye, because I'm not sure SPJ has ever talked about simplicity in an especially referenceable way. Were you thinking of Rich Hickey's "Simple made Easy", or did SPJ do a presentation I missed out on?

anentropic - 3 hours ago

> Prela queries are readable even to those new to the language

Not really, too many obscure symbols.

Certainly learnable but I wouldn't say immediately readable.