[ANN] Wirble 0.1.1: Irb Enhancements for the Masses

P

Paul Duncan

--7l042bGvurpep9Wg
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi All,

I just released version 0.1.1 of Wirble. Wirble is a small collection
of enhancements Irb, packaged in an easy-to-use format. Wirble includes
tab-completion, persistent history, built-in ri support, and syntax
highlighting for Irb results. Here's a screenshot of Wirble in action:

http://pablotron.org/software/wirble/shots/wirble-0.png

All of Wirble's features are configurable, including the color settings.
Each is documented in glorious technicolor in the README, which is
linked below.

URLs
=3D=3D=3D=3D
* Wirble 0.1.1 Tarball
o Download: http://pablotron.org/files/wirble-0.1.1.tar.gz
o Signature: http://pablotron.org/files/wirble-0.1.1.tar.gz.asc
* Wirble 0.1.1 Gem
o Download: http://pablotron.org/files/wirble-0.1.1.gem
o Signature: http://pablotron.org/files/wirble-0.1.1.gem.asc
* Documentation
o Secret Decoder Ring: http://pablotron.org/software/wirble/README
o ChangeLog: http://pablotron.org/software/wirble/ChangeLog-0.1.1

If you've seen most of Wirble before, that's because, well, you've seen
most of Wirble before. Several of the features were collected from the
"Irb Tips and Tricks" page of the Ruby Garden Wiki. My Irb config file
was out of control, so I decided to clean things up and share the
results. =20

Questions, comments, candy, weapons of mass destruction, etc, are always
appreciated, and can be sent to the email address below.

--=20
Paul Duncan <[email protected]> pabs in #ruby-lang (OPN IRC)
http://www.pablotron.org/ OpenPGP Key ID: 0x82C29562

--7l042bGvurpep9Wg
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFFATY/zdlT34LClWIRAjooAJ0YTSIXrUrp2KldbV2cLN+n/W2iEACff+lP
koGWn+Daun3h0RxYISZ+J/4=
=9p9f
-----END PGP SIGNATURE-----

--7l042bGvurpep9Wg--
 
B

benjohn

Hi All,
I just released version 0.1.1 of Wirble. Wirble is a small collection
of enhancements Irb, packaged in an easy-to-use format. Wirble includes
tab-completion, persistent history, built-in ri support, and syntax
highlighting for Irb results. Here's a screenshot of Wirble in action:

That looks great! :) A feature request: Could you syntax highlight the
input lines as well as the output lines?

Cheers,
Benj
 
W

William Crawford

unknown said:
That looks great! :) A feature request: Could you syntax highlight the
input lines as well as the output lines?

Cheers,
Benj

Like, in real time, like an IDE? That'd be awesome.
 
J

John Wilger

URLs
====

FYI, the gem file doesn't seem to exist. I tried both the URL abave
and RubyForge (which is specified n the README in the tarball).

--
Regards,
John Wilger
http://johnwilger.com

-----------
Alice came to a fork in the road. "Which road do I take?" she asked.
"Where do you want to go?" responded the Cheshire cat.
"I don't know," Alice answered.
"Then," said the cat, "it doesn't matter."
- Lewis Carrol, Alice in Wonderland
 
P

Paul Duncan

--iwjEIfU64POCkTAH
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* John Wilger ([email protected]) said:
=20
FYI, the gem file doesn't seem to exist. I tried both the URL abave
and RubyForge (which is specified n the README in the tarball).

That's what I get for doing a release at 4am :).

All my gems are located at http://pablotron.org/files/gems/. So the
correct URLs for the Wirble gem are:

http://pablotron.org/files/wirble-0.1.1.gem
http://pablotron.org/files/wirble-0.1.1.gem.asc

Thanks for the heads up!
--=20
Regards,
John Wilger
http://johnwilger.com
=20
-----------
Alice came to a fork in the road. "Which road do I take?" she asked.
"Where do you want to go?" responded the Cheshire cat.
"I don't know," Alice answered.
"Then," said the cat, "it doesn't matter."
- Lewis Carrol, Alice in Wonderland

--=20
Paul Duncan <[email protected]> pabs in #ruby-lang (OPN IRC)
http://www.pablotron.org/ OpenPGP Key ID: 0x82C29562

--iwjEIfU64POCkTAH
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFFAZbmzdlT34LClWIRAm+TAJ4uW3xeYK4UnXWmdzVJhb2EP9iuhQCbBz7y
fo4W6Za62AwigzeBF6f8wfM=
=ClUX
-----END PGP SIGNATURE-----

--iwjEIfU64POCkTAH--
 
P

Paul Duncan

--qjSZefE6w0iW6XmQ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* Surendra Singhi ([email protected]) said:
Hi Paul,
When I tried it on Windows XP, I get this wierd error:
I don't have rubilicious=20

Now that is bug is both hilarious and stupid.

I must have used the rubilcious gemspec as a template for the Wirble
gempsec :).

I'll get that fixed and release a new version, stat.
irb(main):001:0> require 'rubygems'
=3D> false
irb(main):002:0> require 'wirble'
LoadError: no such file to load -- rubilicious
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21= :in `re
quire__'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21= :in `re
quire'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:182:in `activate'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:181:in `activate'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:26= :in `re
quire'
from (irb):2
irb(main):003:0>
=20
--=20
Surendra Singhi
http://ssinghi.kreeti.com, http://www.kreeti.com
Read my blog at: http://cuttingtheredtape.blogspot.com/
,----
| Great wits are sure to madness near allied,
| And thin partitions do their bounds divide.
|=20
| (John Dryden, Absalom and Achitophel, 1681)
`----
=20

--=20
Paul Duncan <[email protected]> pabs in #ruby-lang (OPN IRC)
http://www.pablotron.org/ OpenPGP Key ID: 0x82C29562

--qjSZefE6w0iW6XmQ
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFFAZqBzdlT34LClWIRAn1BAJ9fPig1lggLTxBAW9FHni9bm0FcVgCfXcD3
gatMngGwx8jGGoGMSglTm/s=
=T1G4
-----END PGP SIGNATURE-----

--qjSZefE6w0iW6XmQ--
 
W

William Crawford

Paul said:
That's what I get for doing a release at 4am :).

All my gems are located at http://pablotron.org/files/gems/. So the
correct URLs for the Wirble gem are:

http://pablotron.org/files/wirble-0.1.1.gem
http://pablotron.org/files/wirble-0.1.1.gem.asc

Thanks for the heads up!

Hmm... Maybe it's not just the 4am thing ;) Maybe you have a mental
block dealing with gems and urls?

</cough>

;)
 
B

Ben Bleything

--HcAYCG3uE/tztfnV
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable


I think you mean...

http://pablotron.org/files/gems/wirble-0.1.1.gem
http://pablotron.org/files/gems/wirble-0.1.1.gem.asc

:)

Ben

--HcAYCG3uE/tztfnV
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----

iD8DBQFFAZo/NRFiSXP2RtkRAkrYAKCsLfbneNuuzDbkhQro6kW1Is9G4wCgxzAu
Qoaio1NOL603FHxjtJAK9nc=
=ct3d
-----END PGP SIGNATURE-----

--HcAYCG3uE/tztfnV--
 
P

Paul Duncan

--pvq4FPIYehQuVelz
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

=20
That looks great! :) A feature request: Could you syntax highlight the
input lines as well as the output lines?

I looked into highlighting the input in Irb, too. It's a lot more work,
but it might be doable. At a minimum, I'd need to write, borrow, or
steal a full-blown Ruby lexer. I'd probably need a more terminal-
friendly replacement for readlines (probably curses).

Now that I know more people are interested, I'll have to investigate :).
Cheers,
Benj

--=20
Paul Duncan <[email protected]> pabs in #ruby-lang (OPN IRC)
http://www.pablotron.org/ OpenPGP Key ID: 0x82C29562

--pvq4FPIYehQuVelz
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFFAZ/mzdlT34LClWIRAvidAKDLyQdKUCGsOFDZ65aufFFoGbtECQCeJxcm
nC26NIe9eyStK1VRO7XPMqk=
=Iwg+
-----END PGP SIGNATURE-----

--pvq4FPIYehQuVelz--
 
P

Paul Duncan

--CGcXfQ1PUDCmwDYp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* William Crawford ([email protected]) said:
Hmm... Maybe it's not just the 4am thing ;) Maybe you have a mental=20
block dealing with gems and urls?

I pretty much just have a mental block. I don't think it's constrained
to gems or urls, either.

Here we go:

http://pablotron.org/files/gems/wirble-0.1.1.gem
http://pablotron.org/files/gems/wirble-0.1.1.gem.asc

The only way I got those out was to copy and paste yours :D.

Thanks!

--=20
Paul Duncan <[email protected]> pabs in #ruby-lang (OPN IRC)
http://www.pablotron.org/ OpenPGP Key ID: 0x82C29562

--CGcXfQ1PUDCmwDYp
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFFAaB7zdlT34LClWIRAuK2AKCLPIgT054LO7eKJGRMQsygybff8QCgivpN
C4kdYnhYVJlFZLmTe7Qm4Jw=
=zSGC
-----END PGP SIGNATURE-----

--CGcXfQ1PUDCmwDYp--
 
P

Paul Duncan

--K5roPakIqCb4O6y8
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* F. Senault ([email protected]) said:
Le 08 septembre =E0 15:32, John Wilger a =E9crit :
=20
=20
I found it there :
=20
http://pablotron.org/files/gems/wirble-0.1.1.gem
=20
Nice little tool, BTW... ;)

Thanks, I'm glad you like it! :)

--=20
Paul Duncan <[email protected]> pabs in #ruby-lang (OPN IRC)
http://www.pablotron.org/ OpenPGP Key ID: 0x82C29562

--K5roPakIqCb4O6y8
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFFAaCuzdlT34LClWIRAmWzAKDSXdtHS578BAZBKo0GJhXw36JaWACggxIC
UiZ+mFCQ3HMbNcmnscGoogY=
=sDS8
-----END PGP SIGNATURE-----

--K5roPakIqCb4O6y8--
 
P

Paul Duncan

--jZNlLGxhPb4urluq
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* William Crawford ([email protected]) said:
Eric said:
-the coloring alters the output line
"hee"
=3D> ???[0;32mnil???[0;0m
=20
Those are ANSI codes. You'll need to use a console that deals with=20
them, or load ANSI.SYS.
=20
http://www.windowsnetworking.com/kbase/WindowsTips/Windows2000/UserTips/M=
iscellaneous/CommandInterpreterAnsiSupport.html

I'll add this to the documentation for future releases. Thanks!

--=20
Paul Duncan <[email protected]> pabs in #ruby-lang (OPN IRC)
http://www.pablotron.org/ OpenPGP Key ID: 0x82C29562

--jZNlLGxhPb4urluq
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFFAavFzdlT34LClWIRAjtMAJ9ktPb+COxfp7pZV4ZlhOf4EuW/2QCfY5XE
NJpD6E2WV/8UjeIN9EaNl/0=
=DKtp
-----END PGP SIGNATURE-----

--jZNlLGxhPb4urluq--
 
P

Paul Duncan

--yIMHf/Pa6CzSkARF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* Eric Torreborre ([email protected]) said:
Hi Paul,
=20
I take it that the windows masses are not concerned,...

Any problems on Windows are a direct result of sloth and incompetence on
my part, rather than intentional malice. I haven't done much console
development on Windows, and I don't have easy access to a Windows
machine for testing.
I have tried wirble on my windows laptop:
=20
-the gem install doesn't work

The URL in the original email was wrong and the gem had an accidental
dependency on Rubilicious. I've fixed the latter and regenerated the
former. Here's the URL:

http://pablotron.org/files/gems/wirble-0.1.2.gem
http://pablotron.org/files/gems/wirble-0.1.2.gem.asc

(Note: This version doesn't address the two issues you have below)
-the Object.ri sample brings an exec error
=20
Errno::ENOEXEC: Exec format error - ri 'object_h'
from c:/ruby/lib/ruby/site_ruby/1.8/wirble.rb:465:in ``'
from c:/ruby/lib/ruby/site_ruby/1.8/wirble.rb:465:in `ri'
from (irb):1

Hi, it should be one of the following forms:

ri 'Object#object_id'
ri Object.ri 'object_id'

It should definitely have a more graceful error message. I'll add that
to my list of stuff to fix.
-the coloring alters the output line"hee"
=3D> ???[0;32mnil???[0;0m
=20
-The persistent history works! Yes!

One out of three ain't bad! :)
I am not used to the internals of the windows console. Do you think it
is possible to have wirble working on both Unix and Windows
plateforms?

I'm not familiar with the Windows console either. I'll follow up on
some of the other URLs in this thread and see what I can find out.

--=20
Paul Duncan <[email protected]> pabs in #ruby-lang (OPN IRC)
http://www.pablotron.org/ OpenPGP Key ID: 0x82C29562

--yIMHf/Pa6CzSkARF
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFFAa/OzdlT34LClWIRAvXkAKCdfdLB3fAhUkyv1AnK0RdPz4XTHQCgqO5Y
2MEK488f5L1C+LCRugAEwSc=
=Tykz
-----END PGP SIGNATURE-----

--yIMHf/Pa6CzSkARF--
 
P

Paul Duncan

--/LSm8UPTCLHL4o89
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* Surendra Singhi ([email protected]) said:
Hi Paul,
When I tried it on Windows XP, I get this wierd error:
I don't have rubilicious=20

I've fixed this bug and packaged up an 0.1.2.

Here's the URL(s):

http://pablotron.org/files/wirble-0.1.2.tar.gz
http://pablotron.org/files/wirble-0.1.2.tar.gz.asc
http://pablotron.org/files/gems/wirble-0.1.2.gem
http://pablotron.org/files/gems/wirble-0.1.2.gem.asc

All I did was remove the accidental rubilicious depencency and
regenerate the gem.

By the way, some other people have had problems with the color codes
under Windows, so I make no promises about how well that will work for
you :).

--=20
Paul Duncan <[email protected]> pabs in #ruby-lang (OPN IRC)
http://www.pablotron.org/ OpenPGP Key ID: 0x82C29562

--/LSm8UPTCLHL4o89
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFFAbCjzdlT34LClWIRAhmXAJ0ey4b2rnW1Ghqa44SigjOEHKN8sQCfRAlo
n8vsNClIHTXRC51bd9sAZnc=
=rmUC
-----END PGP SIGNATURE-----

--/LSm8UPTCLHL4o89--
 
H

Hal Fulton

Paul said:
I looked into highlighting the input in Irb, too. It's a lot more work,
but it might be doable. At a minimum, I'd need to write, borrow, or
steal a full-blown Ruby lexer. I'd probably need a more terminal-
friendly replacement for readlines (probably curses).

You can use the lexer built into irb. I forget how it's
done, but I did it two years ago. ;)


Hal
 
H

Hans Fugal

Paul said:
Hi All,

I just released version 0.1.1 of Wirble. Wirble is a small collection
of enhancements Irb, packaged in an easy-to-use format. Wirble includes
tab-completion, persistent history, built-in ri support, and syntax
highlighting for Irb results.

Nice! I think you should do auto indent too.

IRB.conf[:AUTO_INDENT]=true
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,697
Latest member
AugustNabo

Latest Threads

Top