This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-15
Channels
- # admin-announcements (130)
- # alternate-reality (2)
- # aws (20)
- # beginners (49)
- # boot (1)
- # braid-chat (18)
- # cljsrn (54)
- # clojars (1)
- # clojure (70)
- # clojure-art (1)
- # clojure-japan (21)
- # clojure-miami (2)
- # clojure-my (7)
- # clojure-russia (60)
- # clojurescript (75)
- # community-development (12)
- # core-matrix (7)
- # cursive (23)
- # datomic (31)
- # dirac (2)
- # dunaj (3)
- # dysphemism (5)
- # editors-rus (1)
- # emacs (22)
- # events (9)
- # funcool (56)
- # hoplon (63)
- # human (1)
- # jobs (9)
- # ldnclj (7)
- # lein-figwheel (21)
- # leiningen (1)
- # off-topic (2)
- # om (61)
- # onyx (20)
- # other-lisps (2)
- # portland-or (1)
- # proton (26)
- # re-frame (27)
- # reagent (16)
- # ring-swagger (30)
- # spacemacs (6)
- # yada (5)
hi all, i’d like to do a quick straw poll on a question of style - i'm parsing a javascript message object e that contains a json serialization of an object of interest… are there any strong opinions on whether either of the following two forms are better/more idiomatic/more readable? (let [name (.-name (JSON.parse (.-message e)))] …) or (let [name (.. (-> (.. e -message) JSON.parse) -name)] …) I think i’m leading towards the second but the mixed use of .. and -> seems a little clunky - perhaps there's another way...
@j1mr10rd4n: I personally would be inclied towards using aget
- IE (let [name (aget (aget e “message") “name”)] …)
@clumsyjedi: thanks for the input! that refactor made the line look as follows: (let [name (-> e (aget "message") JSON.parse (aget "name"))] …) which seems much better!
yep, I like tht too
I have a library https://github.com/electric-it/clj-tosca .. which is just basically manipulating a data structure to describe a TOSCA document (standard for cloud instance) .. is it going to be easy to use in clojurescript?
but these last 2 weeks I've been back in clojurescript world, this time with re-frame
@clojuregeek Those files are clojure files (.clj). They would have to be .cljc (or .cljx but that's an old standard) to be compatible in both Clojure and ClojureScript.
re-frame is awesome! Though I myself stick with "plain old" (read: awesome new) Reagent plus reactive DataScript via Posh.
Nearly all of that clj-tosca looks like it would compile as ClojureScript—the only bits that would need porting are the uses of clojure.data.json
and clj-yaml.core
Hey! Has anyone here used Figwheel with a mobile WebView? I'm not looking to go the React Native route for reasons of UI consistency.
As far as GitHub repos go, there's mobile + React Native + Figwheel, and mobile + ClojureScript REPL, but no mobile + WebView + Figwheel out there so far as I can see.
@clumsyjedi, @j1mr10rd4n: FYI while aget
works it's entirely by coincidence (read: Javascript's weak typing), it's meant to be used with arrays only; idiomatically you should be using https://closure-library.googlecode.com/git-history/docs/namespace_goog_object.html#goog.object.get and yes, I hate that it's not referred in by default as well.
@samueldev: well, I'm not sure about "still" in that question - it seems to me re-frame has had been around longer than om.next being officially publicly available, so it couldn't have been more popular than re-frame always. And IMO I wouldn't call it popular now either - it's new, shiny, interesting, solves hard problems re-frame doesn't, but I'm not sure if those are the problems most of the community is having - I would rather say reagent and re-frame are still more popular than om.next because they are simpler and om.next advantages don't yet become apparent in a simple, CRUDy application.
@clojuregeek: well, it's your library so how easy it is going to be to use from Clojurescript depends entirely on you. But like mfikes said the library seems to be fairly host-agnostic except the part where you serialise to json and yaml. Serialising to JSON with Clojurescript should be easy, something like (comp #(. js/JSON stringify %) clj->js)
should do the trick. It's probably going to be a bit hard with the yaml format, but it seems there's that lib that could help you - https://clojars.org/cljsjs/js-yaml
thanks @jaen !
@samueldev: If you’re counting votes, I prefer re-frame. I think Om.Next has more mindshare though.
@edbond: use :output-dir compiler option and inspect compiled code in this directory
@delaguardo: that’s not as informative as it would seem because of dead code elimination.
right, but it may give a hint
@edbond: if you’re interested in minimizing initial payload then Allen Rohner’s talk from the last conj is informative, esp. the first 10-15 minutes https://www.youtube.com/watch?v=fICC26GGBpg
@cjmurphy: thanks!! I thought that might be the case.
@dnolen, @delaguardo Thanks!
does anyone here know if quiescent (https://github.com/levand/quiescent) has a slack or IRC channel somewhere?
not to my knowledge but you can pm @luke
Does anybody have https client functionality working in clojurescript? What libraries?
@billharten: Hey Bill cljs-ajax might be what you’re looking for https://github.com/JulianBirch/cljs-ajax
On http://clojure.org is you scroll down a little you have a list of very general Features
I think they are the same except s/jvm/js
I guess they vary a bit re concurrency and macros
This pages collects the differences that ClojureScript has from Clojure: https://github.com/clojure/clojurescript/wiki/Differences-from-Clojure
@alexmiller: I brought it up because I was talking to my boss about cljs
I quickly realized that there is not a quick way for non-devs to read about the virtues of clojurescript
@kamn: What does your boss need to see to get cljs going?
And what size business/project is there a potential for? We might be able to come up with some good examples that will help
It was just some water cooler chat and I mentioned how much I liked it and specifically tooling
I guess what I am looking for is something to show technical, non-clojure people why CLJS is a great choice without them having to understand the benefits of Clojure first
Yeah the tooling is pretty fantastic now. I've found a couple areas that have really impressed our non-dev managers so far - main things have been excel-templates for reporting and figwheel to change things during spec meetings
and I realize that might not be possible since the high similarities between the languages
I'm thinking about putting in a proposal for the next Clojure/West on adoption and successes of Clojure in our small-ish (100-150 person) business with only one dev - would that be interesting or useful to you? Even if it doesn't work out as a full talk I'll have a bunch of info and thoughts I can send to you if you want.
Ok cool! Hopefully I'll be able to get a whole good talk out of it, but if not I'll send you what I can get together.
Oh awesome - really hoping I can make it there even if I don't give a talk. I went to last year's Conj and it was awesome.
Just realized I used awesome twice in the same message, friday afternoon brain is apparently kicking in.