[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Eating CPAN - Was Port A Library.

John Carter

2/16/2006 12:19:00 AM

11 Answers

eastcoastcoder

2/16/2006 3:51:00 AM

0

There are modules in CPAN that can do almost anything you need, and
most things that you don't. Having access to them would make a lot of
Ruby tasks much easier!

May I make a suggestion: Go the route of the Cygwin project. Instead
of porting individual modules, build a bridge that let's Ruby invoke
and talk to Perl. This would give us free access to (nearly) all of
CPAN. It would also make migrating a lot of Perl apps easier.

Are there any major difficulties it building a Ruby <-> Perl bridge?
Allowing Ruby code to call Perl subroutines, pass vars back and forth,
etc.?

Wilson Bilkovich

2/16/2006 4:34:00 AM

0

On 2/15/06, eastcoastcoder@gmail.com <eastcoastcoder@gmail.com> wrote:
> There are modules in CPAN that can do almost anything you need, and
> most things that you don't. Having access to them would make a lot of
> Ruby tasks much easier!
>
> May I make a suggestion: Go the route of the Cygwin project. Instead
> of porting individual modules, build a bridge that let's Ruby invoke
> and talk to Perl. This would give us free access to (nearly) all of
> CPAN. It would also make migrating a lot of Perl apps easier.
>
> Are there any major difficulties it building a Ruby <-> Perl bridge?
> Allowing Ruby code to call Perl subroutines, pass vars back and forth,
> etc.?
>

You can do this with RubyInline:
http://rubyforge.org/projects/r...


Dave Burt

2/16/2006 1:58:00 PM

0

John Carter wrote:
> So we need a script that will chew on CPAN's dependency network and
> prioritise the CPAN modules.

There's already one. It's called CPAN::Dependency; you can get it from CPAN.

http://search.cpan.org/~saper/CPAN-Dependency/lib/CPAN/Dep...

Cheers,
Dave


David Vallner

2/16/2006 2:32:00 PM

0

Dna Štvrtok 16 Február 2006 04:53 eastcoastcoder@gmail.com napísal:
> Are there any major difficulties it building a Ruby <-> Perl bridge?
> Allowing Ruby code to call Perl subroutines, pass vars back and forth,
> etc.?
>

Horrible, terrible overhead? Personally, I'd be happier to see Parrot deliver
on the rumours to run all manners of scripts - definately a more consistent
interoperability solution than making bridges.

Also, porting is useful in that it lets you do API modifications with respect
to specific Ruby idioms. Although the bridge would let you do a sort of Ruby
bindings to Perl modules this way more quickly getting rid of recoding core
algorithms.

David Vallner


eastcoastcoder

2/16/2006 2:39:00 PM

0

Neat. How do you go about using this this to do Perl? Do you need to
inline an entire perl interpreter?

Ryan Davis

2/21/2006 12:01:00 AM

0


On Feb 16, 2006, at 6:31 AM, David Vallner wrote:

> Dna Štvrtok 16 Február 2006 04:53 eastcoastcoder@gmail.com
> napísal:
>> Are there any major difficulties it building a Ruby <-> Perl bridge?
>> Allowing Ruby code to call Perl subroutines, pass vars back and
>> forth,
>> etc.?
>>
>
> Horrible, terrible overhead?

Really? Have you measured?



Ryan Davis

2/21/2006 12:02:00 AM

0


On Feb 15, 2006, at 8:33 PM, Wilson Bilkovich wrote:

> On 2/15/06, eastcoastcoder@gmail.com <eastcoastcoder@gmail.com> wrote:
>
> You can do this with RubyInline:
> http://rubyforge.org/projects/r...

Yup. And at RubyConf I demo'd perl specifically. I'll release it in a
bit.



Edgardo Hames

2/21/2006 3:25:00 AM

0

On 2/21/06, Ryan Davis <ryand-ruby@zenspider.com> wrote:
>
> On Feb 15, 2006, at 8:33 PM, Wilson Bilkovich wrote:
>
> > On 2/15/06, eastcoastcoder@gmail.com <eastcoastcoder@gmail.com> wrote:
> >
> > You can do this with RubyInline:
> > http://rubyforge.org/projects/r...
>
> Yup. And at RubyConf I demo'd perl specifically. I'll release it in a
> bit.
>

Does this really mean that we would have access to all the Perl
libraries "for free"?
If so, this would be great news, Ryan!

Cheers,
Ed



--
Encontrá a "Tu psicópata favorito" http://tuxmaniac.bl...

Thou shalt study thy libraries and strive not to reinvent them without cause,
that thy code may be short and readable and thy days pleasant and productive.
-- Seventh commandment for C programmers


pat eyler

2/21/2006 7:49:00 PM

0

On 2/20/06, Edgardo Hames <ehames@gmail.com> wrote:
> On 2/21/06, Ryan Davis <ryand-ruby@zenspider.com> wrote:
> >

[deleted info about RubyInline's Perl capabilities]

> Does this really mean that we would have access to all the Perl
> libraries "for free"?

well, only if you consider having to deal with their various APIs 'for free'

> If so, this would be great news, Ryan!

It's a good temporary measure, but having Ruby rewrites of the
important/useful libraries would be *much* better.

>
> Cheers,
> Ed
>
>
>
> --
> Encontrá a "Tu psicópata favorito" http://tuxmaniac.bl...
>
> Thou shalt study thy libraries and strive not to reinvent them without cause,
> that thy code may be short and readable and thy days pleasant and productive.
> -- Seventh commandment for C programmers
>
>


--
thanks,
-pate
-------------------------


pat eyler

2/23/2006 6:05:00 PM

0

On 2/23/06, Dave Burt <dave@burt.id.au> wrote:
>
> Hi,
>
> (Sorry if this is a duplicate; I attempted to post basically this to
> c.l.r before but it hasn't shown up there or in ruby-talk.)
>
> So, anyway, I couldn't get Perl's CPAN::Dependency to do what I wanted,
> so I wrote a Ruby script to download CPAN. Well, the names of "releases"
> (packages with versions; these can contain multiple modules) and their
> authors and dependencies, anyway.
>
> http://www.dave.burt.id.au/...
>

very cool!

> The script downloads about 15000 pages from CPAN, one per author (5000)
> plus one per current release (10000), and takes a little while, although
> all the pages are small (the per release ones are just Makefile.PL, to
> pull prerequisites from). It produces 800k of YAML.
>
> I've cleaned up and processed this output (relatively trivially, sorry,
> didn't save my work) to find the top 100 most-required releases. I've
> got 2 versions of this list: the first is based on CPAN::Dependency's
> notion of only counting authors whose releases refer to each release, to
> eliminate false popularity generated by gratuitous references between an
> authors own releases. The second isn't restricted like that and counts a
> references for each release that lists it as a prerequisite.
>
> The first that stands out to me, after eliminating functions that exist
> or
> are being developed in Ruby, is POE - Perl's event-driven networking
> library. It looks quite simple to build, in comparison to Python's
> Twisted,
> and it seems it may be possible to build a Twisted-like interface layer
> on
> top of a POE port. What do Rubyists use in lieu of a Ruby event-driven
> networking library?
>

Would you like to share your lists somewhere (rubygarden's wiki?) so
that people interested in porting can register their intention, ask for
help, etc.?

> Cheers,
> Dave
>
> --
> Posted via http://www.ruby-....
>
>


--
thanks,
-pate
-------------------------