This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-11-23
Channels
- # admin-announcements (38)
- # announcements (1)
- # aws (1)
- # beginners (195)
- # boot (1)
- # business (3)
- # cider (100)
- # cljsrn (37)
- # clojure (99)
- # clojure-russia (69)
- # clojure-switzerland (1)
- # clojurescript (120)
- # datavis (26)
- # datomic (23)
- # devcards (4)
- # editors (38)
- # hoplon (18)
- # ldnclj (27)
- # lein-figwheel (28)
- # off-topic (50)
- # om (329)
- # onyx (255)
- # portland-or (1)
- # re-frame (8)
- # reagent (18)
- # spacemacs (5)
- # testing (1)
@dnolen: I added a page for how to build the compiler as I couldn’t see the info anywhere else in the wiki https://github.com/clojure/clojurescript/wiki/Building-the-compiler
Hi. I have function f
, which is called with a param :foo
, and calls macro m
with this param: (defn f [x] (m x))
But the macro seems to receive symbol x
, not the keyword :foo
. Is that feature of CLJS' macros implementation or I'm doing something wrong possibly?
You are executing the macro inside a function, and the macro receives the not evaluated symbols
@danielcompton: it exists on the developer pages. Should maybe just link to it
@dnolen: Which developer pages? There were other commands in the wiki but I couldn't see script/build
cool, asked by a colleague: what do you think of the advantage of using ClojureScript i node over clojure i JVM?
@joseph: the hope is to be able to use clojurescript in environments where dependency on the jvm is cumbersome or impossible, like Electron or embedded systems
@joseph: no problem! the other answer to your question is access to the node.js ecosystem
yes, right, node ecosystem is awesome, just considering something about performance or simplicity in both platforms
@joseph I would not use bootstrapped stuff if I was targeting clients (like browsers) where code size is a primary concern. iOS, Electron etc. are all targets where size concerns matter less.
sorry, wrong mentioned, @dnolen , btw, in iOS, do you kind of mean the usage of react-native with cljs?
foreign deps are collected and dependecy sorted into a single concatenated string that’s prepended to the final advanced build
foreign deps can declare a minified source file and these will be used instead if provided
in case of cljsjs minified source is always provided
hello, i’m searching for the simplest way to use figwheel + ring in cursive, any ideas? so far I’ve tried to adapt chestnut and reagent-template in order to have proper browser REPL whithin cursive but can’t make it work...
@pbaille: What specifically isn't working about figwheel+ring?
I had trouble starting from chestnut last week and got it working with some tweaks to the figwheel config
Are you pointing to figwheel's repl or weasel?
Yeah, but chestnut uses figwheel internals directly, from an old version 0.2.5
The figwheel tutorial is probably oriented for direct usage from the figwheel template, and on version 0.4.1 or 0.5.0
It would be great to have a simple template for figwheel+ring+cursive , I think many people should be interested
@pbaille: Have you worked with figwheel+ring before this project?
OK. Have you worked in Clojurescript before this project?
If you didn't use figwheel before I suggest trying boot + boot-reload, it's far simpler to get working and integrate with Cursive. Unless you specifically want figwheel that is.
OK, what I was told last week when I was asking similar lines is that I could either go for a full-blown framework like http://www.luminusweb.net/ or it would be a good idea to start from a bare figwheel template and build up from there, instead of starting with chestnut.
How do I get Chrome to kill a tab automatically, when I’ve messed up? (I’m not trying to solve the halting problem, just takes ages before Chrome kills a tab by itself, and using the Task Manager is a hassle
I opted to do neither, because luminus was overkill for what I wanted, and figwheel's ring wrapper is really just for development and not good for building an uberjar for production use
@pbaille: I made a template “tenzing”: lein new tenzing …
https://github.com/martinklepsch/tenzing
luminus is really a huge thing, I just want to add a server of my own to a bare figwheel template
There's also saapas for comparison - https://github.com/Deraen/saapas
@pbaille: Is it this wiki you have problems with? https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL
Okay, I’m doing Reagent dev with Figwheel. I’m using the figwheel template. Adding Reagent is pretty straightforward
@martinklepsch thank you i will give a try
I’m having some weird cljs errors when building an uberjar. I’m using cljs 1.170. Everything works fine during dev, but when building the uberjar I get this exception:
Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.io.ByteStreams.limit(Ljava/io/InputStream;J)Ljava/io/InputStream;, compiling:(/private/var/folders/0m/cjqkxdl50131dgfkz3mnlk300000gp/T/form-init1783542293441291701.clj:1:125)
This is my uberjar profile:
:uberjar {:aot :all
:omit-source true
:source-paths ["src/zoom_recordings/server"]
:main zoom-recordings.server.core
:hooks [leiningen.cljsbuild]
:cljsbuild {:builds [{:source-paths ["src/zoom_recordings/ui"]
:jar true
:figwheel false
:compiler {:optimizations :advanced
:main "zoom-recordings.ui.core"
:output-wrapper true
:asset-path "js/out"
:output-to "target/classes/public/js/app.js"}}]}}
the cljsbuild is not that different from dev, the only difference is that optimizations
is set to :none
unless you are prepared to prove that all your dependencies are AOT-safe you are in a world of trouble
oh, I hadn’t had to to that before. Hmm, okay, I assume that goes inside the :compiler
?
I’d like to port some formatting code from clojure to cljs. There is one case so far I don’t have an answer for (clojure.core/format "$%,.2f” n)
… ie I’m printing a dollar amount with commas, for example $123,123,123.34
goog.string/format
doesn’t do commas apparently. I’ve had a little look at cljs.pprint/cli-format
which still holds promise… although it’s new to me and a little tinkering has failed to get what I’m after. I’m sure I can get there via a custom fn… but if anyone knows of a lib, or way to use cli-format etc to do this, please let me know.
okay, narrowing it down. The exception is only thrown when I enable advanced
optimizations.
what are people’s favorite visualization/charting libs? kinda growing frustrated with dimple, considering vega now...
@jaen: Looking at saapas, the websockets it uses seems to prevent cljs-repl from working with an nrepl-connection (i.e. using cider, connecting to the nrepl created by boot and then running (cljs-start)
). Have you come across this problem? Or how do you get a cljs repl when working with it?
@mrb welcome mister pizza book! 👋
@roberto I had this problem some time ago, it was caused by conflicting dependencies. check lein deps :tree
for multipe versions of guava
When testing cljs, is there a simple way to start and stop a clj server like you’d do in a :once fixture in clj?
@sooheon: sorry, Slack was down for ma and I've only now see your question. I don't know about using boot-cljs-repl
with Emacs unfortunately, I only ever used it with Cursive and haven't had any problems. You basically just add the cljs-repl
task in your pipeline (it has to be before the cljs
task) and then you can call the start-repl
function in your Clojure REPL to establish the connection. I'm not 100% sure how exactly saapas does it, since I usually set up my projects by hand, but from what I glanced at it, I do it in an analogous way.
(br/reload :on-jsload 'presentation.frontend.core/app-reload!)
(bcr/cljs-repl)
(bc/cljs :source-map true
:optimizations :none
:ids #{"public/assets/javascripts/application"})
in my dev
pipeline, and then
(defn cljs-repl! []
(bcr/start-repl))
I call that starts the REPL.@jfntn: look at https://github.com/bensu/doo/wiki/End-to-end-testing-example for starting a server while cljs testing, we'll probably find a better solution in the future
@jaen @sooheon boot-cljs-repl
starts an nREPL server. Once it has started it displays something like nREPL started at localhost:PORTNUMBER
. In emacs you do M+x cider-connect -> localhost -> PORTNUMBER
and get a great experience
but there is a lot of boilerplate in that example that I'm hoping to extract in the future
@jfntn: also, I just pushed 0.1.6-rc.1
to clojars if you want to try it (final release coming soon)
can someone familiar with cljs.test
tell me if there is a way to determine/hook into when all tests have finished executing? asssuming there are async tests involved.
@bensu: great, I think the boilerplate is fine for now, I’d rather have the opportunity to configure everything I need rather than a pretty one-liner thta I need to hack around at some point 😉
how do I get a jar download url from clojars? Trying to get quil
, but the page is unhelpful for this use case https://clojars.org/quil