Live data from Hacker News

Steve Yegge's foreword to Joy of Clojure

manning.com

71–77 of 77 posts

Re: Steve Yegge's foreword to Joy of Clojure

#71

Earlier quoted context omitted.

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

Re: Steve Yegge's foreword to Joy of Clojure

#72
post #66

Earlier quoted context omitted.

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

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:

http://www.paulgraham.com/avg.html

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:

http://joyofclojure.com/

Re: Steve Yegge's foreword to Joy of Clojure

#73

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?

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.

Re: Steve Yegge's foreword to Joy of Clojure

#74
post #7

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

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

Re: Steve Yegge's foreword to Joy of Clojure

#75
post #48

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…

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.

Re: Steve Yegge's foreword to Joy of Clojure

#76
post #48

Earlier quoted context omitted.

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…

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)
Post reply on HN