This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-29
Channels
- # architecture (14)
- # beginners (184)
- # boot (25)
- # cider (23)
- # clara (9)
- # cljsjs (13)
- # cljsrn (5)
- # clojure (140)
- # clojure-austria (1)
- # clojure-dev (24)
- # clojure-greece (15)
- # clojure-italy (7)
- # clojure-nl (1)
- # clojure-norway (1)
- # clojure-sanfrancisco (10)
- # clojure-spec (39)
- # clojure-uk (28)
- # clojured (1)
- # clojurescript (26)
- # core-async (3)
- # cursive (13)
- # datomic (44)
- # docs (3)
- # emacs (31)
- # events (2)
- # figwheel (4)
- # fulcro (6)
- # graphql (2)
- # hoplon (5)
- # jobs (11)
- # juxt (4)
- # keechma (19)
- # leiningen (1)
- # off-topic (8)
- # om (8)
- # onyx (18)
- # parinfer (2)
- # re-frame (18)
- # reagent (24)
- # ring (4)
- # rum (2)
- # shadow-cljs (26)
- # sql (15)
- # timbre (6)
- # vim (2)
i see that omcljs/om has react 16 support but there hasn't been a release since May. is there something preventing a beta-2 release? (current release is 1.0.0-beta1
this is probably aksed frequently, but, can I make cross-platform native apps wrapping my cljs project in a thing?
where thing is docker or electron or whatever? (recommendations welcome!)
You might want to look into react-native, there's cljs libs for that.
Is there any wrapper for http://Socket.io client in clojurescript? If not, how can i make a wrapper for a npm package?
I’ve never used it before, but that’s the first one I’d try
Ohh wait are you asking about this one? - https://github.com/socketio/socket.io-client
wait socket-io and http://socket.io are not the same?
@U7V9HE682, if you haven't already seen it, you might want to check out the sente library. https://github.com/ptaoussanis/sente
I believe socket-io is just the cljsjs package for http://socket.io
If I do this on js:
var socket = require('socket.io-client')('');
socket.on('connect', function(){});
socket.on('event', function(data){});
socket.on('disconnect', function(){});
How would I do it on cljs?(let [socket (js/io.connect "`)]
(do (.on socket "connect" #())
(.on socket "event" #())))
??I found this - https://github.com/bodil/clojurescript-all-the-way-down/blob/master/src/server/server.cljs#L54
A bit old
do inside let is redundant btw
Haven’t been able to find a cljs wrapper for the socket.io-client JavaScript library, but there is a clj wrapper for the Java library - https://github.com/ejschoen/clj-socketio-client
Yeah I thought you might 😕 At any rate, the cljsjs wrapper for http://socket.io might be helpful in writing your own wrapper for socket.io-client
but you can use doto there (doto socket (.on "connect" #()) (.on "event" #()))
Is it conventional to put dependencies in the :provided
profile so they’re available at compile-time but are not packaged into the Uberjar?
Anyone have a good idea about why trying to resolve a multi-method would work in my cljs repl but not in a .cljc
file? Specifically, (methods @(resolve (quote sym)))
works in my repl, but throws the following error - Uncaught Error: No protocol method IMultiFn.-methods defined for type cljs.core/Symbol:
- when called in a cljc
file that doesn’t explicitly :require
the namespace that the multi-method lives in.
Just to be clear, I have a cljs
file that’s calling a function in a cljc
file that’s trying to resolve a multi-method defined in another cljc
file, but both cljc
files are (:require)
’d in the cljs
file
Why would you want to put temporary files used during compilation into the resources dir, as shown in the compiler options page? https://clojurescript.org/reference/compiler-options#output-dir Wouldn’t this include them in the Uberjar, which is unnecessary?