Hacker News new | past | comments | ask | show | jobs | submit login
Clojure from the Ground Up, Part 2: Basic Types (aphyr.com)
114 points by mrbbk on Oct 27, 2013 | hide | past | favorite | 21 comments



It's an okay intro I guess, but there's a complete guide written for complete noobs. http://www.reddit.com/r/Clojure/comments/1pb8sx/the_original...


Thank you, nice one.


Useful tip:

"By default Clojure operates with natural numbers as instances of Java'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: +', -', *', inc', and dec'. These operators auto-promote to BigInt upon overflow, but are less efficient than the regular math operators."

So you can write

(inc' Long/MAX_VALUE)

instead of

(inc (bigint Long/MAX_VALUE))


Has anyone at all managed to get past the first paragraph? It's his blog, his tutorial, his sweat disseminating knowledge to everyone for FREE. So he encourages a certain group of people. I don'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.


I don't really see what's so problematic about "We’ve learned the basics of Clojure’s syntax and evaluation model. Now we’ll take a tour of the basic nouns in the language." Am I missing something?


I am a member of one of the underrepresented groups aphyr mentioned in the "who is this for" section of the intro. Let me tell you what effect the discussion these HN comments threads have had on me.

aphyr's introduction seemed to me like a kind of warm "you can do it". 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.

Cue HN comments. I read them and my first reaction was, I didn't understand why it'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 "who is this for" section, which seems (to me) to be an eminently appropriate place to put such a thing.

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'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're separated. But it was so warm I thought, I don't see how that could be true -- maybe I'm missing something. I started to think that maybe these issues are not reconcilable.

So, I began to doubt myself. Eventually the entire effect of the introduction was reversed. Soon I felt worse than when I started.

Then today happened. Let's consider some facts.

* The "who this is for" section appeared yesterday.

* That was part 1.

* This is part 2.

* Not only were the HN comments on part 1 dominated by this issue, but also the HN comments in part 2.

* So, merely writing this once is enough for the issue to follow you around in subsequent posts.

As a member of one of these underrepresented groups I'm both shocked and -- honestly? -- kind of hurt that the community can't even let this go when we're supposed to be discussing an entirely different section of the book. Besides this, if aphyr can't write this in the "who is this for" section, then where, precisely, is it appropriate to have this discussion?

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.


I'm not one of the underrepresented groups, but I think it's irrefutable that these issues are central when introducing someone to a new technology and community.

I understand that these issues are usually discussed separately from purely technical matters, but that doesn't mean that they're separable, or can be considered in isolation. There seems to be a lot of people who are uncomfortable with this, judging by how this discussion has magically jumped from the previous article to this one.

Lastly, it's hugely offensive to suggest that Kyle did this to establish his liberal bonafides or for any other reason than to create a more open and welcoming community. This sort of cynicism is just as toxic to the community as open prejudice.


I'm sorry to hear you had a bad experience from the previous (and this) hn discussion, and I really appreciate you taking the time to comment here [edit: in spite of having a bad experience -- frequently it can be tempting to just walk away, as most of these kinds of debates only ever seem to spiral downwards into a pretty dark place, no matter how many well-intentioned participants there are].

I too find it a little disturbing that comments on this second instalment seem to revolve around the introduction to the previous one -- even if I too had some comments on that[1]. As for why people comment on it, one of the reasons might be that the "Who is it for section" was quite long compared to the rest of the post (which is fine, but it isn't surprising that it then becomes the subject of discussion).

The one-line introduction on this post doesn't seem to warrant a lot of discussion, however...

[1] https://news.ycombinator.com/item?id=6620568


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.


[deleted]


Today I learned that I'm straight, Nancy Lynch is a man, and David Nolen is white.

Diverse engineers are all around us. They just go unnoticed--in part, because we interact with usernames and papers instead of face to face.


+1 :D


This thread is so full of BS I shouldn't even bother commenting, but maybe you should just know that Kyle himself is openly gay...


Good job assuming that anyone who writes an introduction to Clojure is a straight white dude. As it turns out, you're completely wrong.


He's just signaling that he has the right beliefs about the right issues, and is therefore a modern righteous dude.

Perhaps we should create a compiler that works differently for men, women, members of visible minorities, gays/straights, transgendered folks and so forth. I'm sure this would be a great advance in computer science.

But, more seriously, this is actually one of the great things about exact sciences - they are objective and completely fair. A compiler or a mathematical proof or the laws of physics can't be racist or sexist.

Unfortunately, we can't say the same about the social systems surrounding these sciences - a university department or a corporation, or some of the individual members of these organizations, can, of course, have bias.

I don't know that the solution is injecting social justice content into technical discussions. It's probably fine to have a social track at a technical conference, where people know what they are getting into. But in the context of a technical lesson, it seems like derailing off topic.


That's nice. And I have completely unmixed feelings from reading you and the other genius commenters here and in the other thread about how you are somehow threatened by his simple encouragement of underrepresented minorities in a technical field.

Unlike you I'll actually tell you what my feelings are about the entrenched misogyny, racism, and sexism tolerated by so many white anglo saxon males in the tech world: complete disgust and contempt.


Unfortunately I don't have enough points to downvote this so I'll just have to speak up.

> entrenched misogyny, racism, and sexism tolerated by so many white anglo saxon.

During my 15 years, as a white anglo saxon male, working at 8 companies of various size across Canada I have never met a man who hates women. Over the last say 10 years I have always been the minority by race and have reported women 40% of the time.

It would be nice to have more women in IT (yes please!), but the crap you just spewed must not represent all of IT around the world.

I don't have an appreciation for the intro. I think it detracts from an otherwise great blog post. And I think it's ok for people to have mixed feelings about it too.


Putting a "simple encouragement" in a technical tutorial like that is at the very least a non sequitur and detracts from the reading experience.

That's not to say educational material should be dry and without humor, but this is simply pure agenda.


And I fail to see anything out of order with the agenda, "encourage women to program".


There isn't. There's nothing wrong with the agenda of promoting healthy eating habits, either. However it's not a good idea to preface a technical article about food processing with it.


You seem very (and rather irrationally) upset, so instead of responding I will just give you a (completely ulterior-motive-free) e-hug from an anglo saxon male who has so far been nearly universally told he is the "nicest guy ever" as well as the "best boyfriend ever". That said, I once got in trouble with a female superior for using the word "wench" in casual conversation. I think that's a bit extreme, but that's just me. Skins have various thicknesses when it comes to these things.

I didn't mean anything malicious by what I said. I just felt browbeaten, that is all.


I randomly returned to this conversation and boy are there a lot of assholes here who commented after I left. I think I'm more on your side now. I like to think I'm a nice guy, but there's clearly a lot to learn... and to teach to other guys.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: