News for hackers. Stuff that matters.
Re:A Django Developer’s Views on Rails by carbon8 on Thursday May 28, 2009 @05:11PM (#631030)
"Python vs. Ruby (Perl’s Ugly Sister)...This makes the Ruby syntax look like someone emptied all the symbols from the keyboard into a shotgun and shot them into your face."

It's amazing watching the python web development community develop, nurture and encourage so much mindless trolling. It has turned reddit completely septic and now this garbage is on the front page here? Sigh.

Re:A Django Developer’s Views on Rails by tvon on Thursday May 28, 2009 @05:28PM (#631058)
"It's amazing watching the python web development community develop, nurture and encourage so much mindless trolling."

Where are you seeing this? There are a fair number of Django and Python posts on HN and this is the first I've read that I can remember any such trolling.

Re:A Django Developer’s Views on Rails by carbon8 on Thursday May 28, 2009 @07:44PM (#631232)
"on HN"

Indeed, but even here it has been increasing. This made it to #2 within a half hour of posting. Even watching this thread you can see people driving through down modding even mdasen's post. Another recently popular blatant nonsensical anti-rails/pro-django troll that comes to mind was the "Magic Sucks, Django Rocks!" submission: http://news.ycombinator.com/item?id=596833

Re:A Django Developer’s Views on Rails by olifante on Thursday May 28, 2009 @07:18PM (#631190)
What the hell are you talking about? This is ONE article written by ONE person and suddenly it's the Python community's fault for allowing it to exist? Spare me.

This victimization technique should added to the list of Logical Fallacies, if it isn't already there.

Re:A Django Developer’s Views on Rails by foobar2k on Thursday May 28, 2009 @05:29PM (#631060)
The article was meant to address transition points from django to rails not start a flamewar. I was never encouraged by anyone to "troll", this is from my personal experiences. There's no conspiracy theory here.
Re:A Django Developer’s Views on Rails by olifante on Thursday May 28, 2009 @06:14PM (#631118)
As a pythonista who likes ruby, I think your "Perl's ugly sister" comments were a shot in the foot and detracted from the rest of your argument, which concentrates on rails and has little to do with Ruby itself.
Re:A Django Developer’s Views on Rails by berntb on Thursday May 28, 2009 @06:31PM (#631133)
Frankly, I'm quite used to see this kind of trolling spam about Perl.

You could answer by asking after specific problems with "Perl Best Practices" or what can top e.g. Moose, but language wars (+)? I AM able to grow a beard....

This group of scripting languages seems really similar in functionality and usability today (so if I change environment, I'd probably go functional). The large difference seems to be in the cultures around them...

(+) I'm all for editor wars, of course! :-)

Re:A Django Developer’s Views on Rails by immad on Thursday May 28, 2009 @06:11PM (#631109)
Oh come on, it was funny.

You need to lighten up a bit. He gives points on both sides. I do only Ruby and I get what he means.

Re:A Django Developer’s Views on Rails by petercooper on Thursday May 28, 2009 @06:33PM (#631135)
What does he mean then?

I've looked at quite a bit of Python and Ruby source code and Python uses square brackets, periods, mathematical symbols, parentheses, and colons in similar ways. Indeed, a method definition in Ruby uses fewer symbols (no need for the colon on the end, or even the parentheses, although that's against common Ruby style). Python even makes nonsense like using double underscores in method names obligatory. Or how about Python's obligatory parentheses on all method calls?

How is Ruby really more "line noise" than Python? Seriously. Sure, Ruby allows you to be more lax than Python and write poor, "line noisy" code, but good Ruby is no more "line noise" than good Python.

Re:A Django Developer’s Views on Rails by sri on Thursday May 28, 2009 @07:13PM (#631184)
ruby uses < (less than) for inheritance; also regular expressions start & end with / (slash). you have %W, %w for arrays and %q, %Q for string. things like "class << self ..." looks weird to those new to ruby. also stuff like "a ||= ...". and of course pre-pending '@' for instance variables and '@@' for class variables.

also when i use regexps in ruby i then say "/re(g)ex/ =~ 'string' && $1". in python that would be multiple statements: "m = re.match('re(g)ex', 'string'); m.group(1)"

in python existing syntax (or more familiar syntax) is used to accomplish all the above.

Re:A Django Developer’s Views on Rails by tptacek on Thursday May 28, 2009 @07:57PM (#631255)
I never use %w for arrays and I never use %Q for strings. After years of schlepping through Python's regular expression support --- support not dissimilar from the regex support C++ has --- /regexes/ are a gift from god.

Also, your Ruby vs. Python regex examples aren't even equivalent.

Re:A Django Developer’s Views on Rails by petercooper on Sunday May 31, 2009 @11:47AM (#634751)
Sigils on variables are a good point. This is an area where I think Python wins out. Dependence on "self" all over the place is irritating at first but ultimately quite comforting - especially when you wonder whether you're going to screw up your attributes when you use the same name for a local variable in your Ruby method ;-)

But on inheritance - you have to put the class name in round brackets in Python, no? That's 2 characters to Ruby's 1.

Stuff like a ||= shouldn't be considered Ruby-specific noise as Python also has the same idiom as in a += and a -=, just not with ||. || is arguably noise over "or" but it shouldn't seem like cryptic noise with any sort of experience of C, C++, Java, JavaScript, or almost any other mainstream language.

Further, that Ruby code of yours does seem more Perlish than Rubyish, but I suspect this is because Ruby style is gradually shifting away from Perl-like styles to more idiomatic approaches. For example, I'd probably choose 'string'[/re(g)ex/, 1] or if I was trying to be "proper" then something like m = string.match(/re(g)ex/); m[1] (or potentially use Regexp#match, but I far prefer String#match). I see those solutions more typically than those you present - and the latter is quite like your Python example - but.. TMTOWTDI and that's Ruby's greatest asset :)

Re:A Django Developer’s Views on Rails by chairface on Thursday May 28, 2009 @09:43PM (#631361)
I took him to mean all the built in special variables, like $$ and $! and $?. I don't see them too often in Ruby, but I'm pretty sure the language supports pretty close to Perl's full set. Not a great argument though, unless most of the Ruby I've seen isn't really representative of the whole.