This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-30
Channels
- # announcements (2)
- # avi (12)
- # aws (6)
- # beginners (49)
- # boot (140)
- # cider (2)
- # cljs-dev (5)
- # cljsrn (9)
- # clojure (149)
- # clojure-czech (6)
- # clojure-miami (1)
- # clojure-nl (2)
- # clojure-russia (19)
- # clojure-ukraine (1)
- # clojurescript (34)
- # conf-proposals (36)
- # core-async (2)
- # cursive (11)
- # emacs (2)
- # funcool (23)
- # hoplon (2)
- # incanter (4)
- # jobs (1)
- # ldnclj (19)
- # om (47)
- # onyx (5)
- # proton (12)
- # re-frame (20)
- # ring-swagger (17)
- # testing (1)
Sanity check: I want to do client-side routing with not just paths but subdomains. Is extending Secretary the best approach?
ie point http://alice.example.com and http://bob.example.com to the same s3 bucket with the same cljs SPA
Are cursors an om-specific concept or a general computer science thing? The only general reference I can find is to database cursors - is that the same thing?
I think it is a functional programming thing and that cursors and lenses (and zippers - I just googled) are all in the same area.
I wonder if it's possible for a macro to know if it compiles for clojure or for clojurescript? I want to write a macro which results in slightly different code for different environments.
Yup, I think this should help: https://clojure.org/guides/reader_conditionals
Still, couldn't you emit different code from the macro based on the reader conditional? I haven't used them tbh, I'm not sure as well
Clojurescript macros are run in Clojure (unless bootstrapped) so at best you could differentiate between JVM Clojurescript and bootstrapped Clojurescript that way.
Not 100% sure but I don't think there are any reader conditional variants to differentiate Clojurescript from Clojurescript macro execution.
@asolovyov: https://github.com/plumatic/schema/blob/master/src/clj/schema/macros.clj#L15-L19 :ns
in &env
can be used to differentiate cljs env from clj
Is that like an official feature or just happen to be that way and can change in the future?
Hmh, not official. Not sure if &env
is documented somewhere. Anyway, it's already used by lots of code so stuff will anyway break if it is changed.
Yeah, it feels more like a "trick" to me. It works, and it's not uncommon to come across it in CLJC libraries in the wild. I've had to use it in one of my projects too.
@juhoteperi: cool, thanks, will try that
how do I find analogues of cljs protocol in clojure? Like IPrintWithWriter
or IHash
, for example?
@asolovyov: you might be interested in this ticket
we've debated this a bit, particularly about whether this is even a thing that we should provide. still unresolved.
I am interested! It work with &env right now, of course, but official way would be really nice to have.
@asolovyov: FWIW, Nicolás Berger explores a common approach relying on &env
, specifically if-cljs
, near the bottom of this post http://blog.nberger.com.ar/blog/2015/09/18/more-portable-complex-macro-musing
@spinningarrow: they were inspired by the thinking behind zippers & lenses
Hi, anyone here using cljs with node? I'm not sure I understand the dev workflow. Do you use cljs compiler watching and rebuilding and nodemon to autorestart the server or just cljs node repl somehow?
@mateusz-fiolka: I suspect most people use just use the node REPL
@mateusz-fiolka: some time ago someone was wondering the exact same thing. They came up with a template - https://github.com/crocket/cljs-npm-template (here's a project using it - https://github.com/crocket/to-utf8-unix).