Ruby Weekly News 27th March - 2nd April 2006
Ruby Weekly News is a summary of the week’s activity on the ruby-talk
mailing list / the comp.lang.ruby newsgroup / Ruby forum, brought to
by Tim S…
[ Contribute to the next newsletter ]
Articles and Announcements
* Italy on Rails - First Europe Ruby on Rails Conference -------------------------------------------------------- Nathaniel B. announced the first Ruby on Rails Conference in Europe. It will be held in Rome in late 2006, and run by Open
* Article: An Exercise in Metaprogramming with Ruby --------------------------------------------------- Hal F. wrote an article in February called An Exercise in Metaprogramming with Ruby, but neglected to post a link to it on ruby-talk. | My editor said it "didn't do that well" in terms of page views.
| I said, well, I should have posted it to ruby-talk. And she
| that now, and we’ll see what effect it has.
| So there you have it. No bots or artificial inflation, please.
The article was well received by the group. http://www.devsource.com/article2/0,1895,1928561,00.asp * Brazilian Portuguese Ruby Book -------------------------------- Eustaquio Rangel de Oliveira J announced his Brazilian Portuguese
book, to be released on April 5.
The book was added to the RubyGarden RubyBookList page. | Com um texto orientado para quem já programa em alguma outra | linguagem, este livro apresenta exemplos claros que podem ser | facilmente assimilados, servindo de guia para o conhecimento e | aprendizado da linguagem Ruby. * Ruby and RoR Book Roundup --------------------------- Rob S., "a big bookworm", put together a list of Ruby books coming up in 2006.
User Group News
* The San Diego Ruby U. Group lives! --------------------------------------- Daniel A. claimed that the San Diego Ruby U. Group lives! "After some false starts, we've decided to do this thing for real
Calling all San Diego Rubyists!"
* Ruby Social Club - 1st April Milan Meeting -------------------------------------------- Chiaro Scuro: "The Ruby Social Club is getting up to speed and spreading fast. After the first two meetings in Rome we are going
meet up in Milan on the evening of saturday the first of April."
* April Meeting of the Phoenix Ruby U. Group ----------------------------------------------- James B. announced that the Phoenix Ruby U. Group will be meeting on April 10, and will likely discuss new features in
1.1, and old features in Ruby’s built-in unit testing library.
I’m sure we’ll make stuff up as we go.”
Quote of the Week
* Blixy Tee Bus Stop -------------------- So I was wearing my chunky bacon Blixy Tee http://www.cafepress.com/blixytees.10116504 at the School bus stop the other day, and my son (5yrs) gets up on his tip toes and starts trying to read foxspeak: "Chunky?... bacon? Chunky Bacon... Come on, seriously... Chunky. Bacon. Chunky Bacon. [repeated ad nauseam]" Pretty soon all the kids were chanting. It was fun. Thanks Why, Bil K.
ruby-dev summary 28274-28600
Furuhashi Apuri summarised the Japanese mailing list ruby-dev, which
ideas around regexp named captures, method to hold the name of
currently executing method, and a proposal for multi-method support.
The latter would allow you to write
def foo(String x)
def foo(Integer x)
b = Bar.new
b.foo(“hello”) # -> “a string”
b.foo(5) # -> “an integer”
The String or Integer or … is just anything that has an === method.
“Matz said he agrees and this can be committed to 1.9 if it is fast
Ruby Goes to the Sun
April Fools’ jokes. Hansson’s getting the band back together. Mmmbop.
Testing DiGraph (#73)
Robert F. posted this week’s Ruby Q…
“In this week’s Ruby Q. you will not only have fun and (hopefully)
something; you will also contribute to a research project evaluating
automated testing techniques. So please read on and then take the
“The goal of this quiz is to write a good and extensive test suite
Ruby DiGraph (directed graph) class.”
WIN32OLE# and WIN32OLE#= method in Ruby 1.9 (or later)
Win32OLE author Masaki S. said he was considering changing the
behaviour of WIN32OLE# and WIN32OLE#= “in Ruby 1.9 or later.”
“I have not commited the change yet. Before commiting it, I want
suggestions or opinions from Win32OLE users.”
Currently,  and = map to method calls, so that excel.visible =
and excel[‘visible’] = true are equivalent. The change is to make
on properties, so you can write code like worksheet.cells[1,2] = 10.
| Excellent! This makes a lot more sense than the existing function
| and =.
| When I first used WIN32OLE, I was surprised that you couldn’t use
| access index operations.
In a thread noting the release of Rails 1.1, Jim W. commented
CVS head of rubygems will do incremental downloads of the index file.
are working out the details of testing this on a large site like
This will greatly improve the speed of the “Updating Gem source
action when installing or upgrading gems.
Ruby Black Belt
Dmitry B. posted a draft Ruby exam, having decided to create a
equivalent of JavaBlackBelt.com.
“What we need is a feedback of experienced Ruby enthusiasts (means
James Edward G. II posted a list of errors in the draft exam, while
Justin C. asked what the purpose of the exam was, given that
previously “most people expressed a strong dislike for anything
Dmitry: “What we are talking here about is a bit different, than
traditional certification. The main purpose is learning. You pass the
and see that You don’t know some answers.”
Listrecv: “One of the problems I’d have with a certification of this
is that it focuses only on the least important aspects of the
syntax, nomenclature, conventions, etc.”
Peter S. mentioned The Python Challenge - a set of programming
where you must apply some Python programming techniques to advance to
| I came to know a LOT of non-programmers through python challange -
| have been mailing on a (nearly) dayly basis with an US (non
| girl (i think se was a lawyer) up to the 18th or something level.
| she begun she did nothing about programming at all, after 1 week he
| been posting about regexps, after 2 weeks about bzip2 from python,
| 3 weeks cookies and HTTP, well you get the idea… She was really
| enthusiastic to learn this stuff (which is IMHO not typical for a
| technical person) just to see the next screen… And she was not
| only one…
This made Bill K. think of _why’s Try Ruby! web-based interactive
interpreter. It has an on-line tutorial where you type code into your
browser and see what happens.
Pistos C.: “I tentatively agree with the others about official
certification, but this idea of some sort of online interface that
all (or many) of the features, tools, libs, etc. of Ruby in an
interactive, educational fashion sounds appealing.”
Ruby Q. was mentioned several times as a resource for improving
Calling R from Ruby
AlexG created a simple bridge between Ruby and R (a statistical
language), allowing him to use R libraries from Ruby.
The thread also discussed advantages and disadvantages of using
the languages over the other, for example R has a fast matrix library
so does Ruby, via NArray), R is “Procedural, with highly limited
| Au contraire! R is at heart a functional language with a Lisp
| What’s different about R (and S) is two different ways of doing
| and classes, neither one of which is remotely like a Java or Ruby
| programmer’s idea of objects and classes. [M. Edward Borasky]
Going back to the original topic, Thomas said that if you’re on
then you can access R through Win32OLE.
Round floats to N decimal places?
| I’m doing some math that results in floats with ~10 decimal places,
| I’d like to round them to 2 places. Is there a built in way of
| this? Right now I’m doing format("%0.2f", the_float).to_f, which
| to work fine but it seems like an ugly way of doing it.
Dave B. said that the Facets project defines Numeric#round_at(d)
Numeric#round_to(n) methods for this purpose, and suggested that
built-in Numeric#round method be altered to accept an optional
for degrees of rounding.
Karl B. suggested Pat take a look at the LongDecimal library,
is “specialized for doing calculations with a defined number of
after the decimal point.”
B & E (#72)
Stephen W. created (last) week’s Ruby Q. - find the least number
security codes you need to try to break a system where the code
whenever the last sequences of key-presses matches the codes, without
Get the size in pixels for a string
Stéphane Thibaudeau asked how to get the pixel width and height of a
string rendered with a particular font.
f = TkFont.new(‘Courier 10’)
width = f.measure(“Hi There!”)
height = f.metrics.assoc(‘linespace’)
Thomas E Enebo said that JRuby 0.8.3 was released. “JRuby is a
provide a Java implementation of the Ruby language and interpreter.”
jirb now works, using Java classes from Ruby is “dramatically”
several important bugs were fixed and more.
Mongrel Web Server 0.3.12 – Pre-Release
Zed S.: “Mongrel is due for a 0.3.12 release which will feature
pretty insane goodies for everyone. There’s talk of IOWA support,
speed improvements (including sendfile support), a great Configurator
which makes configuring Mongrel a snap (especially for framework
implementers), and a ton of debugging stuff.”
“DON’T CRY” (it’s a pre-release).
“Mongrel now has sponsorship from Eastmedia
partnership with Verisign (http://www.verisign.com/) to make Mongrel
and stable enough for enterprise class loads (meaning “gigantic”, not
Jim W. put out a new Rake release, fixing a bug on Windows and
a few features.
Instant Rails 1.1
Curt H. announced Instant Rails 1.1 an update of the “one-stop
runtime solution containing Ruby, Rails, Apache, and MySQL, all
preconfigured and ready to run”. Unsurprisingly, this release
Ryan D. exposed ZenTest 3.1.0, with updated versions of zentest,
unit_diff, autotest and multiruby.
RJS, Active Record++, respond_to, integration tests, and 500 other
Hoho, it’s Rails 1.1.
“The biggest upgrade in Rails history has finally arrived. Rails 1.1
boasts more than 500 fixes, tweaks, and features from more than 100
contributors. Most of the updates just make everyday life a little
smoother, a little rounder, and a little more joyful.”-David
Jeremy H. announced a new version of the Ruby-FLTK bindings, “Yes,
been a while!”.