Hacker News new | comments | show | ask | jobs | submit login
Steve Yegge's foreword to Joy of Clojure (manning.com)
191 points by calibraxis 2527 days ago | hide | past | web | favorite | 68 comments

Just a word.. not that it is really relevant but I wanted to share this with fellow hackers. To encourage the Clojure community/language, I've pre-ordered the book Joy of Clojure on amazon. On the book's website, it is clearly stated that you also get a free pdf of the book before the release date. So, I was pretty enthusiastic about starting to read the book.

But then, I find out that you only get the pdf if you ordered from manning.. So, I email manning saying that had I know about the "order at manning instead of amazon", I really would have bought it there and that I'd be more then happy to blog about "Joy of Clojure" and give a link to manning's order web page.

So, then, I receive an email saying (summarized in my word): "Fu, it's your problem, next time buy it at manning, not amazon".

It really frustrated me.. I mean, isn't it the best way to demolish someone's best intention? I just feel like never ever buying anything from manning; never ever linking anything to their website, and spread the word about that story.

Am I over-reacting? What's your thought on that, fellow HN-users?

Yes, you're over-reacting. Your post sounds spiteful, and your threat of bad publicity sounds more like revenge than warning your fellow consumers. The way I see it, it would've been nice of them to give you a free MEAP copy, but it was well within their rights to refuse. Similarly, it's well within your rights to write a nasty blog post about how Manning is a bunch of meanies, but it'd be nice if you let it go, admitted that you made a mistake and got on with your life. It doesn't seem to me like there's anything to be gained by taking the low road here, even if you feel that it would be fair.

I have a story that starts similarly to yours, but ends very differently. I discovered "The Joy of Clojure" from a post here on HN, and after some consideration, I decided to pre-order. I was familiar with Amazon, but not with Manning, so I checked them out a little. I read their page about MEAPs and preview releases and really liked what I saw, so I pre-ordered the e-book copy from them directly, got my MEAP copy immediately and started reading. Since then, I've purchased/pre-ordered a half dozen other titles from them (frequently on steep discount thanks to their daily deals and newsletter sales) and they've become my go-to publisher for tech e-books when O'Reilly doesn't have what I'm looking for. I can't help but feel that my life would be ever-so-slightly poorer if I had had a bad experience with them right off the bat and decided to avoid them in the future.

Regardless of which path you decide to take, I hope that you enjoy reading the book. As someone who's fairly new to Clojure and functional programming, I've found it to be a great way to get deeper into the language as well as expand my horizons by exploring concepts like laziness and immutability that I don't see often enough as a Python programmer. Happy reading!

You gave a significant chunk of their profit to Amazon; it would be nice if they still gave you the PDF (which is the bonus for ordering directly from them), but not doing so is just "not nice", not rage-worthy. If you really wanted it, you could have cancelled your Amazon order and placed your order with manning...

The thing is, on joyofclojure.com, it says:

"[...]The Joy of Clojure can now be pre-ordered, which gives you access to the entire book as a PDF now, plus other formats including the printed book once they're available."

Which is misleading because you only get the pdf if it get pre-ordered FROM MANNING.

And, yes, you are right that I give a part of their profit to amazon, but I still give them money.

Maybe you are right that it is just "not nice" and not rage-worthy. Still, I don't like the idea of a company being "not nice" to someone giving them money.

Yes, that should be worded clearer. But, there's still a way for you to get the advance PDF and Manning to get what they expected in return: you can still cancel your Amazon order and order from Manning instead.

Problem solved. If you don't want to do that, then you're over-reacting.

It doesn't say anything about the PDF on the Amazon page, not that that's an excuse for Manning to be rude. Was it really an "FU" or just a polite "no"?

It looks like the page has been amended to say "The Joy of Clojure can now be pre-ordered from Manning".

"You gave a significant chunk of their profit to Amazon" Are you implying this gives Manning reason for the disdain they showed him? From the rough translation it seems disdainful. He/she is a customer regardless of whatever vehicle (Amazon) he/she uses.

Personally, they should work with you to remedy this situation through various steps. The first should be try to cancel your amazon order and place it through Manning. If that doesn't work, then ...

You have every right to be angry at your bad customer service experience.

It's definitely high up on the "not nice" scale, because sending him the PDF would cost them a grand total of zero dollars and zero cents. Not sending him the PDF has probably cost them at least one book sale.

It's not about the PDF copy having zero marginal cost. Manning is a business that is trying to offer an incentive for customers to buy direct from them. Are you suggesting that they destroy their own value add?

Also, I seriously doubt that Manning responded to d0m's request by literally saying:

"Fu, it's your problem, next time buy it at manning, not amazon"

Pronounced "F-U" and not "foo".

The moment you twist someone's wording to sound that aggressive, you're overreacting.

I don't know if I would consider emailing a PDF to a customer who made an honest mistake "destroying your value add".

I've given some paid members on setformarriage.com free lifetime accounts because they were consistently forwarding us emails from the spam profiles that made it through our filters. I think the value of overall goodwill to the customers is probably worth it.

The March 14 google cache of JoyofClojure.com says "can be preordered [link to the Manning preorder page with explanation of MEAP], which gives you access to the entire book as a PDF now".

The current page has been amended to say "can now be pre-ordered from Manning [link to the same MEAP purchase page], which gives you access to the entire book as a PDF now".

It looks like you helped them solve the "user reads about the preorder bonus and then chooses not to click on the nearby purchase link; instead bounces to Amazon, buys the book for half price, and then comes back asking for the PDF later" edge case.

They could certainly have just given you a copy of the PDF though. Probably not worth the hassle for Manning to argue the point.

The book hasn't been released yet. You can cancel your Amazon order without penalty until it enters the shipping process.

Sounds like Manning just lost the opportunity to win a customer for life. In fact, they chose to lose him for life. Go Amazon!

If you get on Manning's email list, you'll get a steady stream of discount codes and never have to spend full price.

There's a 35% off code on the website (which is very broken in Firefox).. does it get better than that?

EDIT: Hmm, it only applies to the e-book only version.

Yes. On a typical day there's a new 50% discount on ebook and ebook+print, of up to 3 different but related titles. On Christmas, there was 50% on all purchases. Then a couple days later was $15 off on all.

As with many commodities, you can simply pass until the price is sufficiently low. Unless you really want the thing immediately.

I'd have to see their actual email before I decide whether you are over-reacting. If they actually wrote "Fu, it's your problem, etc." then no you aren't over-reacting at all. I very much doubt that I would summarize their email the same way, however.

Honestly, I don't think you're over-reacting. Book publishers don't touch customers very often and their behavior here was pretty poor. Not sure if this is the only good Clojure book around, but if not, I'd consider just cancelling and buying a different one.

If it is the only good Clojure book, then I guess you're just kind of stuck. I would probably just stick with the Amazon purchase then because it would feel like every additional dollar to Manning, I would't feel comfortable with. And you probably could get someone to donate their PDF to you.

...but you saved a lot by ordering it on amazon: 45 (manning)-26(amazon)=$19 savings. Is the pdf worth $19?

Considering that it's $34.99 when purchased alone, just maybe?

Had the same happening with Pragmatic Programmers.

I must admit that I would not think too badly about somebody who decided to torrent a PDF of a hardcover book he owns.

Thinking about it, maybe publishers could give out PDFs if there was a good way to prove ownership of the paper edition? If you ordered through Manning, they know you bought it, if you order through Amazon, they don't.

And a funny fact:

For both of my comments, the score keep oscillating from +5 to -4. Which doesn't talk a lot because, if it continues like that, at the end, I will probably only have ~1 which won't give any clues about the opinion on HN-users. (i.e. people don't care about it vs half agree / half disagree!)

I am guessing that this is because you are off-topic, writing about the publisher which doesn't seem to be the topic of the OP.

Upvote/downvote isn't meant to be agree/disagree, but rather something like insightful/irrelevant.

Amazon just told me my pre-order was cancelled because the book was discontinued by the publisher. There must be some kind of misunderstanding?

I am in Germany, so ordering from Amazon seemed to be the fastest and cheapest way to get the book. But now I'm considering ordering from Manning.

It would be nice, when there is a thread on Clojure, if at least one person chimed in and gave an example of a problem where this lisp dialect on JVM helped them to solve a problem faster than using an existing language, like Python, C#, Java, or whatever.

"Drinking through a fire hose", "understanding corner cases", and such are just euphemisms. Where's the beef?

Here's an easy example. In some code I'm writing for my startup, I'm attempting to build the DAG that maximizes a scoring function. I permute through the candidates, and then run a scoring function. I perform greedy hill climbing , and return the DAG with the best score.

Since this is Clojure, and my DAG is build from Clojure's persistent data structures, iterating through all possible dags is easy. Clojure's "update" functions return new structs that share structure with the original, both the original structure and the new one exist at the same time. If I were using mutable data structures, I'd either have to deep copy a new DAG (slower), or write "rollback" code (buggy).

Additionally, because the Clojure data structures are purely functional, and Clojure includes tools for multi-threaded synchronization, parallelizing this algorithm is trivial.

A separate example: I have an existing function that can take several minutes to an hour to run. I wanted to add a button to the web UI that says "go run the function". Of course, you don't want multiple versions running at the same time, so you need to queue up the function call, and you don't want the user to queue up 5 calls when they only need 1. It took all of about 4 lines of clojure to make the function run in a separate thread and handle all of the above issues, and I'm guaranteed to never have multithreading bugs in that code.

In summary

* purely functional data structures greatly simply multi-threaded programming, and make some algorithms easier to write.

* Clojure is designed from the ground up to make multi-threading easy and painless. Many multi-threading tools are built into the language, and you don't have to deal with locking and deadlock unless you drop into the Java synchronization primitives.

Thanks for this. I didn't know about update-in. Are there other 'update' functions?

However, it's a good thing you want a DAG, because with immutable data structures you're hosed if you want a cyclic graph. Or at least you won't be building them out of such structures, which means you aren't getting to use Clojure's functions for sequences, collections and maps. Thus Clojure does not seem to be a good tool for graphs.

Actually, when I said 'update', I meant the functions that in standard languages that would modify the existing structure return a new one, but it's great you found update-in. That's a beautiful function. There's also assoc-in, which is basically just a more specialized assoc-in.

I've built cyclical graphs in Clojure. The simplest form looks like

   {:nodes #{:a :b :c}
    :edges {:a #{:b}
            :b #{:c}
            :c #{:a}}}
(for non-clojurians, {} is a map, and #{} is a set)

I learned Clojure with Joy of Clojure, the early access version, coming from a Python background with very little practical experience in Java or Lisp. It's an excellent book.

The biggest advantage for my coding has actually been in my day-to-day Python work, where I'm much improved at designing functionally, parallelizing with multiprocessing, and building decorators and context functions to remove boilerplate code. So my Python is faster and cleaner; this is all thanks to being able to to think better about code design after working in Clojure.

For a good example of "why Clojure" take a look at Cascalog:


which leverages Hadoop/Cascading Java libraries and combines them with a Lisp-style custom query language.

Interesting. Would you say that it's worth reading, even if I don't intend to program Clojure at all in the next few years, but I am a Python programmer?

I would say that learning Lisp is definitely worthwhile and will improve your Python coding; pg's essay argues for Lisp better than I could:


You'll want to not just read a book, but also get hands on experience with the language. That's where I found Clojure a good choice for me since I could work on problems of interest to my work and reuse existing Java libraries.

Joy of Clojure also presents a persuasive argument in the opening chapter for Clojure, Lisp and functional programming. There is a pdf of that chapter available for free from the author's website:


We use Clojure in our startup and it significantly speeds up development for us. Also, the resulting code runs correctly and many classes of bugs are eliminated just because of the language.

Clojure really shines in complex concurrent applications. In our case, it's a search engine for e-commerce, offered as SaaS, with instant search (so speed really matters). Without Clojure it would have been much more difficult to manage problems like concurrent switching to a new index while queries are being serviced.

I was initially skeptical and worried about implementation quality, but over 1.5 years of development we found exactly ZERO bugs in the language itself.

So there is beef. Start using Clojure and you'll find it.

in the book.

4.2 on the Rant-o-meter. "fashion-driven to a degree that would embarrass..." more Yegge yadda-yadda.

Not sure if i prefer "class-five tropical storm" or a fire hydrant book shoved up. But those fire hydrant books, say,

- Wampler / Payne's Scala book, or

- Cesarini /Thompson's Erlang book

- Syme/Granicz/Cisternino for F#

- (dunno if real World Haskell is a fire hydrant; dunno which are scheme/common Lisp fire hydrants, and ocaml doesn't have one)

are very important, not to read in their entirety, but to figure out where to find stuff when you're hauling yourself out of intermediate developer-ness i.e. get you up to understanding production code, and cover the edge cases so you can figure out the corner cases and save you asking hundreds of questions on stackoverflow. Somewhere in amazon i wrote a book review that tutorial books cover 1 sigmas of the language, standard libs and dev environment, but books that cover 2 sigmas are rare.

And this is that book for clojure. And clojure does have that "perfect storm" feel

> dunno if real World Haskell is a fire hydrant;

We certainly tried (and it ended up being 3x bigger than we planned): http://book.realworldhaskell.org/read/

thanks for the list !

"Clojure has only been out for three years, but it’s gaining momentum at a rate that we haven’t seen in a new language in decades"

[citation needed]

Unless the context is HN threads with "clojure" in the title.

Context: http://steve-yegge.blogspot.com/2007/02/next-big-language.ht... is/was reasonably well-known, and people have been speculating on which language he meant ever since [EDIT: see reply by dpritchett]. Steve Yegge doesn't quite come out and declare his preference, but...

Sadly, he's not written anything on his blog in a while.

Yegge has since admitted that NBL was Javascript.

Clojure hits the sweet spot between Yegge's "JVM languages shall inherit the earth" rhetoric in the fabulous "Rhinos and Tigers" talk and his longstanding fondness for Lisp. Clojure will probably never eclipse JS in mindshare even if it is a wonderful language.


> Yegge has since admitted that NBL was Javascript.

Not really, no.

I work with Steve, and he's always been saddened that nobody really understood that the language he describes in his NBL article doesn't exist. He was hoping that someone would invent it.

During his OSCON 2007 talk, Steve does say that "NBL" is JavaScript 2. Watch http://blip.tv/file/319044/ around the 24:40m mark. Then again, I don't know what's his opinion at press-time.

"NBL is JavaScript 2 / EcmaScript 4."


Of course ES4 was scuttled so I guess you're right. It can still be created.

Attn MEAPs: I was notified this morning of the following:

"We are pleased to announce that The Joy of Clojure is now complete! As a MEAP subscriber you can download your copy of the finished ebook right now! "

I was starting to wonder if I was going to ever get a final copy.

I just requested a refund for MEAP for "Secrets of the JavaScript Ninja", that I ordered almost three years ago. I didn't expect it to take that long...

At the risk of sounding like a broken record on this topic, I will state again that "Joy of Clojure" is a very good book. (I'm a Clojure newbie, so I can't judge its technical content, just that it is well written.) The Manning early-access program is highly disappointing. We got an update in August 2010, and then again on March 18, 2011. Nothing in between.

When I pre-order from PragProg they update their PDFs much more often, and I can see the evolution of the book.

I just downloaded the finished ebook. Searching for "monad" returns three hits. :lemonad, one mention to monadic and one mention of monads in the source list. I was a little disappointed.

Because you have a fever, and the only prescription is more monad? "Monad" is a loaded term and we didn't feel that talking about them in that way added any value to the book.

I don't know what you imply with fever, I am not a native english speaker, but I just paid for your book. I am also a beginner to functional programming and curious about what monads are and I have read about them without really understanding them.

I was reading up on monads the last two weeks, these are the good sources I have found for Clojure: http://onclojure.com/2009/03/05/a-monad-tutorial-for-clojure... http://intensivesystems.net/tutorials/monads_101.html http://vimeo.com/20717301

I don't know what you imply with fever

Let me help. The "fever" line is an offhand reference to this fairly famous piece of American culture:


You should obviously not feel ashamed for missing the reference completely. ;)

Those are the best Clojure monad tutorials available. Definitely better than we could have written. :-)

Throwing down a challenge in the preface. That's a great way to sell a book to developers.

Damn I miss that guy.

Why does he mention .NET? I have not heard of Clojure being available on the .NET stack.

Actually, there is https://github.com/richhickey/clojure-clr, but the JVM is still the preferred platform for Clojure (although I'm sure the CLR version would be picked up once someone comes around that cares enough or in the hypothetical event that Oracle would ruin the JVM platform somehow).

He mentions .NET in the same breath as the JVM because they're almost identically positioned and have almost identical capabilities.

I think shoving an "hydrant up in the *" won't appear on the preface...

I just bought the ebook version and it appears as is on the preface.

Not that I bought the book for the preface...

Looks like dpritchett was right all along :)


English is not my first language but: "So nobody could be more surprised than I that a Lisp dialect ..." shouldn't it be "than ME"

The rule of thumb would be to fill in the implied verb and see which one makes sense.

"So nobody could be more surprised than I was that a Lisp dialect ..."

"So nobody could be more surprised than me was that a Lisp dialect ..."

Then it becomes clear that "I" is correct.

> Then it becomes clear that "I" is correct.

No, it's not.

Your sentences are correct, though, but you altered them from the original by adding a verb, thereby requiring the presence of a subject. The original sentence doesn't have a verb, therefore they need the object form.

In other words:

"You're stronger than I am"

"You're stronger than me"

This last sentence is the form used in the article.

A pronoun in a comparison is nominative if it is the subject of a stated or understood verb.

  Sandy writes better than I. (Than I write.)
-- Strunk & White, 4th Edition, section 10.

I realize that grammar discussions are as boring as they come, but this is a case of someone learning English so it's important to be accurate.

Strunk & White is frequently wrong and doesn't even follow it's own rules. For example, what you quoted is obviously wrong - "better than me" is correct here and is what anyone who isn't completely pretentious would write.

Sigh. English grammar is hard. The word "than" is a conjunction (like "and"), but it can also be used prepositionally. Your second sentence is more colloquial American English, and it's not wrong, but it's also not wrong to keep the nominative case ("I"), as in your first example. If the verb in the subordinate clause is the same as in the main clause, it can be assumed.

tl;dr Being a grammar nazi is a mug's game.

Ah, so you're a conjunctionist, uh? :-)

Conjunctions are supposed to connect whole sentences, and while "I am" is a complete sentence, "I" is not, which casts doubt on the correctness of "than I", thereby hinting that "than" in this case is a preposition, which mush therefore be followed by an object, e.g. "me".

It's a two century old debate, but I say we settle it right now, right here, on Hacker News, once and for all.

tl;dr: "than me" and "than I am" are correct. "than I" is not.

Both usages are perfectly fine.

It is unlikely that I'll convince you with any argument here, so I'll just recommend that you check out a reference on English usage. My favorite is Merriam-Webster's Dictionary of English Usage.

P.S. Clojure is great and I am enjoying this book so far.

Edit: Aha, I saw in a later response of yours that you're already aware that both usages are considered fine and just have a strong personal opinion. Carry on.

Applications are open for YC Summer 2018

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