8 ms·
Thoughts on Clojure
- francoisdevlin 16y agoFor the inevitable "Where do I start" questions, read this previous comment: http://news.ycombinator.com/item?id=1033503 http://news.ycombinator.com/item?id=1033503
- twism 16y ago... and an example of web development in Clojure: http://mmcgrana.github.com/2010/03/clojure-web-development-ring.html http://mmcgrana.github.com/2010/03/clojure-web-development-r... Just install leiningen, whip out your favorite text editor, and you don't have to worry about downloading/installing clojure, libraries and deps.
- dpritchett 16y ago... provided you have java installed.
- swannodette 16y ago... which is likely if you use an Apple laptop and trivial if you don't
- dpritchett 16y agoWhen I first started out with Clojure on Ubuntu I honestly had no idea which packages to start out with. It's not a huge deal and I was able to get it right through trial and error but it's one more step where a potential user could get lost. I wouldn't mind contributing to some official getting started documentation if that was possible. Seeing an HN comment as the go-to source for getting started upthread disappointed me.
- deleted 16y ago[deleted]
- hga 16y agoSorry to disappoint. What you're asking wasn't the intended scope of my comment, but it is covered by the 4th item: http://en.wikibooks.org/wiki/Clojure_Programming http://en.wikibooks.org/wiki/Clojure_Programming, specifically: http://en.wikibooks.org/wiki/Clojure_Programming/Getting_Started http://en.wikibooks.org/wiki/Clojure_Programming/Getting_Sta... To a great extent the previous items are intended to convince you to give Clojure a try/orient you before you start typing in a REPL. Learning a functional language is not necessarily hard but many people say it's harder than programmers who are experienced in imperative programming expect. The latter are used to picking up new imperative languages and the change to the functional paradigm is not as easy. On the other hand, the more scars they have from side effect induced bugs the more they appreciate it.
- gtani 16y agoThe Apress book (VanderHart, Sierra ) is out, it's pretty well done: http://www.amazon.com/Practical-Clojure-Experts-Voice-Source/dp/1430272317/ http://www.amazon.com/Practical-Clojure-Experts-Voice-Source... and Manning has 2 MEAP books in the pipeline http://manning.com/fogus http://manning.com/fogus http://manning.com/rathore http://manning.com/rathore
- gphil 16y agoSince it's not covered in the link you posted I can't recommend labrepl enough as a way to get started. http://github.com/relevance/labrepl http://github.com/relevance/labrepl
- deleted 16y ago[deleted]
- d0m 16y agoIn the middle of the article, the author talks about three advantages that clojure has over ruby. Simply put, speed, easy concurrence and functional. I don't find these to be really good advantages.. First, "functional" isn't an advantage.. I mean, the advantage of functional code might be easier maintenance, concise code, easier to concurrence etc.. but "functional" isn't an advantage. It's like saying C++ is better than ruby because it is imperative or OO.. "Why is imperative or OO better?", that's the interesting part. In my opinion, the advantage of clojure by comparing it with Ruby are: - You get the best of Java (lots of library, OO) - You get the best of Lisp (macro, high level function)
- acangiano 16y ago> First, "functional" isn't an advantage.. I mean, the advantage of functional code might be easier maintenance, concise code, easier to concurrence etc.. Those are all good reasons why functional programming is an advantage. I guess you object to my grouping of all these under the "functional" umbrella term. > In my opinion, the advantage of clojure by comparing it with Ruby are: - You get the best of Java (lots of library, OO) I mention this as well, but that's not really an advantage over Ruby. JRuby gives you access to all the Java libraries you want.
- d0m 16y agoWhat I meant is that functional in this situation is a bit vague. Clojure Dude (talking to ruby dude): Hey, you should try clojure. Ruby Dude: What is clojure ? Clojure Dude: Oh, clojure is a lisp/functional language. You should really give it a try. Ruby Dude: Why? Clojure Dude: Its main advantage is that it's functional. Ruby Dude: Wow, you convince me. I'm switching!
- funcall 16y agoFor a certain (large) class of programs, being "functional" is an advantage. Interestingly, you made the point that being functional means easier maintenance etc., but fail to attribute those advantages to being functional. If your argument is that there can be bad functional code which performs worse than non-functional (imperative or OO) code, I don't disagree. However, in the multicore future that our semiconductor overlords have in store for us, functional programming has a demonstrable advantage in helping build understandable and robust programs.
- fbcocq 16y agoIf it gets added to SPOJ (https://www.spoj.pl/ https://www.spoj.pl/) I'll give it another shot. The JVM is just a frustrating platform when it comes to experimenting with new languages.
- aphyr 16y agoI really want to get into Clojure, but everything I've read suggests that I'll have to learn Emacs to do it. Does anyone think giving up Vim for a few months is worth it?
- FlemishBeeCycle 16y agoThere's a few scripts to help you out: http://www.vim.org/scripts/script.php?script_id=2501 http://www.vim.org/scripts/script.php?script_id=2501 http://www.vim.org/scripts/script.php?script_id=2531 http://www.vim.org/scripts/script.php?script_id=2531
- SkyMarshal 16y agoYou can modify Emacs to mimic Vim, which might be help you bridge the gap: http://www.sanityinc.com/articles/vim-vs-emacs http://www.sanityinc.com/articles/vim-vs-emacs
- tsuraan 16y agoI've been using clojure for a while now (nothing huge LOC-wise, but it's a pretty significant part a large system). I use vim, and haven't had any troubles. The clojure REPL doesn't seem to have readline support, but it works fine with the rlwrap program. I've been meaning to learn emacs to try out the niftier select and execute functionality that it has, but vim does work for me.
- TallGuyShort 16y agoI still use exclusively Vim for all my clojure coding. I have Vim in one window (with VimClojure for syntax highlighting and some other features), a REPL in another (for quick experimenting), and my ant script in another for compiling and testing the whole thing. It's not as integrated as SLIME and emacs, but I don't feel like my tools are slowing me down significantly.
- frognibble 16y agoThis is exactly how I work with Clojure. Emacs is not required to develop in Clojure.