This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-21
Channels
- # adventofcode (24)
- # announcements (1)
- # beginners (122)
- # braveandtrue (9)
- # calva (45)
- # cider (24)
- # cljdoc (8)
- # cljs-dev (23)
- # clojure (112)
- # clojure-europe (2)
- # clojure-india (2)
- # clojure-italy (36)
- # clojure-nl (3)
- # clojure-spec (32)
- # clojure-uk (35)
- # clojurescript (52)
- # core-typed (12)
- # cursive (4)
- # datomic (61)
- # emacs (4)
- # figwheel-main (2)
- # fulcro (14)
- # hoplon (5)
- # hyperfiddle (1)
- # jobs-discuss (6)
- # kaocha (5)
- # leiningen (2)
- # nrepl (15)
- # off-topic (62)
- # re-frame (26)
- # reagent (39)
- # ring (3)
- # shadow-cljs (56)
- # spacemacs (8)
- # specter (5)
- # tools-deps (1)
- # yada (2)
How do you guys test promises in clojurescript? I'm trying clojure.test, but putting my assertion in my then block does not seem to work (the run-tests command finishes before the then is evaluated)
I can define (deftest) the test itself in the callback via some wrapper like generate-promise-tests
, then execute assertions from that snapshot of promise return values via (run-tests)
I have a lib, at one point it will be made open source but yeah the classic pattern is async
then your is
inside the .then
are there any view libraries in clojurescript for the DOM that don't rely on React in some form or another?
I haven't tried it but this was posted on the mailing list recently https://bitbucket.org/sonwh98/mr-clean/src/master/
This one is very nice and has reconciliation (I've used the lib but not this feature): https://github.com/jeluard/hipo
This one is very nice and has reconciliation (I've used the lib but not this feature): https://github.com/jeluard/hipo
I’m trying to discover a way to detect the equivalent of CLJ class
in CLJS, if only in some cases.
(str (type []))
;; => "function (meta,cnt,shift,root,tail,__hash){\nthis.meta = meta;\nthis.cnt = cnt;\nthis.shift = shift;\nthis.root = root;\nthis.tail = tail;\nthis.__hash = __hash;\nthis.cljs$lang$protocol_mask$partition0$ = 167666463;\nthis.cljs$lang$protocol_mask$partition1$ = 139268;\n}"
Oh, I see! I might still be missing something, but would this work then?
(print-str (type []))
;; => "cljs.core/PersistentVector"
I notice that there’s a cljs$lang$ctorStr: "cljs.core/PersistentVector"
on many CLJS data structures
is there a stable way to access that? does it persist through advanced compilation?
that's there for REPLs, it hasn't changed in years but unlikely to make any promises about it
@dnolen I am finding that I’d like to be able to get this type of information when serializing datafied stuff and putting it over a wire
@lilactown first question is how would you accomplish this in Clojure?
@lilactown I dunno, for REBL use does this really matter
@dnolen what I’m working with is a situation where you have custom views for a particular data type (e.g. JS error, a DOM node, or a database query) and you’re viewing it remotely.
what I’m finding is you pretty much have to separate the app into two parts: the part that calls datafy
and nav
, which lives in-process with a ClojureScript app, and the remote UI
when you want to e.g. view a JS error, it can get datafied into a map and sent over the wire. but then how do you know it was originally a js/Error
or a DOM node so your custom viewer can kick in?
while it would be cool if it worked everywhere - there's some huge diminishing returns if you try to pursue that
Ok guys, I love Clojure. Clojure is awesome, I am running it on my PCs, I have it running on Android (clojurescript), Now I want it on iOS, I am using re-natal and I have an app ready to go, even code signed and everything 🙂 But.... it seems like once it runs on my iOS device, it sits there waiting for figwheel to feed it JavaScript 😕 any advice?
@cole.yarbor I’m not super familiar with re-natal, but you might try the #re-natal channel if you don’t get a response here
@lilactown thanks, I appreciate it! 🙂