This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-17
Channels
- # 100-days-of-code (5)
- # announcements (13)
- # beginners (98)
- # boot (19)
- # cider (10)
- # cljdoc (32)
- # clojure (142)
- # clojure-dev (37)
- # clojure-italy (3)
- # clojure-nl (2)
- # clojure-spec (30)
- # clojure-uk (18)
- # clojurescript (28)
- # cursive (8)
- # datomic (25)
- # duct (18)
- # editors (5)
- # emacs (39)
- # events (4)
- # figwheel (7)
- # figwheel-main (5)
- # fulcro (38)
- # graphql (19)
- # jobs-discuss (1)
- # jobs-rus (7)
- # keechma (1)
- # lumo (47)
- # off-topic (28)
- # om-next (3)
- # parinfer (3)
- # re-frame (18)
- # reagent (37)
- # reitit (8)
- # shadow-cljs (101)
- # specter (7)
- # tools-deps (8)
- # vim (1)
I'm working with some collection and in the end want to test whether for some item in it a condition holds, which i do with some
if it doesn't hold, some doesn't return anything, which is fine. it seems redundant to cast it to a boolean
but i don't want anybody else to read my code and make wrong assumptions because i ignored conventions
I’d follow what predicates in clojure core do. So my vote would go to returning booleans for consistency.
If a predicate returns a Boolean, the next release of the ClojureScript compiler will likely be able to infer this, and this will result in slightly more efficient code. See https://github.com/clojure/clojurescript-site/blob/news-next/content/news/2018-09-01-release.adoc#function-return-type-inference
hi guys
i'm using this code: (.reload js/window.location true) to reload page, how can i modify it to do something after finish reloading ?
hey 🙂 when reloading the page all JS context is lost 🙃 What would you like to do after the page has completed the reloading?
Compile cljs throws:
java.lang.Exception: No input matching "socket.io_client"
at cljs.module_graph$canonical_name.invokeStatic(module_graph.cljc:179)
at cljs.module_graph$canonical_name.invoke(module_graph.cljc:173)
at cljs.module_graph$inputs__GT_assigned_modules$canon__4705$fn__4706.invoke(module_graph.cljc:216)
at clojure.core$map$fn__5583$fn__5584.invoke(core.clj:2734)
at clojure.core.protocols$fn__7852.invokeStatic(protocols.clj:168)
at clojure.core.protocols$fn__7852.invoke(protocols.clj:124)
at clojure.core.protocols$fn__7807$G__7802__7816.invoke(protocols.clj:19)
at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:31)
at clojure.core.protocols$fn__7835.invokeStatic(protocols.clj:75)
@isaac what version of ClojureScript - just seems like you may have a bad module graph
clean my output-dir, got a new error:
java.lang.Exception: No input matching "pako"
at cljs.module_graph$canonical_name.invokeStatic(module_graph.cljc:179)
at cljs.module_graph$canonical_name.invoke(module_graph.cljc:173)
at cljs.module_graph$inputs__GT_assigned_modules$canon__4705$fn__4706.invoke(module_graph.cljc:216)
I've had circular dependency issues that are hard to diagnose when that was turned on.
I checked my cljs file, all things ok. is the circular requires in js files will cause throws too?