This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-16
Channels
- # beginners (176)
- # boot (11)
- # cider (12)
- # cljs-dev (65)
- # cljsrn (54)
- # clojars (18)
- # clojure (195)
- # clojure-austin (1)
- # clojure-dev (2)
- # clojure-italy (8)
- # clojure-quebec (1)
- # clojure-russia (51)
- # clojure-serbia (3)
- # clojure-spec (24)
- # clojure-uk (28)
- # clojurescript (41)
- # cursive (14)
- # data-science (60)
- # datascript (2)
- # datomic (111)
- # emacs (6)
- # figwheel (1)
- # graphql (16)
- # hoplon (26)
- # juxt (2)
- # lein-figwheel (3)
- # lumo (12)
- # off-topic (8)
- # om (14)
- # pedestal (22)
- # perun (2)
- # proton (1)
- # re-frame (29)
- # reagent (27)
- # ring (17)
- # ring-swagger (2)
- # rum (3)
- # spacemacs (3)
- # unrepl (155)
- # untangled (28)
- # vim (4)
so I just wasted 30 minutes on the "can't have numbers as the first character in a keyword" gotcha
john: AFAIK this applies to symbols:
(def 1a 1)
;; => clojure.lang.ExceptionInfo: Invalid number format [1a]
But you can get away with it with keywords:
:1a ;; => :1a
Similarly with periods in symbols/keywords.
Keep in mind that the reference says that keywords have the same restrictions as symbols: https://clojure.org/reference/reader
But in practice keywords are more lax.+cljs.user=> :1a
:1a
@noisesmith (cljs.reader/read-string (pr-str :1a))
=> #object[TypeError TypeError: Cannot read property '0' of null]
and while the docs say :1a
isn't allowed, CLJ made a command decision to allow them, after fixing the behavior broke jdbc and other libs in the wild. So they grandfathered it in.
and while I can see how edn is more restrictive, CLJS should try to follow CLJ's behavior in this case, IMO
Calling all Singaporean clojurians or anyone who might be traveling to this part of the world, we have a dedicated clojurians slack channel #clojure-sg, please join to this channel if wants to share or wondering what we do over Singapore Clojure.
@olivergeorge, it's a well-known gotcha
see e.g. https://presumably.de/reagent-mysteries-part-1-vectors-and-sequences.html
I think that reagent does warn if you return a lazy seq but perhaps it can't catch all cases
Has there been much exploration into re-frame–like state management for other libs, e.g. rum?
Hey guys, quick qustion on the status of bundling commonjs modules into an app or packaging for cljsjs. While it's easy to achieve it with webpack et al, do we actually have facilities that would allow us to either build package directly with boot or require with figwheel without pre-processing?
I upgraded to the newest ClojureScript and I’m getting:
WARNING: No such namespace: cljs-time, could not locate cljs_time.cljs, cljs_time.cljc, or Closure namespace "" at line 567 /Users/Borkdude/.boot/cache/tmp/Users/Borkdude/dre/DataHub/app/1cn1/-xybho3/public/js/app.out/cljs_time/core.cljs
Is anyone familiar with this error?I get an error with a cljsjs library extern:
SEVERE: file:/Users/Borkdude/.m2/repository/cljsjs/selectize/0.12.1-1/selectize-0.12.1-1.jar!/cljsjs/selectize/common/selectize.ext.js:54: ERROR
- Object literal contains illegal duplicate key "clearOptionGroups", disallowed in ES5 strict mode
clearOptionGroups: function(){},
Yup, that’s it: https://github.com/cljsjs/packages/commit/9dd60a44080c9fc74555152400c10775d45c26a2#diff-c37136aafb0317a2ea6e7ebfde0ac3cc
@m using js.spec
here, not everything is super. But it is usable
I’m trying to use :npm-deps
and require npm module submobule (eg. material-ui/styles
). Is there any supported syntax for it? (:require material-ui.styles)
or (:require material-ui/styles)
does not work for me. I can define JS file with import styles from "material-ui/styles"
and then goog.provide
it, but it will be much nicer if I don’t have to.
not supported
I’ve messed with Arcadia (Unity 3D), and though it does work, it’s pretty crashy on me. Any thoughts on using CLJS instead, since Unity runs Javascript?
Oh I see. Apparently it’s called UnityScript. Well, maybe I should fork the cljs compiler then 😉