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.

A Clojure Crash Course

252 pointsby nonrecursiveover 11 years ago

11 comments

brudgersover 11 years ago
Concludes with:<p><i>By this point I highly recommend actually writing some code to solidify your Clojure knowledge if you haven&#x27;t started already.</i><p>While I will be among the quickest to acknowledge that there is great value to be gained by typing in example code, without structured exercises, the article might be providing a fine tutorial or feature list or cookbook, but it is not a course.<p>Courses look more like &quot;Learn Python the Hard Way&quot; than blog entries. They&#x27;re hard to make and one for Clojure is sorely needed. The easy parts of Clojure are the syntax and the common idioms. That&#x27;s why Lisps have a long history as introductory programming languages. The hard part is learning to apply them to the sort of hard problems that one applies other programming languages to.<p>All that to say, that there&#x27;s nothing wrong with the article as an article. In fact I think it represents an admirable amount of work for a positive purpose. My only criticism is that it is not what it says it is, and the only reason that is a criticism is that it claims to do heavy lifting which it does not.
评论 #7043560 未加载
评论 #7044145 未加载
mjburgessover 11 years ago
There really needs to be a JVM crash-course for clojure... I can understand the syntax well-enough, but I want to know what java libs i need&#x2F;how i use them&#x2F;etc. ie. when I have to &quot;leave clojure&quot;.
评论 #7043208 未加载
评论 #7043255 未加载
评论 #7043211 未加载
nonrecursiveover 11 years ago
I hope this provides a good introduction to the Clojure language, apart from concerns about building and running Clojure programs. I&#x27;d love any feedback :)
评论 #7042914 未加载
评论 #7048094 未加载
评论 #7043119 未加载
phren0logyover 11 years ago
I have been really enjoying this tutorial. If you wanted to be super timely you could add instructions for doing it in Light Table.
评论 #7043109 未加载
评论 #7043037 未加载
评论 #7043786 未加载
评论 #7043059 未加载
评论 #7043283 未加载
actsasbuffoonover 11 years ago
I love the pacing of this tutorial. It has a wonderful no-nonsense delivery, and the pacing is fast enough to feel excitingly informative, but not so fast as to be intimidating.<p>This is really great writing. As an Emacs user who hasn&#x27;t yet gotten very far into a lisp, I look forward to having time to sit down and really dig into this tutorial.<p>Thanks for creating this!
tokipinover 11 years ago
i found the Clojure koans useful. (<a href="http://clojurekoans.com/" rel="nofollow">http:&#x2F;&#x2F;clojurekoans.com&#x2F;</a>) they&#x27;re aimed at beginners so they would be a good companion&#x2F;followup to this
评论 #7044832 未加载
euphemizeover 11 years ago
hey great tutorial! really easy to go through, super helpful.<p>My only suggestion : it would be great to have a small reference&#x2F;cheatsheet&#x2F;table to convert equivalent data structures and other syntactic details from closure to other languages. I found myself scrolling back up a lot to remember what &quot;def&quot; meant (coming from python this was confusing), whether &quot;vector&quot; was a dict or a list, etc. It interrupted the reading for a few seconds every time until &quot;ah ha!&quot; I found it.<p>I remember spending about 50% of my time learning Mongo syntax just checking out their mysql &lt;-&gt; mongo syntax table - I assume most people checking out your tutorial will have experience with some previous form of programming (like me).
评论 #7043046 未加载
评论 #7043175 未加载
评论 #7043261 未加载
mattfenwickover 11 years ago
As a Clojure fan, while I appreciate the author&#x27;s effort, and admit I would do a much worse job, I&#x27;m bothered by oversimplifications like these:<p>- &quot;Like all Lisps, it employs a uniform structure&quot;<p>- &quot;All Clojure code is written in a uniform structure&quot;<p>- &quot;Forms have a uniform structure.&quot;<p>- &quot;In other languages, different operations might have different structures depending on the operator and the operands.&quot;<p>- &quot;No matter what operator you&#x27;re using or what kind of data you&#x27;re operating on, the structure is the same.&quot;<p>It&#x27;s pretty obvious that forms don&#x27;t have a uniform structure (e.g. the structure of a number is pretty different from the structure of a vector), and that the structure depends on the operator (e.g. `def` special form vs. `or` macro).<p>Yes, Clojure syntax is relatively simple, no need to oversell it.<p>Still, that&#x27;s a minor issue that doesn&#x27;t detract from the overall quality and usefulness of the work.
评论 #7050389 未加载
评论 #7043574 未加载
lgasover 11 years ago
Technically this is the transliteration of that ruby code:<p><pre><code> (def severity :mild) (def error_message &quot;OH GOD! IT&#x27;S A DISASTER! WE&#x27;RE &quot;) (if (= severity :mild) (def error_message (str error_message &quot;MILDLY INCONVENIENCED!&quot;)) (when (= severity :terrible) (def error_message (str error_message &quot;DOOOOOOOMED!&quot;)))) </code></pre> And if we consider that a good transliteration then I&#x27;m not sure why this wouldn&#x27;t suffice for the second one:<p><pre><code> (def failed_protagonist_names [ &quot;Larry Potter&quot; &quot;Doreen the Explorer&quot; &quot;The Incredible Bulk&quot; ]) (def failed_protagonist_names (assoc failed_protagonist_names 0 &quot;Gary Potter&quot;)) ;; =&gt; [&quot;Gary Potter&quot; &quot;Doreen the Explorer&quot; &quot;The Incredible Bulk&quot;]</code></pre>
评论 #7050407 未加载
bcarrellover 11 years ago
This is really helpful. As someone who&#x27;s never worked with a JVM language (or Lisp, for that matter) or Emacs, braveclojure is really enjoyable. Thanks!
danielweberover 11 years ago
I&#x27;ve been having fun using clojure over the past week or two, and it&#x27;s really nice to get a tutorial on all the vocabulary. Thanks.