TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Getting Started With Clojure

279 pointsby jrheardover 12 years ago

17 comments

manishsharanover 12 years ago
This is a great article. More articles in similar tone are needed to highlight how simple this language is. A big disservice to Clojure was probably done by a few early adopters of Clojure who hyped up the LISP heritage of the language to the extent it turned away C/java guys like myself: I recall reading somewhere that in order to learn Clojure , one had to master SICP and Scheme. That was a huge learning curve I did not have time or inclination for. However, once I waded into Clojure, I was amazed by how simple the language is really and how productive I could get; Clojure REPL is awesome . I still haven't mastered the language, I haven't mastered macros, protocols etc. and I bet my code is ghastly and non-idiomatic but I have still managed to write Clojure code that does what it is supposed to do in a highly concurrent workload.
评论 #5028618 未加载
评论 #5028891 未加载
评论 #5027887 未加载
评论 #5028387 未加载
DigitalJackover 12 years ago
I didn't know about clojure-toolbox. That's pretty neat.<p>One thing though, regarding this page, is that you don't need to install clojure with brew. Leiningen takes care of all that... clojure is just a jar that's included in your project, aka a dependency, and Leiningen manages that. This lets you tie a specific version of clojure to that project, which is handy for some legacy projects that aren't maintained anymore.<p>Also, if you drop the brew references, then this becomes OS agnostic. Just go to the leiningen page on github[1] and it'll get you started: osx, windows, linux.<p>I develop with clojure on my mac and I've not brewed anything related to clojure.<p>[1] <a href="https://github.com/technomancy/leiningen" rel="nofollow">https://github.com/technomancy/leiningen</a>
评论 #5028216 未加载
spacemanakiover 12 years ago
&#62; The reason that you won’t find yourself running `clj` often is that the REPL built into bare Clojure is pretty much garbage....<p>This is what rlwrap is for. Call `rlwrap clj` instead of `clj`, and you get all that and more (C-r, for reverse incremental search, etc). Works with every other REPL that doesn't bother to re-implement read-line.
评论 #5028469 未加载
评论 #5029922 未加载
wonderzombieover 12 years ago
I knew about clojars.org, but I hadn't known about <a href="http://www.clojure-toolbox.com/" rel="nofollow">http://www.clojure-toolbox.com/</a>. Very nice!<p>I also recommend the Value of Values video presentation: <a href="http://www.infoq.com/presentations/Value-Values" rel="nofollow">http://www.infoq.com/presentations/Value-Values</a>. It will help you internalize Clojure's approach to data.<p>I really wish I could remember why I didn't experience <i>nearly</i> as much pain starting out as the author, but I'm glad that he took the trouble to put this together.
评论 #5028295 未加载
评论 #5027876 未加载
scarmigover 12 years ago
Very nice, JR, best guide I've seen.<p>I've always wished, though, that all "getting started" guides would just provide a chef recipe or machine image with everything ready to go. Getting to know a language shouldn't require jumping through an hour of hoops and documentation to get it set up.<p>(Of course, the guide here is broader than simply getting your system set up.)
评论 #5028165 未加载
technomancyover 12 years ago
I wish people would at least attempt contributing to official documentation instead of spreading stuff across random blogs.
评论 #5028364 未加载
leephillipsover 12 years ago
At first the Clojure environment is confusing: why do I need Leiningen? How do I use libraries in my project? This article is a good place to start for beginners, as it explains all that.
tesmar2over 12 years ago
I have been thinking about getting into Clojure, but time is precious. It doesn't seem like there are that many jobs out there, but I could be wrong.<p>For those of you in the industry, why would I want to use Clojure? What would be a good project to try it on? A Web app? Why is it worth learning it?
评论 #5028947 未加载
评论 #5029086 未加载
评论 #5028840 未加载
pandeiroover 12 years ago
or,<p><pre><code> # make sure you have java/open-jdk already wget https://raw.github.com/technomancy/leiningen/preview/bin/lein &#38;&#38; chmod +x lein &#38;&#38; ./lein repl</code></pre>
dizzystarover 12 years ago
I wish someone would do a Learn Clojure the Hard Way. The comments in this thread is a great documentation of the unfounded fears of the language.<p>I also want to point out to those who are using Windows: Yeah, you could, but this is not a good idea. Leiningen 2 is not available for Windows, but you can still get quite a bit done. At some point, you just have to bite the bullet and install a VM with Linux to really dive into it.
评论 #5029862 未加载
tripzilchover 12 years ago
Shouldn't the title say "Getting Started With Clojure in OSX"?
gits1225over 12 years ago
"When I was going through all this myself a few months back, there was a weird period of a good few weeks when I had basically no mental map of the Clojure ecosystem and had no idea how to assemble one."<p>One of the things you can do when learning something new is to hop onto IRC and join a channel related to the topic. I almost always have got a good overview of things just by asking around what I am supposed to know.
paddyoloughlinover 12 years ago
I'm interested in learning LISP. How good a choice is learning Clojure as a way of achieving this?<p>I've read a page[1] listing differences between Clojure and other LISPs, but I'm not sure that I fully understand the implications of these differences.<p>[1] <a href="http://clojure.org/lisps" rel="nofollow">http://clojure.org/lisps</a>
评论 #5032356 未加载
jumanjisamaover 12 years ago
<a href="http://youtu.be/VVd4ow-ZcX0" rel="nofollow">http://youtu.be/VVd4ow-ZcX0</a><p>this video by Chas Emerick (co-author of clojure programming) also gives a good introduction to start with clojure, especially for people who uses eclipse.
politicianover 12 years ago
I hope the Light Table guys see this article and incorporate the guide into their OOBE content. hint, hint ;)
147over 12 years ago
Anybody have any ideas for beginner projects in Clojure?
评论 #5029691 未加载
评论 #5028525 未加载
dschiptsovover 12 years ago
The same thing could be done in Python (with requests) and Ruby (with whatever-it-is) with more clarity, less confusion, and <i>much</i> less consumption of resources.)<p><pre><code> (:headers resp) </code></pre> This construction is confusing - it breaks environmental model (scoping) <i>and</i> general evaluation rule of Lisps - is :headers a global symbol? a part of foo namespace? Is it macros?<p><pre><code> (resp :headers) </code></pre> On the other hand, this form is perfectly consistent - I'm sending to some closure which is bound in a global or other environment a constant message.<p>The assumption that the reader function implicitly transforms first form to second is of no good, because it is not obvious and breaks intuition about environments and violates principle of less astonishment.<p>That thing (:headers resp) returned - what language is it?)
评论 #5028076 未加载
评论 #5028103 未加载
评论 #5028108 未加载