This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-28
Channels
- # announcements (11)
- # aws (2)
- # babashka (35)
- # beginners (173)
- # calva (3)
- # chlorine-clover (2)
- # cider (17)
- # clara (2)
- # clj-kondo (28)
- # cljs-dev (11)
- # cljsrn (53)
- # clojure (178)
- # clojure-argentina (1)
- # clojure-europe (12)
- # clojure-germany (5)
- # clojure-italy (4)
- # clojure-nl (5)
- # clojure-spec (25)
- # clojure-uk (88)
- # clojurescript (109)
- # conjure (34)
- # cursive (2)
- # data-science (35)
- # datomic (15)
- # emacs (6)
- # events (1)
- # fulcro (28)
- # graphql (15)
- # helix (21)
- # hoplon (7)
- # jobs (4)
- # jobs-discuss (1)
- # joker (15)
- # lambdaisland (1)
- # lein-figwheel (4)
- # local-first-clojure (1)
- # malli (8)
- # meander (17)
- # off-topic (33)
- # parinfer (2)
- # rdf (16)
- # re-frame (3)
- # reagent (21)
- # reitit (14)
- # remote-jobs (5)
- # ring (8)
- # rum (1)
- # shadow-cljs (184)
- # sql (2)
- # testing (1)
- # tools-deps (23)
actually porting spec to joker is the reason why I asked that demunge
question đ
joker is currently the only unofficial variant of Clojure that supports namespace and qualified keywords (in comparison to janet, ferret)
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
I consider babashka a repackaging version of Clojure JVM ;)
That's kind of true, but also not. https://github.com/borkdude/sci is a Clojure interpreter backing it all up
regarding spartan.spec, I think the remaining tweak is that demunge
/ fn-sym
functions
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.
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=>
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.
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.
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=>
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.
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.
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.
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.
(My guess might be wrong or incomplete, of course!)
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=>
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.