This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # admin-announcements (6)
- # aleph (3)
- # beginners (38)
- # boot (119)
- # braid-chat (15)
- # braveandtrue (1)
- # clara (4)
- # cljs-dev (56)
- # cljsfiddle (12)
- # cljsjs (15)
- # cljsrn (6)
- # clojars (4)
- # clojure (113)
- # clojure-art (1)
- # clojure-berlin (1)
- # clojure-dusseldorf (3)
- # clojure-india (15)
- # clojure-new-zealand (3)
- # clojure-poland (1)
- # clojure-russia (83)
- # clojure-uk (18)
- # clojurescript (97)
- # community-development (9)
- # cursive (1)
- # data-science (1)
- # datomic (12)
- # emacs (14)
- # hoplon (350)
- # immutant (2)
- # jobs (2)
- # jobs-discuss (23)
- # keechma (74)
- # liberator (1)
- # off-topic (1)
- # om (127)
- # onyx (54)
- # parinfer (74)
- # pedestal (1)
- # proton (5)
- # re-frame (6)
- # reagent (4)
- # remote-jobs (17)
- # ring-swagger (1)
- # slack-help (5)
- # untangled (16)
- # yada (21)
oh wow… it seems commonjs pattern is not yet supported by clojurescript compiler 😞 so I can’t use anything that can’t work in browser out of the box
@anmonteiro: I don't think there is anything else you'd need to do. That is native ClojureScript code which should be OK with
@ag the docs are thin https://github.com/clojure/clojurescript/wiki/Compiler-Options#foreign-libs but see Maria's posts which elaborate on it http://mneise.github.io
I added that now seeing bunch of
@ag which version of ClojureScript are you using? I'd recommend the latest unless you need to conservatively move to the minimal version where CommonJS was introduced.
@ag as the warning suggests, you could also try setting the
:language_in option to something newer than ES3
could you recommend some UI prototyping tool? sth I can use later with clojurescript
https://precursorapp.com/ I think it's written in clojure/clojurescript too
@doddenino: thank you!
is there any tool which would show me unused stuff from ns :requires? something like https://github.com/jonase/eastwood but for cljs
another approach is to just build your Node.js deps into a single module and require just that instead.
On this one project incremental compilation seem to not work at all. Initial compile is ~4s and all further compiles (figwheel) are also around 4s. Nothing big, just 2 files and all standard config. Can't seem to isolate the problem. Has anybody had such a problem?
@rauh: are there
.cljc files in that project?
cljs_deps but there is literally only core.asycn, core and figwheel (and my 2 files). I removed all other deps.
@dnolen: Just found it. I somehow had
:dependencies [clojuresciript ... :classifier "aot" ...] in there
yeah I can’t get Leiningen to work with AOTed ClojureScript and I haven’t had time to look into it
@mfikes: FWIW, wrt. yesterday's bug, I've discovered it doesn't need a macro to repro
updated my gist
Fully qualified name in this expression:
(.play (goog.fx.dom.Scroll. el (clj->js start) (clj->js end) time)))`
Error: Cannot read property 'dom' of undefined
If it matters, using figwheel live, so not advanced optimized,though I'd think closure itself would be safe against that 😄
@not-much-io: are you requiring the goog.fx namespace?
@bhauman: I did try, but same problem, with this expr, in a file:
Or how should I require it for the fully qualified name? :O
(ns bla (:require [goog.fx :as fx])) (fx.dom.Scroll. ...)
@not-much-io: I'm not that familiar with this but I would do (:require [goog.fx.dom]) (goog.fx.dom/Scroll. ...)
@bhauman It worked, makes sense also. I was looking at an example and didn't think to question that I was calling a module/namespace as a function. 😅
@bhauman Thnx, also figwheel rocks, just saying.
@bhauman: the only problem I have with figwheel is that, now that I'm using it daily (`lein figwheel dev`), I keep finding figwheels in my cart when I go to Costco… I've eaten more figs in the last couple of months than in my entire life
@fasiha: well just watch out for the fig flavored Vodka, thats a bulk Costco purchase you may want to avoid ...
all abilities degraded except that rate of progress is unchanged for when working with core.logic
This raises the question: is a figwheel one of these... http://www.delicioso.co.uk/files/cache/d8a7674b8df91f014eb3a0039b4a1524_f947.jpg or one of these? https://i.ytimg.com/vi/IvNEQdMalgY/hqdefault.jpg
Perhaps a question better suited for #C0B22RS2Y... or the philosophy department.
bidi for routing? having a hard time trying to do redirects client-side
@hugobessaa: using bidi, yes — what's the problem?
@martinklepsch: I can't find a way to do redirects client-side.
->Redirect is available just for
@hugobessaa: redirecting isn't really a thing in JS no? You can always do stuff like
(set! js/location.href "/abc") if you want to navigate to another page
I wanted to declare that a route should be redirected to another
this is perfectly possible. would in practice just change the navbar browser url to the correct one
not really reloading the page
ah I see what you mean
like you had
/some-page earlier and now it's
/another and so you want to "redirect the first to the latter"?
I assume this is mostly important when the user opens the page for the first time?
I think I'd keep the old paths in the routing tree, and whenever the path matches any of these trigger a new navigation event
Don't think there's a built-in bidi thing for that
thanks for the help!
I will probably keep two routing trees
match on the first (older routes) and go to the second (current routes)
yeah, that should also work
hi there, I’m trying to learn how to build devcards that have leaflet maps inside them. Has anyone here come across any recent code examples of using leaflet in a clojurescript app, that I could look over, and learn from?
@mrchrisadams: Yes this github repo uses it: https://github.com/rururu/rete4flights
cjmurphy: ah, thanks!
I have some event handling code in a game I'm building. It's a multimethod called do-event. I have a handler that just does a (keep do-event events). If the event returns another event, like say it needs to throw a damage event in the case of hit detection I just rerun that recursively until empty. Is that a good approach? Should I look into doing it with cljs.async? If with cljs.async, how do you pass the channel around to the other handlers? Use a global?
base698: I’ve written a library called Ittyon that handles game events in JS. It’s very opinionated, but the way I handled it was to split event handling into three parts
I had multimethods -valid? -react and -index. The reactions are a little like what you describe - a damage event thrown as a reaction to hit detection for example.
I recursively ran through the reactions for each event
So far I haven’t had a need to limit that.
@francoiswirion: there's also an #C06DT2YSY channel