This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-25
Channels
- # adventofcode (18)
- # announcements (10)
- # beginners (59)
- # calva (9)
- # cider (1)
- # clojure (43)
- # clojure-austin (1)
- # clojure-europe (6)
- # clojure-italy (2)
- # clojure-nl (1)
- # clojure-uk (3)
- # clojurescript (8)
- # cursive (3)
- # emacs (3)
- # fulcro (3)
- # hoplon (1)
- # klipse (1)
- # off-topic (24)
- # reagent (2)
- # reitit (1)
- # shadow-cljs (41)
- # specter (5)
- # vim (1)
That throws an error for me about there being a duplicate case. What should I do to achieve that?
user> (case 'quote 'foo 42)
42
user> (= '(case 'quote 'foo 42) '(case 'quote (quote foo) 42))
true
hello guys
i have a stupid question over this code, is there a way in clojure to know the syntax tree of z which is (+ x y) ?
In the way you defined it, no. (+ x y) evaluates to z and unless you re-read the source code there is no way
You can also use the :file
metadata along with the line and col info to read your own source and extract it out
You might also be interested in https://github.com/xsc/rewrite-clj
It does not let you take a compiled function and extract the syntax tree from it, but it does have some tools that are somewhat related to the topic, so maybe some interesting stuff to explore there.
This talk kind of blew my mind this weekend: https://www.youtube.com/watch?v=ZgqFlowyfTA . I’d love to have a fully reactive system from database to user with efficient incremental computation everywhere. I’d like to understand the internals of declarative dataflow a bit better.. does anyone know where I can find plain implementations of the core algorithms (preferably in clojure and without the distributed system / networking stuff 😬)?
I believe it is implemented in Rust
Source: http://tank.hyperfiddle.com/:dustingetz!niko-gobel-differential-dataflow/ C-f "Rust"
I found these but they’re inscrutable to me: https://github.com/frankmcsherry/differential-dataflow/tree/master/src/operators
Maybe I was expecting these incremental processors to be something more fundamental and composing like a transducer and they’re actually just lots of hand tuned mutation code?
Differential Dataflow's raison d'être is to generalize incremental computation to work in a distributed setting. The two fundamental algorithms are progress tracking (implemented in Timely dataflow) and the logic of partially ordered times. Any incremental computation requires a previous state to make use of. In a distributed setting, determining the previous state to use is a hard problem, which Differential solves for you. This is almost a separate issue from how you express incremental computations themselves. Differential comes with a bunch of incrementalized operators built-in (hand tuned mutation code, if you will), which happen to be great for many common use cases (Datalog evaluation being one of them). But there are other ways of expressing incremental computations, which could all be made to work with Differential, e.g: http://www.umut-acar.org/self-adjusting-computation https://www.youtube.com/watch?v=R3xX37RGJKE
FWIW I too am interested in simplified implementations of the core concepts for educational purposes, but I probably won't have the time to work on them anytime soon.
Thanks Nikolas - this information is super helpful. I’ll be digging into all this for a while I think 🙂