This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-11-16
Channels
- # admin-announcements (9)
- # beginners (112)
- # boot (223)
- # cbus (10)
- # cider (19)
- # clara (2)
- # cljs-dev (81)
- # cljsjs (3)
- # cljsrn (45)
- # clojure (239)
- # clojure-conj (12)
- # clojure-poland (2)
- # clojure-russia (56)
- # clojure-taiwan (1)
- # clojurescript (57)
- # cursive (28)
- # datomic (5)
- # events (14)
- # immutant (1)
- # jobs (1)
- # ldnclj (8)
- # off-topic (28)
- # om (80)
- # onyx (121)
- # re-frame (10)
- # sneer-br (1)
- # spacemacs (40)
- # yada (44)
How can I build a clojurescript JAR from source?
I looked at the wiki and couldn’t find any instructions
script/build
?
@danielcompton: I presume the QuickStart should contain all the raw information https://github.com/clojure/clojurescript/wiki/Quick-Start
script/build
looks to be the way though
How do I require specter? I added [com.rpl/specter "0.8.0"]
to build.boot
, but still get an error no such namespace
when I try to require specter. I tried (:require [specter :as s])
, (:require [com.rpl/specter :as s])
, (:require [specter.specter :as s])
.
Can I programm in clojure on windows or can I better use a cloud enviroment so I can use Linux ?
@mbertheau: namespaces never contain slashes, check the readme to find out which namespace you need
@martinklepsch: There's nothing in the README about that. It's a cljx library. cljs 1.7.0 should be enough for that, right? Do I have to enable something in order to get .cljx-support?
com.rpl.specter
That was the namespace of the cljx file :)
So it's basically the path to the clojure(script) file, with dots instead of slashes.
In boot repl --client after (start-repl)
after doing (:require [some.lib :as s])
I still get "No such namespace s" when I try to use for example s/transform
? some.lib/transform
works as expected.
This is more of a #boot question.. The reason is that start-repl starts a new clojurescript repl. Any requires/state/other defined thing will be gone
@martinklepsch: I'm doing that in the repl after (start-repl)
. Shouldn't it work then?
Doing what?
After start repl you will have a fresh cljs repl, requiring you to require things again if wanted.
1. Start repl 2. Require 3. Use :)
(defn foo [x] ^:a (fn []))
Unexpected keyword 'return'
eval (NO_SOURCE_FILE)
planck$repl$caching_js_eval (planck/repl.cljs:369:4)
cljs$js$eval_str_STAR__$compileloop (cljs/js.cljs:1693:16)
cljs$js$eval_str_STAR_ (cljs/js.cljs:1715:6)
cljs$core$IFn$_invoke$arity$5 (cljs/js.cljs:1818:30)
planck$repl$process_execute_source (planck/repl.cljs:698:6)
planck$repl$execute_source (planck/repl.cljs:738:12)
planck$repl$execute (planck/repl.cljs:742:4)
if clojurescript compiles to itself now, doesn’t that remove the advantages of the closure library, ie having highly portable code across browsers and speed?
@tmtwd: the majority of people still use closure and will continue to. the objective of self hosting is not to make compilation with closure/jvm redundant
@tmtwd: yeah. the things where I’ve seen self-hosted clojurescript being used were mostly situations where jvm was not available or practical
@tmtwd: I think there is a wiki page on self-hosting that you probably want to check out
Hey (self-ashamed), there is also replumb to try now 😄 -> https://github.com/ScalaConsultants/replumb
when using figwheel I got cider emacs connected, but I want to use the cljs.user namespace and it wont let me. What should I try
I have a figwheel repl open to port 7888 and do m-x connect-cider
then go to a repl buffer and can see cljs.{ns} messages from the figwheel but I can’t issue commands to cljs.
what is the status of cljs.pprint/pprint
? I see references to it online, but when I attempt to call it I get Cannot call method 'call' of undefined
this is with a rhino repl and cljs 1.7.170
I have done (require ‘cljs.pprint)
in my repl I get tab completion for (cljs.pprint/
showing
cljs.pprint/deftype cljs.pprint/formatter
cljs.pprint/formatter-out cljs.pprint/getf
cljs.pprint/pp cljs.pprint/pprint-logical-block
cljs.pprint/print-length-loop cljs.pprint/setf
cljs.pprint/with-pprint-dispatch cljs.pprint/with-pretty-writer
hmm, I’m using it in my browser repl successfully and its being required by my app. I haven’t actually used it from rhino.
try cljs.pprint/pp
, that isn’t defined for me so maybe you have a different version of pprint somehow
org.mozilla.javascript.EcmaError: ReferenceError: "console" is not defined. (rhino.clj#41)
hmm does this mean pprint has a “proper browser” requirement
Are you sure you are in a cljs repl? I suspect the cljs.pprint that you required is the clj macros file and not the cljs ns since all of those are macros: https://crossclj.info/ns/org.clojure/clojurescript/latest/cljs.pprint.html
pretty sure,
cljs.user=> (clj->js {:foo :bar})
#js {:foo "bar”}
I just tried from a freshly created figwheel template and it worked for me with lein trampoline cljsbuild repl-rhino
. cljs.pprint/pprint
was defined even without requiring it in the default user ns.
hooray
no, sorry, that was a sarcastic hooray regarding my messed up repl
I will poke at it some more, see if I can remove some bits and see what is “special” about my setup
it works using lein do clean, trampoline cljsbuild repl-rhino
but not when I use piggieback, which is what I was doing
Ah, I see. I don’t have any experience with nrepl or piggieback so I probably can’t help you there.
thanks for your help so far, it’s been informative