[ANN] Why's (Poignant) Guide to Ruby: Expansion Pak I: The Tiger's Vest (with a Basic Introduction to Irb)

Yes, I've been taking forever. Well, what can I say? Answering threats is quite consuming. (But apologies to those of you whose threats have been too jarring for me to reply or breathe.)

Today I'm passing on to you the first fruits of a big batch of material forthcoming. The Tiger's Vest (with a Basic Introduction to Irb.)

  http://poignantguide.net/ruby/expansion-pak-1.html

Stick around. Picture a man with a balloon, pinching the air out slowly, cats tied to his leg. If you can do that, then you're all prepped for chapter 5.

Thank you, -talkers.

_why

why the lucky stiff <ruby-talk@whytheluckystiff.net> writes:

Yes, I've been taking forever. Well, what can I say? Answering
threats is quite consuming. (But apologies to those of you whose
threats have been too jarring for me to reply or breathe.)

Today I'm passing on to you the first fruits of a big batch of
material forthcoming. The Tiger's Vest (with a Basic Introduction to
Irb.)

  http://poignantguide.net/ruby/expansion-pak-1.html

Stick around. Picture a man with a balloon, pinching the air out
slowly, cats tied to his leg. If you can do that, then you're all
prepped for chapter 5.

Thank you, -talkers.

_why

Please don't ever seek professional psychiatric help.

mikael

why the lucky stiff wrote:

Yes, I've been taking forever. Well, what can I say? Answering threats is quite consuming. (But apologies to those of you whose threats have been too jarring for me to reply or breathe.)

Today I'm passing on to you the first fruits of a big batch of material forthcoming. The Tiger's Vest (with a Basic Introduction to Irb.)

http://poignantguide.net/ruby/expansion-pak-1.html

The sidebar about Ruby versions... does this still apply? I've heard, that there will be a 1.9 stable version before 2.0?

Regards,

   Michael

why the lucky stiff wrote:

Yes, I've been taking forever. Well, what can I say? Answering threats is quite consuming. (But apologies to those of you whose threats have been too jarring for me to reply or breathe.)

Today I'm passing on to you the first fruits of a big batch of material forthcoming. The Tiger's Vest (with a Basic Introduction to Irb.)

http://poignantguide.net/ruby/expansion-pak-1.html

Stick around. Picture a man with a balloon, pinching the air out slowly, cats tied to his leg. If you can do that, then you're all prepped for chapter 5.

Thank you, -talkers.

_why

Using Debian unstable, irb1.8, I had to issue

require 'irb/completion'
conf.use_readline = true

to get completion.

I have added this in my ~/.irbrc to get it automatically loaded:

require 'irb/completion'
IRB.conf[:use_readline] = true

Raph

+1

···

On Tue, 27 Jul 2004 21:29:20 +0900, Mikael Brockman <phubuh@phubuh.org> wrote:

why the lucky stiff <ruby-talk@whytheluckystiff.net> writes:

> Yes, I've been taking forever. Well, what can I say? Answering
> threats is quite consuming. (But apologies to those of you whose
> threats have been too jarring for me to reply or breathe.)
>
> Today I'm passing on to you the first fruits of a big batch of
> material forthcoming. The Tiger's Vest (with a Basic Introduction to
> Irb.)
>
> http://poignantguide.net/ruby/expansion-pak-1.html
>
> Stick around. Picture a man with a balloon, pinching the air out
> slowly, cats tied to his leg. If you can do that, then you're all
> prepped for chapter 5.
>
> Thank you, -talkers.
>
> _why

Please don't ever seek professional psychiatric help.

mikael

Raphael Bauduin wrote:

why the lucky stiff wrote:
> Yes, I've been taking forever. Well, what can I say?
Answering threats
> is quite consuming. (But apologies to those of you whose threats have
> been too jarring for me to reply or breathe.)
>
> Today I'm passing on to you the first fruits of a big batch of material
> forthcoming. The Tiger's Vest (with a Basic Introduction to Irb.)
>
> http://poignantguide.net/ruby/expansion-pak-1.html
>

Using Debian unstable, irb1.8, I had to issue

require 'irb/completion'
conf.use_readline = true

to get completion.

I have added this in my ~/.irbrc to get it automatically loaded:

require 'irb/completion'
IRB.conf[:use_readline] = true

This reminds me that I want to fix the fact that tab-completion does not
work in irb in the one-click installer -- I never knew why and I kept
forgetting to ask.

I tried why's suggestion for getting it to work under windows (pretty much
the same as Raphael's above), but it doesn't work. Below is my console log.
Does anyone know what is wrong? Am I building the ruby for the one-click
installer incorrectly?

Thanks, in advance, for any help (console log below).

Curt

=== BEGIN-LOG ===

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\hibbs_c>irb
irb(main):001:0> require 'irb/completion'
LoadError: No such file to load -- readline
        from c:/ruby/lib/ruby/1.8/irb/completion.rb:10:in `require'
        from c:/ruby/lib/ruby/1.8/irb/completion.rb:10
        from (irb):2:in `require'
        from (irb):2:in `irb_binding'
        from c:/ruby/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding'
        from c:/ruby/lib/ruby/1.8/irb/workspace.rb:52
Maybe IRB bug!!
irb(main):002:0> puts $LOAD_PATH
c:/ruby/lib/ruby/site_ruby/1.8
c:/ruby/lib/ruby/site_ruby/1.8/i386-msvcrt
c:/ruby/lib/ruby/site_ruby
c:/ruby/lib/ruby/1.8
c:/ruby/lib/ruby/1.8/i386-mswin32
.
=> nil
irb(main):003:0>

=== END-LOG ===

maybe you don't have readline.so+readline.dll ? (binding + real
library) It did not used to come with the one click installer.

I tried using the readline (dll+so) that was given from
Index of /ruby/mswin32/en
and it partially worked (i.e. tab completion was ok) but I had
problems related to proper settings of .inputrc (using the one from my
linux box to get italian settings did not work), so I could not input
some character... well, like [ and { :slight_smile:

···

il Wed, 28 Jul 2004 21:43:38 +0900, "Curt Hibbs" <curt@hibbs.com> ha scritto::

This reminds me that I want to fix the fact that tab-completion does not
work in irb in the one-click installer -- I never knew why and I kept
forgetting to ask.

I tried why's suggestion for getting it to work under windows (pretty much
the same as Raphael's above), but it doesn't work. Below is my console log.
Does anyone know what is wrong? Am I building the ruby for the one-click
installer incorrectly?

Thanks, in advance, for any help (console log below).

Curt

=== BEGIN-LOG ===

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\hibbs_c>irb
irb(main):001:0> require 'irb/completion'
LoadError: No such file to load -- readline

Curt Hibbs wrote:

This reminds me that I want to fix the fact that tab-completion does not
work in irb in the one-click installer -- I never knew why and I kept
forgetting to ask.

This topic's been knocked about on the discussion list for the (Poignant) Guide. I don't know if this is the same set of files that Gabriele is offering, but it works for me:

  http://whytheluckystiff.net/ruby/dist/readline.so-for-1.8.zip

Two files inside. Place readline.dll in $RUBY/bin. The readline.so goes in $RUBY/lib/ruby/1.8/i386-mswin32. Then, to get Irb working with Readline:

  irb --readline -r irb/completion

Or the ~/.irbrc that Raph offered will work as well.

_why

gabriele renzi wrote:

il Wed, 28 Jul 2004 21:43:38 +0900, "Curt Hibbs" <curt@hibbs.com> ha
scritto::

>This reminds me that I want to fix the fact that tab-completion does not
>work in irb in the one-click installer -- I never knew why and I kept
>forgetting to ask.
>
>I tried why's suggestion for getting it to work under windows
(pretty much
>the same as Raphael's above), but it doesn't work. Below is my
console log.
>Does anyone know what is wrong? Am I building the ruby for the one-click
>installer incorrectly?
>
>Thanks, in advance, for any help (console log below).
>
>Curt
>
>=== BEGIN-LOG ===
>
>Microsoft Windows XP [Version 5.1.2600]
>(C) Copyright 1985-2001 Microsoft Corp.
>
>C:\Documents and Settings\hibbs_c>irb
>irb(main):001:0> require 'irb/completion'
>LoadError: No such file to load -- readline

maybe you don't have readline.so+readline.dll ? (binding + real
library) It did not used to come with the one click installer.

I tried using the readline (dll+so) that was given from
Index of /ruby/mswin32/en
and it partially worked (i.e. tab completion was ok) but I had
problems related to proper settings of .inputrc (using the one from my
linux box to get italian settings did not work), so I could not input
some character... well, like [ and { :slight_smile:

But if it is supposed to come with ruby, why is it not getting built?

Curt

gabriele renzi wrote:

il Wed, 28 Jul 2004 21:43:38 +0900, "Curt Hibbs" <curt@hibbs.com> ha
scritto::

>This reminds me that I want to fix the fact that tab-completion does not
>work in irb in the one-click installer -- I never knew why and I kept
>forgetting to ask.
>
>I tried why's suggestion for getting it to work under windows
(pretty much
>the same as Raphael's above), but it doesn't work. Below is my
console log.
>Does anyone know what is wrong? Am I building the ruby for the one-click
>installer incorrectly?
>
>Thanks, in advance, for any help (console log below).
>
>Curt
>
>=== BEGIN-LOG ===
>
>Microsoft Windows XP [Version 5.1.2600]
>(C) Copyright 1985-2001 Microsoft Corp.
>
>C:\Documents and Settings\hibbs_c>irb
>irb(main):001:0> require 'irb/completion'
>LoadError: No such file to load -- readline

maybe you don't have readline.so+readline.dll ? (binding + real
library) It did not used to come with the one click installer.

I tried using the readline (dll+so) that was given from
Index of /ruby/mswin32/en
and it partially worked (i.e. tab completion was ok) but I had
problems related to proper settings of .inputrc (using the one from my
linux box to get italian settings did not work), so I could not input
some character... well, like [ and { :slight_smile:

I downloaded http://jarp.jin.gr.jp/win32/readline-4.3-2-mswin32.zip and put
the readline.dll it contained in C:\ruby\lib\ruby\site_ruby\1.8\i386-msvcrt
but I still get this error:

=== BEGIN-LOG ===

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\hibbs_c>irb
irb(main):001:0> require 'irb/completion'
NameError: uninitialized constant Readline
        from c:/ruby/lib/ruby/1.8/irb/completion.rb:184
        from (irb):1:in `require'
        from (irb):1:in `irb_binding'
        from c:/ruby/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding'
        from c:/ruby/lib/ruby/1.8/irb/workspace.rb:52
Maybe IRB bug!!
irb(main):002:0>

=== END-LOG ===

Don't you guys think that this stuff should be included in the
one-click installer for Windows? It should probably even include the
~/.irbrc settings to turn it on, so that users don't have to do
anything to have tab completion.

···

On Wed, 28 Jul 2004 22:44:37 +0900, why the lucky stiff <ruby-talk@whytheluckystiff.net> wrote:

Curt Hibbs wrote:
>
> This reminds me that I want to fix the fact that tab-completion does not
> work in irb in the one-click installer -- I never knew why and I kept
> forgetting to ask.
>

This topic's been knocked about on the discussion list for the
(Poignant) Guide. I don't know if this is the same set of files that
Gabriele is offering, but it works for me:

  http://whytheluckystiff.net/ruby/dist/readline.so-for-1.8.zip

Two files inside. Place readline.dll in $RUBY/bin. The readline.so
goes in $RUBY/lib/ruby/1.8/i386-mswin32. Then, to get Irb working with
Readline:

  irb --readline -r irb/completion

Or the ~/.irbrc that Raph offered will work as well.

_why

why the lucky stiff wrote:

Curt Hibbs wrote:
>
> This reminds me that I want to fix the fact that tab-completion does not
> work in irb in the one-click installer -- I never knew why and I kept
> forgetting to ask.
>

This topic's been knocked about on the discussion list for the
(Poignant) Guide. I don't know if this is the same set of files that
Gabriele is offering, but it works for me:

  http://whytheluckystiff.net/ruby/dist/readline.so-for-1.8.zip

Two files inside. Place readline.dll in $RUBY/bin. The readline.so
goes in $RUBY/lib/ruby/1.8/i386-mswin32. Then, to get Irb working with
Readline:

  irb --readline -r irb/completion

Or the ~/.irbrc that Raph offered will work as well.

Great... this worked!

I want to include this in the Ruby Installer for Windows. Where did you get
this? If you built it yourself, where did you get the source?

Thanks,
Curt

the readline library is an external one, just like openssl or zlib
Ruby's source just contains the bindings, so I think the configure on
the oneclick build system did not find GNU/readline and just skipped
it's compiling.

···

il Wed, 28 Jul 2004 22:06:19 +0900, "Curt Hibbs" <curt@hibbs.com> ha scritto::

But if it is supposed to come with ruby, why is it not getting built?

Carl Youngblood wrote:

Don't you guys think that this stuff should be included in the
one-click installer for Windows? It should probably even include the
~/.irbrc settings to turn it on, so that users don't have to do
anything to have tab completion.

Yes, I do. That's precisely why I started asking these questions.

Curt

···

On Wed, 28 Jul 2004 22:44:37 +0900, why the lucky stiff > <ruby-talk@whytheluckystiff.net> wrote:
> Curt Hibbs wrote:
> >
> > This reminds me that I want to fix the fact that
tab-completion does not
> > work in irb in the one-click installer -- I never knew why and I kept
> > forgetting to ask.
> >
>
> This topic's been knocked about on the discussion list for the
> (Poignant) Guide. I don't know if this is the same set of files that
> Gabriele is offering, but it works for me:
>
> http://whytheluckystiff.net/ruby/dist/readline.so-for-1.8.zip
>
> Two files inside. Place readline.dll in $RUBY/bin. The readline.so
> goes in $RUBY/lib/ruby/1.8/i386-mswin32. Then, to get Irb working with
> Readline:
>
> irb --readline -r irb/completion
>
> Or the ~/.irbrc that Raph offered will work as well.
>
> _why
>
>

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.726 / Virus Database: 481 - Release Date: 7/22/2004

Curt Hibbs wrote:

Great... this worked!

I want to include this in the Ruby Installer for Windows. Where did you get
this? If you built it yourself, where did you get the source?

I yanked it from the 1.8.1.2 of ActiveRuby. http://arton.hp.infoseek.co.jp/

The readline windows port (the dll) is the one built by eban: http://jarp.jin.gr.jp/win32/ His package appears to come with the import libraries which probably just need to be linked. I'm sure it's just a matter of putting it in the proper path.

_why

Curt Hibbs wrote:

Or the ~/.irbrc that Raph offered will work as well.

Great... this worked!

Didn't work for me though. I'm on a German keyboard layout and have to use ctrl-alt-7 to get a {. This stops working as soon as I use readline for irb.

I also have a Cygwin-bash available and in the shell itself I can still type brackets.

Is there any way to fix that? If yes it should also be included into the one-click installer.

Regards,
Florian Gross

Absolutely, especially when some people are just starting to learn and love
Ruby (like me) and don't have a *nix box, this is a great addition and an
imense help when first learning Ruby...Nubys will apreciate it! :slight_smile:

···

----- Original Message -----
From: "Carl Youngblood" <carl.youngblood@gmail.com>
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
Sent: Wednesday, July 28, 2004 11:31 AM
Subject: Re: [ANN] Why's (Poignant) Guide to Ruby: Expansion Pak I: The
Tiger's Vest (with a Basic Introduction to Irb)

Don't you guys think that this stuff should be included in the
one-click installer for Windows? It should probably even include the
~/.irbrc settings to turn it on, so that users don't have to do
anything to have tab completion.

On Wed, 28 Jul 2004 22:44:37 +0900, why the lucky stiff > <ruby-talk@whytheluckystiff.net> wrote:
> Curt Hibbs wrote:
> >
> > This reminds me that I want to fix the fact that tab-completion does

not

> > work in irb in the one-click installer -- I never knew why and I kept
> > forgetting to ask.
> >
>
> This topic's been knocked about on the discussion list for the
> (Poignant) Guide. I don't know if this is the same set of files that
> Gabriele is offering, but it works for me:
>
> http://whytheluckystiff.net/ruby/dist/readline.so-for-1.8.zip
>
> Two files inside. Place readline.dll in $RUBY/bin. The readline.so
> goes in $RUBY/lib/ruby/1.8/i386-mswin32. Then, to get Irb working with
> Readline:
>
> irb --readline -r irb/completion
>
> Or the ~/.irbrc that Raph offered will work as well.
>
> _why
>
>

why the lucky stiff wrote:

Curt Hibbs wrote:

>Great... this worked!
>
>I want to include this in the Ruby Installer for Windows. Where
did you get
>this? If you built it yourself, where did you get the source?
>
>
I yanked it from the 1.8.1.2 of ActiveRuby.
http://arton.hp.infoseek.co.jp/

The readline windows port (the dll) is the one built by eban:
http://jarp.jin.gr.jp/win32/ His package appears to come with the
import libraries which probably just need to be linked. I'm sure it's
just a matter of putting it in the proper path.

Thank you!

Curt

Florian Gross wrote:

Curt Hibbs wrote:

>>Or the ~/.irbrc that Raph offered will work as well.
> Great... this worked!

Didn't work for me though. I'm on a German keyboard layout and have to
use ctrl-alt-7 to get a {. This stops working as soon as I use readline
for irb.

I also have a Cygwin-bash available and in the shell itself I can still
type brackets.

Is there any way to fix that? If yes it should also be included into the
one-click installer.

I have no way to find a solution or test this. But if someone else can do so
and send me the solution I will include it in the installer.

Curt

imvho this is a problem with readline, try to get a proper .inputrc
file. It's hard on my italian box too.

···

il Wed, 28 Jul 2004 17:55:51 +0200, Florian Gross <flgr@ccan.de> ha scritto::

Curt Hibbs wrote:

Or the ~/.irbrc that Raph offered will work as well.

Great... this worked!

Didn't work for me though. I'm on a German keyboard layout and have to
use ctrl-alt-7 to get a {. This stops working as soon as I use readline
for irb.