Ruby’s not ready - an indepth essay

Someone has suggested that but I haven’t looked at it. I haven’t
gotten far with the whole ruby_parser port (it’s in place but didn’t
take long to write), so switching to something would be fine. I’ll
look into that tonight then, since I didn’t know 1.9 had it built in.

I spoke to Eric via mailing list who said he wanted to use ruby_parser
for a new RDoc, but ripper seems like a more logical choice to me.

–Jeremy

On Tue, Apr 8, 2008 at 12:10 PM, Dave T. [email protected] wrote:

reduce dependencies (on of the goals of RDoc was to have zero external

extracting the markup stuff from RDoc into its own gem/library so it’s

Dave


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

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

Or, my blogs:

http://rubyinpractice.com

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

Austin Z. wrote:
| On Tue, Apr 8, 2008 at 12:05 AM, Phillip G.
| [email protected] wrote:
|> Austin Z. 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.
|
| 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.

Without Unicode support, a string operation in a non-English alphabet
will work as expected. Any language with more characters in the alphabet
that English, needs full Unicode support.

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

Without Unicode support, you can’t be Unicode safe. That’s a tautology.

Also: Rails rolls its own Unicode support.


Phillip G.
Twitter: twitter.com/cynicalryan

~ - You know you’ve been hacking too long when…
…you are looking at an ASCII core dump of your OS project which has
many
O’s and &'s in it (among other things), and you shout:
“I see the problem. Orcs are attacking my demons.”
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkf7rNMACgkQbtAgaoJTgL9VggCgpgHK+7+yLEitYjlG0+71Ahkw
otAAn2/jKZS3RmAnMp0sLcyYVGQQzREI
=CSoC
-----END PGP SIGNATURE-----

On Apr 8, 2008, at 12:05 PM, Jeremy McAnally wrote:

Someone has suggested that but I haven’t looked at it. I haven’t
gotten far with the whole ruby_parser port (it’s in place but didn’t
take long to write), so switching to something would be fine. I’ll
look into that tonight then, since I didn’t know 1.9 had it built in.

I spoke to Eric via mailing list who said he wanted to use ruby_parser
for a new RDoc, but ripper seems like a more logical choice to me.

It’s easy to beat up the documentation. It’s a time-honored tradition.
Still, the fellow’s post zeroed in on digest, and the fact that it’s
not documented at all. If you go to php.net (ick) and type ‘sha1’ in
the search box, you get this:
PHP: sha1 - Manual
(or maybe something else if you aren’t in the US). The point is, the
answer is relevant and if you knew why you needed SHA1, you would
probably have your answer including an example.

For whatever reason, PHP has quite usable documentation. Now, for a
different experience, go to http://msdn.microsoft.com and type
‘sha1’ (assuming you have no objection to installing Silverlite). You
will get tons of information, but you have to do a lot of wading to
find what you’re looking for. Ruby can do better.

My opinion (FWIW). Good documentation should be:

Fast to load
Cross browser
Cross platform
Downloadable as an alternative
Extremely searchable (consider typing “encryption” in PHP’s search box)
Commentable by the community

It should:

Contain specific information about a module’s “purpose”, a class’s
“overall description”, and specifics on argument types, defaults, and
return types, as well as exceptions raised. Examples are extremely
useful.

Having pontificated for some time, I recognize that this is a tall
order and that the main problem is not that the Ruby documentation is
“not there”, but rather that the coverage is not uniform –
particularly in the standard library. As an example, pretend you don’t
know much about YAML and want to figure out how to load a YAML
document from a file. What is your search strategy and how many clicks
does it take you to arrive at sufficient information using the current
API docs.

Just my $.02

We’re probably going to do something like that for Rails at RailsConf
at the community code drive, but there’s no saying that we couldn’t
work on Ruby too (or even more so, work on them at Cabooseconf).

–Jeremy

On Tue, Apr 8, 2008 at 4:00 PM, Kyle S. [email protected]
wrote:

eventually written, but very rarely updated, because hackers generally
beer…but no more than 1L per hour.

Just my thought.
–Kyle


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

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

Or, my blogs:

http://rubyinpractice.com

Php’s docs are good, really good. But I always felt that it’s because
it’s a domain specific language.

It lives, breaths and is a web language. Sure, you can use it as
general purpose, but it was designed for the web.
With that mindset they made possibly the best web-friendly docs I’ve
ever seen.

Ruby on the other hand was developed because some hacker got an itch,
and wanted something kindof like lisp, only better.
It’s definitely documented like a hacker language. Good docs are
eventually written, but very rarely updated, because hackers generally
have something better to do than document: hack their language and
make it better.

There needs to be something like a ruby-illumination (see
Illuminated manuscript - Wikipedia ) going on.
Maybe at the big ruby conferences a bunch of ruby hackers can be paid
in pizza to spend 8 or so hours on a mass documenting session. Make
the docs beautiful in every way: correct, complete, elegantly written,
indexed, and, of course, aesthetically.
For fun have them all in monks robes, and bring them dark German
beer…but no more than 1L per hour.

Just my thought.
–Kyle

Complete with the monk robes, pizza and 1 liter of dark beer per hour?

Sounds like something that’ll be really good for everyone.

On Tue, Apr 8, 2008 at 4:10 PM, Jeremy McAnally

Phillip G. wrote:

Kyle S. wrote:
| Complete with the monk robes, pizza and 1 liter of dark beer per hour?
|
| Sounds like something that’ll be really good for everyone.
|

If it doesn’t produce documentation, the beer will at least produce
alcoholics. :stuck_out_tongue:

That, or a pissing match. Which is what discussions of why ruby docs
“aren’t good enough” usually degenerate into.

Hoping this turns into a constructive effort…

On Tue, Apr 8, 2008 at 2:00 PM, Kyle S. [email protected]
wrote:

Php’s docs are good, really good. But I always felt that it’s because
it’s a domain specific language.

If PHP’s docs are good, then Perl documentation must be qualified as
simply extraordinary (and that’s true for most modules at CPAN, too).

That’s the one thing where I still feel that Ruby doesn’t even begin to
compare.

Perl documention is wonderfully intergrated to the environment where
it’s installed (at least that’s true for UNIX, I don’t know for
Windows), it’s very informative (man perl), very complete and very
simple to use. I actually learned Perl when I was a student and the
Camel and Llama books where in the “too expensive” category, which
means I learned from the documentation shipped with Perl itself. I
don’t think I would be able to say the same thing for Ruby (which I
learned from the Pickaxe, but I would have probably preferred the
current edition of TRPL if it had been available back then).

And yes, I have been thinking about contributing patches around this.
What stops me is that I don’t like ri that much, to be honest, which
probably means that I have to submit patches against ri first.

Marcelo

Kyle S. wrote:

Php’s docs are good, really good. But I always felt that it’s because
it’s a domain specific language.

It lives, breaths and is a web language. Sure, you can use it as
general purpose, but it was designed for the web.
With that mindset they made possibly the best web-friendly docs I’ve ever seen.

I’m curious. Who is “they”? Who wrote these docs? The PHP developers?
The PHP community? Professionals? What was their incentive? What was
their reward?

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

Kyle S. wrote:
| Complete with the monk robes, pizza and 1 liter of dark beer per hour?
|
| Sounds like something that’ll be really good for everyone.
|

If it doesn’t produce documentation, the beer will at least produce
alcoholics. :stuck_out_tongue:


Phillip G.
Twitter: twitter.com/cynicalryan

At these prices, I lose money–
but I make it up in volume.
~ – Peter G. Alaquon
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkf74Y8ACgkQbtAgaoJTgL9hMgCfS4OK49X0ZaZJv4ZZ7+Psdmos
MqQAnRk89uWma8u0UMDblW+/NbOipHE9
=zpa1
-----END PGP SIGNATURE-----

They were most likely written by those paid by Zend and Yahoo.

–Jeremy

On Tue, Apr 8, 2008 at 6:20 PM, Tim H. [email protected] wrote:

I’m curious. Who is “they”? Who wrote these docs? The PHP developers? The
PHP community? Professionals? What was their incentive? What was their
reward?


RMagick: http://rmagick.rubyforge.org/
RMagick 2: http://rmagick.rubyforge.org/rmagick2.html


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

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

Or, my blogs:

http://rubyinpractice.com

El Martes, 8 de Abril de 2008, Joel VanderWerf
escribió:

different. It happens that they are the same for strings (and why not).
They don’t have to be the same for other things.

Very good example :wink:

On Apr 8, 2008, at 3:42 PM, Jeremy McAnally wrote:

it’s a domain specific language.
PHP community? Professionals? What was their incentive? What was
their
reward?

And there are no similar companies who would either profit from or be
helped by superior Ruby documentation? Everyone from IBM to Sun to
Apple to (even) Microsoft now have stakes in Ruby. All the Rails-
centric hosting services are stakeholders. Surely they are as invested
if not more so than Zend and/or Yahoo in the early days of PHP.

On Apr 7, 9:00 pm, Austin Z. [email protected] wrote:

Oniguruma package… In general, it’s a bad sign when a third-party

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.

2008/4/8 Rob S. [email protected]:

The only good point in that whole mess is that the current state of
docs for Ruby is poor, and could use a lot of love.

That, and that it’d be useful to have a backtrace that shows the lines
of code in question. Should be implementable as a postprocessor.

martin

I thought it did.

require ‘jcode’

Julian.

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

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

s.ross wrote:
| On Apr 8, 2008, at 3:42 PM, Jeremy McAnally wrote:
|
| And there are no similar companies who would either profit from or be
| helped by superior Ruby documentation? Everyone from IBM to Sun to Apple
| to (even) Microsoft now have stakes in Ruby. All the Rails-centric
| hosting services are stakeholders. Surely they are as invested if not
| more so than Zend and/or Yahoo in the early days of PHP.

Not really, no. Their interests are different than that of Zend or
Yahoo!. Zend benefits from sales of their PHP runtime (or benefited,
it’s been awhile since I was looking at the state of the PHP ecosystem),
and Yahoo can recruit developers easier (their services run on PHP).

Sun, IBM, etc. profit by providing tools to developers. However, only
indirectly, since the runtimes, connectors, or IDEs offered are open
source, and not directly sold, or the projects were acquired to benefit
the core business (.NET/Java in case of MS/Sun, DB2 in case of Java).

And the Rails hosters? How do they profit from a better Ruby
documentation? They only have to care about Rails’ API, and the Rails
blogosphere covers that, too (see Railscasts, for example). These folk
care about easy hosting of Ruby. And IronRuby or JRuby make that easier,
as well as the new mod_rails by Phusion will help in that area, too.


Phillip G.
Twitter: twitter.com/cynicalryan

~ - You know you’ve been hacking too long when…
…you send email to somebody who’s three terminals down the lab.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkf7/igACgkQbtAgaoJTgL8BEACfdxhFV1e4tKP5psF1bclaFTEP
m3AAoIKQkI7lFKu0RyJV4kviUq9CNQnb
=uwrM
-----END PGP SIGNATURE-----

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 Tue, Apr 8, 2008 at 7:00 PM, Isaac G. [email protected] wrote:

On Apr 7, 9:00 pm, Austin Z. [email protected] wrote:

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.

I haven’t gone back to the Alioth shootout web site in a long time,
because the problem was originally reported at least a year before it
was fixed.

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

No, it’s a lot more than name calling. It’s still treated far more
seriously than it deserves to be treated. Since I haven’t looked at
the “benchmarks game” in a while (I don’t visit places that are
useless), I don’t know if your text is any better than it was two
years ago (the last time I wasted any time there) to make it clear
that no one should take anything presented on the “benchmarks game”
seriously. I’ll assume for the moment that you have improved it and
that now it’s because people like this author are stupid and take
something like the “benchmarks game” seriously when it never should
be.

-austin

programs people wanted to write in the language that they couldn’t, etc. The
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.