== Background ==
Most of my life has been eaten by Ruport lately, I haven’t even had a
chance to play around with any of the alternative implementations of
Ruby out there!
I did some looking around and it seems like most people are interested
in 1.8 compatibility, and performance, and fancy things like that.
So little innovation, so little fun!
So I’m proud to announce something you’ll be sure to find convenient
on talk like a pirate day, PRuby.
== What is it? ==
A bunch of wonderful ideas from Greg, Aaron, Paul, James, and Mike.
Why use irb when you can use iargghb?
[sandal@metta pruby]$ ./iaarghb
a = “pirate ship”
=> “pirate ship”
a.hail(:length) if a.savvy? :length
=> 11
a.hail(:lengthe) if a.savvy? :lengthe
=> nil
a.hail(:ye_stinkin_length)
=> 11
port = AARGHray.ahoy
=> []
port << Aye
=> [true]
port << Aye
=> [true, true]
port << Aye
=> [true, true, true]
blow_me_down if port.empty?
=> nil
port.plunder
=> []
blow_me_down if port.empty?
AarghYeSunkMeShip: Yarr! Ye Stinkin’ Lubber!!!
from ./libpruby.rb:33:in `blow_me_down’
from (irb):11
from :0
avast!
[sandal@metta pruby]$
Ruby is supposed to be about expressiveness, and about making the
programmer comfortable expressing their thoughts. Now, we are no
longer shackled by Matz’s obvious oppression of the would be pirate
Rubyist!
== Coolest Features ==
PRuby gives you the same syntactic diabetes RSpec users crave:
Object.ahoy.gimme_yer_stinkin_object_id
=> 23793950882680
Object.ahoy.avast_with_yer_cursed_class
=> Object
With convenient aliases to help you think clearly, and not wrestle
with Ruby’s cumbersome lubber syntax.
AARGHray.ahoy.me_matey?(Array)
=> true
AARGHray.ahoy.me_matey?(String)
=> false
It even ends the eigenclass/singleton debate with the most intuitive
naming ever.
Object.me_onsies
=> #Class:Object
If you’re not already sold on PRuby, well to hell with you. We don’t
want to hear your FUD.
== Get it ==
http://code.stonecode.org/pruby/
PRuby is copyrighted tree software under LotFOT (see license at the URL)
Pirates do not believe in complex package management, so see the pkg/
directory for zip/tarball and src/ for the actual code.
There is also a README.txt and some small examples.