This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-23
Channels
- # admin-announcements (2)
- # arachne (2)
- # beginners (76)
- # boot (241)
- # cider (14)
- # cljsrn (2)
- # clojars (3)
- # clojure (94)
- # clojure-android (12)
- # clojure-dev (33)
- # clojure-gamedev (1)
- # clojure-greece (3)
- # clojure-india (1)
- # clojure-nl (2)
- # clojure-quebec (3)
- # clojure-russia (21)
- # clojure-spec (38)
- # clojure-uk (72)
- # clojurescript (62)
- # cursive (20)
- # datascript (3)
- # datomic (14)
- # devcards (1)
- # dirac (14)
- # emacs (11)
- # hoplon (7)
- # jobs (2)
- # keechma (1)
- # lein-figwheel (9)
- # leiningen (9)
- # luminus (1)
- # off-topic (6)
- # om (13)
- # onyx (30)
- # planck (181)
- # proton (3)
- # re-frame (6)
- # reagent (6)
- # specter (108)
- # spirituality-ethics (7)
- # untangled (3)
i have a question about js->clj
and namespaced keywords:
I try to use clojure.spec in my clojurescript app where i namespace all keywords that are map keys.
{:url "
.
Most of my data i use in my app will be received as js-object, so i need to js->clj
a lot.
Now i need to namespace all those map keys. Is the only solution to write my own js->clj
or do i miss something here? - maybe it is stupid to namespace all my map-keys?
(js->clj jsobj :keywordize-keys true)
is not namespaceing the keys.
i changed the js->clj to use a second param :ns
. And i used a faster implementation by Darrick Wiebe.
https://gist.github.com/ThomasDeutsch/667dc44cb301e646de76d92f54f921d1.
Has anybody used cljsjs/react-bootstrap "0.29.5-0" i.e react bootstrap components in reagent?
@rnandan273: I used react-bootstrap before
what is the context? Like from a deployed production ClojureScript web app or Node.js?
Yeah, that is what I'm talking about, I created a simple map in cljs and used an ^:export to create a function that lets me pull it in in js using the namespace from cljs
@tomjkidd: so you will need to export cljs.core.deref
and anything else you might need
And its with a browser, debugging with chrome, I can see the object, its just hidden in obj.state.arr and I don't know how to access it with it's keys
@tomjkidd: goog.exportSymbol
is what you want to use since you cannot go and add ^:export
to things already defined
Garden CSS question: what is the syntax to generate this translate3d(0,0,0)
?
can't you just :transform "translate3d(0,0,0)"
i.e put it in a string
seems to work fine for me
sure but I gave a simplified version
actually I want to use some vars and doing str
is tiresome
I looked into Garden's unit tests https://github.com/noprompt/garden/blob/master/test/garden/def_test.clj
defcssfn
is what I need
@myguidingstar: yep that's the one.
thanks for the fun you bring to CSS 🙂
@myguidingstar: it makes me happy to know people are still finding utility in the library. 🙂 i can't apologize enough for not doing a better job maintaining it. 😕
@noprompt: I find the library fantastic. Been using it for almost a year now 🙂
@noprompt: while you are here...what is the best way to add "!important" flags when using color objects?
@sbmitchell: well you wouldn't add it to the color. it'd be in the declaration e.g. [<color> :important]
can :blue be replaced with rgb definitions?
oh awesome
ok I have been doing that wrong this whole time
I was doing some nasty stuff around that...`{:color (str (as-hex v/light-gray) " !important")}` where v/light-gray is a rgb definition in a variables ns
my recommendation is to use the vector notation for declaration values all the time. in fact, i wish i would have made that the design from the start.
it's much easier to write functions, update declarations, etc. with the vector notation. imho.
what's a good way to figure out which project i'm in?
@brian_mingus: can you clarify the question? what is this in relation to?
i have a shared library and i'd like to make some code conditional depending on who is using it
the code is in namespace foo. if i could access the namespace that required the code, that would be one method
another is to check for the general existence of a library in globals
@brian_mingus: ah you’re talking about detecting namespaces not projects it seems? it’s still not clear to me
Is it possible to use the CLJS compiler to analyse a namespace without fully compiling it? Specifically, I’m interested in introspecting information about vars in a namespace.
@dnolen: Awesome, thanks. Should that pretty much just require the classpath to be set correctly?
@cfleming: we don’t store a ton of information beyond what Clojure does would be interested to hear if something is missing for tooling that we could put behind a flag
Ok, thanks - I’ll let you know. This is for generating stubs that can be indexed for libs that generate a lot of vars dynamically.