This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-02-17
Channels
- # beginners (106)
- # cider (20)
- # cljs-dev (4)
- # cljsrn (1)
- # clojure (65)
- # clojure-austin (7)
- # clojure-canada (2)
- # clojure-russia (1)
- # clojure-spec (28)
- # clojure-uk (2)
- # clojurebridge (1)
- # clojurescript (32)
- # datomic (8)
- # docs (1)
- # emacs (27)
- # events (7)
- # fulcro (13)
- # garden (1)
- # hoplon (3)
- # leiningen (4)
- # luminus (2)
- # off-topic (32)
- # onyx (4)
- # parinfer (6)
- # pedestal (16)
- # re-frame (7)
- # reagent (5)
- # shadow-cljs (8)
- # spacemacs (2)
- # uncomplicate (4)
- # vim (3)
I am running figwheel + reagent and using figwheel sidecar in emacs to get a clojurescript repl. When I make changes and save, figwheel detects it and prints “Loading! <filename>” to the browser, but the changes do not actually take effect… anyone run into this before or have any ideas?
Hello friends. Could someone tell me how can I trace bugs on production if I develop simple express application using clojurescript and my cljs is minified to js? It is hipothetical question but very important for me. I know that in frontend I can use sourcemaps and they will probably work great but I am wondering what about the nodejs
Same, I believe. Use source maps. Haven’t tried though.
In production should I use source maps as well?
Why not?
Ok I gonna try 😛
If you end up with a bug that can't be reproduced with :none
, and only appears with :advanced
then :pseudo-names
is very helpful: https://clojurescript.org/reference/compiler-options#pseudo-names
Indeed, great tip. But beware that the size explodes.
@U8ES68TGX Is it matter?
Even If I do not minify, the output js is not readable
It’s an interesting question whether it is worth it to run advanced optimization on server side code. I always thought the optimizations were for size not speed but I don’t actually know that for sure. It is definitely easier and less error prone to use code without advanced optimization though so I wouldn’t do it unless there is a benefit
@U8ES68TGX do you know other alternatives? I mean I can always use lumo, but what cljs community thinks about it?
If you use lumo and always refer to the cache directory (with same version of lumo on every run), then you are in fact running compiled js code, with source mapping. So first run is slow but after that very fast. It depends tough if you need to distribute this as a library, but for runtime, lumo can be very fast when useing cache.
I'm getting inconsistent behavior between the way I've set up tests, and experimentation in the repl: https://github.com/mathpunk/sherman/blob/master/test/sherman/grammar_test.cljs#L7
I expected expanding-symbol to reference bracketed
in fact I expected anything to reference bracketed OK I saw it now
@noisesmith It will; I discovered the undefined problem, and then broke my test apart further
In the state of code I've linked, my expectation is that test-expanding-symbols
should have one passing, and one failing test. Instead, term.startsWith('#')
is undefined. Or term
is undefined?
Anyway, defining the function in the repl gets me a bracketed
that yields true
for "#hi#"
and false
for "hi"
, which is correct behavior
@mathpunk You could instead write
(defn- bracketed [term]
(and (clojure.string/starts-with? term "#") (clojure.string/ends-with? term "#")))
which is more portable (`.startsWith` and .endsWith
don't exist in all JavaScript environments.)@mfikes That's way better. For some reason I got the impression that "clojure.string" wasn't available