clara

http://www.clara-rules.org/
2019-12-13T01:17:32.090900Z

The 1st (= ?cd_paciente cd_paciente) is a binding (since there are no other on the local scope. The second (= ?cd_paciente cd_paciente) is a comparison because the binding is already established right ?

ethanc 2019-12-13T01:20:06.091600Z

That is correct

1đź‘Ť
2019-12-13T01:21:46.092900Z

Its beautiful . (error prone too) if i remove a char of ?cd_paciente I got two bindings

ethanc 2019-12-13T01:24:38.096300Z

Yeah, i've wondered if the Clara compiler should warn on unused bindings...

1🤯
bartuka 2019-12-13T11:58:09.097Z

this could be very handy

2019-12-13T15:49:48.000600Z

@geraldodev yeah, because ?binding-name is just some arbitrary local name you want to give for the context

2019-12-13T15:50:04.000900Z

the warning isn’t a bad idea, @ethanc is a genius

ethanc 2019-12-13T15:51:08.001600Z

I will log an issue for enhancement, when i get a few free seconds @mikerod

1👍1🎊
2019-12-13T17:28:28.004200Z

@mikerod the warnings from clj-kondo have improved a lot my experience with clojure.

1
2019-12-13T17:36:49.004700Z

@geraldodev I’ve started to play around with clj-kondo, but haven’t done so very seriously yet - it looks promising

2019-12-13T17:37:11.005300Z

for a Clara DSL thing though - not thinking it can help you much? like in the case of this variable binding thing?

2019-12-13T17:37:26.005700Z

I know it does have some pretty good extension points though - so can do some nice things

2019-12-13T18:11:14.008900Z

@mikerod I've asked on #clj-kondo if it's possible to lint the unused binding case

2019-12-13T18:14:43.010800Z

I think it's a work for a linter. But it's a very especific syntax. for macros that follows defn or def pattern you simply configure :lint-as on a config file like: {:lint-as {com.fulcrologic.fulcro.components/defsc clojure.core/defn }}

2019-12-13T18:15:45.011400Z

@geraldodev yeah, I’ve seen how to do that pattern following like you have above

2019-12-13T18:15:48.011600Z

I’ve used that one

2019-12-13T18:15:58.012Z

but the clara DSL is of course more complicated

2019-12-13T18:16:34.012500Z

of course for unused, it may be just not finding the symbol more than one time in the entire DSL form hah

2019-12-13T18:16:45.012900Z

Ethan did log a Clara issue it looks like now though

2019-12-13T18:17:34.013900Z

His proposal targets more on the AST compilation side - which is better since the DSL layer is something that is “pluggable” in Clara (people could use their own and target same AST pre-compilation)

2019-12-13T18:19:57.015Z

Yesterday was my 1st day with clara. I'm enjoying.

2019-12-13T18:42:10.015700Z

oh, nice

2019-12-13T20:36:20.016300Z

About processing facts that comes from sql databases on long running sessions. Because of mutation, one has to query the session looking for the fact based on the primary key of the table, compare it with the current value and if it's different retract the old fact and insert again. Is that correct ?

Eduardo Mata 2019-12-13T23:10:47.016600Z

what does this even mean"

Java.lang.IllegalStateException: Attempting to call unbound fn: #'

Eduardo Mata 2019-12-13T23:12:50.017Z

ups wrong place