precept 2017-07-12

@julianwegkamp has joined the channel

Hi, I'm trying out precept but even my most basic experiment doesn't work...

Sorry to hear that. What seems to be the trouble?

Hi Alex, let me try to paste the code

`(ns precept-test.core (:require [precept.core :refer [start! then]] [precept.rules :refer-macros [define defsub session rule]])) (enable-console-print!) (println "This text is printed from src/precept-test/core.cljs. Go ahead and edit it and see reloading in action.") (rule println-when-fact-with-some-attr [[_ :some-attr true]] => (println "Yes")) (session my-session 'precept-test.core) (start! {:session my-session :initial-facts [[123 :some-attr true]]})`

hmmm, at least it is readable

I'm using figwheel and have tried to reload, restart etc

Ok. Seems like it should work. Have you restarted figwheel completely? i.e. control c, run lein figwheel again?

the only thing I didn't try is lein clean...

trying right now

Ok. Is the println Logging?

the println in the rule isn't

the other one is

can i see what rules and facts are in the session?

@precept.state/store should show facts that are a mirror of what’s in the session

empty map

Unfortunately I’m short on attention ATM. The only thing I can think of that’s different is that the session and start! are being used in the same namespace

ok, no problem

I'll put the session in a separate ns and try again

thx for your quick response

I'll be back 😉

Aha, I should have looked more closely at the docs...

:initial-facts in precept.core/start! should be :facts

It's an error in the readme

Sorry…will create an issue

no problem

Thanks for sticking with it and catching it for us

I can at least move on with a more complicated rule

Awesome. Issue logged will fix when I have a sec. Let me know if you run into any more trouble

will do