Remix.run Logo
Mangle – a language for deductive database programming(github.com)
100 points by simonpure 4 days ago | 19 comments
Pxtl 4 days ago | parent | next [-]

Anybody who replaces the hoary old albatross of SQL without throwing out the relational algebra baby with the bathwater gets my support. I hope this goes far.

jauntywundrkind 4 days ago | parent [-]

I'm unconvinced the syntax makes a genuine difference. But always interesting to see what folks come up with!

Some notable others:

PreQL/Trilogy - https://github.com/trilogy-data/pytrilogy https://news.ycombinator.com/item?id=40728938

Malloy -https://www.malloydata.dev/ https://github.com/malloydata/malloy https://news.ycombinator.com/item?id=30053860

PRQL - https://prql-lang.org/ https://github.com/PRQL/prql https://news.ycombinator.com/item?id=36866861

Pxtl 3 days ago | parent | next [-]

SQL's shortcomings aren't just syntax and the convention of SCREAMING KEYWORDS. There's the lack of algebraic types (particularly galling given the bizarre three-value boolean algebra created by its strange null-handling), the poor composability (why is creating a reusable predicate filter so hard?), the lack of any coherent module system, etc.

The fact that something as simple as a tree is such a nuisance in a "relational" database is ludicrous.

anonzzzies 3 days ago | parent | prev | next [-]

> I'm unconvinced the syntax makes a genuine difference

Syntax not, but datalog (-ish) does. It's a more natural way (imho of course) to query data. Far more complex queries with less mental overload.

pbowyer 3 days ago | parent | prev [-]

EdgeQL - https://www.geldata.com/showcase/edgeql

albert_e 4 days ago | parent | prev | next [-]

Is this the same "Deductive Database" mathematical programming language of Google DeepMind mentioned in the latest 3b1b guest video by Aleph0 (where they say the language doesnt have a name yet)

https://youtu.be/4NlrfOl0l8U?t=4m8s

Onavo 4 days ago | parent | prev | next [-]

This is what? The third logic/datalog family query language Google launched? What's the internal story? Does each department have their own query engine?

yorwba 4 days ago | parent | next [-]

"This is not an officially supported Google product." For all we know, this is just some people having fun, but because they're having their fun at Google, it needs to be open-sourced under the Google umbrella.

diggan 3 days ago | parent [-]

> because they're having their fun at Google

I think it's even worse, even stuff they do in their freetime have to be under the Google umbrella if they want to open-source it, just because they work during the daytime at Google.

riku_iki 3 days ago | parent [-]

Does it depend on jurisdiction? In California, they are free to do whatever they want if they don't compete with employer (a little bit hard in case of Google of course)

nylonstrung 3 days ago | parent [-]

No, big tech has restrictive CIIA agreements that apply in California too

hobofan 4 days ago | parent | prev [-]

Which are the other ones that come to your mind?

I know of PathQuery[0], but that one doesn't have an open source implementation and is much more inspired by Graph query languages than SQL.

[0]: https://arxiv.org/abs/2106.09799

cess11 4 days ago | parent [-]

Perhaps they have https://logica.dev/ in mind. I think it's more restricted.

tomsmeding 3 days ago | parent [-]

Which is, in fact, linked in the readme of this project.

haolez 3 days ago | parent | prev | next [-]

I haven’t worked closely with Datalog, but whenever I come across tools that use it, they always seem to extend vanilla Datalog (like this one).

Are there any notable implementations of plain Datalog? If not, what’s the reason? Does vanilla Datalog have major limitations? Just curious.

jauco 3 days ago | parent [-]

I think it’s similar to how every sql implementation adds their own extensions.

But iirc datomic came with a quite vanilla datalog implementation.

business_liveit 4 days ago | parent | prev [-]

I wanna know what's the difference between the mysql and mangel?

tomsmeding 3 days ago | parent [-]

I suggest you read the linked readme. ;)

business_liveit 3 days ago | parent [-]

ok...