Live data from Hacker News

Why I am excited about Clojure

blog.txus.io

11–20 of 173 posts

Re: Why I am excited about Clojure

#11
post #5

Earlier quoted context omitted.

At a fairly superficial level, the :keyword syntax seems reminiscent of Ruby. But I'm neither an expert Rubyist nor Clojurist (Clojurian?) so I would defer to those more familiar.

There are quite a few things in Clojure that are similar to Ruby. nil? empty? and count all do in Clojure what you'd expect from Ruby. take-while, drop-while are a couple other examples.

The funny thing is that the reason for the similarity is that Matz "borrowed" most of those features from older lisps.

Re: Why I am excited about Clojure

#12
post #8

I'm a Python user and I love Clojure. I guess I missed the Go bus. But there's 2 things about it I'm not too fond of. One is due to it's declarative nature (which I love), it's quite difficult to get up to speed with unfamiliar code. The 2nd is due to it's JVM roots. Those stacktraces, man. And when it happens on an anonymous funtion in a not so documented library, ugh. It's like hitting a brick wall. The first, I ca…

Oddly enough I never used this, but maybe named fns might help? (http://clojure.org/special_forms#Special%20Forms--%28fn%20na...)

    (fn my-name []
      (throw (Exception. "boom")))
(Sorry, I don't know Clojure internals well enough to have great answers to your explicit questions.)

[Edited: thanks to jerf for pointing out the inconsistency in a term I used.]

Re: Why I am excited about Clojure

#13
post #2

What is it about Clojure that Rubyists love? I am a Rubyist who is new to Clojure (I love it) and I cant explain it myself. Clojure was suggested to me by several other Rubyists. I find myself suggesting it to other Rubyists as well....

At a fairly superficial level, the :keyword syntax seems reminiscent of Ruby. But I'm neither an expert Rubyist nor Clojurist (Clojurian?) so I would defer to those more familiar.

They both have same roots, the :keyword syntax comes from Common Lisp and others:

    From Matz (creator of Ruby):

    Ruby is a language designed in the following steps:

    * take a simple lisp language (like one prior to CL).
    * remove macros, s-expression.
    * add simple object system (much simpler than CLOS).
    * add blocks, inspired by higher order functions.
    * add methods found in Smalltalk.
    * add functionality found in Perl (in OO way).

    So, Ruby was a Lisp originally, in theory.
    Let's call it MatzLisp from now on. ;-)

Re: Why I am excited about Clojure

#14
That last feature is certainly one of my favorite parts about Clojure. It's one of my favorite parts about Lisps in general actually, but Clojure has a very good handle on it. Having to compile a program before seeing if the changes you made work can be a nuisance. Interpreted programs are slightly better, but being able to make micro-changes to a running instance of a program and seeing in real-time how it affects the whole program is the best. The feature that Clojure misses here is the ability to load new libraries (jar files) on the fly, but that's not Clojure's fault, but rather the JVM's fault.

Re: Why I am excited about Clojure

#15
post #2

What is it about Clojure that Rubyists love? I am a Rubyist who is new to Clojure (I love it) and I cant explain it myself. Clojure was suggested to me by several other Rubyists. I find myself suggesting it to other Rubyists as well....

Well, I think it's because Ruby has borrowed a lot of features from Lisp (and Clojure is also a Lisp). Here's an article that argues that it is actually an acceptable Lisp: http://www.randomhacks.net/articles/2005/12/03/why-ruby-is-a...

Re: Why I am excited about Clojure

#16
post #14

That last feature is certainly one of my favorite parts about Clojure. It's one of my favorite parts about Lisps in general actually, but Clojure has a very good handle on it. Having to compile a program before seeing if the changes you made work can be a nuisance. Interpreted programs are slightly better, but being able to make micro-changes to a running instance of a program and seeing in real-time how it affects t…

I could load jars on the fly in Java.

Re: Why I am excited about Clojure

#17
post #6

Earlier quoted context omitted.

I'll go out on a limb and say that everyone on HN loves Clojure! It seems to be the least cribbed language here. Its features are hard to beat - that and Rich Hickey's wonderful talks[0] make you all the more confident in Clojure as a language! [0] - http://www.infoq.com/author/Rich-Hickey

In a community of several 10's of thousands of people saying 'everyone' is always wrong. To love clojure you'd have to first become proficient in it and I highly doubt even double digits of HN would claim to be proficient, much less to love the language. In general, you speak for yourself and yourself alone and my take from your comment is that you love clojure. I have played around with it but not enough to be able…

To love clojure you'd have to first become proficient in it...

I do not think that the GP was using 'love' in that sense. You can 'geek out' about news and information about something without actually being much involved in that something at all. Witness the popularity of posts about space launches on HN. I doubt that there are very many actual rocket scientists, but we sure do have a lot of people interested in progress made in space.

Re: Why I am excited about Clojure

#18
post #2

What is it about Clojure that Rubyists love? I am a Rubyist who is new to Clojure (I love it) and I cant explain it myself. Clojure was suggested to me by several other Rubyists. I find myself suggesting it to other Rubyists as well....

They have a similar taste, one of many examples is both are dynamic typed. There's at least some LISP ancestry for both (more for Clojure obviously).

As for differences I like Clojure because I can compile up an uberjar and hand that uberjar to ops and walk away, so its faster and easier, whole regions of "fun" (In the dwarf fortress sense of "fun") that exist in ruby deployments simply don't exist as a class of problem in clojure deployments.

Re: Why I am excited about Clojure

#19
post #14

That last feature is certainly one of my favorite parts about Clojure. It's one of my favorite parts about Lisps in general actually, but Clojure has a very good handle on it. Having to compile a program before seeing if the changes you made work can be a nuisance. Interpreted programs are slightly better, but being able to make micro-changes to a running instance of a program and seeing in real-time how it affects t…

I could load jars on the fly in Java.

TIL that that is possible. Just googled it apparently requires custom class-loader. Thanks for this.

Re: Why I am excited about Clojure

#20
post #8

I'm a Python user and I love Clojure. I guess I missed the Go bus. But there's 2 things about it I'm not too fond of. One is due to it's declarative nature (which I love), it's quite difficult to get up to speed with unfamiliar code. The 2nd is due to it's JVM roots. Those stacktraces, man. And when it happens on an anonymous funtion in a not so documented library, ugh. It's like hitting a brick wall. The first, I ca…

Oddly enough I never used this, but maybe named fns might help? ( http://clojure.org/special_forms#Special%20Forms--%28fn%20na... ) (fn my-name [] (throw (Exception. "boom"))) (Sorry, I don't know Clojure internals well enough to have great answers to your explicit questions.) [Edited: thanks to jerf for pointing out the inconsistency in a term I used.]

Named... anonymous... functions? Wuzzah fuzzah?
Post reply on HN