My impressions about Ruby

  • Thread starter Sam Sungshik Kong
  • Start date
S

Sam Sungshik Kong

This post is kinda long and a personal opinion which is not meant for
flaming. I think that sharing my experience and opinion may be helpful to
whoever starts to learn Ruby (especially coming from Python).



Sam



----



Hi, rubyists!



Now I have been learning Ruby for 2 months. My programming background (8
years) is Delphi(Pascal), VB, PowerBuilder, C#, Java, ASP(VBScript) and a
bit of C++. I liked C# best until I met Python at the end of last year. I
learned Python and performed several personal projects with it and decided
to make it my primary language.



Especially I liked Python's minimalism. It was very easy to learn since
codes are basically uniform. I used it for ASP projects instead of VBScript.
The length of codes were enormously diminished. The syntaxes and function
names were so intuitive and development time got shortened a lot. Its OO
concept is kinda messy but I didn't care much because I thought that I don't
need to create classes very much when I program with a script language.



In Python newsgroup, I found many people mensioning Ruby. At first, I didn't
think much of it as I was very happy about Python and didn't see any needs
to learn another language. People said that Ruby is pure OO. I thought that
pure OO would be a disadvantage for a scripting language. About 2 months
ago, I read an online article of matz's interview about ruby's philosophy.
That interested me. I decided to learn Ruby.



I ordered 3 books from Amazon - PickAxe(I didn't know that there's a free
online version. Actually I read it online so the book is still very clean
;-)), The Ruby Way, and Teach Yourself in 21 Days. I started with PickAxe.
Who said that Ruby is easy to learn? I think Ruby is at least 3 times as
hard as Python to learn. I somewhat hesitated to continue to learn it. What
bothered me was too many syntaxes, blocks, class object (class is an
object). Also I missed Python's something.__doc__ which returns brief help
descriptions about something. Especially obj.each do..end was hard to get
used to. So when I need to do something urgent, I still used Python.



Anyway, after I finished the first book, I started The Ruby Way. It was good
and I wished I could understand it better. After skimming the book, I
thought I needed to learn the ruby basics more thoroughly. I started reading
Teaching Yourself in 21 Days line by line. That made me understand most of
Ruby syntax. After finishing the book, I read the first chapter of The Ruby
Way again which is an excellent summary of Ruby features.



Now I know Ruby more than Python. Quite frankly, I don't want to go back to
Python. Ruby is now my most favorite language. The funny thing is that what
bothered me when I started to learn Ruby is actually now why I love Ruby.
Clean OO concepts (including single inheritance with mixin), blocks and rich
syntaxes (many aliases, operators). This proves that my prejudice was wrong.
I think Ruby's something...end syntax is really good. I started my
programming with Pascal which uses too long syntax like if ... begin ...
end. C's {} is simple but not very elegant. Python's forced indentation
seemed to be fine but sometimes causes trouble. Ruby is in the right way in
my opinion.



I also want to mention that ruby people are very kind to each other and
enthusiastic. That may be because its community is still small. I hope this
atmosphere lasts even after it grows bigger.



Well... I wish Ruby supported unicode like Python. Actually I think string
should be always unicode like C#. I'll wait and see Ruby 2.0.



To sum up, my decision to convert to Ruby was good. Now Ruby lets me focus
on what I want to program. I feel that I'm well-equipped now...:)



Thanks for reading.
 
D

David Garamond

Sam said:
end. C's {} is simple but not very elegant. Python's forced indentation
seemed to be fine but sometimes causes trouble. Ruby is in the right way in
my opinion.

Frankly, the only situation I've encountered when Python's necessary
indentation giving trouble is when I need to post Python code via email
and people reading my post from Yahoo Groups. Yahoo Groups strips
indentation so my Python code won't compile.
I also want to mention that ruby people are very kind to each other and
enthusiastic. That may be because its community is still small. I hope this
atmosphere lasts even after it grows bigger.

From my observation (and I think this has been discussed at least once
in this group), a hostile environment is usually caused by/originates
from a few dominant pricks. When those pricks go away, so is the
hostility. I hope we don't have to experience this in ruby-talk/c.l.r :)
Well... I wish Ruby supported unicode like Python. Actually I think string
should be always unicode like C#. I'll wait and see Ruby 2.0.

In Ruby, Unicode will probably _never_ be embedded as deeply as in
Java/C#. Ruby needs to be more unicode than Unicode, as it needs to
accodomate Japanese people more.

But that doesn't mean Ruby won't ever have good Unicode support.
 
G

gabriele renzi

il Fri, 09 Jul 2004 17:53:54 GMT, "Sam Sungshik Kong"
<[email protected]> ha scritto::


Thanks for considering the community nice, your comment is quite nice
too..


Just some points:

A class is an object in python too. And it has class methods, just
like ruby. Actually, they even both have metamethods (as in method of
the class' class). Python even have static methods. (which imho are
useless..)
If you want docstrings they're easy to implemente, take a look at
metatags on the ruby application archive: raa.ruby-lang.org.

And about unicode.. well, you could use the iconv library, but it's
agreed that better encoding handling is needed.
If you look in the archives You'll find references to m17n, and you'll
discover that unicode is impressively restricted and euro centric (I
could never ever ever suppose that a charset with 170000 characters
existed, but it does.). This is supposed to be fixed in ruby2.

Happy rubying :)
 
Z

zuzu

il Fri, 09 Jul 2004 17:53:54 GMT, "Sam Sungshik Kong"
<[email protected]> ha scritto::

Thanks for considering the community nice, your comment is quite nice
too..

Just some points:

A class is an object in python too. And it has class methods, just
like ruby. Actually, they even both have metamethods (as in method of
the class' class). Python even have static methods. (which imho are
useless..)
If you want docstrings they're easy to implemente, take a look at
metatags on the ruby application archive: raa.ruby-lang.org.

And about unicode.. well, you could use the iconv library, but it's
agreed that better encoding handling is needed.
If you look in the archives You'll find references to m17n, and you'll
discover that unicode is impressively restricted and euro centric (I
could never ever ever suppose that a charset with 170000 characters
existed, but it does.). This is supposed to be fixed in ruby2.

Happy rubying :)


all this complaining about unicode not being japanese friendly, i
don't understand it.
utf-8 includes hiragana, katakana, and the ~10,000 kanji. what's the problem?

also, what are the difficulties in implementing unicode encoding?
web browsers such as mozilla seem to support unicode without much problem.

-z
 
L

Lothar Scholz

Hello gabriele,

gr> And about unicode.. well, you could use the iconv library, but it's
gr> agreed that better encoding handling is needed.
gr> If you look in the archives You'll find references to m17n, and you'll
gr> discover that unicode is impressively restricted and euro centric (I
gr> could never ever ever suppose that a charset with 170000 characters
gr> existed, but it does.). This is supposed to be fixed in ruby2.

Unicode always was 4 Byte large. The IBM/Apple/MS connection was it
that cutted it down to 2 Bytes and "double" characters. So don't blame
Unicode for the UCS-2 system. Always use UCS-4.
 
J

Joao Pedrosa

Hi,

--- Sam Sungshik Kong said:
This post is kinda long and a personal opinion which
is not meant for
flaming. I think that sharing my experience and
opinion may be helpful to
whoever starts to learn Ruby (especially coming from
Python).



Sam

[snip]

What a beautiful post. ;-)

I think this quote has some truth, after all:

"It's so simple to be happy, but so difficult to be
simple." » Gururaj Ananda Yogi

I find Ruby very interesting, not because it's the
simplest language on earth, but because it struggles
to make the life of the programmer simpler. On the
other hand, the tool makers go crazy because they
can't wrap Ruby, due to it being so dynamic. At the
end of the day, we have all this power that can't be
shared with the newbies, because they can't have their
IDEs as they are used to with the other languages...
and even the language needs some care before one can
truly like it.

I have a couple of articles on Ruby at my site:
http://geocities.com/canalruby/index_en.htm

They aren't long, and they have been translated from
Portuguese to English. I still gotta translate some
text of my examples, though.

Thanks,
Joao



__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail
 
L

Lennon Day-Reynolds

Unicode support does not necessarily replace all standard Japanese
text encodings, and given that Ruby probably still has more users in
Japan than anywhere else, it seems a bit rash to demand that Matz
break support for many commonly-used Japanese charsets.

UTF-8 in the core would be nice, though.

Lennon
 
H

Hal Fulton

zuzu said:
so the problem isn't unicode, but supporting *all* encodings?
i respect matz's opinion on the backlog of code in other encodings...
but the purpose of unicode (iirc) is "one encoding to rule them all".

i would switch to unicode and tell everyone else to deal.

Read again. I read this as saying that Unicode is indeed
inadequate for the purposes of many Asian programmers.

Hal
 
Z

zuzu

Unicode support does not necessarily replace all standard Japanese
text encodings, and given that Ruby probably still has more users in
Japan than anywhere else, it seems a bit rash to demand that Matz
break support for many commonly-used Japanese charsets.

UTF-8 in the core would be nice, though.

Lennon

if it weren't rash i'd probably insist upon it more.

at the same time, i would have no love lost with a lack of iso-8895-1 encoding.

apple osx supports unicode natively for multilingualization (m17n) and
word is quite a success with its native japanese support. i believe
linux also supports unicode natively in the console at least. is it
windows screwing people up with legacy shift_jis?

-z
 
G

gabriele renzi

so the problem isn't unicode, but supporting *all* encodings?
i respect matz's opinion on the backlog of code in other encodings...
but the purpose of unicode (iirc) is "one encoding to rule them all".

i would switch to unicode and tell everyone else to deal.

you porobably need to read a larger piece of the thread.
As matz pointed out, a japanese person could send a mail to a korean
geek and have to use the same codepoint (is this the correct name?) to
mean different things in the different languages.
 
D

durgaprasad guda

--- Hal Fulton said:
to deal.

Read again. I read this as saying that Unicode is
indeed
inadequate for the purposes of many Asian
programmers.

Hal

Here about Unicode and Indian Languages:

http://acharya.iitm.ac.in/multi_sys/unicode/intro.html

saying:
"It is true that Unicode is a world standard proposed
and accepted by a large community of academics,
professionals and users. Unfortunately, it does not
really blend with the syllabic writing systems used in
india, much less provide the means to express
linguistic content without ambiguity and in a manner
that ties in well with our own understanding of
languages."

Prasad



__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top