Can we attack the 'not enough libraries' thing straight on?

Hi –

We’ve all heard this: “Ruby is great, but it doesn’t have the
equivalent of CPAN.”

So, all you almost-satisfied Ruby programmers, what’s missing? :slight_smile:

libwww-ruby

Oh never mind, there is http-access. I guess I didn’t look hard enough.
Instead of inputting www in the search, I put libwww in the RAA search and
didn’t find it originally.

Sorry.

···

On Fri, 24 Jan 2003 14:56:14 +0900 “Daniel P. Zepeda” daniel@zepeda-zone.net wrote:

On Thu, 23 Jan 2003 10:36:31 +0900 > dblack@candle.superlink.net wrote:

David


David Alan Black
home: dblack@candle.superlink.net
work: blackdav@shu.edu
Web: http://pirate.shu.edu/~blackdav


“Daniel P. Zepeda” <daniel@z,e,p,e,d,a,-,z,o,n,e.net>
(Remove commas for address)


“Daniel P. Zepeda” <daniel@z,e,p,e,d,a,-,z,o,n,e.net>
(Remove commas for address)

Hi –

We’ve all heard this: “Ruby is great, but it doesn’t have the
equivalent of CPAN.”

So, all you almost-satisfied Ruby programmers, what’s missing? :slight_smile:

yes, a CPAN equivalent is currently missing. however, worry not because
ruby will attract enough perl programmers that sooner or later they will
recreate a CPAN for ruby :slight_smile:

Rumor has it that a number of Ruby programmers have already manifested
an interest in this problem domain :slight_smile:

i’m widly guessing that of 10 perl programmers that migrate to/try out
other languages:

  • 1 will settle to python;
  • 7-8 will settle to ruby;
  • 1-2 will settle to other language;

ruby tries very hard to be a better perl, while python is just too
different from perl that perl programmers will miss all these features:

  • builtin regexes;
  • command line options (-i, -n, -p);
  • special variables ($_, $0…$9);
  • tainting;
  • all that nice quoting operators (qw//, qr//, qq//);

However, from the Ruby ToDo file:

  • discourage use of symbol variables (e.g. $/, etc.) in manual
  • discourage use of Perlish features by giving warnings.

:slight_smile:

  • obfuscatability (sp?);

Not sure about the spelling, but people should be warned that it’s
not one of Ruby strong points :slight_smile:

David

···

On Sat, 25 Jan 2003, David Garamond wrote:

dblack@candle.superlink.net wrote:


David Alan Black
home: dblack@candle.superlink.net
work: blackdav@shu.edu
Web: http://pirate.shu.edu/~blackdav

s/obfuscatability/playfulness

martin

···

David Garamond davegaramond@icqmail.com wrote:

  • obfuscatability (sp?);

Hi there,

I wrote a simple program to enumerate an array. The code is as below:
class Test
def initialize
@x=[0,1,2]
@tem=@x
@y=@x
y=del(@tem)
printf "#{@x}\n"
printf "#{@y}\n"
end
def del(x)
x.delete_at(0)
return x
end
end
a=Test.new

But the output is :
12
12
Why @x and @y are changed? Is there anyone can tell me how to deal with
this problem?

Hi –

···

On Thu, 23 Jan 2003, Hal E. Fulton wrote:

----- Original Message -----
From: “Joey Gibson” joey@joeygibson.com
To: “ruby-talk ML” ruby-talk@ruby-lang.org
Sent: Wednesday, January 22, 2003 7:58 PM
Subject: Re: Can we attack the ‘not enough libraries’ thing straight on?

So, all you almost-satisfied Ruby programmers, what’s missing? :slight_smile:

One part of cpan that I really like is the cpan shell that let’s you query
what you have, find what you need and install it. I haven’t looked at the
Perl code for that to see how complicated a task that is, but it’s a very
nice thing to have.

True, but a meta-issue.

The question at hand (correct me if I’m wrong, David) is:
What libraries (i.e., content) does CPAN have that you
wish Ruby had? (Ditto for Python’s repository.)

And Haskell’s, and whatever. Yes, I was asking a non-meta question –
very nuts and bolts :slight_smile:

David


David Alan Black
home: dblack@candle.superlink.net
work: blackdav@shu.edu
Web: http://pirate.shu.edu/~blackdav

I don’t know what Simon thinks, but I really do think that exactly. It
took me a while to find NArray. The only reason why I can find it in RAA
now is because I already know it exists.

I suspect that there are more libraries in RAA that I’d be interested in
and I just don’t know are there.

···

On Thu, Jan 23, 2003 at 11:27:46AM +0900, dblack@candle.superlink.net wrote:

OK, but what modules do we need? :slight_smile: Or are you saying that (some of)
the software in question is there but hidden under names that make
people think it’s not there?


Daniel Carrera
Graduate Teaching Assistant. Math Dept.
University of Maryland. (301) 405-5137

I think that’s a great idea. I don’t know if it’s been done.

···

On Thu, Jan 23, 2003 at 11:40:19AM +0900, Dossy wrote:

$ irb
irb(main):001:0> require ‘raa’
true

irb(main):002:0> raa.install ‘Foo::Bar’
…fetches the Foo::Bar module from RAA…
…installs it using setup.rb or whatever…

irb(main):002:0> raa.updates
…displays a list of currently installed modules, their versions, and
the latest version available according to RAA…

You get the idea. Is this attractive to anyone? Hasn’t this been
/done/ already?


Daniel Carrera
Graduate Teaching Assistant. Math Dept.
University of Maryland. (301) 405-5137

Debian GNU/Linux gets this just right, IMHO. They have a policy that packages
wishing to be placed on their central set of package mirrors must adhere to,
a proper dependency system, mirroring of packages so they’re always available
and not dependant on the author’s personal server/ISP (one of my pet hates
about RAA), command-line and curses tools for installing/removing/viewing
packages and their dependancies, policies concerning the quality, quantity
and location of documentation, etc… This packaging system is the one and
only reason I use Debian over any other Linux distribution. It would take a
significant amount of effort to get such a beast running for Ruby, but once
done I think the benefits would be phenomenal.

Tim Bates

···

On Thu, 23 Jan 2003 01:12 pm, ahoward wrote:

this is one idea CPAN lacks - a central set of standards which modules must
conform to (unit testing for modules?) and a way to separte the really good
modules from all the chatter and useless crap…


tim@bates.id.au

Hi –

···

On Thu, 23 Jan 2003, ahoward wrote:

  • libraries wishing to become part of the ruby standard library should
    follow some sort of standards (naming being one of them) and perhaps fit
    into some overall package management system (like the cpan shell). they
    should install in standard places, have standard docs (in fact it’d be
    great if there were a site_ruby/doc directory doccumenting every thing
    installed on your system), etc.

  • other modules can do what they please

The standard library is a different matter – at least, that term is
generally reserved for the stuff in the distribution itself. RAA is
all add-on – the well-named stuff as well as the miscellany :slight_smile:

David


David Alan Black
home: dblack@candle.superlink.net
work: blackdav@shu.edu
Web: http://pirate.shu.edu/~blackdav

Hi,

···

In message “Re: Can we attack the ‘not enough libraries’ thing straight on?” on 03/01/23, Wai-Sun Chia waisun.chia@hp.com writes:

But then, what the heck is a “mozilla” anyway? Is it some sort of a
Japanese monster?
Or a “gnumeric”? Huh?
Or a “squid”? Seafood?

Or a “Ruby”? Gem? :wink:

Libraries and programs have different naming requirement. I think
Simon was referring library naming convention.

						matz.

I’ve been thinking (okay, dreaming) of a small snippet of Ruby code that
could turn the interactive Ruby shell (irb) into a RAA browser, much
like CPAN.pm for Perl. I imagined:

$ irb
irb(main):001:0> require ‘raa’
true

why@stungun:~/cvs/yaml4r$ irb --simple-prompt

require ‘raainstall’
=> true

irb(main):002:0> raa.install ‘Foo::Bar’
…fetches the Foo::Bar module from RAA…
…installs it using setup.rb or whatever…

RAAInstall.install( ‘yaml’ )
Unarchiving yamlrb-0.49.tar.gz with gnu tar
yamlrb-0.49/
yamlrb-0.49/samples/
yamlrb-0.49/samples/okayRpc-client.rb
yamlrb-0.49/samples/okayRpc-server.rb
yamlrb-0.49/samples/okayNews-validate.rb
…and so on…
=> [#<RAAInstall::package:0x40260cc8 @depends=, @require=nil,
@versionModule=nil,
@download_url=“Download yamlrb-0.49.tar.gz (YAML.rb: YAML for Ruby)”,
@version=[0, 49], @appId=nil>]

irb(main):002:0> raa.updates
…displays a list of currently installed modules, their versions, and
the latest version available according to RAA…

RAAInstall.showall
=> [“acl”, “activeattr”, “aes-rb”, “aiura”, … ]

So the last one isn’t exactly what you requested… so… come on over to
the raa-install list and tell us what you want!
[narf-lib-raainstall List Signup and Options]

More on the raa-install API itself at
[http://www.rubygarden.org/ruby?QuickGuideToRaaInstall]

_why

···

Dossy (dossy@panoptic.com) wrote:

not to get on the name issue, but the easy solution is to have a very-brief
description field along with the name, hence:

Package Name	Descriptor 
Rouge			Lisp Interpretor 

tom sawyer, aka transami
transami@transami.net

                               .''.
   .''.      .        *''*    :_\/_:     .
  :_\/_:   _\(/_  .:.*_\/_*   : /\ :  .'.:.'.

.’’.: /\ : ./)\ ‘:’* /\ * : ‘…’. -=:o:=-
:/:’.:::. | ’ ‘’ * ‘.’/.’ (/’.’:’.’
: /\ : ::::: = / -= o =- /)\ ’ *
’…’ ‘:::’ === * /\ * .’/.’. ‘._____
* | : |. |’ .—"|
* | _ .–’| || | _| |
* | .-’| __ | | | || |
.-----. | |’ | || | | | | | || |
__’ ’ /"\ | '-."". ‘-’ ‘-.’ '` |.

···

Good ideas. It’s great to have a repository that anybody can
contribute to, and we do need to be able know which ones are well
implemented and supported. I wish someone who has used a lot of
packages (i.e. not me) would write a summary of packages they think
are ready for the big time. Also along these lines, I believe the RAA
should mandate a standard for versioning. Everything should be
versioned x.y.z, with perhaps some allowance for alpha, beta,
whatever. Version numbers based on dates or descriptions are not
particularly informative.

About “standard docs”, I think this is the way forward:

  • packages have a doc directory

  • this gets installed along with the package so it ends up in
    something like
    site_ruby/1.6/froboz/doc/package.info
    /index.html

  • it can therefore be determined which packages have been installed
    and have documentation installed

This allows different programs to programatically access all package
documentation. The particular program I have in mind might be called
‘rdb’ (for Ruby Documentation Browser) and would do the following:

  • build a list of all installed package doco (using package.info for
    description etc.)
  • generate an HTML page containing links to all available package
    doco (the index.html files, which represent RDoc output and
    contain the README etc. as well as the API doc)
  • open a browser to that page

There you have it. One command to access all of your available
package documentation. Of course it can take an argument so you can
access a particular package doco easily.

I mention this in this thread because I have a suspicion that Ruby’s
reputation for a lack of libraries is superficial. There are a lot of
libraries; we just don’t always access them very well. Setting some
standards and easing access are easy things to do, and they can only
encourage effort in creating more high-quality libraries, and higher
quality documentation for those libraries.

One technical nit: not all libraries conform to the pattern whereby
they install in a single directory.

Anyway, things like package management require community evolution.
Judging by the number of RAA entries, the Engligh-speaking Ruby
community has evolved to the point where some standards ought to be
enforced to help us make sense of it all.

Gavin

···

On Thursday, January 23, 2003, 1:42:34 PM, ahoward wrote:

[Comparing to C++ boost system]

  • libraries wishing to become part of the ruby standard library should
    follow some sort of standards (naming being one of them) and perhaps fit
    into some overall package management system (like the cpan shell). they
    should install in standard places, have standard docs (in fact it’d be
    great if there were a site_ruby/doc directory doccumenting every thing
    installed on your system), etc.
  • other modules can do what they please

this is one idea CPAN lacks - a central set of standards which modules must
conform to (unit testing for modules?) and a way to separte the really good
modules from all the chatter and useless crap…

  1. Find a more accessible domain name. www.ruby-lang.org/raa is not as
    easy to remember as www.cpan.org. Unfortunatelly
    (ruby|cran|raa).(org|net) are all taken.

How do you feel raa.ruby-lang.org ?

It’s logical and compelling.

  1. RAA is hard to browse. I think that a setup of the style of
    www.search.cpan.org is best.

I don’t use CPAN modules so I seldom use CPAN search…

What is the most significant point of all the features which
CPAN search have and RAA don’t have, do you think? We’ll
change it better and better untill RAA.succ comes.

I never use it, but in order to justify this “me too”-ish post, I did
my bit and tried to answer your question anyway :slight_smile:

search.cpan.org provides the following features:

  1. Clear enumeration of categories up front

In contrast to RAA’s very hierachical structure, CPAN seems to be
organised around 26 categories. When I used to use it, I actually
found it confusing, as I roughly knew what I was looking for, but
couldn’t decide which of 2 or 3 categories was the most logical place
to find it. So I used it for browsing, but was never convinced that
it all made sense.

  1. Search options (search in modules, distros, or authors, or all)

Pretty straightforward really. RAA’s not so big that it needs this.
Search all works fine.

  1. Browse by author

Good idea, but annoyingly over-hypertext. I want to browse all
authors on one page, with an index up the top using anchors. This
forces you onto a different page for each author.

I’d like this feature in RAA.

  1. Recent updates

Browse the last 7 days of “uploads”. I hate arbitrary limits - why
not allow you to go further back. But it’s good anyway.

RAA should allow you to view “recent updates” separately from “recent
additions”, but I’ve carped on about that enough and you’ve agreed to
support it in future. (^o^)/

  1. About/Mirrors/Feedback

Various meta-information/services.

  1. FAQ

RAA should have one, including plans for future updates.

So I dug into a search to see what functionality I could find. I
searched for MIDI in Modules and got 33 results. (MIDI in all got 413
or something. Go figure.)

Good feature: change the number of entries per page. The output is
nice and neat; RAA could take an example here.

Bad feature: it’s not well organised. Several results seem related.
They are not all top-level modules; some are bits of modules, or
something. E.g. MIDI, MIDI::Event, MIDI::Opus, MIDI::Score and more
(all by the same author) are separate search results! So much for the
33 different MIDI modules I expected!

That concludes my tour of search.cpan.org. I don’t see any killer
feature in it that puts any daylight between it and RAA, just a more
professional look and a few little things. I’ve said it before, but
the last major update to RAA was a quantum leap, and the whole
community applauds your efforts (^^)// so the pace of improvement is
already very good.

Cheers,
Gavin

PS. See サービス提供終了のお知らせ for
the great Japanese smileys!

···

On Saturday, January 25, 2003, 1:18:03 AM, Hiroshi wrote:

What is the most significant point of all the features which
CPAN search have and RAA don’t have, do you think? We’ll
change it better and better untill RAA.succ comes.

Um, on CPAN, module authors seem to write better descriptions of their code. Very frustrating to go to RAA, and see:

Name Short Description
SomeNonDescriptiveName SomeNonDescriptiveName

Can’t search what isn’t there.

James

···

Regards,
// NaHi

  1. Find a more accessible domain name. www.ruby-lang.org/raa is not as
    easy to remember as www.cpan.org. Unfortunatelly
    (ruby|cran|raa).(org|net) are all taken.

How do you feel raa.ruby-lang.org ?

Sounds great. I like it.

  1. RAA is hard to browse. I think that a setup of the style of
    www.search.cpan.org is best.

I don’t use CPAN modules so I seldom use CPAN search…

What is the most significant point of all the features which
CPAN search have and RAA don’t have, do you think? We’ll
change it better and better untill RAA.succ comes.

In Gavin’s response, points 1., 2., and 4. are essentially what I had in
mind. I think they would make a big difference. I liked all his other
points as well.

···

On Fri, Jan 24, 2003 at 11:18:03PM +0900, NAKAMURA, Hiroshi wrote:


Daniel Carrera
Graduate Teaching Assistant. Math Dept.
University of Maryland. (301) 405-5137

Piers Harding piers@ompa.net writes:

I agree with you that ultimately distributions, and “certified
collections” of packages are probably an ultimate goal, but I would
suggest that one reason why this works for RedHat is that RedHat is a
commercial entity, and they (as an entity) have the man power/time and
the money to do it.

Debian is not a commercial entity and yet is the distribution with the
best package management (way better than Red Hat anyway).

Massimiliano

dblack@candle.superlink.net wrote:

ruby tries very hard to be a better perl, while python is just too
different from perl that perl programmers will miss all these features:

  • builtin regexes;
  • command line options (-i, -n, -p);
  • special variables ($_, $0…$9);
  • tainting;
  • all that nice quoting operators (qw//, qr//, qq//);

However, from the Ruby ToDo file:

  • discourage use of symbol variables (e.g. $/, etc.) in manual
  • discourage use of Perlish features by giving warnings.

hm, i wonder what is the list of features that the author (matz?) decide
as perlish and should be discouraged. so far i’ve been excited because
many of the nifty perl features are present in ruby. (i admit these
usually only mean the builtin regex operator, the perl re language [with
only few differences], the flexible quoting mechanism, and the command
line options. i almost never use $/ and the likes nowadays).

···


dave

dblack@candle.superlink.net wrote in message
news:Pine.LNX.4.44.0301222111480.15882-100000@candle.superlink.net

Please, let’s not forget lessons we learnt - even today: someone was
asking for a Ruby Lisp interpreter. Now, what would that be called?
Language::LISP? Scheme.rb? No, of course, it was given the eminently
sensible name of Rouge, from which one could determine, well,
absolutely nothing at all, except that it might have something to do
with makeup. Naming is important!

Yes, but what if there are five Lisp interpreters? And what if some
of them are better than others? Same for SGML parsers, etc. Somehow

We have seen this with Test::Unit which as I understand is a merger of two
earlier modules.
I think a module should be codenamed whatever - and at some point it may or
may not be integrated into a core language module where it would be given a
more clinical name - like Test::Unit.

That said, too many modules have too weird codenames - I stil have
difficulties remembering what Amrita and O… ehh O… you know the
framework that is also known as SeaSide for Smalltalk … Really my brain
doesn’t work that way.

One could codename modules like “Green Lisp” to distinguish it from a
potential future “Blue Lisp”, yet I would instantly know it was a Lisp
module.

Mikkel

dblack@candle.superlink.net wrote in message
news:Pine.LNX.4.44.0301250131190.23138-100000@candle.superlink.net

  • obfuscatability (sp?);

Not sure about the spelling, but people should be warned that it’s
not one of Ruby strong points :slight_smile:

Why not? Spelling mistakes are ideal for obfuscation :wink:

Mikkel