[HN Gopher] Differential Datalog: a programming language for inc...
___________________________________________________________________
 
Differential Datalog: a programming language for incremental
computation
 
Author : jitl
Score  : 97 points
Date   : 2022-11-08 17:23 UTC (5 hours ago)
 
web link (github.com)
w3m dump (github.com)
 
| gautamcgoel wrote:
| Maybe I'm just clueless, but after looking at the README I have
| no idea what this software does. Can someone ELI5?
 
  | dathanb82 wrote:
  | Lets you define queries over some data set declaratively, and
  | instead of recomputing the query over the entire data set every
  | time you want an updated answer, it uses Differential Dataflow
  |  to
  | efficiently(^1) calculate the new results by updating the
  | results of the previous query execution in response to new
  | updates to the data set.
  | 
  | ^1: I'm not an expert on Differential Dataflow, so I don't know
  | what "efficiently" means in this context, other than "should be
  | faster than running the query from scratch."
 
| ryanschneider wrote:
| Tutorial which I didn't see linked in the README:
| https://github.com/vmware/differential-datalog/blob/master/d...
 
  | Jtsummers wrote:
  | It's under "Documentation" in the readme.
 
| karavelov wrote:
| What is the difference with https://github.com/rust-
| lang/datafrog? It's a Datalog engine written by Frank McSherry on
| top of differential dataflow, that's used here also
 
| ianbutler wrote:
| Why wouldn't I just use differential dataflow, bindings to it or
| a higher level library using it in a language I know like Rust or
| Python?
| 
| I think differential dataflow is very interesting and could be
| very useful at scale for certain businesses but I just don't get
| the need for the lang.
| 
| And I'll plug for https://bytewax.io/ which is one company I know
| doing interesting things within the niche!
| 
| (I have no association to it besides having talked with the
| founder once upon a time.)
 
  | jitl wrote:
  | Learning DDLog was much easier for me than learning Rust and
  | differential-dataflow. I tried writing some differential-
  | dataflow a few years ago and it was beyond me. DDLog was very
  | quick to pick up.
 
  | carom wrote:
  | For everyone's context, differential datalog is built on the
  | differential dataflow library.
 
    | andrenotgiant wrote:
    | Even more context:
    | 
    | SQL interface on Differential/Timely Dataflow =
    | https://materialize.com/
    | 
    | Python interface on Differential/Timely Dataflow =
    | https://bytewax.io/
    | 
    | Grossly oversimplified, but directionally correct.
 
| samuell wrote:
| For the record, the thread which I think triggered this one to be
| posted and getting to the front page:
| 
| https://news.ycombinator.com/item?id=33518320
| 
| (On cozo, a new embedded SQLite like database with datalog as a
| language, written in Rust).
 
| gavinray wrote:
| This seems like it would rock for building Language Server
| Protocol implementations or other similar things.
| 
| There's a tool in Rust called Salsa that's tailored for this, but
| it's galaxy-brained (I watched an hourlong introduction video and
| could still barely grasp it).
| 
| https://github.com/salsa-rs/salsa
 
| leeuw01 wrote:
| Looks awesome!
| 
| It has been a while since a new version has been released. Has
| anything been published regarding future plans? Or is the current
| version "feature complete" for the foreseeable future?
 
  | jitl wrote:
  | I talked to some of the devs during HYTRADBOI
  | (https://www.hytradboi.com/) in April and they seemed to be
  | going strong - but in these trying times it's hard to know.
 
| carterschonwald wrote:
| it looks like the main application layer is a haskell code base,
| cool!
 
| Vaslo wrote:
| Don't know by looking at it if it is the related to or the same
| as my link below but had a class where the professor liked
| Datalog for some reason. Entire class found it hard to learn and
| not really useful, and not much more work to do similar things in
| other languages. Very niche but I know HN loves niche-y
| languages.
| 
| http://www.learndatalogtoday.org/
| 
| Maybe some useful scientific applications I am not aware of?
 
  | PaulHoule wrote:
  | Compared to SQL, Datalog lets you break down queries into
  | smaller queries that are reusable.
  | 
  | I think Datalog got some attention in the 1980s as a logically
  | pure dialect of Prolog, then it practically disappeared from
  | the literature for a while. I remember it being really hard to
  | find anything about it around 2008, then when people got really
  | tired of OWL and other semantic web tools Datalog came roaring
  | back in the 2010s.
  | 
  | Like the semantic web tools people have a hard time recognizing
  | bog-standard database technology when they have been slightly
  | reskinned and Datalog has long had that problem. One issue is
  | that SQL has this crazy idiosyncratic syntax that hides the
  | fact that it has a simple set of operators behind it, in the
  | case of Datalog the operators are quite directly exposed which
  | people seem to find too simple to understand.
 
    | digdugdirk wrote:
    | So is the functionality provided by something like SQLAlchemy
    | attempting to cover the same use cases?
 
      | PaulHoule wrote:
      | In some ways, but it is more dynamic, that is, you can
      | write recursive queries in a natural syntax like the way
      | you write recursive functions in a normal programming
      | language. You don't have awful hacks like
      | 
      | https://www.postgresql.org/docs/current/queries-with.html
 
| Jtsummers wrote:
| One prior discussion:
| 
| https://news.ycombinator.com/item?id=26514456 - March 20, 2021
| (62 comments)
| 
| A few other submissions, but all with 0 comments.
 
| erichocean wrote:
| If you like this kind of thing, google _Self-Adjusting
| Computation_.
| 
| One advantage of self-adjusting computation vs. the _differential
| dataflow_ approach is you can convert existing imperative code to
| it very easily. For example, a ray tracer with self-adjusting
| computation is written very similarly to a ray tracer without it.
| 
| There's a C++ library that implements parallel-friendly self-
| adjusting computation here: https://github.com/cmuparlay/psac
| 
| I see no reason why a Rust version couldn't be implemented.
 
  | carterschonwald wrote:
  | Self adjusting computation is such a great framework.
 
___________________________________________________________________
(page generated 2022-11-08 23:00 UTC)