Newbie questions

Absolutely! I’m currently very fluent with Perl and I’m struggling
with Ruby. Lack of adequate documentation is making my learning
experience more time consuming and somewhat more frustrating. More
Ruby documentation would significantly improve my Ruby experience.

Carter.

···

-----Original Message-----

From: Daniel Carrera [mailto:dcarrera@math.umd.edu]

[snip]

I do think that the biggest things holding Ruby back (IMHO) are
documentation and availability of mature modules.

I’m working on one component of this as we speak. I just committed the
first Ruby interpreter source file with embedded documentation. Once
this task is finished, you’ll be able to generate RDoc documentation of
all of Ruby (and any libraries that choose to participate). You’ll also
have full ‘ri’ integration. For example, I can now say:

dave[ruby/lib 14:42:34] ri Array.zip
-------------------------------------------------------------- Array#zip
array.zip(arg, …) → an_array
array.zip(arg, …) {| arr | block } → nil

···

On Dec 16, 2003, at 13:28, Carter Thompson wrote:

Absolutely! I’m currently very fluent with Perl and I’m struggling
with Ruby. Lack of adequate documentation is making my learning
experience more time consuming and somewhat more frustrating. More
Ruby documentation would significantly improve my Ruby experience.


  Converts any arguments to arrays, then merges elements of _self_
  with corresponding elements from each argument. This generates a
  sequence of <code>self#size</code> _n_-element arrays, where _n_ is
  one more that the count of arguments. If the size of any arguemnt
  is less than <code>enumObj#size</code>, <code>nil</code> values are
  supplied. If a block given, it is invoked for each output array,
  otherwise an array of arrays is returned.

     a = [ 4, 5, 6 ]
     b = [ 7, 8, 9 ]

     [1,2,3].zip(a, b)      #=> [[1, 4, 7], [2, 5, 8], [3, 6, 9]]
     [1,2].zip(a,b)         #=> [[1, 4, 7], [2, 5, 8]]
     a.zip([1,2],[8])       #=> [[4,1,8], [5,2,nil], [6,nil,nil]]

dave[ruby/lib 14:42:40] ri Date.step
-------------------------------------------------------------- Date#step
step(limit, step) {|date| …}

  Step the current date forward +step+ days at a time (or backward,
  if +step+ is negative) until we reach +limit+ (inclusive), yielding
  the resultant date at each step.

(forgive the funky markup symbols: it’s a work in progress…)

Cheers

Dave

Dave Thomas wrote:

Absolutely! I'm currently very fluent with Perl and I'm struggling
with Ruby. Lack of adequate documentation is making my learning
experience more time consuming and somewhat more frustrating. More
Ruby documentation would significantly improve my Ruby experience.

I’m working on one component of this as we speak. I just committed the
first Ruby interpreter source file with embedded documentation. Once
this task is finished, you’ll be able to generate RDoc documentation of
all of Ruby (and any libraries that choose to participate). You’ll also
have full ‘ri’ integration.

Thats awesome, the one thing I missed from perl was the way
perldoc would pick up newly-installed modules documentation.
I think thats an incentive for module writers to write
good doc too - if theres a standard tool that means people
might read it, its worth writing :slight_smile:

Is the code in CVS anywhere?

···

On Dec 16, 2003, at 13:28, Carter Thompson wrote:


Rasputin :: Jack of All Trades - Master of Nuns

It’s in the ruby CVS tree: if you install Ruby, you now get RDoc and
ri. However, they’re both in a state of flux. As it stands right now,
there’s no Ruby documentation available out of the box: you have to
build it, so don’t go replacing your existing ‘ri’ just yet.

Cheers

Dave

···

On Dec 16, 2003, at 15:01, Rasputin wrote:

Is the code in CVS anywhere?