Story

On air. The free wire runs 15 minutes behind live. See pricing

World, crypto, finance and tech news, scored for impact.

TechHacker NewsFiled 22 h ago

Lua as a Query Language

Open the sourceReported by Hacker News, remy.wang, 29 November 2026

Not investment advice. Muhabbit scores how much a story may matter, not which way to trade.

Prela, a Rust-embedded query language built on Tarski's Algebra of Relations, now supports dynamic queries by hosting its relational operators in Lua, with Lua expressions returning AST nodes that are passed to a Rust backend for execution. The approach overloads operators such as `&` for relation product and field access like `customer.mktsegment` to implement selection, while Lua local variables serve as non-materialized common table expressions (CTEs). Aggregations and generalized projections remain the hard part: passing Lua closures row-by-row to Rust would be prohibitively slow, so operators inside closures are instead overloaded to work over columns and fed into a reduce function. The design matters because it gives Prela ad hoc query support without writing a parser, reusing Lua's arithmetic, variables and tooling while keeping Rust's statically compiled execution path. What to watch next is whether the column-overloading trick for maps and folds closes the performance gap with native Rust closures.

Muhabbit's AI wrote this summary in its own words from Hacker News's report. It can get details wrong, so check the source.

Named in this story

Prela, Lua, Rust