Live data from Hacker News

Getting Started With Clojure

jrheard.tumblr.com

1–10 of 113 posts

Re: Getting Started With Clojure

#2
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.

Re: Getting Started With Clojure

#4
I knew about clojars.org, but I hadn't known about http://www.clojure-toolbox.com/. Very nice!

I also recommend the Value of Values video presentation: http://www.infoq.com/presentations/Value-Values. It will help you internalize Clojure's approach to data.

I really wish I could remember why I didn't experience nearly as much pain starting out as the author, but I'm glad that he took the trouble to put this together.

Re: Getting Started With Clojure

#5

I knew about clojars.org, but I hadn't known about http://www.clojure-toolbox.com/ . Very nice! I also recommend the Value of Values video presentation: http://www.infoq.com/presentations/Value-Values . It will help you internalize Clojure's approach to data. I really wish I could remember why I didn't experience nearly as much pain starting out as the author, but I'm glad that he took the trouble to put this togethe…

That talk's definitely a good one. I particularly like how he frames it as a discussion about the difference between value-oriented programming (good) and place-oriented programming (what you're used to, bad). Giving the two paradigms those names really helps clarify how you think about the distinctions between the two.

Re: Getting Started With Clojure

#6

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 di…

This isnt specific to Lisp. There are people who think that learning C++ will help you learn Java, learning C will help you learn C++ etc.

Re: Getting Started With Clojure

#7
Very nice, JR, best guide I've seen.

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.

(Of course, the guide here is broader than simply getting your system set up.)

Re: Getting Started With Clojure

#9
The same thing could be done in Python (with requests) and Ruby (with whatever-it-is) with more clarity, less confusion, and much less consumption of resources.)

  (:headers resp)
This construction is confusing - it breaks environmental model (scoping) and general evaluation rule of Lisps - is :headers a global symbol? a part of foo namespace? Is it macros?

  (resp :headers)
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.

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.

That thing (:headers resp) returned - what language is it?)

Re: Getting Started With Clojure

#10

The same thing could be done in Python (with requests) and Ruby (with whatever-it-is) with more clarity, less confusion, and much less consumption of resources.) (:headers resp) This construction is confusing - it breaks environmental model (scoping) and general evaluation rule of Lisps - is :headers a global symbol? a part of foo namespace? Is it macros? (resp :headers) On the other hand, this form is perfectly cons…

>This construction is confusing - it breaks environmental model (scoping) and general evaluation rule - is :headers a global symbol? a part of foo namespace? Is it macros?

It follows Clojure's evaluation rules just fine: it's an object that implements the IFn interface.

> 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.

resp isn't a closure, it's a map, which is also an object that implements IFn.

Post reply on HN