Ruby’s not ready - an indepth essay

The points he was trying to make are incredibly biased.

Ruby works like people do. That's why I like it. That's why it's faster to program in.

If people aren't open to programming in a more natural way, Ruby will just "get in the way". So, it's not for them.

All of the "downsides" are worth this. It's pragmatic.

Julian.

Learn Ruby on Rails! Check out the FREE VIDS (for a limited time) VIDEO #3 out NOW!
http://sensei.zenunit.com/

···

On 08/04/2008, at 1:21 PM, Song Ma wrote:

Interesting. But what I am thinking about is not the attitude of the author,
but the points he was trying to make. The deep review and discussion will
benefit the language insights.

2008/4/8, Avdi Grimm <avdi@avdi.org>:

2008/4/7 Song Ma <songmash@gmail.com>:

Ruby's not ready | glyphobet • глыфобет • γλυφοβετ

The piece can be summarized in two brief quotations:

First, near the beginning:

   I promise we'll be as objective as humanly possible

then, about 500 pages later:

   TMTOWDI is bad

In other words, I'll be objective, so long as objective means judging
things according to my own lack of imagination.

--

Avdi

There's no deep review here. It's a shallow review written in a
shallow way. The author is completely and wholly incorrect that:

  "The options for Ruby 1.8 users are to install 1.9 or the third-party
   Oniguruma package... In general, it's a bad sign when a third-party
   reimplements a large chunk of functionality in an existing piece
   of software."

This represents pure ignorance. Yes, Ruby 1.8 users must install
Oniguruma for the features that Oniguruma provides. But it's not a
"third-party" product as such; it *is* the Ruby 1.9 regexp engine.
This fact has been known and stated for at least three years, and
Oniguruma is made available as an option for people who need the
additional features. (Free clue: not many. Those who do need it really
need it. Most people don't.)

The author is similarly wholly ignorant of Ruby 1.9 and Ruby 2.0
discussions and assumes that "lack of English documentation" is the
same as "lack of documentation." The author is a fool for believing
the claim that Ruby 2 has been in development longer than Perl 6. Perl
6 was ramping up as I switched to Ruby in 2002 and Ruby 1.8 was
released a bit after that (I got my Ruby 1.8 Pickaxe at the 2005
RubyConf in San Diego). Matz has been talking about the next
generation of Ruby (Ruby 2.0) for a while, but that's no different
than the discussions and experiments surrounding Py3k.

Worst of all, the author treats both the Alioth shootout and the Zed
Shaw rant as things worthy of positive attention, when both are, well,
worthless. The Alioth shootout has been known to be worthless for
years yet periodically some idiot treats it as serious. Zed's rant was
a *rant*. It too had things that are known to be false, things that
are probably libellous, and things that were simply taken out of
context.

All in all, the authors pretend to be objective when they are anything
but. They've drunk the Guido-ade and as the resulting article shows
had no interest in showing Ruby in a positive light. Most of the
things that they've mentioned are *differences* from Python (neither
positive nor negative) or have little importance to most applications.
(Yes, Virginia. Most people don't need full-on Unicode munging in
their code. It's necessary when you do need it, but most people don't
need it.)

This article deserves to be buried with great prejudice.

-austin

···

2008/4/7 Song Ma <songmash@gmail.com>:

Interesting. But what I am thinking about is not the attitude of the author,
but the points he was trying to make. The deep review and discussion will
benefit the language insights.

--
Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/
* austin@halostatue.ca * You are in a maze of twisty little passages, all alike. // halo • statue
* austin@zieglers.ca

However I did sympathise with the author's comment on having too many
ways to do the same thing. They pretty much mirror my feelings: that
you either learn them all (in which case you lost in simplicity) or
you'll have a very hard time reading other people's code. I admit
though that it makes _writing_ code easier.

I know however that the Ruby community is strongly in favour of this
"feature", so I was wondering why.

Learning Ruby as my first language, I can emphasize with this issue.

But: The TMTOWDI approach helps with productivity. A lot. I switch
between the different idioms and methods as the situation requires.
Sometimes it is more natural to use #match, sometimes it is more natural
to use #scan, depending on the situation.

The only problem I've had is the less than optimal documentation for
Ruby, so it is rather difficult to find what a method does or,
sometimes, where it comes from.

And lets face it: Most code in the world is write-only: It's written
once, and becomes instant legacy code. How often is code completely
revisited, and has to be re-factored in an amount of time that makes it
impossible to wrap one's head around it again? Not much, and it doesn't
happen often (mostly in languages that are used in the enterprise, where
refactoring tools are available, and IDEs are more useful than with Ruby
at the moment).

Besides, it helps with problem solving, I've noticed, the more Ruby I
pick up. It's a matter of using the right tool for the right job within
the language itself.

However, I've not yet formalized my IT knowledge, so take it with a
grain of salt. My view is an opinion. Treat it as such.

- --
Phillip Gawlowski
Twitter: twitter.com/cynicalryan

Write first in an easy-to-understand pseudo-language; then translate into
whatever language you have to use.
~ - The Elements of Programming Style (Kernighan & Plaugher)

You answered your own question here. It makes writing code a joy. And,
unlike, say, Perl (or even more extremely, K), Ruby isn't quite a
write-only programming language. (If you use all the idiot Perlisms you
can make it that way, but almost nobody uses those thankfully!)

Ruby is by no means a perfect language. But as a former Pythonista (I
started with Python at v1.3), Ruby, despite its warts (and this includes
the UNICODE issue, the lousy performance, the bad threading model and
the whole host of other things people have ranted about for ages now)
remains my first and favourite language I reach for when I'm starting a
project. As things move along in the project I reach for other
languages to supplement or replace it (recently Erlang has grabbed my
imagination for certain key application elements), but Ruby's my first
choice and is usually in the final product in some form or another.

···

On Tue, 2008-04-08 at 23:20 +0900, Diego Virasoro wrote:

However I did sympathise with the author's comment on having too many
ways to do the same thing. They pretty much mirror my feelings: that
you either learn them all (in which case you lost in simplicity) or
you'll have a very hard time reading other people's code. I admit
though that it makes _writing_ code easier.

I know however that the Ruby community is strongly in favour of this
"feature", so I was wondering why.

--
Michael T. Richter <ttmrichter@gmail.com> (GoogleTalk:
ttmrichter@gmail.com)
If there's one thing that computers do well, it's to make the same
mistake uncountable times at inhuman speed. (Peter Coffee)

M. Edward (Ed) Borasky wrote:

Well ... I guess that depends on which docs you are talking about.
There's plenty of documentation on Rails, three of the major GUIs --
Shoes, FXRuby and QtRuby -- have books in "print" on them, there are two
major Ruby "cookbooks", the documentation on Ruport and RSpec is
excellent, etc.

I shouldn't have to buy a book (like the PickAxe), to get decent
documentation. A book should be one option, among many, to get to the
documentation. I'll elaborate on that in the next paragraph.

A week or so ago when the Ruby Mendicant was considering working on the
docs, I expressed the opinion that the documentation is the
responsibility of the creator -- someone shouldn't have to do it for
them. Now if the creator is a better coder than tech writer, perhaps the
project can take on someone. But my experience has been that it's very
rare for someone to be an excellent coder and a poor tech writer.

While I agree, that the project is responsible for its own documentation
~ (its rather obvious, is it not?), the tools we have in the Ruby
community to create documentation are limited to RDoc, a rather hacky
solution (Correct me if I'm wrong, but Dave Thomas said as much),
intended as a stand-in until a more useful tool comes around.

Sadly, as it is so common in the world, the temporary solution becomes
the permanent solution, with all its short-comings (see a discussion on
the mixup of Ruby Core and Ruby StdLib documentation on
ruby-doc.org/core). And that is a big obstacle, making it unnecessarily
difficult for newbies like me (I still am a newbie to Ruby, despite
using it for more than a year, the language is just that complex in its
simplicity, which is a major appeal for me, but that is a rant for
another time).

We, as a community, have to provide tools that make it easy and painless
to generate documentation, and generate it in different formats. In my
most humble opinion, we should take a look at Javadoc, and see what we
can steal^H^H^H^H^H implement for Ruby. I fully recognize that Javadoc
is great for Java, and less so for Ruby, but that doesn't mean it
doesn't have useful ideas that make it a breeze to generate documentation.

Anecdotal evidence: When building the gem for Gondor Library I was
struggling in including the README and LICENSE files in RDoc. The files
were included in my Rake task's FileList for gem generation, as well as
standalone doc generation.

However, the gem didn't include the files in ./, only ./lib, much unlike
the RDoc task. I had to explicitly tell the gem, to include extra files.
I lost more than an hour to that. The outdated RubyGems documentation
didn't really help. Fortunately, I found other Rake tasks, and could
eliminate the problem.

But it shouldn't be this way, and I have the feeling it is a shortcoming
of RDoc (maybe not, I haven't looked at RDoc itself, so my assessment of
the reason maybe wrong, but my point still stands).

Also, that RDoc generates frames for usage isn't the ideal solution,
IMO, as it makes search difficult (via a browser's search, anyway).

And AFAIK, RDoc cannot spit out PDFs, PostScript, or LaTeX, or something
other than ri. And that makes it unnecessarily difficult to generate
non-RDoc documentation without third party tools (and I don't really
want to learn Yet Another Tool that is not directly related to
increasing my productivity in writing Code (that's what I want to do,
not write comments or documentation).

2. My main concern is not with the documentation. My main concern is
that both the syntax and semantics of the language seem to be more fluid
than "pragmatic" considerations would dictate. I more or less grew up
with FORTRAN, although I missed FORTRAN I. So I'll use its evolution as
an example.

Ten years into its evolution, an ANSI committee was formed to
standardize the language. Users and vendors sat around a huge table and
thrashed out what would break the least code, what was easy to
implement, what kinds of programs people wanted to write in the language
that they couldn't, etc. The result was FORTRAN 66. 11 years later there
was FORTRAN 77, etc.

C and C++ went the other way, with the STDLIB growing steadily, and new
features being added. Yet, C/C++ are more in use.

However, both FORTRAN and C are anecdotal evidence. The scope of the
languages is not really the same, and neither is Ruby's.

I think there are enough "killer apps" now that we know what we can't
take out of Ruby without breaking Rails, RSpec, Ruport, etc. And from
MRI, KRI, jRuby and Rubinius, I think we know what's easy to implement
and what isn't. But what I have no clues about is what programs people
want to write in Ruby that they can't write now.

For the power that Ruby gives me: I want to write everything in Ruby.
It's good at pretty much everything I can throw at it, except
number-crunching. But I can farm that out to C or Java, or maybe .NET
once IronRuby is "production ready".

Personally, I haven't reached the point where I feel that Ruby isn't up
to the task at hand, or severely limited. That's anecdotal, though. I'm
sure that people who have to do some heavy lifting and datamunging to do
have a different opinion on that (but more related to Ruby's speed, than
Ruby's syntax and expressiveness, or am I mistaken?).

- --
Phillip Gawlowski
Twitter: twitter.com/cynicalryan

~ - You know you've been hacking too long when...
...you dream that your SO and yourself are icons in a GUI and you can't get
close to each other because the window manager demands minimum space between
icons...

Now FORTRAN is 50 years old, there's a FORTRAN 95 standard, and the
language is still in use (I think -- I haven't written any since 1990).

Most definitly. In my office we is it constantly. There's only one
serious contender for number crunching here and it's C, but then C is
much more of a pain to use, and you need to use the correct flags to
get the kind of optimisations that Fortran gives you out of the box.
Oh, and Fortran has now moved to Fortran 2003 standard (and they are
working on 2008). It's a really nice language to write in... though
it's not suitable for that many jobs.

But this is totally OT, sorry. (it's just rare to find another person
with a good opinion of Fortran ^_^)

Diego

2. My main concern is not with the documentation. My main concern is that
both the syntax and semantics of the language seem to be more fluid than
"pragmatic" considerations would dictate. I more or less grew up with
FORTRAN, although I missed FORTRAN I. So I'll use its evolution as an
example.

Ten years into its evolution, an ANSI committee was formed to standardize
the language. Users and vendors sat around a huge table and thrashed out
what would break the least code, what was easy to implement, what kinds of
programs people wanted to write in the language that they couldn't, etc. The
result was FORTRAN 66. 11 years later there was FORTRAN 77, etc.

Now FORTRAN is 50 years old, there's a FORTRAN 95 standard, and the
language is still in use (I think -- I haven't written any since 1990). Ruby
is a tad older than ten years, and I think maybe it's time for some
standardization on the syntax and semantics.

I think there are enough "killer apps" now that we know what we can't take
out of Ruby without breaking Rails, RSpec, Ruport, etc. And from MRI, KRI,
jRuby and Rubinius, I think we know what's easy to implement and what isn't.
But what I have no clues about is what programs people want to write in Ruby
that they can't write now.

This is the insightful point I was expecting after following such a long

mail chain. Now I am implementing one Rails application which requires to be
supported by both MRI (1.8.5) and JRuby (1.0.3, compatible with MRI 1.8.5).
I found so many inconsistencies between these two "Ruby". (Or Rubies?). Even
the MRI test cases can not pass in JRuby. That's painful. I remembered
Charles Nutter asked Matz in RubyConf 2007 if there is going to have any
specification for Ruby. But apparently it doesn't happen.

Austin Ziegler wrote:

(Yes, Virginia. Most people don't need full-on Unicode munging in
their code. It's necessary when you do need it, but most people don't
need it.)

I need it. Most of Europe needs it. Not to mention Arabia, Japan, and
everybody else not speaking English.

- --
Phillip Gawlowski
Twitter: twitter.com/cynicalryan

~ "Endorsing products is the American way of expressing individuality."
- -Calvin

I'm pretty sure this was simply a bullet point review on a client's
list of requirements for a project's RFP/spec.

"We want you to use Ruby/Rails because we've heard you get things done
faster. If you want this project, you need to use Ruby or tell us why
you won't use it."

"We don't know how to use Ruby, so let me give you a list of stupid
reasons we aren't using it. It has nothing to do with the fact that
we don't have any clue how to use it. Nope. The biggest killer for
us is all of these minor things, especially having to remember THREE
WHOLE WAYS to print text to the screen. Whew! Ruby isn't ready."

I think your assessment is basically spot on of its bias.

--Jeremy

···

2008/4/8 Austin Ziegler <halostatue@gmail.com>:

2008/4/7 Song Ma <songmash@gmail.com>:

> Interesting. But what I am thinking about is not the attitude of the author,
> but the points he was trying to make. The deep review and discussion will
> benefit the language insights.

There's no deep review here. It's a shallow review written in a
shallow way. The author is completely and wholly incorrect that:

  "The options for Ruby 1.8 users are to install 1.9 or the third-party
   Oniguruma package... In general, it's a bad sign when a third-party
   reimplements a large chunk of functionality in an existing piece
   of software."

This represents pure ignorance. Yes, Ruby 1.8 users must install
Oniguruma for the features that Oniguruma provides. But it's not a
"third-party" product as such; it *is* the Ruby 1.9 regexp engine.
This fact has been known and stated for at least three years, and
Oniguruma is made available as an option for people who need the
additional features. (Free clue: not many. Those who do need it really
need it. Most people don't.)

The author is similarly wholly ignorant of Ruby 1.9 and Ruby 2.0
discussions and assumes that "lack of English documentation" is the
same as "lack of documentation." The author is a fool for believing
the claim that Ruby 2 has been in development longer than Perl 6. Perl
6 was ramping up as I switched to Ruby in 2002 and Ruby 1.8 was
released a bit after that (I got my Ruby 1.8 Pickaxe at the 2005
RubyConf in San Diego). Matz has been talking about the next
generation of Ruby (Ruby 2.0) for a while, but that's no different
than the discussions and experiments surrounding Py3k.

Worst of all, the author treats both the Alioth shootout and the Zed
Shaw rant as things worthy of positive attention, when both are, well,
worthless. The Alioth shootout has been known to be worthless for
years yet periodically some idiot treats it as serious. Zed's rant was
a *rant*. It too had things that are known to be false, things that
are probably libellous, and things that were simply taken out of
context.

All in all, the authors pretend to be objective when they are anything
but. They've drunk the Guido-ade and as the resulting article shows
had no interest in showing Ruby in a positive light. Most of the
things that they've mentioned are *differences* from Python (neither
positive nor negative) or have little importance to most applications.
(Yes, Virginia. Most people don't need full-on Unicode munging in
their code. It's necessary when you do need it, but most people don't
need it.)

This article deserves to be buried with great prejudice.

-austin
--
Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/
  * austin@halostatue.ca * You are in a maze of twisty little passages, all alike. // halo • statue
  * austin@zieglers.ca

--
http://jeremymcanally.com/
http://entp.com

Read my books:
Ruby in Practice (http://manning.com/mcanally/\)
My free Ruby e-book (http://humblelittlerubybook.com/\)

Or, my blogs:

http://rubyinpractice.com

Austin Ziegler wrote:

There's no deep review here. It's a shallow review written in a
shallow way.

Indeed. Just one shallow point that showed up when I scrolled about 2/3 down and read a couple of paragraphs from the essay:

What is the difference between the length and size methods on
String, Array, and Hash? There is none. Hashes have update and
merge methods. What's the difference? None.

These are particularly atrocious synonyms, because the English
words they are based on aren't synonymous. What if you have a
class representing a geometric object, and you want length and
size to return different measurements?

Sure, so on your geometric class you define length and size to be different. It happens that they are the same for strings (and why not). They don't have to be the same for other things.

···

--
       vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

While I agree, that the project is responsible for its own documentation
~ (its rather obvious, is it not?), the tools we have in the Ruby
community to create documentation are limited to RDoc, a rather hacky
solution (Correct me if I'm wrong, but Dave Thomas said as much),
intended as a stand-in until a more useful tool comes around.

I said it's a hacky _implementation_. I believe the concept is just fine.

However, the gem didn't include the files in ./, only ./lib, much unlike
the RDoc task. I had to explicitly tell the gem, to include extra files.
I lost more than an hour to that. The outdated RubyGems documentation
didn't really help. Fortunately, I found other Rake tasks, and could
eliminate the problem.

But it shouldn't be this way, and I have the feeling it is a shortcoming
of RDoc (maybe not, I haven't looked at RDoc itself, so my assessment of
the reason maybe wrong, but my point still stands).

Sounds like a configuration issue with the gem, to me.

Also, that RDoc generates frames for usage isn't the ideal solution,
IMO, as it makes search difficult (via a browser's search, anyway).

The frames are just one option. Have you looked at api.rubyonrails.com?

And AFAIK, RDoc cannot spit out PDFs, PostScript, or LaTeX, or something
other than ri. And that makes it unnecessarily difficult to generate
non-RDoc documentation without third party tools (and I don't really
want to learn Yet Another Tool that is not directly related to
increasing my productivity in writing Code (that's what I want to do,
not write comments or documentation).

Actually, I have it generating all three, as well as plain text, chm, and our in-house PML markup.

I'm not defending RDoc. But I think that if the situation is to improve, it should be through informed discussion.

There are a couple of underlying issues. Firstly, much of the basic Ruby infrastructure is not well documented. Many standard libraries in the base distribution have minimal documentation, for example. Many gems are only minimally documented (for example, having just API-level documentation).

Second, there's no good place to go to see documentation.

I think we have the basis for a great set of documentation. What is needed now is for someone with vision to take the next step. It needn't be a big one. In the same way that the RubyGems initiative set down some simply packaging guidelines that we all follow, I think that someone could drive through the same for documentation. It needn't be more than a few conventions. For example, we are used to seeing README and INSTALL in the top-level of an application. Change Gems to include these by default. If it sees a HOWTO file, include that. If it sees GUIDE, do the same. These are just suggestions--someone needs to take ownership of this and flesh it out properly.

We have the API documentation nut cracked. We need to do the same for the non-API documentation. And, if we set the conventions in place now, the tools will be able to use them to build a raft of different styles of documentation sites.

I'm looking forward to it.

Dave

···

On Apr 8, 2008, at 10:02 AM, Phillip Gawlowski wrote:

Used to be that was the ONLY way to get documentation.

-austin

···

On Tue, Apr 8, 2008 at 11:02 AM, Phillip Gawlowski <cmdjackryan@googlemail.com> wrote:

M. Edward (Ed) Borasky wrote:
> Well ... I guess that depends on which docs you are talking about.
> There's plenty of documentation on Rails, three of the major GUIs --
> Shoes, FXRuby and QtRuby -- have books in "print" on them, there are two
> major Ruby "cookbooks", the documentation on Ruport and RSpec is
> excellent, etc.

I shouldn't have to buy a book (like the PickAxe), to get decent
documentation. A book should be one option, among many, to get to the
documentation. I'll elaborate on that in the next paragraph.

--
Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/
* austin@halostatue.ca * You are in a maze of twisty little passages, all alike. // halo • statue
* austin@zieglers.ca

> Interesting. But what I am thinking about is not the attitude of the author,
> but the points he was trying to make. The deep review and discussion will
> benefit the language insights.

There's no deep review here. It's a shallow review written in a
shallow way. The author is completely and wholly incorrect that:

  "The options for Ruby 1.8 users are to install 1.9 or the third-party
   Oniguruma package... In general, it's a bad sign when a third-party
   reimplements a large chunk of functionality in an existing piece
   of software."

This represents pure ignorance. Yes, Ruby 1.8 users must install
Oniguruma for the features that Oniguruma provides. But it's not a
"third-party" product as such; it *is* the Ruby 1.9 regexp engine.
This fact has been known and stated for at least three years, and
Oniguruma is made available as an option for people who need the
additional features. (Free clue: not many. Those who do need it really
need it. Most people don't.)

The author is similarly wholly ignorant of Ruby 1.9 and Ruby 2.0
discussions and assumes that "lack of English documentation" is the
same as "lack of documentation." The author is a fool for believing
the claim that Ruby 2 has been in development longer than Perl 6. Perl
6 was ramping up as I switched to Ruby in 2002 and Ruby 1.8 was
released a bit after that (I got my Ruby 1.8 Pickaxe at the 2005
RubyConf in San Diego). Matz has been talking about the next
generation of Ruby (Ruby 2.0) for a while, but that's no different
than the discussions and experiments surrounding Py3k.

Worst of all, the author treats both theAliothshootoutand the Zed
Shaw rant as things worthy of positive attention, when both are, well,
worthless. TheAliothshootouthas been known to be worthless for
years yet periodically some idiot treats it as serious.

Once upon a time, you made a specific complaint that the execution
environment, on what used to be called the computer language shootout,
stopped a Ruby Ackermann program from doing it's stuff - that problem
was fixed.

Unfortunately, since then your comments about what is now called the
benchmarks game don't amount to more than name calling.

···

On Apr 7, 9:00 pm, Austin Ziegler <halosta...@gmail.com> wrote:

2008/4/7 Song Ma <songm...@gmail.com>:

Zed's rant was
a *rant*. It too had things that are known to be false, things that
are probably libellous, and things that were simply taken out of
context.

All in all, the authors pretend to be objective when they are anything
but. They've drunk the Guido-ade and as the resulting article shows
had no interest in showing Ruby in a positive light. Most of the
things that they've mentioned are *differences* from Python (neither
positive nor negative) or have little importance to most applications.
(Yes, Virginia. Most people don't need full-on Unicode munging in
their code. It's necessary when you do need it, but most people don't
need it.)

This article deserves to be buried with great prejudice.

-austin
--
Austin Ziegler * halosta...@gmail.com *http://www.halostatue.ca/
* aus...@halostatue.ca *You are in a maze of twisty little passages, all alike. // halo • statue
* aus...@zieglers.ca

We have to be a little careful here...

Can I ask you - do you think life is perfect?

Perhaps it is, perhaps it isn't, it depends on perspective, don't you think?

Ruby is NATURAL.

Julian.

Learn Ruby on Rails! Check out the FREE VIDS (for a limited time) VIDEO #3 out NOW!
http://sensei.zenunit.com/

···

On 09/04/2008, at 12:45 AM, Michael T. Richter wrote:

On Tue, 2008-04-08 at 23:20 +0900, Diego Virasoro wrote:

However I did sympathise with the author's comment on having too many
ways to do the same thing. They pretty much mirror my feelings: that
you either learn them all (in which case you lost in simplicity) or
you'll have a very hard time reading other people's code. I admit
though that it makes _writing_ code easier.

I know however that the Ruby community is strongly in favour of this
"feature", so I was wondering why.

You answered your own question here. It makes writing code a joy. And, unlike, say, Perl (or even more extremely, K), Ruby isn't quite a write-only programming language. (If you use all the idiot Perlisms you can make it that way, but almost nobody uses those thankfully!)

Ruby is by no means a perfect language. But as a former Pythonista (I started with Python at v1.3), Ruby, despite its warts (and this includes the UNICODE issue, the lousy performance, the bad threading model and the whole host of other things people have ranted about for ages now) remains my first and favourite language I reach for when I'm starting a project. As things move along in the project I reach for other languages to supplement or replace it (recently Erlang has grabbed my imagination for certain key application elements), but Ruby's my first choice and is usually in the final product in some form or another.

--
Michael T. Richter <ttmrichter@gmail.com> (GoogleTalk: ttmrichter@gmail.com)
If there's one thing that computers do well, it's to make the same mistake uncountable times at inhuman speed. (Peter Coffee)

Diego Virasoro wrote:

Now FORTRAN is 50 years old, there's a FORTRAN 95 standard, and the
language is still in use (I think -- I haven't written any since 1990).

Most definitly. In my office we is it constantly. There's only one
serious contender for number crunching here and it's C, but then C is
much more of a pain to use, and you need to use the correct flags to
get the kind of optimisations that Fortran gives you out of the box.

Right around the time I stopped writing Fortran (not by choice -- I got laid off) C compilers were just starting to appear that could compete with Fortran. The way people wrote C in those days was so infested with pointers and mallocs that a lot of code was simply hopeless. Then again, people wrote compilers, operating systems, text processors, interpreters, etc., in C, and they wrote number crunching in Fortran.

I used to work with the people who developed the second usable C compiler for number crunching (the first was developed by a competitor. :slight_smile:

Song Ma wrote:

This is the insightful point I was expecting after following such a long
mail chain. Now I am implementing one Rails application which requires to be
supported by both MRI (1.8.5) and JRuby (1.0.3, compatible with MRI 1.8.5).
I found so many inconsistencies between these two "Ruby". (Or Rubies?). Even
the MRI test cases can not pass in JRuby. That's painful. I remembered
Charles Nutter asked Matz in RubyConf 2007 if there is going to have any
specification for Ruby. But apparently it doesn't happen.

There are partial test suites/specs out there, but probably no single one that's "definitive". I haven't heard much about the BFTS (Big Formal Test Suite) recently.

The last rumor I heard was that the "canonical" Ruby test suite was most likely going to come out of the Rubinius project. Can someone confirm or deny that? I haven't been tracking Rubinius recently.

Bullshit. I've done localization for Chinese sites in Ruby without
ever
having to think about unicode issues. SOME things require you to take
care. Such as not making stupid assumptions about the length of
strings
in bytes vs. characters. But most of the time people can do a lot of
string mangling with UTF-8 without ever needing to think about it.

ALL my work involve international character sets in one way or the
other,
because I refuse to not deal with i18n. NONE of my work involves "full-
on
unicode munging". It involves a tiny subset of support at most.

That applies to most people, and most of what they'll ever need is
trivial to implement.

Reading/writing UTF-8 is easy. Splitting UTF8 into characters, or
converting it to 32 bit codepoints is easy (surprise, surprise,
#pack and #unpack supports it).

Once you have it in 32 bit, the length calculation problems go away,
and slicing and splicing strings without thinking about it becomes
easy.

That's almost everything _most_ people ever need in order to work
with Unicode. If there was such a burning need, most people would
use ICU bindings for Ruby (do they exist? I've never even bothered to
look, but if they don't they'd be trivial to write if I ever need
them)

Vidar

···

On Apr 8, 5:05 am, Phillip Gawlowski <cmdjackr...@googlemail.com> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Austin Ziegler wrote:

> (Yes, Virginia. Most people don't need full-on Unicode munging in
> their code. It's necessary when you do need it, but most people don't
> need it.)

The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!) – Joel on Software

I need it. Most of Europe needs it. Not to mention Arabia, Japan, and
everybody else not speaking English.

Dave Thomas wrote:

While I agree, that the project is responsible for its own documentation
~ (its rather obvious, is it not?), the tools we have in the Ruby
community to create documentation are limited to RDoc, a rather hacky
solution (Correct me if I'm wrong, but Dave Thomas said as much),
intended as a stand-in until a more useful tool comes around.

I said it's a hacky _implementation_. I believe the concept is just fine.

Err, yes. I like the idea of RDoc myself. I like it very much, almost to
the level of fan boy. It is very easy to generate API docs. But that is
the only thing it can do, it seems.

Sounds like a configuration issue with the gem, to me.

Yes, it was. I had to tell the gem specifically to find these extra
documents. My chip on my shoulder is, that this shouldn't be necessary,
especially when the RDoc task in my Rakefile actually generates the
documentation without declaring these documents explicitly.

Also, that RDoc generates frames for usage isn't the ideal solution,
IMO, as it makes search difficult (via a browser's search, anyway).

The frames are just one option. Have you looked at api.rubyonrails.com?

Which is still a frameset. The layout's different, but that's it.

Actually, I have it generating all three, as well as plain text, chm,
and our in-house PML markup.

I'm not defending RDoc. But I think that if the situation is to improve,
it should be through informed discussion.

Yes, of course. I'm not shouting to purge RDoc from the Rubyist's
toolkit, not at all. However, it stopped progressing at some point, and
no body has taken over to expand it.

(However, I have found a github repository that seems to tackle the
issue. And I'm waiting for the source code to take a look at it.)

There are a couple of underlying issues. Firstly, much of the basic Ruby
infrastructure is not well documented. Many standard libraries in the
base distribution have minimal documentation, for example. Many gems are
only minimally documented (for example, having just API-level
documentation).

The hashing functions in the STDLIB have no documentation. Having looked
at the STDLIB documentation for Ruby in the past, I'm looking at the web
first, and spend my time tweaking search-engine queries, and find some
sort of tutorial on how to use it. Which makes me sad.

And since I'm not good at reading C, or other people's code just yet, I
can't contribute with documentation patches, and *that* makes me an
unhappy camper: Not being able to contribute in correcting issues I see,
and help out a great community. :confused:

Second, there's no good place to go to see documentation.

Indeed. If there were, the Rails API wouldn't be on 5+ websites to look
at. Similar for Ruby's documentation. That it isn't very searchable is
another issue, IMO. (OTOH, neither is Javadoc from what I've seen. Well,
there's no silver bullet, is there?).

I think we have the basis for a great set of documentation. What is
needed now is for someone with vision to take the next step. It needn't
be a big one. In the same way that the RubyGems initiative set down some
simply packaging guidelines that we all follow, I think that someone
could drive through the same for documentation. It needn't be more than
a few conventions. For example, we are used to seeing README and INSTALL
in the top-level of an application. Change Gems to include these by
default. If it sees a HOWTO file, include that. If it sees GUIDE, do the
same. These are just suggestions--someone needs to take ownership of
this and flesh it out properly.

We have the API documentation nut cracked. We need to do the same for
the non-API documentation. And, if we set the conventions in place now,
the tools will be able to use them to build a raft of different styles
of documentation sites.

To put my money where my mouth is, I'm willing to contribute to this
effort in any way I can. Be it coding, writing documentation, or
evangelizing it..

What I'd like to see, is something like RDoc, which grabs formatted
files (In Textile, Markaby, RDoc's variant,..), and emits documentation,
from files that are in some way specified (a .document extension, maybe.
Something that is convention over configuration, to make the transition
as easy as possible).

I think I can hack up a simple tool that demonstrates what I mean (after
all, there's RedCloth, and Rake's FileList to accomplish what I mean).

Once I have that running, I'm perfectly happy to hand it to anyone who's
more qualified than me to work on this tool.

I'm looking forward to it.

So am I.

As a personal note: I did not mean to criticize you or your work, Dave.
In fact, if I could find my copy of the Pickaxe again, I'd drag it along
to have you sign it. It was a great help to me in picking up Ruby, and a
very valuable reference for the documentation. Thanks for the effort by
you and all who contributed to it. :slight_smile:

And I'd go nuts without RDoc to generate API documentation.

- --
Phillip Gawlowski
Twitter: twitter.com/cynicalryan

~ - You know you've been hacking too long when...
...you "woke up" this morning and thought, "I'll checkpoint here, snooze
a bit more and then revert to checkpoint." A while later you go up
another consciousness notch and realize that you hadn't checkpointed
successfully
~ - "Oh, of course. I didn't have the keyboard."

···

On Apr 8, 2008, at 10:02 AM, Phillip Gawlowski wrote:

I agree about the API docs. There has been talk recently about
working on them, but there are some snags we need to get around (I
don't know that you've been privvy to those conversations or not but
if not you should be :)).

As an aside, I'm working on re-implementing RDoc using ruby_parser.
It's in very bad shape right now (transitioning from using RDoc's
CodeObjects stuff to ruby_parser), but you can monitor my work at
http://github.com/jeremymcanally/docr .

The basic plan is to get the parser/normalization stuff in place and
tested this week. Then I'll try to put a really lightweight bin
script/library in front of it next week. Most of the same code should
work in that part with minor modification. Sometime in there I'll be
extracting the markup stuff from RDoc into its own gem/library so it's
more separated from the mainline DocR stuff. I believe I along with
others have plans to hack in some additions to the markup to give it
some more powerful structures.

Hopefully when this is in decent shape, it will be a well-tested,
nicely implemented Ruby documentation tool.

--Jeremy

···

On Tue, Apr 8, 2008 at 11:37 AM, Dave Thomas <dave@pragprog.com> wrote:

On Apr 8, 2008, at 10:02 AM, Phillip Gawlowski wrote:

> While I agree, that the project is responsible for its own documentation
> ~ (its rather obvious, is it not?), the tools we have in the Ruby
> community to create documentation are limited to RDoc, a rather hacky
> solution (Correct me if I'm wrong, but Dave Thomas said as much),
> intended as a stand-in until a more useful tool comes around.
>

I said it's a hacky _implementation_. I believe the concept is just fine.

> However, the gem didn't include the files in ./, only ./lib, much unlike
> the RDoc task. I had to explicitly tell the gem, to include extra files.
> I lost more than an hour to that. The outdated RubyGems documentation
> didn't really help. Fortunately, I found other Rake tasks, and could
> eliminate the problem.
>
> But it shouldn't be this way, and I have the feeling it is a shortcoming
> of RDoc (maybe not, I haven't looked at RDoc itself, so my assessment of
> the reason maybe wrong, but my point still stands).
>

Sounds like a configuration issue with the gem, to me.

> Also, that RDoc generates frames for usage isn't the ideal solution,
> IMO, as it makes search difficult (via a browser's search, anyway).
>

The frames are just one option. Have you looked at api.rubyonrails.com?

> And AFAIK, RDoc cannot spit out PDFs, PostScript, or LaTeX, or something
> other than ri. And that makes it unnecessarily difficult to generate
> non-RDoc documentation without third party tools (and I don't really
> want to learn Yet Another Tool that is not directly related to
> increasing my productivity in writing Code (that's what I want to do,
> not write comments or documentation).
>

Actually, I have it generating all three, as well as plain text, chm, and
our in-house PML markup.

I'm not defending RDoc. But I think that if the situation is to improve, it
should be through informed discussion.

There are a couple of underlying issues. Firstly, much of the basic Ruby
infrastructure is not well documented. Many standard libraries in the base
distribution have minimal documentation, for example. Many gems are only
minimally documented (for example, having just API-level documentation).

Second, there's no good place to go to see documentation.

I think we have the basis for a great set of documentation. What is needed
now is for someone with vision to take the next step. It needn't be a big
one. In the same way that the RubyGems initiative set down some simply
packaging guidelines that we all follow, I think that someone could drive
through the same for documentation. It needn't be more than a few
conventions. For example, we are used to seeing README and INSTALL in the
top-level of an application. Change Gems to include these by default. If it
sees a HOWTO file, include that. If it sees GUIDE, do the same. These are
just suggestions--someone needs to take ownership of this and flesh it out
properly.

We have the API documentation nut cracked. We need to do the same for the
non-API documentation. And, if we set the conventions in place now, the
tools will be able to use them to build a raft of different styles of
documentation sites.

I'm looking forward to it.

Dave

--
http://jeremymcanally.com/
http://entp.com

Read my books:
Ruby in Practice (http://manning.com/mcanally/\)
My free Ruby e-book (http://humblelittlerubybook.com/\)

Or, my blogs:

http://rubyinpractice.com

You didn't read what I said. I said "most people don't need full-on
Unicode munging." This is true. There are some cases where it's
absolutely necessary, but most people just need to know that they're
not going to screw up things when they work with Unicode.

You can write Unicode-safe applications without needing full Unicode
string munging. Easily. Most Rails apps should probably be doing
exactly that.

And yes, I do know Unicode. Maybe not as well as Tim Bray, but well
enough to know what's actually needed and what isn't. (I just wrote an
app that deals with UTF-8 Unicode strings; I don't modify them at all,
so I've got a Unicode-safe app in Ruby because I'm not mucking with
things that I don't need to muck with.)

Joel's article is oversimplistic on this, really. I stand by what I
said: most people don't need Unicode munging. But when you need it,
you *really* need it and Ruby can fall down flat for you, pre 1.9.
(And yes, if you look above, that *is* what I said.)

-austin

···

On Tue, Apr 8, 2008 at 12:05 AM, Phillip Gawlowski <cmdjackryan@googlemail.com> wrote:

Austin Ziegler wrote:
> (Yes, Virginia. Most people don't need full-on Unicode munging in
> their code. It's necessary when you do need it, but most people don't
> need it.)
The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!) – Joel on Software

I need it. Most of Europe needs it. Not to mention Arabia, Japan, and
everybody else not speaking English.

--
Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/
* austin@halostatue.ca * You are in a maze of twisty little passages, all alike. // halo • statue
* austin@zieglers.ca