precept

Preception!
amarjeet 2018-03-23T14:42:23.000558Z

Hey @alex-dixon, wanted to check with you before I experiment. The use-case is that I want to generate rules at the compile time (say, via Macros). Precept consumes namespace to create the session, which is different from Clara where I can provide just rules to create a session. So, does it mean that I will have to create a namespace as well at the compile time that can be fed to the session? Or, do you see other possible ways of handling such scenarios?

alex-dixon 2018-03-23T17:27:56.000583Z

@amarjeet Hey. Clojure or Clojurescript?

amarjeet 2018-03-23T17:28:15.000217Z

clojurescript

alex-dixon 2018-03-23T17:29:53.000499Z

OK. Could you explain more? You want to generate rules dynamically at runtime, or just at compile time? Right now they are compile time

amarjeet 2018-03-23T17:31:13.000762Z

compile time only. Its like I take some input/data, and apply macros to spit out rules at the compile time

alex-dixon 2018-03-23T17:32:49.000050Z

Ok. It would be namespaced base and that namespace would need to be required in the session along with other rule namespaces

alex-dixon 2018-03-23T17:34:20.000734Z

Iā€™m not sure if before Clara 0.17 there was support for loading rules without namespaces in CLJS, just Clojure. Iā€™d recommend looking into that feature though ā€” they did a lot of work on it and extended the API. I think it would help your exact use case

amarjeet 2018-03-23T17:36:04.000619Z

hmm, i had thought so on the first point. On the 2nd point - will have to check. I had used just rules to build session in Clojure only. Haven't tried vanila Clara in cljs. In cljs, I am riding on Precept šŸ™‚

amarjeet 2018-03-23T17:36:42.000488Z

Will explore this more

amarjeet 2018-03-23T17:36:44.000746Z

thanks šŸ™‚

alex-dixon 2018-03-23T17:37:46.000634Z

Awesome. Thanks for saying hey :simple_smile:

šŸ™‚ 1