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.

Clojure from the Ground Up, Part 2: Basic Types

114 pointsby mrbbkover 11 years ago

5 comments

the-originalover 11 years ago
It&#x27;s an okay intro I guess, but there&#x27;s a complete guide written for complete noobs. <a href="http://www.reddit.com/r/Clojure/comments/1pb8sx/the_original_clojure_from_the_ground_up_tutorials/" rel="nofollow">http:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;Clojure&#x2F;comments&#x2F;1pb8sx&#x2F;the_original...</a>
评论 #6622119 未加载
diegoover 11 years ago
Useful tip:<p>&quot;By default Clojure operates with natural numbers as instances of Java&#x27;s long primitive type. When a primitive integer operation results in a value that too large to be contained in a primitive value, a java.lang.ArithmeticException is thrown. Clojure provides a set of alternative math operators suffixed with an apostrophe: +&#x27;, -&#x27;, *&#x27;, inc&#x27;, and dec&#x27;. These operators auto-promote to BigInt upon overflow, but are less efficient than the regular math operators.&quot;<p>So you can write<p>(inc&#x27; Long&#x2F;MAX_VALUE)<p>instead of<p>(inc (bigint Long&#x2F;MAX_VALUE))
merlinsbrainover 11 years ago
Has anyone at all managed to get past the first paragraph? It&#x27;s his blog, his tutorial, his sweat disseminating knowledge to everyone for FREE. So he encourages a certain group of people. I don&#x27;t see any of them reacting. Take the education and thank aphyr for his efforts. Way too many people take that for granted these days.
评论 #6622899 未加载
anticsover 11 years ago
I am a member of one of the underrepresented groups aphyr mentioned in the &quot;who is this for&quot; section of the intro. Let me tell you what effect the discussion these HN comments threads have had on me.<p>aphyr&#x27;s introduction seemed to me like a kind of warm &quot;you can do it&quot;. I felt pleasantly fuzzy -- it was good to hear that someone was looking out for people like me, and other groups that are more obviously disenfranchised than mine (mine has it comparatively well off I think). Because of this encouragement, I read the entire post. In this respect it was absolutely effective. It accomplished precisely what it set out to accomplish.<p>Cue HN comments. I read them and my first reaction was, I didn&#x27;t understand why it&#x27;s not ok to say what aphyr said. It seemed so positive and innocuous. Why is it not ok to explicitly encourage me, or my sister, or my partner, to program? Never mind that aphyr put it in the &quot;who is this for&quot; section, which seems (to me) to be an eminently appropriate place to put such a thing.<p>But as I read more of them, I began to wonder whether what I thought and what other people think are so different that I&#x27;m just never going to fit in with this community. For example, people are complaining that this seems out of place -- do they just not understand how positive this was for me? I felt profoundly comfortable and accepted reading the tutorial, and I seriously doubt anyone felt excluded -- how could someone object to such a thing? Another commenter explains that, actually, this statement is bad for groups like mine because it reminds us that we&#x27;re separated. But it was so warm I thought, I don&#x27;t see how that could be true -- maybe I&#x27;m missing something. I started to think that maybe these issues are not reconcilable.<p>So, I began to doubt myself. Eventually the entire effect of the introduction was reversed. Soon I felt worse than when I started.<p>Then today happened. Let&#x27;s consider some facts.<p>* The &quot;who this is for&quot; section appeared yesterday.<p>* That was <i>part 1</i>.<p>* This is <i>part 2</i>.<p>* Not only were the HN comments on part 1 dominated by this issue, but also the HN comments in part 2.<p>* So, merely writing this once is enough for the issue to follow you around in subsequent posts.<p>As a member of one of these underrepresented groups I&#x27;m both shocked and -- honestly? -- kind of hurt that the community can&#x27;t even let this go when we&#x27;re supposed to be discussing <i>an entirely different section of the book</i>. Besides this, if aphyr can&#x27;t write this in the &quot;who is this for&quot; section, then where, precisely, is it appropriate to have this discussion?<p>People of HN, you may not be convinced that this was the right thing to do, but do know that this type of discussion is actively hurting your ability to be diverse. At the very least, I hope this pins a human story to this issue. What you are doing here does affect people. As a community it is time that we take this seriously.
评论 #6623247 未加载
评论 #6623447 未加载
评论 #6623304 未加载
lectrickover 11 years ago
I have mixed feelings about the fact that right off the bat it sledgehammers home the fact that programming is for everyone and not just white anglo saxon males.
评论 #6622372 未加载
评论 #6622467 未加载