joker

borkdude 2020-04-28T10:21:34.044600Z

oh, I see it's not not .cljc but it can be made so.

2020-04-28T10:52:42.045600Z

actually porting spec to joker is the reason why I asked that demungequestion 😄

2020-04-28T10:58:13.047200Z

joker is currently the only unofficial variant of Clojure that supports namespace and qualified keywords (in comparison to janet, ferret)

borkdude 2020-04-28T15:46:22.047600Z

babashka has them too. If you want to co-operate on the existing work that I already have - it's only a few tweaks to make it work with joker probably

2020-04-28T16:29:35.047800Z

I consider babashka a repackaging version of Clojure JVM ;)

borkdude 2020-04-28T17:09:12.049300Z

That's kind of true, but also not. https://github.com/borkdude/sci is a Clojure interpreter backing it all up

2020-04-28T16:38:03.048200Z

regarding spartan.spec, I think the remaining tweak is that demunge/ fn-sym functions

👍 1
2020-04-28T16:39:05.049200Z

so what you joker developers think about adding that ability?

❓ 1
jcburley 2020-04-28T21:06:38.049900Z

It’s an interesting question! Joker is well-designed and fairly easily changed to accommodate such things IME, but I don’t think I have a solid grasp on the issues around naming Fn objects in some fashion.

jcburley 2020-04-28T21:08:58.050200Z

I’m guessing that Clojure gives them name info because it has to, insofar as a new function must be compiled via the Java machinery, which requires a name. E.g. see:

user=> (let [a (fn [] (+ 3 3))] (println a))
#object[user$eval142$a__143 0x6e6fce47 user$eval142$a__143@6e6fce47]
nil
user=>

jcburley 2020-04-28T21:09:51.050400Z

Joker, OTOH, just interprets them on the fly, so any naming needn’t be “pushed down” into the Fn objects themselves. I.e. an Fn doesn’t need a name because it isn’t handed off to a compiler.

jcburley 2020-04-28T21:11:52.050700Z

So while Clojure has to “invent” a name for an (fn ...) outside of a (defn …), in order to compile it, Joker needn’t do that, so…it doesn’t, keeping things simple.

jcburley 2020-04-28T21:12:18.051Z

(My guess might be wrong or incomplete, of course!)

jcburley 2020-04-28T21:14:42.051700Z

What, if anything, does the corresponding Spec stuff do with this case (which I forgot to “Also send to #joker” earlier in this thread)?

user=> (let [a (fn [] (+ 3 3))] (println a))
#object[user$eval142$a__143 0x6e6fce47 user$eval142$a__143@6e6fce47]
nil
user=>

jcburley 2020-04-28T21:16:56.052Z

In particular, I don’t understand why anything would need to know the namespace in which an arbitrary (fn …) appeared, such that Joker (or any other Clojure clone that is an interpreter) would need to attach namespace info, nevermind some name to it.

lispyclouds 2020-04-28T21:17:07.052400Z

@rahul080327 has left the channel