This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-22
Channels
- # admin-announcements (25)
- # beginners (60)
- # boot (277)
- # cider (5)
- # cljs-dev (3)
- # cljsrn (2)
- # clojure (82)
- # clojure-art (15)
- # clojure-berlin (2)
- # clojure-boston (1)
- # clojure-italy (40)
- # clojure-russia (118)
- # clojurebridge (1)
- # clojurecup (1)
- # clojurescript (82)
- # component (3)
- # cursive (31)
- # datavis (9)
- # datomic (39)
- # editors (1)
- # editors-rus (9)
- # emacs (15)
- # hoplon (50)
- # ldnclj (2)
- # leiningen (4)
- # off-topic (9)
- # om (123)
- # re-frame (28)
- # reagent (7)
- # vim (1)
- # yada (3)
@firinne for a lot of the basics, you might find Luminus useful — it even has some helpful overview of ClojureScript and its tooling http://www.luminusweb.net/docs/clojurescript.md
this was supposed to be a talk mostly on Om Next but it ended being a pretty good history of ClojureScript https://www.functionalgeekery.com/episode-40-david-nolen/ for those who are curious
cheers for the dependency hint yesterday btw dnolen - I managed to get things working
it’s a shame I have to share stuff via js/window
- but i’ll leave figuring that out for another day
@glenjamin: glad I could help
use :advanced mode compilation cljs build project https://github.com/callemall/material-ui with dependency react added js file to :externs compiler get warnings "React is not defined in the externs."
I suggest you use either https://github.com/tuhlmann/reagent-material or https://github.com/taylorSando/om-material-ui
nice, I’m waiting for the David Nolen episode to land on iTunes. It tends to land a little late. The Phillip Wadler interview hasn’t landed yet either 😞
Hello all - I was reading a article about WebAssembly and was wondering if that is going to matter much to ClojureScript and making it faster, etc?
@staypufd: too early to tell but I imagine we will do everything to get the most out of it once WebAssembly is stable and widespread
@staypufd: WA integration is likely to be years away, it presents many new challenges none which anyone has any answers for
@staypufd: in the meantime it’s already possible to get within 1.5X-2X of Clojure JVM so we’re already in ridiculously fast territory
Is there any way (macro-way) to replace reagent "reaction" syntax to any kind of reactive-destructuring?
(let [name (reaction (:name @this)) type (reaction (:type @this)) separator (reaction (:separator @this)) value (reaction (:label @this))] (fn [] ))
@serce: That example doesn't look very useful. Just deref this
in render fn without reactions?
@juhoteperi: "this" is not final structure, it has children and i don't want to re-render all tree if one of my children changed
@serce: Okay, maybe using select-keys
in reaction and dereffing and destructuring in render would make sense then
@juhoteperi: But in this case "name" changing will lead to re-rendering "value" component, i think some kind of macro is only solution
@serce: The example is not enough to demonstrate what you are trying to do and you are maybe too careful about not rerendering stuff, I have never hit performance problems caused by parent components being rerendered unnecessarily
Also, Reagent 0.6 track
might make this simpler.
@juhoteperi: thank you, i will look into it
big upcoming enhancement to ClojureScript builds - https://github.com/clojure/clojurescript/commit/18158f9f5b3b577dbe9791057b3d8f29692658b6
this fix should mean you should be able to change dependencies without having to blow away your build
needs testing since it’s touched a bit of code so if you know how to use master on your projects give it a spin
it would be nice to have people try to develop without destroying their caches during dev - any discovered issues will now be considered major
I think I found a bug in clojurescript this:
#([:form-builder/request-form-success formtype %])
compiles on clojurescript 1.7.170 with optimizations none. On advanced compilation this breaks (as it should)@mitchelkuijpers: that’s not really a “bug"
is there a way to automatedly run tests in a browser that preserves reasonable tracebacks?
@dnolen: Hmm.. you’re right that should compile, but on clojure you would get a
ArityException Wrong number of args (0) passed to: PersistentVector clojure.lang.AFn.throwArity (AFn.java:429)
@mitchelkuijpers: variety of reasons why that is easy to do in Clojure and less easy to do in ClojureScript
But on clojurescript with optimizations none it actually works and then on advanced it breaks with a
Uncaught Error: Invalid arity: 1
Ok thnx @dnolen
@mitchelkuijpers: I don’t know what you mean that it “breaks" on advanced
@dnolen: Sorry I am not being very clear, on advanced compilation this gives a runtime error while it works at runtime in optimizations none.
@mitchelkuijpers: I’m skeptical that error is what you think it is
And this does not work at runtime on clojure either
so either your report is missing a lot of information - or the advanced error is the actual bug
on clojure this
(#([1 %]) 2)
gives:
ArityException Wrong number of args (0) passed to: PersistentVector clojure.lang.AFn.throwArity (AFn.java:429)
(at runtime)
clojurescript gives this error at runtime on advanced compilation
Uncaught Error: Invalid arity: 1
@dnolen That is the smallest example I can give, does this make any sense?
@mitchelkuijpers: feel free to open a minor ticket
Does not seem very important indeed, but it broke our production release today, anyway thank you for your help
@mitchelkuijpers: I also can’t reproduce your issue
Is there any good way in ClojureScript to parse and format a date string like "2016-01-13T00:00:00-0800"
such that it renders with a timezone name (e.g. PST
). Ideally, I would like it to get the following string out: "Wed, Jan 13 2016 0:00 AM PST"
.
@dnolen: Mhm. I did try my luck with moment and cljs-time, no look and now I am looking at the things in goog.date
.
@dnolen: Hmm you’re right I get the same error in the repl, sorry for wasting your time
> (macroexpand '(#([1 %]) 2))
((fn* [p1__21615#] ([1 p1__21615#])) 2)
> (macroexpand '((fn [x] [1 %]) 2))
((fn [x] [1 %]) 2)
@jannis https://closure-library.googlecode.com/git-history/docs/class_goog_i18n_DateTimeParse.html
@mitchelkuijpers: it’s definitely a bug
we reuse the dispatch logic from fns for collections and the count is off in this case
@dnolen: Glad I haven’t wasted your time then
(too much)
I so like Clojure(Script) !
Thank y'all guys!
@richiardiandrea: glad to hear it
Thanks @dnolen much appreciated
@dnikita: Mh, DateTimeParse
is also what cljs-time
uses internally. It doesn't like this kind of time zone offset it seems: https://gist.github.com/Jannis/07de0f4069ecf5f856d9 - that shouldn't be +01:00