This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-23
Channels
- # aatree (72)
- # aws (12)
- # beginners (34)
- # boot (256)
- # braid-chat (12)
- # cider (20)
- # clara (8)
- # cljs-dev (1)
- # cljsjs (1)
- # cljsrn (38)
- # clojure (61)
- # clojure-dev (10)
- # clojure-ireland (1)
- # clojure-japan (1)
- # clojure-sg (2)
- # clojurescript (48)
- # community-development (3)
- # conf-proposals (3)
- # core-async (6)
- # cursive (8)
- # datomic (4)
- # emacs (9)
- # hoplon (1)
- # leiningen (1)
- # mount (9)
- # off-topic (4)
- # om (109)
- # parinfer (26)
- # perun (4)
- # proton (5)
- # reagent (14)
- # vim (3)
anyone know how I can have those !@#$-init.clj
files caused by lein fast trampoline placed in a temp folder?
does anyone have advice or references on synchronizing a mutable object hierarchy with an immutable one?
Anybody know how I can use JWT authentication from ClojureScript/Reagent? I can’t find any examples and I want to consume a RESTful API.
@sonelliot: there are a couple of data structure comparison libs — is that the kind of thing you’re looking for? Perhaps more specifics would help...
hi @sventechie, I've made a post on the google group with more details https://groups.google.com/forum/#!topic/clojurescript/mMAtPmEvITo
Re: my own question, looks like cljs-ajax
supports :with-credentials
for doing CORS and some auth, but it seems odd I find no search results of anyone using it thusly.
Does anyone know if there's a write-up of how protocols are implemented under the hood in CLJS?
This is strange. I'm trying to script figwheel and it seems like only one source-path works. E.g. I have :source-paths ["src/cljs" "env/dev/cljs"]
and ClojureScript compiler complains that my core app namespace is missing (only dev env code gets compiled). If I remove "env/dev/cljs", then my app does get compiled, but the dev env is missing.
Well, it turned out that judicious cleaning of all generated JavaScript files solved that particular problem…
Hi guys, I’m trying to convert this widget (http://codepen.io/thisoldbear/pen/YXoVgQ?editors=0010) to reagent/clojurescript, and I have a question about the getData fn at line 57. The cljs equivalent of the ajax call is something like
(GET ""
{:params {:q location :APPID api-key}
:handler handler
:error-handler error-handler})
, but the example returns the response as a var directly, and the cljs-ajax example shows how to print this to the console. How can I write the handler to get this as a cljs map to directly touch the data?@glenjamin: there isn’t, but it’s not that complicated
every protocol method produces a corresponding fn - this fn takes the first argument checks that it implements the protocol and invokes the instance’s implementation if it does
@dnolen: thanks, the bit I was interested in specifically is what that check looks up against: where do protocols live at runtime, and how are they identified
Is there some type of mapping somewhere? is lookup O(n) on the number of implementations? If not, how are implementations attached to complex types?
just a general pointer in the direction of the code would be awesome, I don't expect you to have to answer all that in detail :)
@glenjamin: like I said protocols fns just invoke the instance’s implementation
if you’re interested in how it works I would examine the defprotocol
deftype
defrecord
macros. they are doozies though - there’s a lot of fiddly performance related stuff in that code.
Hi! I'm trying to convert a nested hash-map (representing a tree) to hiccup. Should I use clojure.zip
or should I just write a top-down recursive transformation?
I my trees, in practice, will never have depth greater than 3, so I doubt top-down recursive walk will blow the stack.
Dumb question: how do you extract the value of a variable in a quoted expression?
cljs.user=> (def x "foo")
#'cljs.user/x
cljs.user=> '[x]
[x]
hey! happy cursive user here, but it’s running quite slow on my aged macbook air. What do you people use for ClojureScript development that has some of the same integration? (paredit, refac, completion in editor/figwheel repl etc)?
I’m thinking of trying out cider, but I’d really like something that didn’t require much setting up
@seantempesta: in clojure, you could do (eval ‘x)
So if cljs doesn’t have eval (unless it’s bootstrapped), then how am I supposed to pass a value to an om-next transact! statement?
(om/transact! this '[(zip-change {:zip-text x}) :zip])
@seantempesta: you don’t need eval for that
I tried that, but I’m getting (clojure.core/unquote x) as the value received by the mutate function
Yep, that was it!
I'm a bit stuck. I'm trying to get the Remove Sync Tutorial working, but I'm getting errors. Apparently I need the latest om version, 1.0.0-alpha29-SNAPSHOT, but that version is not in clojars. What's the easiest way to get the latest version? Do I need to git clone om repo and build it locally or am I missing something?
Clone it, then run lein install
@taylor.sando: Alright, I'll try that. @dnolen Oh, sorry, my bad!
@taylor.sando: Oh, that was easy! I got the latest version installed, thanks!