This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-26
Channels
- # admin-announcements (1)
- # alda (44)
- # aws-lambda (6)
- # beginners (8)
- # boot (187)
- # capetown (5)
- # cider (25)
- # cljs-dev (24)
- # cljsrn (93)
- # clojure (45)
- # clojure-austin (9)
- # clojure-canada (2)
- # clojure-greece (1)
- # clojure-mexico (3)
- # clojure-poland (3)
- # clojure-russia (1)
- # clojure-spec (12)
- # clojure-uk (13)
- # clojurescript (86)
- # cursive (9)
- # datascript (3)
- # datomic (32)
- # defnpodcast (4)
- # devcards (23)
- # editors (3)
- # emacs (5)
- # hoplon (27)
- # immutant (3)
- # lein-figwheel (9)
- # leiningen (4)
- # luminus (10)
- # om (32)
- # onyx (2)
- # other-languages (1)
- # perun (1)
- # protorepl (8)
- # re-frame (13)
- # reagent (2)
- # remote-jobs (2)
- # ring (3)
- # spacemacs (4)
- # spirituality-ethics (3)
- # test-check (16)
- # untangled (65)
- # yada (50)
hi all, feedback on this would be greatly appreciated: https://gist.github.com/micha/f3d9d932d8530838698a77156db0be3a
use of js*
and eval()
seems sketchy, there must be a better, more efficient way to do that
@micha: there's just no way to make something like bound-fn
work properly without fundamental ClojureScript support
there’s already open tickets for it but there’s no chance I will consider it until after the cljs.spec port stuff ships in a release
@dnolen thanks I'll check the tickets, but it does seem to work. which part needs cljs compiler support?
anyways there’s no simple way to do it correctly without hiding all the details in ClojureScript itself if it’s going to happen
sure, that's why i made it a library, so i can play around with it without changing the compiler
@micha if you were just looking for feedback on your library then carry on 🙂 nothing to add!
I'm not even sure bound-fn is a win yet, depends on how it affects performance in a real application
things will get renamed and anything inside of eval is not something Closure is going to look at
(people have requested bound-fn
for 5 years and I’ve yet to see a proposal that I’m particularly excited about)
I haven’t seen anyway to make it work, the compiler needs to look up vars and namespaces
you could off course put the output of the boostrapped compiler through advanced optimizations
Closure itself can run only in JavaScript, I mentioned this the other day - you could have a fully JVM-less pipeline right now granted you have time and interest to wire everything together
writing macros in cljs would be interesting because the macros could use cljs multimethods, etc
to be clear you can’t write macros in ClojureScript w/o bringing the entire compiler with you (not sure I communicated that)
I'm having an issue with transit-cljs. I am reading a Number value from a form (using cljs.reader/read-string) and sending it to the server which is expecting a float. If the Number is decimal (i.e. 1.12) then the server gets a float. If its is a whole number (i.e. 1 or even 1.0) then the server ends up with a long. This happens even if I cast to a float on the client. Is there a way to force transit to send a decimal type? I use transit/bigdec for money which works fine, but there isn't a transit/decimal.
hi evrybody
@cmcfarlen: there’s no way to force it
@dhucerbin: macros can depend on runtime stuff, simplest case is previously defined functions
@dnolen: thanks. Would you recommend using a tagged value in this case to coerce to a float or normalize to bigdec?
@cmcfarlen: yes that’ll be simplest
what libs would you recommend for animating the ellipses in the background: https://drive.google.com/file/d/0BzfCuz894WQcV2I4RHNuMjB2ZTQ/view
so in re-natal, in the sample app, if i wanna set the greeting when pressing the button, i would call (dispatch [:set-greeting “bla”])
?
i mean is that the way to do it. i know it works, but is that the “cljs/re-natal/reagent/all that” way?