Fork me on GitHub
#core-logic
<
2018-11-29
>
hiredman00:11:20

https://gist.github.com/hiredman/05befd5b39eef89b86ca#file-bench-clj-L28-L35 isn't all that dynamic but it creates lvars via a function call, and then uses l/composeg to constrain all the generate lvars

arohner00:11:40

my number of goals is also dynamic based on the data. Clearly I can read the source and call the macro expansions directly, just wondering how ‘against the grain’ that is

hiredman00:11:22

https://gist.github.com/terjesb/3181018 might another interesting thing to look at, particular the usage of to-stream

hiredman00:11:59

I kind of doubt you actually want that, it would be similar to a clojure program with a dynamic number of functions based on the data, it is possible, but much more likely you have a fixed number of functions and you want to drive the composition via the data

hiredman00:11:00

but, for example, that code I linked generates a goal per items in a map, and then composes them all in to one goal

arohner00:11:51

I think there are a fixed set of functions, with an unknown number of function calls

hiredman00:11:34

I don't think that is against the grain at all

hiredman00:11:30

likely you'll end up with a lot of stuff similar pos-int-vals in that first example, where you map some function over all your data generating a goal for each part of the data, then reduce it with composeg to create a single goal

hiredman00:11:38

composeg is conjuction of goals, and there is another one for disjunction