This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # admin-announcements (56)
- # beginners (67)
- # boot (159)
- # cider (5)
- # cljs-dev (16)
- # cljsjs (7)
- # clojure (142)
- # clojure-dev (15)
- # clojure-japan (1)
- # clojure-poland (1)
- # clojure-russia (33)
- # clojurebridge (2)
- # clojurecup (1)
- # clojurescript (56)
- # cursive (3)
- # datavis (2)
- # datomic (29)
- # devops (6)
- # editors (1)
- # emacs (3)
- # hoplon (95)
- # ldnclj (15)
- # leiningen (18)
- # off-topic (10)
- # om (12)
- # onyx (7)
- # parinfer (6)
- # proton (1)
- # spacemacs (3)
- # yada (2)
they are all just compiler flags...except dump core that is described, we followed -> https://github.com/clojure/clojurescript/wiki/Optional-Self-hosting
note that this is required just for bootstrapped cljs...as we cannot use
David recently referred to an interesting feature https://clojurians.slack.com/archives/clojurescript/p1449702186005954 and here is a demo of what it looks like https://gist.github.com/mfikes/567c85c6473f2c4b511b partially working. It could be cool if it pans out.
I want to write an article with embedded cljs repl so that readers can run and modify code listings
what should I use for that? is there some state of the art embeddable repl lib for cljs in cljs or do I have to roll my own?
Is it possible for a clojurescript macro to call a function? I'm asking because I'm surprised but the error I'm getting with this simple code:
ERROR in (foo-test) (at cljs$lang$test (file:13:17) Uncaught exception, not in assertion. expected: nil actual: #object[TypeError TypeError: undefined is not an object (evaluating 'juxt.iota.foo')] Ran 1 tests containing 1 assertions. 0 failures, 1 errors. Subprocess failed
I don't usually write macros in clojurescript projects, but I'm trying to write tests for juxt.iota which is based on macros
Well, you can call Clojure functions during macroexpansion, but you can't emit them in the quoted form - Clojurescript won't see Clojure code after all.
You have to define the function you want used in the expanded form defined in a Clojurescript file.
It might be confusing that Clojurescript macros run in Clojure and thus see different set of available symbols than the expanded code will.
(defn foo  (println "foo")) (defmacro call-foo "call foo"  `(juxt.iota/foo))
(ns juxt.iota) (defn foo  (println "foo")) (defmacro call-foo "call foo"  `(juxt.iota/foo))
Yeah, you can't have macros in Clojurescript source files. I suppose emitting the macro with reader conditional for
:clj might work, but I didn't try it.
No problemo, first time I encountered that phase difference I was confused as well. And by the fact that you can't use
println during macroexpansion due to rebound
You can use this instead - https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/util.cljc#L179-L184
really appreciate your help on this, I was banging my head against a wall and my head was beginning to hurt
Yeah, I can imagine. It's unfortunately a Clojurescript limitation that you have to be aware of.
I just about grokked the clj for macros, cljs for clojurescript, but then .cljc came along and confused me!
I took a stab at “modernizing” the Differences fro Clojure wiki page to accurately accommodate some of the newer notions we now have with the existence of bootstrapped ClojureScript: https://github.com/clojure/clojurescript/wiki/Differences-from-Clojure/_compare/3dbb64badb7cd1313f6507505c26ef20e73e52c7...001b020761f33a75d5e6e82b13100c2c1d616306
Has anyone experienced an issue where by SyntheticMouseEvents have an unexpected source in Reagent?