Ask HN: Datalog as the only language for web programming, logic and database
Are there any efforts made in this direction.
Are there any efforts made in this direction.
Eve was built using the semantics of Dedalus which is built from datalog. I highly recommend watching Peter Alvaro’s Strangeloop talk about creating Dedalus - it’s exactly the same train of thought you’re onto. https://youtu.be/R2Aa4PivG0g
http://www.neilconway.org/docs/dedalus_dl2.pdf
I wonder why anyone hasn't put significant effort in it and make it mainstream.
> PyDatalog does Datalog (which is ~Prolog, but similar and very capable) logic programming with SQLAlchemy (and database indexes) and apparently NoSQL support. https://sites.google.com/site/pydatalog/
> Datalog: https://en.wikipedia.org/wiki/Datalog
> ... TBH, IDK about logic programming and bad facts. Resilience to incorrect and incredible information is - I suppose - a desirable feature of any learning system that reevaluates its learnings as additional and contradictory information makes its way into the datastores.
I'm not sure that Datalog is really necessary for most CRUD operations; SQLAlchemy and the SQLAlchemy ORM are generally sufficient for standard database querying CRUD.
[1] https://developer.logicblox.com/
[2] https://www.cs.ox.ac.uk/dan.olteanu/papers/logicblox-sigmod1...
Although I personally don't understand why anyone would want to do this ... If you actually try using Prolog or Datalog, it becomes relatively obvious that it makes a very specific set of things easier at the cost of making everything else harder.
Sticking to one language increases productivity as it encapsulates many underlying lower level details which I must not be aware of to get productive. In order to get more productive, I seek a language which is more about WHAT to get done (declarative) than HOW to get done (imperative).
The parser, interpreter and JIT can hide away all the best practices which otherwise needs careful crafty knowledge, lower-level optimization, concurrency, data persistence and system level interfacing details.
I know to a certain extent it sounds like daydreaming but its awesome abstraction to have. :)
I prefer Datalog over Prolog for a simple reason that Datalog is more declarative and program termination is certain.
Is full stack datalog as far as I'm aware
Not tried any of them yet but actively trying these are some tough things to learn
"Datalog" we've interpreted as Datomic Query and Transaction DSL, which is basically exactly what you need for automatic tables and forms – both read side and write – and not an inch more or less.
Very small amounts of Clojure are necessary to glue it all together. React.js view layer progressive enhancement is completely optional, so that doesn't count. There is a small data model for routing (hyperlinks, like the web) and Clojure's namespaced keywords turn out to be very important as well.
Maturity – today, we think Hyperfiddle is amazing at administration dashboards, you can crank them out really fast – basically about as fast as you can think.