This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-24
Channels
- # admin-announcements (2)
- # beginners (46)
- # boot (8)
- # cider (29)
- # cljs-dev (45)
- # cljsjs (10)
- # cljsrn (13)
- # clojure (60)
- # clojure-dev (5)
- # clojure-greece (1)
- # clojure-ireland (4)
- # clojure-mexico (6)
- # clojure-poland (3)
- # clojure-quebec (3)
- # clojure-russia (8)
- # clojure-spec (89)
- # clojure-uk (70)
- # clojurescript (84)
- # cursive (4)
- # datomic (7)
- # devcards (1)
- # dirac (2)
- # emacs (11)
- # hispano (10)
- # jobs (13)
- # keechma (34)
- # lein-figwheel (4)
- # luminus (19)
- # off-topic (2)
- # om (78)
- # onyx (6)
- # parinfer (1)
- # planck (82)
- # proton (2)
- # re-frame (10)
- # reagent (23)
- # ring-swagger (5)
- # spacemacs (2)
- # specter (24)
- # spirituality-ethics (122)
- # untangled (13)
@urbanslug: is that a Reagent snippet?
but :on-invalid (js/setCustomValidity "Only lowercase characters and underscores allowed.”)
failed
that’s not going to work, also the question is better directed to the #C06DT2YSY channel
what i’m trying to say (and maybe this is intended behavior) is it doesnt seem like you can create a map with uuids… {(random-uuid) :foo (random-uuid) :bar (random-uuid) :baz}
will always be => {:# uuid 1234-… :baz}
in my head the expected output would be {#someuuid :foo #someuuid :bar #someuuid :baz}
in the first case invoking 3 random-uuids to generate 3 unique keys, and then assigning each key :foo, :bar, :baz respectively. it looks like the keys are “equal” and thus the map literal accepts just the last value of {#uuid :baz}
instead of all 3 key/value pairs?
@lwhorton: heh it would have been clearer if you had just said that 🙂 ok trying it over here
why would invoking it 3 times in a row in a map literal be different than 3 times in a row in a let block?
@bronsa while you’re here 🙂 I’m assuming the namespaced map literal reader support is coming soon?
@lwhorton: a clojure expression is evaluated (I'm handwaving a bit) via (eval (read-string "the-expression"))
@bronsa huh, it’s interesting that the reader doesn’t ignore seqs for map literal key checks
also the reader has no way of knowing "this map will be evaluated" vs "I actually want to read this as a structure"
it's not just checks, it's a problem inherent to the concept of a reader. because it has to produce a data structure, it can't behave any differently
unless you'd be ok with evaluating {(random-uuid) 1 (random-uuid) 2}
resulting in a 1-element map
I did open a ticket about this in the clojure jira with a workaround for this that didn't build actual maps but just associative lists that the compiler would compile down to maps at runtime
would mean that the reader behaves differently when invoked directly vs via compilation
A basic http question, Im trying to make transit-post via cljs-ajax, on the backend Im using wrap-cors to allow cross origin request. But that last info is kind-a meaningless since Im getting stopped by the frontend (cljs) that Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.
So in general, transit post can't be used cross origin?
@hlolli: that is unless you can show that the setting the Content-Type
header for some reason causes it to fail
ok, good point, I only posted half the story, sorry
(POST "0.0.0.0:8080"
{:params {:message "Hello World"
:user "Bob"}
:response-format :transit
:keywords? true})
I sent this, but GET worked fine.yes, :json keyword returned the same, so I will do this without this library. I do use commonly used function transit-post, that appears often in om.next, but I must admit, that I dont understand what magic the reconciler is doing in :send that I would like to do manualy outside om next. So I guess I just need to wrap this in a core.async channel?
(defn transit-post [url]
(fn [{:keys [remote]} cb]
(.send XhrIo url
(fn [e]
(this-as this
(cb (t/read (omt/reader) (.getResponseText this)))))
"POST" (t/write (omt/writer) remote)
#js {"Content-Type" "application/transit+json"})))
(dont want to waste too much time, need to read more on this I know)excacly, in the autocomplete example you wrote I guess, I remember doing json and defining a channel that handled the callback. Should be no different here. Ah, nevermind, I read more and ask if Im still having problems 🙂 thanks.
https://github.com/clojure/clojurescript/commit/23632baa35f86de8866dede624545bc0cdf4a2bb
^ means you can write clojure.{spec|pprint|test}
and they are aliases for cljs.{spec|pprint|test}
^My list of little quibbles with cljs keeps getting smaller and smaller these days. Thanks!
https://github.com/clojure/clojurescript/commit/783001a6786f8dca4a13fdeadc995716903b07f9
I'm not sure if this is a bug to log or expected behaviour... Building with a cljsjs package where cljs package includes :libs in deps.clj you find the out directory includes a "file:" directory. An example from my specific case: "out/file:/home/vagrant/.m2/repository/cljsjs/openlayers/3.3.0-0/openlayers-3.3.0-0.jar!/cljsjs/development/openlayers/ol/array.js" This makes the build fail on windows because ":" is not permitted in file names (based on experimentation). My feeling is that the path should have reduced to the last part, excluding the file: bit and the entire jar file path.
(@dnolen that is awesome!)
this means for core namespaces your ns form should look really clean now between Clojure & ClojureScript
That is seriously exciting stuff. Thanks as always for your efforts.