5 ms·
Five years after Bret Victor's Inventing on Principle[1], it's crazy that there are not more coding environments that give new users a great out of the box expe
by modernerd 9y ago
Five years after Bret Victor's Inventing on Principle[1], it's crazy that there are not more coding environments that give new users a great out of the box experience with live reloading like this.
I started learning Clojure recently and had a bad experience configuring a development environment on the Mac. Leiningen threw “illegal reflective access” and “Unable to open cgroup memory limit” warnings that appeared to be related to an incompatible version of the JRE. I ended up fixing it (JRE downgrade, then upgrade after it was patched in Leiningen), but it was still a less than smooth introduction to a functional language compared with Elm, Elixir, or even Haskell.
The advice from many Clojurians to use Emacs is fine if you happen to use it anyway, but also seems particularly hostile to beginners.
Lightmod compiled all the demo examples without error for me.
I really want to explore Clojure and ClojureScript to build game servers and web games, and this project looks like a great way to get people using the language faster.
[1]: https://vimeo.com/36579366 https://vimeo.com/36579366
- paultopia 9y agoFWIW, if you're on a Mac, the absolute fastest way to get Clojure/script going for exploration purposes is to use Planck, which is a CLJS REPL with a few batteries included, built on JavaScriptCore. (There's also Lumo, built on top of Node, and I think there might be a Linux port of Planck, FWIW.) It's seamless, and I actually use it for a lot of the same scripting tasks that one might use Python for.
- modernerd 9y agoI hadn't heard of Planck (I know it as an ortholinear keyboard!) or Lumo. Thank you for taking the time to mention them both – downloading to play with now…
- billrobertson42 9y agoI ran into that bug too. It's the first bug that I've encountered with Leiningen after using it for more than five years. Sorry that that was your first experience with the toolset, but it's far from the normal experience. Also, if you're happy using an editor other than Emacs, then go for it. I use it but only because I've been using it for quite some time, and other than the fact that I like the way emacs indents Clojure source there's nothing special about it in the way that I use it. Visual Code has nice support for the language so that's a good option if it's more up your alley. One area where I see Lightmod being really helpful is setting up the initial project. Learning what's going on w/cljsbuild, figwheel and then how to combine that with Clojure in the same project file isn't the simplest thing in the world to say the least.
- modernerd 9y agoThanks for the tips and reassurance – it's good to hear that using Visual Code is acceptable; it's what I'm more comfortable in, and I'll persevere with it!
- moomin 9y agoIt would be really useful if VSC supported the Emacs indentation style: it’s what most people use in real Clojure code. Paredit would be brilliant too (http://bit.ly/paredit http://bit.ly/paredit if you’re not familiar)
- modernerd 9y agoIt looks like there's an extension for paredit, but not sure how it compares to Emacs: https://marketplace.visualstudio.com/items?itemName=clptn.code-paredit https://marketplace.visualstudio.com/items?itemName=clptn.co... For formatting, I've been using this, which supports cljfmt: https://marketplace.visualstudio.com/items?itemName=avli.clojure https://marketplace.visualstudio.com/items?itemName=avli.clo... And the rainbow brackets extension has made code more legible while I've been learning: https://marketplace.visualstudio.com/items?itemName=2gua.rainbow-brackets https://marketplace.visualstudio.com/items?itemName=2gua.rai...
- malloryerik 9y agoYou might also try Cursive[0], a full-featured plug-in for IntelliJ. You can use it free until you so something pro, after which it's about a hundred bucks. Many of the more well-known Clojurists seem to use it. I believe that with Clojure, you owe it to yourself to have a first-class REPL. I mostly use Emacs, but yeah, rabbit hole... [0] https://cursive-ide.com/ https://cursive-ide.com/