This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-16
Channels
- # admin-announcements (2)
- # bangalore-clj (3)
- # beginners (15)
- # boot (303)
- # carry (18)
- # cider (7)
- # cljs-dev (222)
- # cljsrn (103)
- # clojure (196)
- # clojure-czech (2)
- # clojure-russia (69)
- # clojure-spec (21)
- # clojure-uk (48)
- # clojurescript (68)
- # cursive (18)
- # datomic (185)
- # events (1)
- # hoplon (2)
- # lambdaisland (1)
- # leiningen (1)
- # mount (10)
- # off-topic (1)
- # om (14)
- # onyx (154)
- # parinfer (1)
- # pedestal (3)
- # planck (5)
- # protorepl (9)
- # re-frame (17)
- # reagent (27)
- # ring (2)
- # specter (58)
- # test-check (1)
- # testing (7)
- # untangled (59)
- # yada (35)
P.S. The below link suggests its non-trivial: https://github.com/zachallaun/datomic-cljs
@danielcompton: After trolling through the om-datomic code and how they pass it up through the stack it seems like there’s no easy 1-1 way to do it without stuff that’s kinda intimating. I’m still reading and not in a rush so I’ll let u know if your curious.
Planck 1.16 released http://planck-repl.org
so…. turns out I’m part of the 0.1.1% who just found a bug on http://clojurescript.org/guides/quick-start 🙂
XML injection!
looks to be on all of the syntax highters except clojure oddly, as the JS ones inject javascript
at the start
I’ve pushed a fix for the majority of it, deploying now
takes about 20 minutes to work through CI and edge cache invalidation
in the future, you can also file an issue at https://github.com/clojure/clojurescript-site/issues
fails with
react.inc.js:18893 Uncaught Invariant Violation: Objects are not valid as a React child (found: :id). If you meant to render a collection of children, use an array instead or wrap the object using createFragment(object) from the React add-ons.
Post Free ClojureScript Jobs -> https://clojure.news/#!/job
when/why would use you use s/fdef
and s/instrument
over using :pre
and :post
conditions?
because they let you use stest/instrument and stest/check
@alexmiller: can you elaborate on that? sorry i'm new to specs 😅
is there something fishy about cljs-time at the repl I should know about? virtually none of the functions are working as documented, and I wonder if I’m missing something … can anyone recommend a good cljs lib for dealing with iso 8601 and formatting, e.g. something like momentjs for js?
@lwhorton: cljs-time is just a wrapper around Google Closure - you can just use it directly
as a rule, does clojurescript 1.x.y require clojure 1.x?
I saw that recent cljs versions require clojure.string/index-of
although that looks like it was added in 1.8
@pesterhazy: as a rule of thumb, that’s true. the exception being CLJS 1.9.x which works with Clojure 1.8, in which case you won’t get the benefits of clojure spec
thanks
Can you recommend any library for easily getting (EDN) data from a backend-server from a Reagent app?
@sdegutis: what part of getting are you missing ?
@val_waeselynck: Currently all of it. I have a (Compojure) server running on 8080, and a Figwheel/Reagant front-end running on 3000, and I'm trying to figure out the best way to ask the back-end for data from the front-end.
I only see https://github.com/JulianBirch/cljs-ajax which seems okay but I was wondering if that's basically it or if there are other options.
@sdegutis: that's what I've used
you could also use Sente
but it's not especially more simple IMO
I’ve used cljs-ajax and cljs-http. it just depends on what you want. ajax works with callback handlers and http works with core.async channels
i do this over a websocket, then you can just prn-str and read-string CLJ(S) data structures.
@sdegutis: prn-str
and read-string
will probably fall down with dates...not sure. In that case maybe transit is useful for that use-case.
@sdegutis: forgot there are instance (time) literals: (java.util.Date.)
-> #inst "2016-08-16T19:04:25.002-00:00"
sdegutis: As far as I knew the former has always been valid syntax, it’s just that people generally consider the latter more idiomatic.
Is there a better way to handle hot-loading something with requestAnimationFrame
than to do (js/requestAnimationFrame @fn-atom)
and reset!
the atom every time?
Yet, in a project I'm currently working on, it works fine.
@porglezomp: as far as I can tell, that's no less efficient than using raw js variables
@oahner: I just don’t like the ~3 extra statements that I have to do to in order to set it up.
no issues at all, the details show when switching in and out of views.
@joshuanjordan: When you’re sharing that much code, put it in a snippet. Then it can be collapsed, and you’ll also get syntax highlighting.
That makes sense, it offers a little bit more power than my way, I’ll probably switch to that.
@pesterhazy: > as a rule, does clojurescript 1.x.y require clojure 1.x? you can check the clojure versions that cljs uses here: http://cljs.github.io/versions
@sdegutis:
> Is this valid syntax these days? (js/console.log "etc")
yes, this is supported in cljs, not clojure. documented here: http://cljs.github.io/api/syntax/#dot
I am using cljs-http along with core.async to send a bunch of requests and retrieve their results, the problem is a bunch of (<!) from channels are coming up as nil
, presumably because that's what cljs-http does when the channel is close, on the other hand, when I check my devtools, I find that the requests indeed succeeded, for context I am sending about 2200 GET requests
@shaunlebron: thanks!
so many hidden gems on http://cljs.github.io/