Live data from Hacker News

Why I am excited about Clojure

blog.txus.io

91–100 of 173 posts

Re: Why I am excited about Clojure

#91
post #78

Earlier quoted context omitted.

I'm curious how Haskell could be a clear winner for production code, particularly as it pertains to efficiency and time. Clojure sits on top of the JVM, and as such, has the benefit of interop with some of the most robust software packages in the world. Unless I'm missing something, you'd need to roll your own packages in Haskell for all this functionality. I would argue that the most efficient code is well maintaine…

Which kind of libraries are you thinking of that are missing?

imap library with idle support. haskellnet and imapget don't mention idle from what I can see. javamail does.

Re: Why I am excited about Clojure

#92
post #30
post #6

Earlier quoted context omitted.

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 and I highly doubt even double digits of HN would claim to be proficient, much less to love the language. I'm pretty sure many times more than 99 HN people have used Clojure extensively. Heck, there have been posts here from teams using it in production on their startups.

Apologies, I meant that as a percentage, not as an absolute number.

Re: Why I am excited about Clojure

#93
post #9

Earlier quoted context omitted.

I'm not exactly a Rubyist, but I really like Ruby. One of the things I like about it is its orthogonality: the concepts you learn work identically or similarly in different places, for different object types (where possible) so a relatively small handful of syntax + ideas + the library docs give you a running start at any program. The same applies to Clojure. There's laughably little syntax to learn, and once you've…

This is called homoiconicity[0] and it's one of Clojure's coolest features in my opinion. [0] http://en.wikipedia.org/wiki/Homoiconicity

The concept of homoiconicity has yet to really sink in for me. Conceptually, I understand what it means and I can explain it to others but I have yet to really understand it in a practical sense.

Re: Why I am excited about Clojure

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

I'm learning Clojure, and my favorite thing so far is that the Clojure community's idea of engineering is substantially better than Ruby's. For example: * immutability by default * decoupling by default * small libraries rather than mega-frameworks The comparison is not quite fair; but there's something to be said for appreciating a well-engineered solution versus the usual "SHIP FASTER, PEON!" schtick that Ruby has.

I think the SHIP FASTER PEON! thing has less to do with Ruby and more to do with the perception that Ruby is some magical tool with which you can rapidly build anything. I learned Ruby 100% on my own and never worked with anyone else who used it and I've found my approach to writing Ruby very similar to my approach to writing Clojure: decoupling by default, immutability by default (where possible), single use design for methods. It wasn't until recently that I learned that what I do naturally in programming has an entire school of thought behind it called SOLID design. I definitely agree that Clojure lends itself more to following SOLID design principles but I think that Ruby can as well.

Re: Why I am excited about Clojure

#95
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 admit to still not understanding what goes on with function definitions in clojure, but this idea of just making a micro change in clojure and evaling that and seeing the real time effects never seems to pan out for me.

I do lots of small functions that build on each other. If I make a change to one of the base functions, the higher functions seem to hold a reference to the old definition and I end up having to re-eval everything or go figure out every place I used that function.

I'm sure there is a better way but I haven't found it yet. I've tried using some ideas from Stuart Sierra about reloading namespaces, but I spend more time trying to orient my code to work with their ideas than just getting something done.

And documentation in clojure code in general is very poor. People think their code is self documenting. It is not.

While clojure is wonderful to write in, it's not nearly as enjoyable to read. The more macros and syntactic sugar people add to their programs, the less likely someone is going to be able to read, understand, and use that code.

Re: Why I am excited about Clojure

#96
post #28
post #25

Earlier quoted context omitted.

What I find really surprising is that other languages that have pretty decent REPL support have not embraced it so fully as Lisps have. Connecting to the live[0] instance a Rails or Django app, examining its internal state and making updates that don't involve more or less restarting the app is unusual at best. Ruby and Python borrow a lot from Lisp, including the REPL, but some of the most popular applications of th…

I'll stipulate that you might want to be very conservative about doing this with a production system. No kidding. I knew at least one guy who hosed a product launch by doing that. You even have to restart your development instance from time to time to make sure that your application state remains consistent. I've been scared to try, but I suspect that you could live-patch a server though if you were systematic about…

You even have to restart your development instance from time to time to make sure that your application state remains consistent.

There are ways around that. Stuart Sierra uses a scheme wherein the entire application is treated as a value, which can be re-generated on the fly. Of course, that's not terribly different in practice from restarting the whole environment, but it's faster and more convenient.

http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-r...

Re: Why I am excited about Clojure

#97

I am a Ruby guy torn between diving into Haskell or Clojure. Help! Every time I get excited about one feature of one (ClojureScript) I learn the other has something equivalent or potentially better (Haste). One thing that has put me off on Clojure is 1) the ugly as hell JVM stacktraces, 2) hitting the wall of the number system results in nasty JVM errors if you are used to Ruby's trivial (to the developer at least) h…

Hey, I'm a Rubyist in the process of learning Clojure and Haskell. Shoot me an email sometime. I'd love to bounce some ideas around nick dot mcd at gmail

Re: Why I am excited about Clojure

#98
post #41

Earlier quoted context omitted.

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 are there to allow you to call the function recursively while inside it. i.e. (= ((fn factorial [x] (if ( Note, this isn't run under TCO (see loop/recur).

Also, in your example, the recursive call is not in tail position. You would first need to rewrite it to use an acumulator parameter.

Re: Why I am excited about Clojure

#99
post #87
post #76

Earlier quoted context omitted.

I agree, though one has to compare apples and apples. experienced programmer vs inexperienced programmer is not fair. Of course if one is unfamiliar with how to build a flexible type safe systems, (newbies), there could be these sorts of issues. But for experienced programmers, not really.

though one has to compare apples and apples. experienced programmer vs inexperienced programmer is not fair. Oh, definitely. I just feel that far too many people focus on programming languages that are good for beginners without really thinking about them from an experienced programmer's perspective. What may be good for a beginner can often be terrible for an expert. What may be hard to understand for a beginner can…

Excellent point.

We regularly extol the virtues of expert-friendly text editors, but don't talk much about the appeals of expert-friendly languages and frameworks. Also worth thinking about: a huge amount of hype gets allocated towards beginner-level languages/frameworks that solve beginner-level problems (todo lists) more easily.

Re: Why I am excited about Clojure

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

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

Speaking as someone who has lately been studying Common Lisp, I'm not quite sure how I feel about Clojure; I like that it's hosted on the JVM, but I don't like the apparent lack of a debugger, which to my mind is a sine qua non of Lisp development. I haven't seen much in the way of progress on that front, either, but it's been a few months since I last looked into it; is there any sign that that handicap is likely to be repaired?
Post reply on HN