Fork me on GitHub

@venantius: well, there are the various react bindings, of course.


@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?)


Thanks @joost-diepenmaat and @jaen! I think what I had in mind was more some way doing something like Jade -> Kioo -> Om


@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


@val_waeselynck: maybe just post the query then? Yes they can be slow


@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 ? simple_smile


Sure, great!


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:


@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 for simple charts. Works great with clojurescript


And has react component if you prefer React-based wrappers


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)


@borkdude any reason you’re not doing (-> w .-document-body) ?


@joost-diepenmaat: I tried (-> w .document .body)


but (.. w -prop1 -prop2) should work normally


I mean (-> w .-document .-body)


assuming that’s clojurescript


ah yes, that's what I normally do, (-> x .-prop1 .-prop2)


but I think (.. w -document -body) should work yes


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:


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 ?


OK, in which case ommiting it would change something ?


@jvuillermet: won’t change the runtime behavior of the program, but dead code elimination won’t work as effectively.


this problem is entirely limited to Google Closure boolean defines


ok got it thanks


@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.


@bhauman: will have a look thanks. @delaguardo @donmullen So I suppose there is not a “standard” or mostly used lib atm and definitely not a clojurescript one.


and how about dimple?

Petrus Theron14:09:51

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:

(defn hook-browser-navigation! []
  (let [user (subscribe [:user])]
    (doto history
        (fn [event]
          (let [uri   (.-token event)]
            (secretary/dispatch! uri))))
      (.setEnabled true))))
I have tried calling it before and after calling 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.

Petrus Theron15:09:59

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, 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 simple_smile 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.


The Clojure community as much as any OSS community suffers from a lot of this.


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.


The quickstart document nudged me away from using lein and templates.


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


I used this to build out my boot files.


oops, this isn't the example ap.


@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)


@jaen that’s correct


@jeluard: like that, but for the richer templating languages simple_smile


(where I don’t have to write my closing tags!)


Ah, so there's nothing really like that as far as I know.


I want this sort of connector but with an idiomatic Clojure(Script) interface


BTW if you end up switching to boot I can't endorse boot-middleman enough - - 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.


Still not quite what you want, but at least you have pleasant templating syntax


the magic of multiplatform simple_smile


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


But what I wanted to do


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.


I imagine this could make for quite pleasant experience


@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 simple_smile


@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


which will take time, since, new.


@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.


so I contributed to a few … but things are quite different now.


as I’ve said on many occasions I personally don’t use anything more sophisticated than the Quick Start.


I make an exception for Figwheel as it’s getting really solid now


@dnolen How do you handle deps?


@angusiguess: Maven or something that talks Maven (aka Lein)


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.


@dnolen: ++ to everything you just said


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


@nullptr: agreed on all that


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. 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.


In the beginning


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


Pffft. Long live SLIME+swank-clojure!


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


@jaen: haha, that was a joke I use Cursive too.


@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: that is being worked on. I have a pull request that I have to merge.


I'm about to get on a plane. Leaving Montreal and heading back home to Asheville.


@bhauman: that is extremely exciting. I look forward to writing some :)


@venantius oh I think I misunderstood you, I'm talking about customizing the nREPL middleware that figwheel uses.


I'm looking for an in for me to get syntax highlighting at a cljs/ figwheel repl


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


I’m not aware of such project.


@donmullen: I'm just curious simple_smile Every language gets to the point where a shell-like thing is born


but I guess you wanted some “functional” shell without side effects, right? 😉


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 commit!


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 simple_smile


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


black-screen: Note: Only OS X is currently supported :s


@venantius: I just made a quick boot demo project based on the boot-cljs-example to test the new UMD javascript loading in the latest clojurescript ( I've been using that example project as guidance and am really liking how easy boot makes it to get up and running. Compared to the Quickstart however, Boot does feel like it's adding a layer of abstraction between me and the tooling. At this point in my experience I appreciate that, but I can imagine a day in the future where I might want to be controlling every knob in every build tool. @dnolen: I just successfully created a new test app that uses the UMD module loading in 1.7.132 that was described in Maria Geller's blog! Wow, what an exciting milestone! ( ) I'm looking forward to testing out loading various react JSX components, etc. This feels like a significant advancement.