This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aws-lambda (1)
- # beginners (28)
- # boot (54)
- # cider (11)
- # clara (28)
- # cljs-dev (74)
- # cljsrn (13)
- # clojure (342)
- # clojure-austin (3)
- # clojure-dusseldorf (4)
- # clojure-france (2)
- # clojure-greece (11)
- # clojure-italy (42)
- # clojure-poland (7)
- # clojure-russia (11)
- # clojure-spec (44)
- # clojure-uk (156)
- # clojure-ukraine (4)
- # clojurescript (102)
- # cursive (17)
- # datascript (19)
- # datomic (17)
- # dirac (39)
- # emacs (22)
- # funcool (56)
- # hoplon (25)
- # jobs (3)
- # jobs-discuss (31)
- # leiningen (2)
- # luminus (4)
- # lumo (3)
- # off-topic (47)
- # om (51)
- # onyx (57)
- # re-frame (13)
- # reagent (57)
- # remote-jobs (15)
- # ring (9)
- # ring-swagger (7)
- # robots (2)
- # rum (6)
- # specter (16)
- # sql (7)
- # test-check (37)
- # untangled (7)
- # yada (5)
hello guys, am getting this assertion error when in try to compile my cljs (Assert failed: Circular dependency detected, re-frame.interop -> reagent.ratom -> reagent.impl.util -> cljsjs.react -> cljsjs.react) , i tried to exclude reagent/ratom from the reframe dependency but i still got the same error
hrm, I think
cljs.core/coll? will tell you if you have a ClojureScript data structure
@tech_hutch for ClojureScript object detection try to look here: https://github.com/binaryage/cljs-devtools/blob/master/src/lib/devtools/formatters/helpers.cljs#L55
@tech_hutch CLJS does many things to ensure sane scope semantics, that means it will sometimes introduce new scopes and re-bind variables (especially in loops). generally you should probably try to avoid eval
thheller: "CLJS does many things to ensure sane scope semantics" so variables introduced with, e.g.,
let cannot be accessed from an eval string? And I normally wouldn't use eval (in this language or others), but I have a use.
:advanced that will be something else entirely, so stay away from
eval as best you can 😉
anyone know of a lib that simply provides all math functions as cljc ? e.g.
#?(:clj (Math/round x) :cljs (js/Math.round x)) etc
:target :nodejs only right now?
@kommen that said, really the JS module stuff is about the browser - under Node.js you don’t need advanced compilation
seems dangerous to use eval for anything that might see user input but as far as eval is concerned it should work
Is there metadata you can apply to a function definition that prevents it from being dead code eliminated?
@dnolen ok thank you. I just thought I read something that it works for nodejs target only for now, but couldn’t find and and also couldn’t make it work with boot
Hello all. Question about setting up a pipeline with core.async. I have code that takes on the following shape:
oh. it seems to work. I thought only the <! and >! needed to be wrapped in a go block
in clojurescript nothing in core.async works outside a go macro. (please correct me if Im wrong)
I was just trying the
keyword-map macro from https://github.com/plumatic/plumbing/blob/master/src/plumbing/map.cljx#L104 in the repl at http://clojurescript.net, but it always seems to return an empty map. Does anyone know why?
How can we build better "first contact" experiences for new programmers and Clojurians? Our open source learning group is hosting the free online webinar Essential Klipse this Saturday at 7 pm UTC to address that question. Everyone is welcome! http://discuss.thevalueoflearning.org/t/webinar-discussion-2-essential-klipse/39?u=jay
@tech_hutch I don't think you can use #js but you can wrap the map with
JSValue to get a js literal
Do I have to do something different to include
goog.labs namespaces compared to other
@jr: I must be doing something wrong then -
:require [goog.labs.userAgent.util] should work, right?
cljs.user=> (require '[goog.labs.userAgent.util :as util]) nil cljs.user=> (util/getNativeUserAgentString_) "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
@shaun-mahood FWIW, in Lumo:
Lumo 1.1.0 ClojureScript 1.9.456 Docs: (doc function-name-here) Exit: Control+D or :cljs/quit or exit cljs.user=> (require '[goog.labs.userAgent.util :as util]) nil cljs.user=> (util/getUserAgent) ""
I'm trying to get openlayers to compile with Clojure, day 3 of learning what I don't know and figuring things out - error driven development 🙂
They have their own google compiler utility, so my hunch so far is that they're doing something "interesting" that I haven't figured out yet.
@shaun-mahood you might find the cljsjs package for openlayers enlightening https://github.com/cljsjs/packages/tree/master/openlayers
It's been a while since we used that. Not sure I can give comment on current status.
There's half a chance there's code in this old repo which might give you helpful clues
Oh that might totally help - a lot of the things I've been looking at are areas I haven't had to use much (I spend most of my CLJS time without needing to do any interop), so having another reference is awesome. Thanks!