This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # admin-announcements (183)
- # aws (30)
- # beginners (22)
- # boot (301)
- # cider (19)
- # cljs-dev (3)
- # cljsrn (23)
- # clojars (15)
- # clojure (136)
- # clojure-italy (8)
- # clojure-nl (4)
- # clojure-russia (19)
- # clojured (10)
- # clojurescript (134)
- # component (48)
- # cursive (7)
- # datavis (4)
- # datomic (50)
- # devcards (6)
- # events (9)
- # jobs (1)
- # ldnclj (10)
- # lein-figwheel (19)
- # leiningen (1)
- # luminus (16)
- # off-topic (5)
- # om (151)
- # proton (60)
- # re-frame (10)
- # reagent (25)
- # remote-jobs (1)
- # slack-help (3)
- # spacemacs (1)
- # vim (1)
@crocket not sure I understand your request, what feature are you specifically looking for?
I don't think there are any clojurescript libraries that try to reinvent the wheel here
if you're looking for something that's not written in react but jquery there's Hoplon
not too sure, but I think there isn't plans to support it until everything about ES6 is finalized
ES6 was finalized. http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf
I'm not sure on whether imported ES6 modules need to be specified in
:externs option of google closure.
does anyone know when clojurescript started setting the “name” property on functions? or has it done that since early releases?
What’s the current best practice to work with assets in context of a clojurescript app? I want to use SASS stylesheets instead of bare CSS
Which one between Reagent and Om is better? Or, is there a better alternative to both?
@crocket: better is subjective, but i suggest you start with reagent before you try Om, not just because it's easier to get started with, but that Om Next is coming out soon, and now's not a good time to dive into it as an inexperienced clojurescript developer
@jethroksy: I’m also concerned about deployment. is it possible to get everything (clojure backend app, clojurescript app with assets and fingerprinting) into one big uberjar? is it desirable to?
the easy way imo is to run your ring server (if ring) on some port like 8080 and use nginx to expose it
the only boot apps i've seen running servers use boot-s3 to push their app up to s3 lol
so deployment should be independent of the tooling, unless you're using the tool to push the app up to your server
I’m quite accustomed to Rails way of things (much experience in that), but CLJS workflow is much different
also regarding the s3 point, i think they may all have been static sites in retrospect...
I’ve used ansible to automate the deployment. I wonder if there is any native clojure tooling for such tasks
if you self manage the server i'm sure you can use boot to write the deployment process
@crocket: Well, my recomendation stays the same - use webpack/browserify/whatever to compile the modules out. Also transpiling ES6 -> ES5 in general is a good idea; though since you're probably talking about node where you can be sure of the support this may be less important. Not sure how interoperable Clojurescript is with ES6. GClosure has a language in and out options for ES6 and ES6 strict which Clojurescript exposes, but I didn't have any need to test ES6 as out (as opposed to in, since React uses it). I guess you could use
:module-type :es6, but that again requires you to have control of the code you are including since you can reliably use only relative paths as it stands. And either way - yes, you still need to write externs for the foreign library or
goog.object.get everything if you plan on using advanced compilation for your Clojurescript code.
As for the other question - IMO reagent is better than om.prev. Reagent is simple. Om.prev is unnecessarily complex and verbose. Between reagent and om.next it all depends on your requirements. Om.next is a forward-looking library that aims to solve problems you will have in a rich SPA (or on mobile), but it's not as simple to grok as reagent due to that. Rum also seems like a nice alternative to reagent, it's main feature being able to use mixins fairly effortlessly. As for reactless libraries - there's Holpon and freactive I can recall off the top of my head, both of which reactive but do not use React.
@jethroksy: I'm gonna suggest using https://github.com/jgdavey/boot-middleman instead. It basically lets you use full power of Middleman 3.x to create your assets, which is really convenient and gives you some semblance of Rails' asset pipeline.
@jaen: that's great too, if you're not too concerned with being dependent on ruby ^^
But guys like designers or something can run the middleman project with MRI if they so prefer.
be9: i was wondering that too, and this just popped up in my feed: https://adambard.com/blog/deploying-a-clojure-project-with-pallet/
@jaen it seems that rails asset pipeline has been thrown away from middleman: https://middlemanapp.com/advanced/asset_pipeline/, https://middlemanapp.com/advanced/external-pipeline/ I wonder if it’s easier to directly call gulp & friends instead of middleman
Although https://github.com/clojure/clojurescript/wiki/Compiler-Options#foreign-libs says it supports ES6, I haven't tested it.
deps.cljs in classpath automatically assimilated to
:compiler option by clojurescript compiler?
https://github.com/clojure/clojurescript/wiki/Packaging-Foreign-Dependencies seems to explain what
-main passed nothing on
:advanced optimization and command line arguments on other optimizations?
@crocket: Externs aren’t usually necessary on Node because minification isn’t usually necessary.
another options is (condp (= (type n)) …. each case will be the type. Another option is using multimethods and dispatching on type
primary advantage of multimethods is making it open to extension of new types while cond and friends makes it closed. (depends on what you’d rather have). If you are checking the same thing over and over in your cond (such as the type and comparing for equality) condp is a nice bit of sugar
We're happy to announce that Clojure/west 2016 will be held in Seattle, Apr 15-16th - please see http://clojurewest.org for more info.
satisfies? is not dynamic at all for perf reasons, you cannot use it higher like that
@edbond: ^ Stuart Sierra has a lot of good blog posts. That one helped me appreciate lazy side effect issues.
i’ve mostly switched to transducers from lazy seqs personally, except for infinite computations as sierra describes
still don’t really grok how to write one, but i can use the built-in map, cat, filter, etc. well enough 😃
@spieden: Then you might like this:
(defn produce "Returns a lazy sequence of colls from a recursive, axiomatic, transformative process." [seed prep-f get-xf] (letfn [(process [coll] (lazy-seq (when (seq coll) (let [new-coll (into (empty coll) (get-xf coll) (prep-f coll))] (cons new-coll (process new-coll))))))] (process seed)))
Also some L-System and CA examples here: https://github.com/decomplect/ion/tree/master/examples/ion/ergo
accessing name host in externs has no effect. Perhaps you forgot to add a var keyword?
@thomas sounds like a syntax error in your externs file - it’s even giving you a suggestion
hi @dnolen but what do I add? that I am not sure about (please forgive as I know very little about JS)
how externs work is pretty well documented, there’s nothing special or specific to ClojureScript
:simple optimization simplifies npm deployment.