Live data from Hacker News

Clojure for the Brave and True (2015)

braveclojure.com

91–100 of 106 posts

Re: Clojure for the Brave and True (2015)

#91
post #40

Earlier quoted context omitted.

Everything assumes you're a Java expert.

I came from Perl with zero Java when I learned Clojure and found it very easy. That was 3 years ago and apart from the occasional Integer/parseInt I've hardly ever needed to dip into Java. As Clojure is a dynamic language it's a much cleaner departure from Java than Scala or Groovy where OOP still plays a big part. Clojure can be a truly liberating experience if you've spent most of your programming life working with…

Legacy Perl or Modern Perl with Moose, DBIx::Class, Catalyst...etc? Just curious.

Re: Clojure for the Brave and True (2015)

#92
post #77
post #57

Earlier quoted context omitted.

I still teach in and prototype in Light Table, even though it is losing its "instarepl". Live evaluation visually matched up to an expression removes a lot of the cognitive load. Clojure stack traces are a big mental overhead.

Atom and the ProtoREPL package also make a great Clojure environment. https://gist.github.com/jasongilman/d1f70507bed021b48625

I've tried just about Clojure IDE/editor, and this is probably my favorite. But still I think it is tough for a beginner. 9 packages to install, editing config files, the ProtoREPL tutorial doesn't include Mac keystrokes. The problem for a beginner is you follow all these steps and you don't if you are doing it right - there is no feedback. Once it is up and running, it is really nice.

To be beginner friendly, it would be good to have a packaged installer that pre configures and installs everything, or a single Clojure/ProtoREPL package that could be installed in Atom that includes all the dependent packages, and config changes.

Re: Clojure for the Brave and True (2015)

#93

I didn't enjoy this book; the examples used clojure constructs before introducing what they did making them arcane and difficult to understand, and it focused on the language without showing why you would use it or how to use it for real world projects. It's like... a detailed guide to the language, for people who already know clojure. I recommend 'Living Clojure' by Carin Meier for new comers. (Also, avoid the cloju…

I agree with you about the book, it's not for everyone.

> I know the clojurescript people are all enthusiastic these days, but the strength of clojure is its concurrency and seemless interop with the java ecosystem; if you don't need those, it's just another lisp. You lose both of those with clojurescript, and I fail to any benefit in it.

No, it's not just another lisp. There are very compelling reasons why one would chose Clojure even if it didn't have those nice concurrency abstractions. Built in persistent data structures give you the ability to separate values with identities, because of awesome sequence abstraction you usually don't have to care about the exact type of some sequence, the same functions just seem to magically work on all of them, which enables you to think on a higher level, about data streams and transformations. Lazy sequences are also a big benefit, when you want to deal with data that is just too large to fit into memory. Then there are transducers, the decoupling that OO can only dream about.

So I beg to differ.

Re: Clojure for the Brave and True (2015)

#94

The best Clojure book in my personal experience (and fwiw) is O'Reilly's "Clojure Programming" by Chas Emerick, Brian Carper, and Christophe Grand. Extremely clear writing, and very knowledgeable authors. I really enjoyed working through the book. Due Disclosure: 1. I was an experienced Haskell and Java programmer, when I read the books, so I didn't have to go through any culture shocks wrt either Java or FP. 2. I ha…

Just adding my 2 cents. I've found the writing of Clojure Programming to be very dull, to be honest. Sure, it is clear and detailed, but it gets boring after a while. I think the Joy of Clojure is a better read (at least for me). The upside about Clojure Programming is that it covers the language's syntax right upfront, which (IIRC) Joy of Clojure does not.

you should try Programming Clojure then ;)

Re: Clojure for the Brave and True (2015)

#95
post #40

Earlier quoted context omitted.

I came from Perl with zero Java when I learned Clojure and found it very easy. That was 3 years ago and apart from the occasional Integer/parseInt I've hardly ever needed to dip into Java. As Clojure is a dynamic language it's a much cleaner departure from Java than Scala or Groovy where OOP still plays a big part. Clojure can be a truly liberating experience if you've spent most of your programming life working with…

Legacy Perl or Modern Perl with Moose, DBIx::Class, Catalyst...etc? Just curious.

Mostly modern Perl but I was happy without the OOP so Moose and friends were no big deal for me. Catalyst I always considered a lumbering beast with no chance of competing with Ruby on Rails. I'm saying Clojure was easy for me because I'd favoured the procedural Perl way for many years so wasn't so infected with the OOP mindset.

Re: Clojure for the Brave and True (2015)

#96

This was a good book. It would have been better if he had a more critical perspective of the language. As much as I love Rich Hickey and Clojure, the language does have pitfalls and rough edges, and this book was a little too starry-eyed to tackle them head-on like Crockford's book on JavaScript.

I agree. I think this book and a lot of others fall into the _why's Poignant Guide to Ruby which i still totally don't understand the appeal of if you already know how to program. I mean, _why is an interesting dude, who did a lot of interesting things, but (1) the whole 'chunky bacon' thing just is not my cup of bacon smoothie and (2) it was not really a great book for people who already know a lot about programming…

Clojure for the Brave and True is, in my opinion, more substantial than _why's Poignant Guide. It moves faster, guides you through some real (if small) projects, and the whimsical tone is really just some flavoring rather than the whole focus of the book. _why's guide really seems only to be incidentally about programming in Ruby because it's focus is being some kind of crazy postmodern deconstruction of programming tutorials, while Clojure for the Brave and True is the inverse, if that makes sense.

I think it's a good introduction, and as someone who's programmed in a lot of languages over the years it was accessible without being too dumbed-down. The style certainly isn't to everyone's taste, of course.

Re: Clojure for the Brave and True (2015)

#97

Try spacemacs everyone, it's incredible, and the cider repl for clojure is the real deal. I was a long time vim user who tried to switch to emacs for a month but abandoned it for intelli j, and then atom for while. The spacebar mechanism to trigger the top level navigation that you drill into is an amazing mechanism for memorizing key short cuts (or not remembering and being able to use the menu to get what you need)…

I use Spacemacs for Clojure at the moment and I quite enjoy it. My only problem is there doesn't seem to be a way to insert a newline in the repl without submitting the line for evaluation (I want to be able to structure a function definition for readability, for example, rather than having to have a single huge line).

I did also have to stop smart-parens from auto-closing backticks, but that was a simple fix.

Re: Clojure for the Brave and True (2015)

#98
post #27

After reading that book, I also suggest trying this free MOOC, http://iloveponies.github.io/120-hour-epic-sax-marathon/ It really helped solidfy some concepts for me by presenting concepts one at a time with built in unit tests to provide fast feedback.

I can confirm that. I did the same route. Afterwards I read the "Living Clojure" book and solved the Wonderland Katas (https://github.com/gigasquid/wonderland-clojure-katas)

Re: Clojure for the Brave and True (2015)

#99
post #35

Earlier quoted context omitted.

I would agree with you on unfunny and corny points, but I guess it is very much a personal taste issue. On the matter of substance I have found the book to be quite OK. Could you point to any specific examples of what it does "wrong"?

Coming at clojure as a java developer with a firm grasp of programing necessities, trying to bootstrap my awareness of the language, and re-apply existing experience and establish a frame of reference by reading this book alone was not possible. The book was not written for consumption by java developers. Having been a novice programmer in the past, as a natural starting point, trying to start with clojure as a blank…

I think you're right, the book is not suitable for first time learners without any or much background in programming. This as lots of concepts are explained in passing. It quite frustrated me and I think Carin Meyers "Living Clojure" or Aphyr's "Clojure from the ground up" are in this respect a much better job. However, after having gained some experience with Clojure I thought the book was quite rewarding.

As of the Jokes, it seems this is a matter of taste. I quite liked the jokes.

Concerning the book "Land of Lisp" I wished Conrad Barski had used Clojure instead of Common Lisp.

Re: Clojure for the Brave and True (2015)

#100
It's funny how most programming languages have die hard fans that truly believe (and will tell any stranger they meet in the street) that language X is "the best". There is no such thing as "the best" programming language for any given task. I like Clojure and Haskell and Javascript and Erlang and C++ for different reasons. They all have strengths and weaknesses, depending on the context and task at hand. And given the choice, I pick the language I use depending on the context and task that I need to solve.
Post reply on HN