This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # admin-announcements (42)
- # clara (8)
- # cljs-dev (2)
- # clojure (132)
- # clojure-argentina (4)
- # clojure-berlin (3)
- # clojure-brasil (3)
- # clojure-dev (8)
- # clojure-france (2)
- # clojure-hamburg (2)
- # clojure-india (1)
- # clojure-italy (4)
- # clojure-nl (1)
- # clojure-russia (31)
- # clojure-spain (1)
- # clojurescript (154)
- # core-async (19)
- # datomic (16)
- # devcards (43)
- # funcool (3)
- # hoplon (4)
- # immutant (8)
- # jobs (4)
- # ldnclj (71)
- # off-topic (1)
- # om (4)
- # onyx (30)
- # re-frame (3)
- # reagent (6)
- # remote-jobs (2)
- # ring (2)
@venantius: I have not seen anything apart from sablono (hiccup-like) and kioo (enlive-like) templating so far. The closest you might get to what you describe is to use middleman (either with boot-middleman or standalone Ruby) to generate HTML templates from your preferred templating and then use that with kioo.
My current project started out like that, but then I realised it's too much of a hassle until we get proper designers and we decided to stick with hiccup for now.
@val_waeselynck: no, it’s not normal. Would be great if you can share you setup (in GH issue maybe?)
@tonsky: thanks, when I've got time I'll try to give you enough to recreate the problem. I've been experimenting a bit, I think recursive rules are a major slowdown
@tonsky: can't do it right now (I'll need to make it readable a little bit), how about I PM this to you when I have some time ?
Hi everyone. I want to create some simple data plots in ClojureScript. Are strokes and C2 outdated? Any other preferably native options?
@aspra: Just posted over in #C03S1KBA2 - I have not used it - but looks interesting: https://github.com/thi-ng/geom/blob/develop/geom-viz/src/core.org
@donmullen: thanks! seems like a cool lib, I will have a look. However I am still curious to know what is the “standard” these days for ClojureScript. Plus I just need a few simple charts, maybe the above is an overkill.
I use https://gionkunz.github.io/chartist-js/ for simple charts. Works great with clojurescript
any idea how to open a download in a new window + having a spinner while the download is being processed?
Wrong number of args (3) passed to: core/-DOT--DOT- This is valid right? (.. w -document -body)
other question: it's possible to assign a data uri to a new window, right? I'm trying this with a PDF
but it says invalid url... I tried the same as in this example: http://stackoverflow.com/a/25068020
I think I'll abandon this road and just open the pdf in a new window the 'normal' way
Hi, can someone explains what is ^boolean goog.DEBUG what is the ^boolean used for ?
@jvuillermet: won’t change the runtime behavior of the program, but dead code elimination won’t work as effectively.
@jvuillermet: it’s a known issue with a ticket, hopefully get addressed in the near future
@venantius: jade -> kioo -> om is exactly what I do. It works great as long as you keep the size of the templates small (just what is needed) otherwise kioo generates a lot of js code.
@bensu: what do you use to turn jade into html before feeding it to kioo? Also do you do anything to touch relevant kioo snippets so they automatically recompile when you change the jade source? I was doing something similar a while back and I'm curious how do you deal with those things.
@aspra I used c3js the other day and it was super quick to get going. It's on cljsjs so it's really easy to pull in.
I have got secretary working for url routing in my reagent app, but I can't get it working on initial URL load. I call this
hook-browser-navigation! on app init:
I have tried calling it before and after calling
(defn hook-browser-navigation!  (let [user (subscribe [:user])] (doto history (events/listen EventType/NAVIGATE (fn [event] (let [uri (.-token event)] (secretary/dispatch! uri)))) (.setEnabled true))))
reagent/render, with no success.
@petrus, that’s about what I have although I seem to be instantiating the History instance on every call:
(doto (History.) …)
@jaen: I'm using jade as a grunt task in autobuild, and then in kioo consuming the html templates from a
resources/templates folder. I haven't solved automatic cljs compilation when changing the jade source 😞 I just change a line break to activate figwheel.
Yayyy! Got it working. Turns out I was calling
init on page load, and boot was calling it on init as well.
@bensu: I see, thanks. Similar to what I've been doing then if you s/jade/haml, s/grunt/boot-middleman and s/figwheel/boot-reload. Right now I'm back to just using sablono/hiccup, since we don't really have any designers yet to benefit from the separation kioo gives, but at some point we'll probably move back to that. Hopefully I figure something for autoreloading by then.
@bensu that’s awesome! I don’t suppose you have any open source instances of that I could take a look at?
@venantius: no... that's application code and it is probably not a good idea to make all those choices in a library. In any case, try to set it up and if you run into trouble we'll help.
Interesting read @venantius http://blog.venanti.us/clojurescript-blues/, I don’t agree with most of it since some of it is just lack of experience, and a lot of is stuff I don’t use in order to avoid the said issues That said I don’t really have a solution for problem created by 3rd party tooling.
In general I don’t care for the the OSS “free-loader” culture at large, where people use stuff but don’t contribute stuff and then complain about it.
Still worth chewing on - newcomer experiences are important and there’s probably no way to make it better but more blood, sweat, tears.
agreed, worth chewing on -- in particular, i think it's worthwhile to consider the new user profile -- he describes the Dependencies wiki page as "incredibly hostile" to new users, which it probably is, but not at all what who i was writing it for!
some new user focused documentation could be quite helpful for a number of these points -- how to avoid landmines if nothing else
Some of the issues strike chords, I definitely ended up abandoning most of my clojure habits when developing cljs. Still think that the vim problem will always have to do with the awkwardness of implementing a repl with a single thread. I ended up moving off of lein for cljs projects because all I really wanted was deps management, most of lein's other functionality didn't appear to apply.
FWIW boot's cljs workflow seems to be a lot less rough around the edges than figuring a proper combination of figwheels, austins, piggiebacks and compilation options. At least when I first started trying clojurescript it was dark magic how to exactly set up lein for cljs compilation and I ended up aping various project.cljs I found online with middling level of understanding of what I'm doing. Boot makes it considerably easier to start off the bat.
@jaen Once I discovered that the real gap was dep management I went with boot, which after a bit of a curve turned out to be really pleasant!
@dnolen: thanks for the feedback; fwiw I think I’ve got a decent resume as far as contributing back to the Clojure community re: 3rd party tooling, which is what I think makes me somewhat qualified to complain 😛
But in general I agree; I’m not interested in being the sort of person who’s only throwing stones and not offering solutions
And I’m sure much of my complaints at the moment are lack of experience; the post was in a very different state before Daniel Woelfel took at look at it and told me half of the things I was simply doing wrong
I think documentation is a particularly important part of the newcomer experience, and at the moment (at least as a stranger) it still feels like ClojureScript is figuring out its “one true way” of doing things. But then, I suppose I’ve felt similarly about most programming communities at some point or another, so maybe that’s not a helpful criticism.
@jaen I’d love to see a sample boot project for ClojureScript. I’ve written quite a few Lein plugins at this point so I’m pretty familiar with its peculiarities, but if Boot has a way of just making everything simple I’d love to see what that experience is like
@venantius: out of curiosity, what did you mean when you said but if I wanted to keep my templating logic apart from my application logic there's still little support for that? Maybe I'm looking at it wrong, but enlive/kioo always seemed to me like the ultimate templating library in terms of separation of logic from template.
@jaen this is a personal problem, but I really dislike writing Enlive/Hiccup in code. I’d prefer to have standalone templates outside of my clj/cljs src tree that I can pull in
so the separation for me is there: I want the templating logic to sit in a file in /resources, and I just want kioo/etc to help me bring that into the app (along with some sort of nice cljs/template interface)
Ah, I see. So not separation of logic from template, but separation of template from Clojurescript, yes?
@venantius: hiccup is a great pivot format. You don’t have to use it directly in your code, just load some resources and convert it to hiccup (e.g. html -> hiccup via hickory)
I want this sort of connector but with an idiomatic Clojure(Script) interface https://github.com/jadejs/react-jade
BTW if you end up switching to boot I can't endorse boot-middleman enough - http://hashrocket.com/blog/posts/the-front-end-development-environment-of-my-dreams - it can get you partially where you want - you can easily write HTML templates in HAML or Jade or something, and then transform that with kioo.
Yeah, as long as libraries don't clash (I had to run a slightly hacked version of boot-middleman, because otherwise JRuby clashed with buddy).
I didn't take it all the way through, because I realised that as long as there's no real designers on the project writing hiccup is just faster
Is to create HTML mockups with Middleman using HAML and SASS and then in Clojurescript have kioo snippets in a separate namespace, so they could be easily reloaded if templates changed with a simple touch.
@venantius: I think we’re long past the point of ClojureScript trying to find the “one true way”. I actually think part of the actual struggle is the vast array of options even though the community is quite small.
@venantius: but this is also why the criticisms about templating options ring hollow to me. If you want to do it a different way - then go do it yourself
@venantius: as far documentation, I only agree that Clojure(Script) is no better or worse than any other community. Pretty terrible all around, maybe you feel it a bit more in ClojureScript since the community is much smaller.
I think points 1 and 3 are closely related. It took me a long time to figure out which libraries to use in Clojure, and how to stitch them together, and that was through the fortunate experience of working at both CircleCI and Standard Treasury, where we were using it full-time.
To your second point - as I’ve said, it’s definitely an issue of personal preference. And I’m not precluding the possibility of writing things.
Clojure, I think, has the benefit of a few very well maintained and evangelized community offerings, poss. because the community is larger? Conjecture though.
At the moment the place where I felt the suffering the most was not having all of the knowledge of Chestnut encapsulated as a plugin
It doesn't feel to me like clj has one true way, but rather a bunch of well-trodden paths.
something like “just put this plugin in your profiles.clj and you’ll get everything compiled properly and figwheel will just work. if you want to override parts of this, here are your escape hatches"
which is the sort of thing I might tackle, though not until I feel I understand how the compiler works better
@venantius: the problem is no one with any amount of serious experience wants templates. So you don’t get people with tons of expertise spending lots of time on helping out with them.
to be fair, one year ago things were so bad you absolutely had to have a template to get anything done.
as I’ve said on many occasions I personally don’t use anything more sophisticated than the Quick Start.
My fear of XML has long departed. I don’t have any more time to waste on understanding why tool dep X isn’t working with Y.
my happiness with cljs has increased as i’ve simplified my toolset, part of the problem is i came to cljs from clj and expected the same stuff (cider magic, for example) to work, and it’s just not there yet — would have saved time and frustration had somebody just slapped me and said “don’t expect that stuff to work"
that said, i think making lein [cljsbuild] work nicely and reliably would be a big help for newbies — we’d lose a lot of people if we suggested hacking on POMs
I had the same experience. When I stopped trying to make cljs work with cider, I became more productive. And honestly, I feel very little need for that when I’m using figwheel. It also helped to just focus on a small set of tools and not try to spend too much time on tooling. For example, I settled for lein instead of boot, friend instead of buddy, reagent instead of wandering between all the different front end options, clj test instead of midje….
@venantius: the #C053K90BR channel is active and lots of folks there to help get you going.
If anyone has a few min to look at this bug I'm getting and let me know if they think it's a compiler issue or not. https://github.com/Prismatic/om-tools/issues/81#issuecomment-138642906 It involves Om but I think the problem is more general.
@nullptr @roberto I wish more folks would listen your experience :) It's almost like everyone wants to make the experience much harder than it needs to be. Everyone seems to feel compelled to make nREPL and cider work.
to be fair, that’s the recommended course of action in CLJ. And, it is nicer once it’s working
Yes, nrepl/cider is significantly nicer, and the muscle memory is also quite important
Then I suppose I must be a hipster, using Cursive and all? Wouldn't trade the debugging support for anything.
It is a strange thing to adapt to @bhauman. Having all of that auto-reloading magic is very cool but there are some things I still miss when I don’t just have an instant magical nREPL connection available
For instance, being able to nab function-under-cursor documentation is a big convenience when you’re starting out
@venantius: if you are able to get figwheel + cider working that is great, my point was that when you are just starting out with clojure/clojurescript, spending too much time trying to do that is counter productive and can be frustrating. So starting off with little steps would be more helpful instead of trying to swallow the entire eco system from the start.
@roberto: I’m of a mixed mind. I want the setup to be easier (and I’m using Fireplace rather than Cider, but the experience is similar), and you’re right that it’s better to get to “yay, I’m making stuff and it works!” than to spend time feeling frustrated that the toolchain doesn’t do what you want. At the same time, when I know so little about ClojureScript not having easy ways to educate myself like being able to just hit “K” when I’m over a symbol and have the documentation pop up in my Vim window also makes the experience feel really bleh
and I know I can get to a place where this does work, but I ended up taking the path you recommended and just focused on getting stuff shipped to start 😛
Oh! Also, @bhauman — slight change of topic, but where do you stand on the subject of REPL middleware for Figwheel?
@venantius oh I think I misunderstood you, I'm talking about customizing the nREPL middleware that figwheel uses.
does anyone know of a cljs project that builds a shell? I mean a typical unix shell where you would manipulate files, start/stop services etc
xifi: not sure I understand. You mean like an actual shell like bash or something that behaves like a shell?
well we have REPLs, right, so I mean a library that implements what you'd expect from one - filesystem manipulation, handling processes etc
@donmullen: I'm just curious Every language gets to the point where a shell-like thing is born
would be interesting to have some shell where you can treat a part of your filesystem as a persistent value and work with it in clojure-style, and apply effects when executing some commit! or something like that, I guess this must exist somewhere
@darwin: boot has things in that area, immutable filesystem etc. It even has
well I'm often thinking why are we still joining filtering etc strings in the 21st century. I mean yes, Rich says use data to communicate, but he doesn't mean strings
powershell uses objects which some people seem to like (there's even an attempt to port it to linux), but having a clj(s) shell might be interesting