This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-31
Channels
- # arachne (4)
- # beginners (21)
- # boot (36)
- # cider (59)
- # cljsrn (8)
- # clojure (260)
- # clojure-filipino (3)
- # clojure-greece (3)
- # clojure-italy (15)
- # clojure-russia (58)
- # clojure-spec (54)
- # clojure-uk (99)
- # clojureremote (5)
- # clojurescript (65)
- # core-matrix (1)
- # cursive (17)
- # data-science (9)
- # datascript (7)
- # datomic (33)
- # emacs (8)
- # hoplon (2)
- # jobs (1)
- # jobs-discuss (2)
- # lein-figwheel (2)
- # lumo (2)
- # numerical-computing (1)
- # off-topic (22)
- # om (78)
- # onyx (17)
- # parinfer (3)
- # pedestal (5)
- # perun (1)
- # powderkeg (19)
- # protorepl (37)
- # re-frame (3)
- # rum (2)
- # spacemacs (1)
- # uncomplicate (8)
- # unrepl (78)
- # untangled (29)
- # yada (41)
specify seems pretty interesting: https://cljs.github.io/api/cljs.core/specifyBANG
question: using that with something like delay: https://cljs.github.io/api/cljs.core/delay
would it be possible to, upon realization of the value, extend the instance of the container type to that of the new value? Such that, if one were to then apply the object to values, it would act like the realized value?
@john that sounds confusing, but I think you Mean:
(def d (delay <MyProtoImpl>))
;; “magically" `specify!` is applied to the `delay` object
<@U1DHX2E5V>
;; later on call the protocol fn directly on the delay instead of the `@d`
(my-proto-fn-call d)
that seems weird to me, but just trying to wrap my head around what you were asking 😛
I’d think you would need to know at compile time what you want to implement.
(def d (specify! (delay 1) INumberThing (num-val [this] @this))
<@U1DHX2E5V>
(+ 1 d) ; assuming `+` worked against a protocol
it would seem natural that since cljs has specify
that it could be called at runtime and just alter a single instance
I don’t have an answer. just thought that this was a curious topic now that I looked at it closer
This library's readme shows how to populate a data structure using asynchronous calls with promises: https://github.com/jamesmacaulay/cljs-promises
@john they are promises, but the library lets you work with them like channels by implementing the right protocols
be careful what you wish for 😉
We now have a repo for putting together a ClojureScript tack on http://exercism.io
hello guys, anyone can explain to me what Volatile
type is ?
@baptiste-from-paris it exists for portability with Clojure
ok, thanks @dnolen
@baptiste-from-paris the volatile ref type was introduced to Clojure for transducers, and all of that got ported to ClojureScript
Ok, I was checking the cljs code - I’ve got to check the clj one then
looks like it’s only a value holder
more flexible than atom
Where did the original idea of Cursor come from? I saw react-cursor today, not sure it's the same as the one in ClojureScript. https://github.com/dustingetz/react-cursor
@jiyinyiyong from the first version of Om
I read the Wiki for many times, since it's coupled with Om, I'm not sure if I really get it. By the way I never really used Om..
somewhat inspired by zippers / lenses, but works by wrapping the data structure itself
I thought for quite long time today, Cursor(at least react-cursor) did a very good job, compared to this.setState
in React.
Has anyone successfully used martian https://github.com/oliyh/martian with other swagger api servers like django-rest?
hello - I have a javacsript iterator. Was looking around for some "standard" way to convert to something Seq-able. I shall continue to google - but if anyone has an idea...
https://cljs.github.io/api/cljs.core/es6-iterator and https://cljs.github.io/api/cljs.core/es6-iterator-seq
(es6-iterator-seq ...)