This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-28
Channels
- # adventofcode (2)
- # bangalore-clj (3)
- # beginners (171)
- # boot (28)
- # chestnut (3)
- # cljs-dev (20)
- # cljsjs (5)
- # clojure (280)
- # clojure-austin (1)
- # clojure-czech (1)
- # clojure-dev (9)
- # clojure-dusseldorf (2)
- # clojure-greece (20)
- # clojure-italy (6)
- # clojure-poland (16)
- # clojure-russia (7)
- # clojure-serbia (4)
- # clojure-sg (1)
- # clojure-spec (18)
- # clojure-uk (153)
- # clojurescript (57)
- # core-async (9)
- # cursive (21)
- # data-science (29)
- # datomic (18)
- # dirac (8)
- # docker (6)
- # duct (1)
- # emacs (50)
- # fulcro (15)
- # hoplon (56)
- # klipse (3)
- # leiningen (14)
- # lumo (1)
- # off-topic (5)
- # onyx (13)
- # other-languages (14)
- # pedestal (1)
- # perun (5)
- # planck (17)
- # re-frame (10)
- # reagent (2)
- # ring (1)
- # spacemacs (51)
- # sql (14)
- # test-check (16)
- # testing (1)
- # unrepl (93)
There is some how to get the function from spec registry in cljs? On clj I can resolve from symbo.
is https://github.com/jiangts/webrtcljs (last commit 2015) the gest for cljs / web rtc? I'm mainly looking for a library to take camera capture and stream it to a div/canvas on the webpage
Hello folks! Could you be so kind and correct my perception of server-side rendering in cljs&React? From what I have read: - Om has a hack to do this, foam, but it hasnt developed beyond hack since 2016 - Reagent - run it on Node or use JVM's JS engine - Rum - supports it natively So Rum seems the best (easiest) choice if server-side rendering is important. Or? Thanks!
afaik Om.next supports SSR out of the box
here’s a demo, https://github.com/anmonteiro/om-next-fullstack next pet project I do I gonna use Om.next
Thanks!
@holyjak It depends on your project, for me server-side rendering was a reason to stay with closure and use hiccup to generate html, this way I can use the same functions to generate html client and server-side, but it has some disadvantages like not having a nice way to handle state. But since it’s more a static site with a minimal cms instead of an spa it worked out ok.
Thanks! My app is quite "rich" so React wrapper + good SSR story is necessary.
@p-himik & @mfikes Thank you for the replies. 👍 For now the lib doesn't do currency conversion, it will instead error out if you try to calculate with different currencies (unless the amount is zero). 🙂
That sounds fine. As an analog, if you define +
for matrices, it will have to fail if the lhs and rhs are of different dimensions.
I'm trying to use npm-deps with react-three-renderer
npm package, and I've run into Undefined nameToPath for react_three_renderer
. Any pointers?
I’m getting this as well with npm-deps
on subsequent cold runs. lein clean
helps usually. I believe it’s compiler’s issue (was reported here multiple times already)
@dottedmag I think not, but Doo has open PR about this (https://github.com/bensu/doo/pull/125)
Hi. I’m using core.async in cljs and it’s early days. I’m wondering how/if I can wait for a go block to finish and get its return value, or what a reasonable pattern for solving a similar issue is?
(defn list-containers
"TODO: write"
([] (list-containers {}))
([opts]
(pprint @instances)
(go
(->> @instances
(map (fn [[node-name instance]]
[node-name (<<< list-node-containers instance opts)]))
(map (fn [[node-name c]]
[node-name (<! c)]))
(into {})))))
i would like some other fn to be able to work on the resulting map coming out of this block - what’s best way to do so?
also, your types across arities don't look good. the zero arity calls the single arity with an empty map which you dereference
(defn zombie-instances
[]
(println "let's go hunt for zombies!")
(async/go
(let [containers (async/<! (docker/list-containers))]
(pprint (count containers))
(pprint (first containers)))))
Error: <! used not in (go ...) block
at Object.cljs$core$async$_LT__BANG_ [as _LT__BANG_] (/Users/sundbp/dev/bi/permafrost/target/shadow-cljs/builds/pf/dev/out/cljs-runtime/cljs.core.async.js:253:8)
at /Users/sundbp/dev/bi/permafrost/target/shadow-cljs/builds/pf/dev/out/cljs-runtime/permafrost/docker.cljs:32:4
which seems inherently incorrect, as line 32 there is the go line in list-containers..
ah, it’s the “stop translating at fn boundaries” and my use of map there. starting to get it.
so if i have a structure {:foo1 chan1, :foo2 chan2}
, and I like to take a value from each and concat them, my inclination would be to (mapcat (fn [[_ c] (<! c)) the-map-of-chans)
, but I can’t do that. any tips for how I can combine the results in that fashion by other constructs?
i guess the general question is how do I get a value from N channels, and and produce 1 value that is a fn of the N values.
And beware of lazy sequences
yeah. starting to get the hang of it. quite different way to think in cljs+core.async world compared to clj+manifold.streams that I usually wrangle.
yeah, the single-threadedness and nothing blocking is the main mind adjustment. I’m aware of vadim’s port - it’s cool!
Also take a look at async/map, it's useful when you want to join the results of channels together
(async/map vector [ch1 ch2 ch3])
takes items from each channel and puts them into a vector
🙏:skin-tone-6: Halp
Between updating project.clj version numbers with lein ancient and trying to connect to a database instance... chaos erupted lol
Aha, it was encore (part of taoensso/sente). All better now.
spoke waaay too soon, looks lke it's datomic & guava dependency
Hello! What is the state-of-the-art router to use in Clojurescript with something like Om or Reagent?
@U7DKLTCQJ thank you!
and server-side only https://github.com/weavejester/ataraxy