The report on the RDSL project
  http://rubyforge.org/projects/rdsl/
notes the gap between theoretical optimal implementation and the speed of
brute force Ruby builtins.

Yip, been there, done that, been firmly bitten in the bum!

I have a very nifty implementation of a deque as a circular buffer in
ruby. Alas, the interpretor overhead means that the built in dumb
Array shift/unshift is faster unless the deque grows to more than 2000
items.

The last era of computing is what I call "Knuthian". No matter how ugly
the interface and implementation, (think MIX), the emphasis and joy lies
in its time / memory behaviour.

I think in the next era of computing the emphasis will not be on "optimal"
as in fast / least memory, but on elegance of interface and
simplicity of implementation.

After all, why are we attracted to Ruby?

In the Matsumoto era, code that is butt ugly to use, will die. Code that
gives nasty surprises to its user, code that is foul to maintain, will die.

Code that is crystal clear as to what it does and how you use it will
thrive.

http://www.laputan.org/selfish/selfish.html#TheSelfishClass
describes it well.

Now there is a project on Ruby Abstract Data Type's I would like to see.
One that optimises the understandability of concept, elegance of interface
and simplicity of implementation and ease of use.

STL is fast, powerful, but truly UGLY. There are many noxious traps for
the unwary.  Eg. you are iterating across a container, some operation many
modules away caused the thing the iterator is pointing to destruct. Your
iterator is now invalid. All die. (But only at random one in a thousand
times you do it....)


John Carter                             Phone : (64)(3) 358 6639
Tait Electronics                        Fax   : (64)(3) 359 4632
PO Box 1645 Christchurch                Email : john.carter / tait.co.nz
New Zealand

A Million Monkeys can inflict worse things than just Shakespeare on
your system.