core-logic

2018-11-29T00:00:20.051500Z

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

arohner 2018-11-29T00:01:30.051700Z

thanks

arohner 2018-11-29T00:02:40.052600Z

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

2018-11-29T00:03:22.053Z

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

2018-11-29T00:04:59.054500Z

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

2018-11-29T00:06:00.055300Z

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

arohner 2018-11-29T00:07:51.056Z

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

2018-11-29T00:09:34.057500Z

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

2018-11-29T00:13:30.058900Z

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

2018-11-29T00:14:38.059400Z

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