Ruby Weekly News 21st - 27th November 2005

Ruby Weekly News 21st - 27th November 2005

Ruby Weekly News is a summary of the week’s activity on the ruby-talk
mailing list / the comp.lang.ruby newsgroup, brought to you by
(Thanks whoever it was, this week’s newsletter would have been a
without you.)

[Contribute to the next newsletter.]

Articles and Announcements

 * The Ruby Grammar Project

   MenTaLguY announced the creation of The Ruby Grammar Project, the 

of which is to produce a formal specification for Ruby’s syntax
and an
ANTLR grammar. His aim is to describe the language as it exists,
rather than proposing new syntax.

 * Distributing Rails Applications (tutorial)

   Erik V. announces a new version of his tutorial, 

Rails Applications, updated for rails 0.14.3.

 * Frappr! map for ruby-lang

   Daniel Cremer has created a Frappr! map for ruby-lang.

 * RailsConf 2006, June 22-25, Chicago IL

   | Ruby Central, Inc. is pleased to announce the First 

| Rails Conference ( The conference will be
| in Chicago, IL, USA from June 22-25, 2006.
| Brought to you by the same organization that has driven
RubyConf for
| five years running, RailsConf is destined to be a one-of-a-kind
| affair.
| We already have David Heinemeier H., the creator of Rails
| well as Dave T., of The Pragmatic Programmers, lined up as
| keynote speakers. Watch this space for more, exciting speaker
| announcements as we get closer to the event.
| Registration will be limited, so be sure to subscribe to our
| feed to be notified when registration opens. We’re expecting
| conference to sell out. Don’t let yourself be one of the
| ones that misses the cutoff!
| This is your chance to be part of history. Be there for the
| one. Get the t-shirt. :wink:

User Group News

 * Not-yet Phoenix.rb

   James B. writes:

   | The 2nd meeting of Refresh Phoenix will be held on Tuesday, 

| 6, at the Common Ground coffee house in Scottsdale, AZ.
| Refresh Phoenix is a community of designers and developers
| to refresh the creative, technical, and professional culture of
| Internet developers in the Phoenix metropolitan area.
| At the first meeting earlier this month there was strong
showing of
| people either currently using Ruby, or looking to get started.
| Refresh Phoenix isn’t specifically about Ruby, but is a means
| helping designers and developers organize projects and
meetings, and
| I plan to use this next meeting to reboot the Phoenix Ruby
| Group (AKA Phoenix.rb).
| Where:
| Common Grounds Coffee House
| 8658 E Shea Blvd # 1, Scottsdale, AZ
| (480) 222-4870
| When:
| On Tuesday, December, 6th from 6-8pm, though the semi-official
| starts around 7pm.
| More info:

Quote of the Week

   MenTaLguY on the Ruby Grammar Project:

   | Don't like ->{} ? Don't look at us. If matz says we get stabby
   | blocks, we get stabby blocks.


warning: default `to_a’ will be obsolete

David C. wonders what to use in place of foo.to_a, now that
Object#to_a is being obsoleted.

Christian N. suggests [*foo].

James Edward G. II recommends Array( foo ).

Either one works identically to the former foo.to_a, returning the
object if it is already an array.

Trans belatedly recommends Array[foo] instead, but Markus Koenig
out that his suggestion is equivalent to [foo], not to [*foo].

system() on windows

system() can behave very differently on Windows; different Rubyists
present explanations and workarounds.


Kaspar S. raises the prospect writing of a library which can be
to test platform strings to determine whether the program is running
some flavor of Windows or Unix, since there are so many possible

Several other posters point out that it is better to test for
features and fall back as needed, rather than make assumptions based
the platform string (which can be misleading or ambiguous).

As Kero succinctly puts it: “Duck platforming”

problem with .each do

Lady Michelle B. writes in concerning a Net::HTTP snippet:

| Hiya. The book does things this way, so why doesn’t it work for me?
| What’s going on?

Lloyd Z. replies:

| It turns out that Net::Http#get no longer returns a pair of values.
| has changed between ruby version 1.6 (from the edition of the book
| you probably have) and 1.8. This is explained in the method’s
| documentation…
| In version 1.1 (ruby 1.6), this method returns a pair of objects, a
| Net::HTTPResponse object and the entity body string. In version 1.2
| (ruby 1.8), this method returns a Net::HTTPResponse object.


cyberco writes:

| I’m trying to print every combination of three characters from the
| (a…z). I thought recursion would be the most elegant solution, but
| got me quite confused :slight_smile: Any suggestions?

Erik T. responds:


| Or ‘a’…‘zzz’ if you want every combination `up to’ 3 characters.

Not recursive, but certainly elegant.

Other posters presented a variety of recursive solutions.

Symbol#inspect bug?

Dominik B. notices that Symbol#inspect doesn’t always return a
symbol literal. For example:

irb(main):001:0> p :“9”
=> nil
irb(main):002:0> :9
SyntaxError: compile error
(irb):2: syntax error
from (irb):2

matz reports that this is fixed in Ruby 1.8.4.

valgrind and embedded ruby

Heiko L. notices that Ruby is producing warnings under valgrind
allocation exceeds a certain threshold. He wonders whether he is
something wrong, or whether this is a Ruby bug.

The answer appears to be the warnings are a side-effect of the
process used by Ruby’s garbage collector, and are harmless.

New Releases

Turing 0.0.7

Michal announces Turing 0.0.7, an easy-to-use and extensible Captcha
implementation. Turing provides not only image-based Captchas, but
also a
textual Turing::Challenge which should be more friendly to
visually-impaired users.

ruby/audio 0.1.0

ruby/audio is a convenience wrapper around NArray and libsndfile. It
should make audio work in Ruby much, much easier.

Puppet Beta Two

Luke K. announced the second beta release of Puppet, a Ruby-based
server automation framework.

| It lets you centrally manage every important aspect of your system
| a cross-platform specification language that manages all the
| elements normally aggregated in different files, like users, cron
| and hosts, along with obviously discrete elements like packages,
| services, and files.

The new version boasts significantly expanded functionality and
integration to ease migration.

Rant 0.5.0

Rant is a flexible build tool written entirely in Ruby, similar to

RRobots 0.1

Following on fron last week’s thread, Simon Kröger introduces RRobots,
Ruby variation on the fighting-code-robots theme.

| RRobots is a simulation environment for robots, these robots have a
| scanner and a gun, can move forward and backwards and are entirely
| controlled by ruby scripts. All robots are equal (well at the
| maybe this will change) except for the ai.

xampl 0.1.0

Xampl is a tool for developing Ruby programs. It facilitates the `M’
of an MVC architecture. It is meant to be very easy to use,
supportive of
idiomatic Ruby usage, and mostly invisible. It is similar to some
parts of

win32-service 0.5.0

win32-service is a library for writing Windows services in Ruby, and
part of the Win32Utils project.

This version introduces a service_init hook which can be used for
long-running initialization tasks which would otherwise cause the
to timeout on startup. is a library for writing Windows services in
and is part of the Win32Utils project.

This version introduces a service_init hook which can be used for
long-running initialization tasks which would otherwise cause the
to timeout on startup.

RWB 0.2.0

Pat Eyler announces the release of Ruby Web Bench 0.2.0. RWB is “a
library designed to let you run performance/load tests against a