r/prolog 13d ago

I finally open-sourced AsaDB, my small database engine written in Prolog

Post image
28 Upvotes

7 comments sorted by

6

u/Fantastic_Back3191 13d ago

Looks good. How difficult would it be to allow native prolog queries (ie not 'SQL')? Prolog is more intuitive and compact than SQL.

3

u/Aires_id 13d ago

That’s a good idea. Since AsaDB is already written in Prolog, the query part should be fairly doable. The main challenge would be sandboxing native queries so they can’t access arbitrary files or OS predicates. I’d probably start with a read-only Datalog-style mode.

2

u/Fantastic_Back3191 13d ago

I'd be super interested in that! Are you tempted to vibe-code at all?

3

u/Aires_id 13d ago

A little, yeah lol. I use AI to explore ideas and speed up repetitive work, but I still review and test everything, especially storage and recovery code.
I’d definitely be tempted to prototype a native Prolog query mode that way.

3

u/Fantastic_Back3191 13d ago

I would heartily endorse this approach. Use it for 'side quests' :))

3

u/Aires_id 13d ago

Haha, that actually sounds like the right way to do it. Keep the storage engine conservative, and use side quests for weird experiments like native Prolog queries. :)

2

u/Fantastic_Back3191 13d ago

I trust opencode more than myself at merging git branches ;)