This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-24
Channels
- # aatree (27)
- # admin-announcements (5)
- # all-the-channels (2)
- # aws (27)
- # beginners (38)
- # boot (48)
- # braid-chat (18)
- # cider (6)
- # cljs-dev (9)
- # cljsrn (8)
- # clojars (4)
- # clojure (73)
- # clojure-dev (2)
- # clojure-russia (2)
- # clojure-sg (1)
- # clojurescript (96)
- # code-reviews (3)
- # community-development (4)
- # conf-proposals (17)
- # core-matrix (2)
- # cursive (2)
- # datascript (4)
- # datomic (4)
- # dirac (1)
- # funcool (5)
- # hoplon (2)
- # mount (66)
- # off-topic (35)
- # om (211)
- # parinfer (2)
- # pedestal (2)
- # proton (1)
- # reagent (2)
Is clojurescript with Node something viable that people are doing in production? I'm really liking the idea, but don't yet know enough. I do know I'd feel more comfortable, given I've put node in production but I've never put a JVM app in prod.
finding myself far more interested in clojurescript than I would be clojure itself oddly.
@gerred: people do target ClojureScript + Node.js, usually AWS Lambda or for simple scripting
well having done my fair share of Ruby there’s nothing and more or less scary about the JVM
@gerred: I have experienced with go and ruby, the only downside of JVM is its startup time. But with Clojure you can enjoy its repl without restarting JVM, and once JVM run, it's blazing fast
a new bie question. i want to do some js work, and trying to figure out clojurescript. but there seems to be too much things. i see reagent, om, clojurescript and its plugins
i' ve done some clojure small project, and only a little on js. can some one give me a clue where should i start?
cljsbuild is still the most popular plugin so there’s a lot of knowledgeable people if you have questions about it
Om is more of a UI distributed state framework - unless that seems useful to you - you might find Reagent easier going
@jarodzz: https://github.com/magomimmo/modern-cljs/tree/master/doc/second-edition is a pretty cool introduction on how to set up a Clojurescript project; uses boot instead of leiningen though.
You can learn React.js first, but that's not required, really. You will be able to pick up enough knowledge from using the wrapper, I think.
@dnolen. got it. i think i am a litle bit rush to just paint some chart using clojurescript, and got overwhelming by the info. thanks. i'll start by cljs, cljsbuild, then some others.
@nxqd yeah, that makes sense. I've been also jumping into Elixir land, but it's "too much", and ended up on Clojure as a general purpose language for when I'm not using Ruby.
@gerred: if you are application developer, you will be totally happy with original JVM. Optimization and such is for hardcore case, since it will be done and once you have to touch it, there are plenty of mature tools available on JVM land.
by the way, i have seen your youtube video on core.async, never thought i'd talk to you in person. thx again
@nxqd Go, while simple, felt a little too anti-intellectual to me. Hostile to any abstraction, much less good ones.
@gerred: would ask in what way you think Elixir is too much, but I guess you're right about not polluting the channel.
I have a question about JSON parsing: a certain REST api returns:
(console.log gives me: ) #js [#js {:id 1 :foo "bar"} #js {:id 2 :foo "baz"}]
What's the most efficient way to convert this to clojurescript vectors with maps inside?
k, thx!
I noticed js->clj
gives me Strings as keys instead of keywords, any workaround?
And example of how I used this is here - https://github.com/jaen/panda-5/blob/master/src/panda_5/api/coercion.clj - there's also a similar lib out there, let me find it.
This specifically - https://clojure.github.io/clojure/clojure.walk-api.html#clojure.walk/keywordize-keys
And that's the library I mentioned - https://github.com/gfredericks/schema-bijections - didn't use it though, so I'm not sure how it compares to using coercions directly.
Ok, I'll take a look at it.
currently Jsonp from the Google closure library
Ah, so you have to do it all by hand, yeah. So I guess you can start out with js->clj
and clojure.walk/keywordize-keys
and then look into schema coercions when you will want to have more complex data types converted, like dates or something.
do you have experience with a library like Transit
?
should I use it in this scenario?
Hmm, that's a good question. Transit makes most sense if the backend you talk to also speaks transit.
If I recall correctly, transit is still faster at parsing JSON than js->clj
plus some transformation would be
But it depends entirely how complex is the JSON coercion you wan to do - if you want to convert for example dates after you parse the JSON, then you will not gain much by using transit instead of JSON.parse
, js->clj
and then schema coercion, I think.
hello everyone, is it possible to inject raw html into a reagent component? like with the :dangerouslySetInnerHTML key in sablono
@iwankaramazow: here's the link - http://swannodette.github.io/2014/07/23/a-closer-look-at-transit/
Though probably the best idea is to benchmark how each approach behaves in your use-case to be sure.
@jaen: Thanks, I'll evaluate all options
@pbaille: Does it help you? https://github.com/reagent-project/reagent/issues/104
@glenjamin: right that’s how we avoid name clashes
hi folks, I’m trying to add a map to a nested map structure (map ( vector (map map… ))) but having some issues figuring it out. It seems to work at the repl but not when I make it into functions. Could someone take a look at this paste and tell me what I’m doing wrong please?
@alex-eberts: seems you want update-in
+ merge
or you want assoc-in
@dnolen: thanks for the feedback! Is there a reason update-in
+ conj
should work at the repl but not as a function?
@alex-eberts: that statement sounds unlikely
I know! that’s why it’s confusing
I’ll try update-in
+ merge
and / or assoc-in
appreciate the help
just an update. In an attempt to isolate the difficulties I was having on Friday with d3 and ClojureScript, I started a fresh Figwheel project with the cljsjs d3 package and pasted the code in. It worked just fine. This suggests to me that an interaction at a higher level (library?) is causing (call x-axis)
to fail as I described.
Is there a way to start figwheel without landing at it’s repl? Up until now I’ve been starting figwheel from a separate shell in order to preserve the cider repl, but I’d like a single command to run everything from Cider
you might also want to look into launching figwheel from your cider repl https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl
Running thru the quickstart. Is there any reason the browser repl wouldn't work over the internet (as opposed to via localhost)?
I'm attempting to start the repl on an ec2 instance. I'm at the point where my browser is successfully fetching every resource except this one (according to chrome dev console) :
http://<ip address>:8080/repl?xpc=<...omitted...>robots.txt%22%7D
console points to crosspagechannel.js:486
Meanwhile the repl just hangs with the message Waiting for browser to connect ...
This is Java 8, cljs 1.7.228. I'm using a nonstandard port (8080) for the repl.