This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-11-06
Channels
- # admin-announcements (59)
- # announcements (1)
- # beginners (67)
- # boot (140)
- # cljsrn (8)
- # clojure (70)
- # clojure-berlin (18)
- # clojure-dev (7)
- # clojure-russia (53)
- # clojurescript (124)
- # clojurescript-ios (3)
- # clojurewerkz (2)
- # clojurex (10)
- # code-reviews (42)
- # cursive (9)
- # datomic (2)
- # editors-rus (2)
- # emacs (5)
- # events (1)
- # hoplon (35)
- # jobs (8)
- # ldnclj (7)
- # lein-figwheel (34)
- # luminus (1)
- # om (410)
- # onyx (22)
- # overtone (19)
- # portland-or (6)
- # re-frame (1)
- # yada (4)
Hey all, I just bumped some dependencies for a project i'm working on and now running lein figwheel errors with this...
clojure.lang.ExceptionInfo: No such namespace: cljsjs.react, could not locate cljsjs/react.cljs, cljsjs/react.cljc, or Closure namespace "cljsjs.react" {:tag :cljs/analysis-error}
however, lein cljsbuild once works just fine. anyone else run into this?No I did not have this problem bumping Figwheel, which other deps did you bump?
so for doing node.js style broadcasting from clojure server to cljs client is sente still the best option? Are there any others?
Or maybe is there a nice idiomatic wrapper for http://socket.io running on node.js?
https://closure-library.googlecode.com/git-history/docs/class_goog_net_WebSocket.html
@triss: i ended up using https://github.com/jarohen/chord and https://github.com/ztellman/aleph
Whats the best way to connect to MySql on Node? Should I use something like https://github.com/felixge/node-mysql?
@twillis: did you update cljs version to the latest one? if so, you need to bump up figwheel or cljsbuild to the latest SNAPSHOT release.
ClojureScript 1.7.170 released! https://groups.google.com/forum/#!msg/clojurescript/AiCARjGT2Mg/J2TdxtHgBAAJ
Is there an equivalent to clojure.lang.IPersistentSet
in ClojureScript?
@dnolen: ok so with Clojurescript the Persistent bit is just generally omitted?
I don’t remember if http://cljs.info documents these ...
It does
but they don’t refer to their IPersistent*
equivalents as they usually do I think
IPersistentCollection has cons
, empty
& equiv
while ICollection only has -conj
— wheres the rest defined?
@martinklepsch: there is no correspondence like this
That’s what I’m just noticing ^^
(deftype PersistentHashSet [meta hash-map ^:mutable __hash]
— what’s the role of hash here?
@martinklepsch: holds the hash code
@martinklepsch: do you know why the cljsjs react externs contains React.ReactComponent
when the es6 class is called React.Component
?
@thheller: I wouldn’t be surprised if there is stuff from previous versions that didn’t get removed properly. PR welcome if you think that’s the case
I was wondering why om contains https://github.com/omcljs/om/blob/master/src/main/om/externs.js
Oh do the externs not contain React.Component?
I thought you were asking why they contain both.
Then that’s probably a bug
@martinklepsch: I don't know boot, what do I need to run to get a local version of that cljsjs package?
@thheller: boot package build-jar
will install the cljsjs jar into your local repo
@thheller: make sure you have the latest executable. Maybe do export BOOT_VERSION “2.4.2”
@martinklepsch: new version worked, had 2.2.0 from brew
@thheller: 2.4.2 is also in brew btw
@thheller: do the react sources contain a definition for React.ReactComponent? This sounds like something that should be documented in some changelog?
Hi guys! Does anyone know syntax for putting a function in between text in html, hiccup? Example: [:h5 "We've sent a verification email over to you at " { #(get-user) } "."]. Thanks!
@bojanx100: there’s no syntax for that but you can use (str “Hello “ name “!”)
@martinklepsch: Yes, this did the trick: [:h5 (str "We've sent a verification email over to you at " (get-user-and-count) ".")], Thanks!
In clojure there’s also format
which can help with similar things.
@martinklepsch: I actually prefer it that way like String.format(). Thanks for pointing that out!
I believe this should work according to: http://dev.clojure.org/jira/browse/CLJS-98
first time I made a custom cljs type, would be thankful for code-review/feedback https://github.com/martinklepsch/custom-comparator-set/blob/master/src/org/martinklepsch/cc_set/impl.cljs
@martinklepsch: you probably want to implement IFn
and IPrintWithWriter
also somebody should port https://github.com/ztellman/collection-check to ClojureScript
haha, I was thinking that collection-check would be nice and then discovered there is no cljs version
is IPrintWithWriter
analogous to extending print-method
?
@martinklepsch: yep like print-method
(hash-combine (hash comparator) (hash (seq coll)))
— does this look right?
@martinklepsch: hashing the comparator doesn’t make sense to me
unless you think people will be combining your collection with similar collections together in sets and hash maps
probably that won’t be the case. are there any downsides hashing it though? it seems appropriate to me.
if two people provide the same logical function (but different implement), their collections will hash different
I see, that makes sense. Thanks David
ClojureScript documentation about all this Interface/Protocol/Type related stuff is sooooo much better than Clojure’s, 👏 👏 @shaunlebron
@martinklepsch: link to those docs?
https://github.com/cljsinfo/cljs-api-docs/blob/catalog/refs/library/cljs.core.md this basically @tmtwd
I use it via Dash.app which lets me easily sift out protocols only etc
➜ zoom-recordings git:(play-back-url) ✗ lein figwheel
Figwheel: Starting server at
Focusing on build ids: build_needs_id_7801
Compiling "target/classes/public/js/app.js" from ["src/zoom_recordings/ui"]...
Compiling "target/classes/public/js/app.js" failed.
java.lang.AbstractMethodError: Method clojurescript_build/core/CompilableSourcePaths._find_sources(Ljava/lang/Object;)Ljava/lang/Object; is abstract
at clojurescript_build.core.CompilableSourcePaths._find_sources (core.clj:-1)
clojure.lang.ExceptionInfo: No such namespace: cljsjs.react, could not locate cljsjs/react.cljs, cljsjs/react.cljc, or Closure namespace "cljsjs.react" {:tag :cljs/analysis-error}
@roberto I assume you also updated fighweel/cljsbuild?
hmmm, I guess I’ll try that. But I can foresee it causing some pain in other projects when ppl upgrade.
@roberto: I had the same problem, upgrading to lein-figwheel "0.5.0-SNAPSHOT"
and lein-cljsbuild "1.1.1-SNAPSHOT"
fixed it
The release notes mention that latest versions of these tools are required
before i upgraded to idea 15, cursive added 'splice sexp' and other structural editing tools to the cmd-shift-a menu. i can't find them anymore, have they moved elsewhere? i updated to the v15 repo and cursive otherwise works fine
@sander: No, they shouldn’t have moved. Can you see them under Edit->Structural Editing?
In the meantime, if you don’t want to bind them all to keys, you could try a quick list (Settings->Appearance & Behaviour->Quick lists). You can create one with the structural actions in it and bind a single key to it.
@cfleming: done: https://github.com/cursiveclojure/cursive/issues/1144 ! thanks will try, still can't decide upon nice keys for the splice and join commands which i tend to use a lot