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.

Show HN: Clojure by Example

184 pointsby kimhalmost 10 years ago

18 comments

jonnybgoodalmost 10 years ago
Would be awesome if interactive like the interactive SICP[0]<p>[0] <a href="http:&#x2F;&#x2F;xuanji.appspot.com&#x2F;isicp" rel="nofollow">http:&#x2F;&#x2F;xuanji.appspot.com&#x2F;isicp</a>
评论 #9696952 未加载
评论 #9697989 未加载
lewisl9029almost 10 years ago
For those who prefer learning in a more passive manner, I&#x27;ve found these sets of screencasts on the Clojure Koans quite useful too.<p><a href="http:&#x2F;&#x2F;www.clojurescreencasts.com&#x2F;koans-walkthrough&#x2F;01.html" rel="nofollow">http:&#x2F;&#x2F;www.clojurescreencasts.com&#x2F;koans-walkthrough&#x2F;01.html</a>
nerd_stuffalmost 10 years ago
This is a great project!<p>I believe there&#x27;s a lack of clarity in the let form explanation:<p><pre><code> =&gt;(let [object &quot;light&quot;] =&gt; (let [object &quot;darkness&quot;]) =&gt; (println (str &quot;God said let there be &quot; object))) God said let there be light nil </code></pre> &#x27;object&#x27; is overwritten but only within the second let form:<p><pre><code> =&gt;(let [object &quot;light&quot;] =&gt; (let [object &quot;darkness&quot;] =&gt; (println (str &quot;God said let there be &quot; object)))) God said let there be darkness nil </code></pre> or even:<p><pre><code> =&gt;(let [object &quot;light&quot;] =&gt; (println (str &quot;God said let there be &quot; object)) =&gt; (let [object &quot;darkness&quot;] =&gt; (println (str &quot;God said let there be &quot; object)))) God said let there be light God said let there be darkness nil </code></pre> The reason for this is the let form uses lexical scoping. In other words it creates a new frame which includes the bindings declared in the square brackets. When &#x27;object&#x27; is evaluated its binding is looked for in the current frame, then the frame that called that frame and all the way out into the global namespace stopping when a binding is found.<p>See also: <a href="http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;1774417&#x2F;scoping-rules-in-clojure" rel="nofollow">http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;1774417&#x2F;scoping-rules-in-...</a>
评论 #9698552 未加载
评论 #9699549 未加载
评论 #9698553 未加载
kimhalmost 10 years ago
If the site looks cool and slick to you, then you should give a star to <a href="https:&#x2F;&#x2F;github.com&#x2F;tripit&#x2F;slate" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tripit&#x2F;slate</a> which I used to create the site.<p>I found Slate is very easy to use and customize!!
hoprockeralmost 10 years ago
Lovely. A nice addition would be a floating REPL to try things out as you go along, maybe at the bottom of the screen with a dash of transparency.<p>(I know I know, there are plenty of other ways to access a Clojure REPL!)
TickleStevealmost 10 years ago
Clojure has always been slightly disappointing for me...<p>The principles behind its design are all sound and Rich Hickey deserves credit for putting in the hard thought behind it.<p>... but.... the reality seems to be of a really under performing language. The forums are consistently full of people with &#x27;why is this slow?&#x27; to which the solution is always &#x27;Give it more hints&#x27; or &#x27;do it in a more Java like way&#x27;.<p>Unfortunately the Clojure stack seems not to have much mechanical sympathy (despite its best intentions). It seems the natural&#x2F;idiomatic way to use Clojure results in far too much dynamic behavior to be performant. Clojure may scale well, but its inherent bad performance (without lots of work) is a major downside.<p>I forget who said this, but it seems very appropriate to Clojurists... &quot;Show me you can use one machine well before you get another...&quot;
评论 #9699224 未加载
评论 #9698852 未加载
评论 #9698750 未加载
mayneackalmost 10 years ago
This is super helpful. Reminds me of bropages: <a href="http:&#x2F;&#x2F;bropages.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;bropages.org&#x2F;</a>
elwellalmost 10 years ago
Looks cool. Code indentation error&#x2F;confusion at <a href="http:&#x2F;&#x2F;kimh.github.io&#x2F;clojure-by-example&#x2F;#future" rel="nofollow">http:&#x2F;&#x2F;kimh.github.io&#x2F;clojure-by-example&#x2F;#future</a> though.
meliponealmost 10 years ago
Remind me of the little schemer. How about a &quot;The little clojurist&quot; book?
josebaezmedinaalmost 10 years ago
It reminds me to <a href="http:&#x2F;&#x2F;learnxinyminutes.com&#x2F;docs&#x2F;clojure&#x2F;" rel="nofollow">http:&#x2F;&#x2F;learnxinyminutes.com&#x2F;docs&#x2F;clojure&#x2F;</a> but prettier.
thomas11almost 10 years ago
<a href="http:&#x2F;&#x2F;www.4clojure.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.4clojure.com&#x2F;</a> should also be mentioned here. I had a lot of fun there.
hajimsalmost 10 years ago
This should be posted over to r&#x2F;clojure
评论 #9696171 未加载
elangocalmost 10 years ago
I love it!<p>The target audience is people with prior programming experience. It&#x27;s important to know the target audience, either as a writer or reviewer.<p>The tutorial webpage is simple and effective with a gradual progression in concept difficulty.<p>I hope we have more things like this! Thanks!
fierycatnetalmost 10 years ago
Cool, thanks! Looks like a nice reference.
dvlimanalmost 10 years ago
this is exactly how intro to programming language should be (for people who already know other languages)
pvdebbealmost 10 years ago
Great execution, but the indentation is wonky at times, making it difficult to see the idea.
abc_lisperalmost 10 years ago
Good job Man! Bookmarked.
maelitoalmost 10 years ago
Very pleasant to read