Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Let me ask you a question: you arrived at the top of the article with a preconceived idea about Ruby. Did reading the article give you any insight, did you learn something about Ruby or about yourself by reading the post?

If not, please downmod it, I have failed.



or about yourself

At the risk of getting even more downmods for saying true things here, can I just point out that it's a little arrogant to pretend that a blog post about Ruby is going to move someone towards self-actualization?

Anyway, have you failed? No. You wanted to show us your favorite line of Ruby code, and you did.

As for me, I don't really have a favorite "one line" of code, but I fondly remember when I was a kid typing in Nibble Magazine's "one and two-liner" programs. Actually, the "lines" were lines as defined by the Apple II's command line buffer limit. Here's an example:

http://www.apple2.org.za/mirrors/ground.icaen.uiowa.edu/appl...

Maybe I'm not a sufficiently abstract person. My favorite two lines of code was an honest-to-god graphical car driving program in two lines of APPLESOFT BASIC [1]. Two lines of code in a language so crappy it's basically a joke. And yet...a full-on-graphical-car-racing program. I'm strongly tempted to think that APPLESOFT BASIC is superior to Ruby, based on the evidence I've seen.

Point is: The next time you show a feature of a langauge, maybe make it solve a problem, or create something real, rather than just showing how few characters it takes to do something banal. Adding numbers together? Seriously, it's a solved problem.

[1] Sorry for the capital letters, but I'm in Apple mode now:

http://www.apple2.org/images/Literature/a2/BlueBook.JPEG


"have you failed? No. You wanted to show us your favorite line of Ruby code, and you did."

Actually, I wanted to discuss how Ruby's open classes promote language innovation from the fringe, not to try to impress you with how clever that line of code is.

"The next time you show a feature of a langauge, maybe make it solve a problem, or create something real, rather than just showing how few characters it takes to do something banal."

And there you have why my article failed you: you think it is about how useful that line of code is, or how clever it is, or what problem it solves, when I think it is an example of how Ruby is different from centrally planned language.

Is it great code? Of course not. Symbol#to_proc may even be an evolutionary dead end, AFAICT it's just a way to make OO code pretend that it's functional code.

Your criticisms point out that I need to work harder on establishing and communicating my theses, thank you.




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

Search: