was a bit busy today - just updated changes and cutting a release now - but let's do the post tomorrow
fyi, now that gh is past the beta period, we are still working out getting the cognitect accts set up billing wise so I'm building sites manually again, so you'll need to ping me to publish
k
Hi, I'm encountering some weird behaviour and was wondering if this was a bug, for this code
(defmacro foo [x & args]
(println "&form:" &form)
(println "&env:" &env)
(println "args:" args))
(foo 1 2 3 4 5 6)
in clojure:
$ java -jar clojure.jar
Clojure 1.11.0-master-SNAPSHOT
...
user=> user=> (foo 1 2 3 4 5 6)
&form: (foo 1 2 3 4 5 6)
&env: nil
args: (2 3 4 5 6)
nil
which makes sense, but in clojurescript looks like this:
$ ./script/repljs
ClojureScript 1.10.598
...
cljs.user=> cljs.user=> (foo 1 2 3 4 5 6)
&form: 1
&env: 2
args: (4 5 6)
nil
@eltonlaw296 macros for CLJS are defined in CLJ. did you just use defmacro
in the REPL? if so it'll be called as a regular function which will "eat" the first two args as &form
and &env
ending up with your result
ah yea, I was using defmacro
in the repl, I see I understand now thanks for clearing that up!
I ran into an issue with the analysis order in CLJS once: https://clojure.atlassian.net/browse/CLJS-2949 Funny enough to mention that I made the same "mistake" in a Clojure interpreter: https://github.com/borkdude/sci/issues/164
what's up with this though?
$ clj -e '(def x 1) (declare y) (try (assert (pos? x)) (def y (+ 1 2 x)) y (finally (assert (pos? y))))'
#'user/x
#'user/y
4
$ plk -e '(def x 1) (declare y) (try (assert (pos? x)) (def y (+ 1 2 x)) y (finally (assert (pos? y))))'
Execution error (Error) at (<cljs repl>:1).
Var is not a function (near '...$test:null)])));})()...')
Probably just a bug in Planck https://github.com/planck-repl/planck/issues/1022
(It doesn’t happen with the Node or browser REPLs.)
Ah right, it doesn't happen in a plk REPL, only with -e
$ clojure -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.520"}}}' -m cljs.main -re node -e '(def x 1) (declare y) (try (assert (pos? x)) (def y (+ 1 2 x)) y (finally (assert (pos? y))))'
#'cljs.user/x
#'cljs.user/y
4
Updated release notes to indicate 1.10.597: https://github.com/clojure/clojurescript-site/pull/332
I notice that Herald
is only a single first name (or last name). Is it incomplete?
@mfikes looks good, feel free to merge
@dnolen Merged
@alexmiller please push the publish button whenever you get a chance 🙂
I did my best to find the name of that contributor. That’s how his/her name is listed on GitHub
pushing...
done
thanks!
maybe an announcement on https://twitter.com/cognitect? 🙂
is everything official now?
@alexmiller I guess so https://twitter.com/swannodette/status/1196824318442909696