Ruby opinions (111)

1 Name: #!usr/bin/anon 2005-11-23 17:55 ID:rgxG1g8s

I am learning Ruby right now, to play with Ruby on Rails, and I don't know yet wether I like it or loathe it, it looks pretty much like the illegitimate child of Perl and Python, which sounds very wrong.

What are your opinions about Ruby?

2 Name: #!usr/bin/anon 2005-11-23 20:06 ID:mHflta8j

No, no, Ruby is "the bastard child of Smalltalk and Perl." Not Python, Smalltalk. Let's be consistent in our dissing of Ruby here.

And yeah, I agree completely that that is what it is, but whatever you find useful...

3 Name: #!usr/bin/anon 2005-11-23 22:29 ID:rgxG1g8s

So should I run away while I still have time, or should I pretend I like it until I actually do?

4 Name: #!usr/bin/anon 2005-11-24 09:25 ID:Heaven

How about pretending to run away until you actually do?

5 Name: !WAHa.06x36 2005-11-24 12:46 ID:vVis4zRX

The bastard child of Smalltalk and Perl can't be any worse than the bastard child of Smalltalk and C - hello, Objective-C!

I mean, Perl is messed up from the start, it's not like you could easily make it any more strange.

6 Name: Albright!LC/IWhc3yc 2005-11-24 14:37 ID:Heaven

Hate it. Hate Perl too, though, so it's no surprise.

7 Name: #!usr/bin/anon 2005-11-24 19:42 ID:62cSNc39

Love it. It's smalltalk with clear syntax and just the right amount of sugar.
You shouldn't jump straight into rails, though, IMO. Although it's a great web framework, it just doesn't feel like ruby to me.

8 Name: #!usr/bin/anon 2005-11-24 23:18 ID:rgxG1g8s

>>7
I am only learning Ruby so that I can evaluate Rails right now, do you mean that trying out Rails without enough Ruby experience is going to make me waste time, or to make learning Ruby much more difficult?

9 Name: #!usr/bin/anon 2005-11-28 10:17 ID:uW16arsf

Ruby is nice, but it looks like it's going to start getting weird syntax in 1.10. Which is a pity.

>>6
What's so similar between Ruby and Perl that it's unsurprising that if you hate one, you hate the other?

10 Name: dmpk2k!hinhT6kz2E 2005-11-28 12:17 ID:Heaven

How about they start getting rid of some weird syntax first?

Ruby proponents love to joke about semicolons, but then replace that problem with @. There's the really strange ".." vs "..." You can't type variables if you want to. #{} makes some strings look like linenoise. Regex is hamstrung. "end" is questionable.

If you fixed the first three, a significant source of errors would just vanish. Why Ruby replaces s/// with sub/gsub is beyond me. #{} needs to die.

Anyway, Ruby really is superficially quite similar to Perl, which is why I like it. I think of it as Python for Perl coders. If only it was faster (is YARV ready for prime time?).

11 Name: #!usr/bin/anon 2005-12-02 13:36 ID:sOPZ8Q9+

>>7 It's smalltalk with clear syntax
LOL, what ? Obviously you have never written anything serious in Smalltalk.

>>8 I am only learning Ruby so that I can evaluate Rails
Smalltalk is superior. Take a look at http://www.seaside.st/.

12 Name: #!usr/bin/anon 2005-12-02 18:13 ID:zFgU8rzo

>Smalltalk is superior. Take a look at http://www.seaside.st/.

...that site is kind of b0rked for me.

13 Name: #!usr/bin/anon 2005-12-02 22:33 ID:rgxG1g8s

>>11
So basically your post is stating that smalltalk is superior to ruby, and is backing it up by stating that you have experience in smalltalk and accusing >>7 of not having any?

> Smalltalk is superior. Take a look at http://www.seaside.st/.

Only took like 2 minutes to evaluate it, but I am running away. There are too many big words on the front page and way too little big picture explanation, and of course no real-world example, let alone any large site or commercial site example. Is it really supposed to be used to make real sites?
I hope you can prove me wrong on this.

14 Name: #!usr/bin/anon 2005-12-02 22:49 ID:62cSNc39

>>11
Someone is porting seaside to ruby...too bad no one is using seaside or the port...
And no, I haven't written anything serious in smalltalk (has anyone?). The syntax is just too unbearable.

>>10
I don't find any of your examples weird. And I can't understand why you want static typing?

15 Name: #!usr/bin/anon 2005-12-02 22:57 ID:rgxG1g8s

>>11,14
What does Seaside does better, more, faster or differently that Rails?

16 Name: dmpk2k!hinhT6kz2E 2005-12-03 03:15 ID:Heaven

>>14

> And I can't understand why you want static typing?

Because I don't like it when I mistype a variable, and instead of telling me about it, it silently makes a new one? If it catches something that stupid right off the bat, it saves me wondering why the code doesn't work.

Same applies for @. If I forget the @ in front of the variable, does it tell me about it? Nope, it just makes a new one, because @somevariable and somevariable are different things.

I don't particularly care about the other aspects of static typing, I just want to know if something like the above occurs.

17 Name: dmpk2k!hinhT6kz2E 2005-12-03 03:37 ID:Heaven

Talking about which, explain to me why sub does two passes.

Okay, Ruby ripped of some ideas from Perl, including regex. GJ! Unfortunately, it didn't include the rather terse s/// syntacitic sugar. Fine, it's not pretty, but I can live with that. However:

i = '\\'
puts i.sub(/\\/, '\\')

The result is a single backslash. What about this:

i = '\\'
puts i.sub(/\\/, '\\\\')

Should give two, right? No, it gives one. If I want two, I need to use either '\\\\\\' or '\\\\\\\\'. Or I can use:

i = '\\'
puts i.sub(/\\/) { '\\\\' }

Least surprise? I think not.

18 Name: #!usr/bin/anon 2005-12-03 07:22 ID:62cSNc39

>>16
If you need an object to behave in a certain way, check whether the methods you need are available ("string".respond_to? :split)
If you need an object of a specific class, well, nothing is stopping you from doing "string".is_a? String

Oh, and @somevariable is an instance variable, somevariable is not. They shouldn't be the same.

Name: Link:
Leave these fields empty (spam trap):
More options...
Verification: