Ruby

Programming, for all ages and all languages.
Post Reply
User avatar
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Ruby

Post by df »

Started getting into Ruby last week, and wow! I really love it. Id be quite happy if I never had to go back to any other language right now :) _Especially_ php. ugh.

Its got to the point where I detest doing stuff in php...

my copy of Pickaxe II should arrive in a day or two... sweeet..

shame my host doesnt have ruby installed on it :( ohwell...
-- Stu --
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Ruby

Post by Solar »

You might have a better chance at Python - the script language impressing me the most ATM. A bit more widespread as Ruby, and just as much a beauty.
Every good solution is obvious once you've found it.
User avatar
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re:Ruby

Post by df »

nah didnt like python at all. have tried to get into python several times and it just never happened for me.

got into ruby without a single problem tho.

which is surprising as i ULTRA_DETEST perl, but then I dont program ruby using perlisms anyway.

the thing that put me off python the most was all the self stuff and the monotonously repeated __ everywhere.

on the other hand, i think both languages are much the same...
-- Stu --
chris

Re:Ruby

Post by chris »

Solar wrote: You might have a better chance at Python - the script language impressing me the most ATM. A bit more widespread as Ruby, and just as much a beauty.
I am one who loves Python also! I can't stand Perl, but Ruby is okay :).
mystran

Re:Ruby

Post by mystran »

I agree with those who say Ruby combines the best parts of Lisp, SmallTalk and Perl. It's definitely MUCH more agile language than Python. I just finally gave up trying to even learn Python after realizing how many stupid limitations there are. Python might be good for simple things, but Ruby scales a LOT better.

I might have told this before, but I learned Ruby by writing a portal server with it. Categorized bookmark-system, integrated Google (I mean, it displayed the result in the search portlet) search, forums, basic RDF-portlets, standalone HTTP implementation.... and it all took me about a three days. That is, three days from when I didn't know Ruby at all to the point I had the above stuff running on top of it. Granted, I didn't do HTTP/1.1-KeepAlive, and the whole thing was bit of a hack, but...
The only thing I used besides standard libraries was the database libs.

There isn't much you can't do in Ruby with a few lines of code, and Ruby seems to have miraculous resistance to 'quick hacks'. Even sources which were written as quick hacks on top of quick hacks on top of quick hacks seem to stay maintainable MUCH better than any language I've ever seen.

Some of the definite highlights are passing blocks to functions (or capturing them as first-class closures), the iterators, first-class regular expressions, basic types that play nice with each other, Perl-style pronouns, extensible case-structure (it just calls a method to do the case comparisons, and you can have different types of "compare-agaist" objects in there), and the serious attitude towards OOP (everything, including 'nil', is an object, no exceptions).

Ruby was the first OOP language that really made me think that OOP might actually be an useful paradigm. It was only later I realized the reason I hadn't liked OOP before was because I had only see the C++/Java-school of OOP, and not the much more dynamic SmallTalk school.
Post Reply