Ruby Weekly News 29th May - 4th June 2006
Ruby Weekly News is a summary of the week’s activity for the
mailing list, and its mirror equivalents the ruby-talk google group
the Ruby forum. (The comp.lang.ruby newsgroup used to be equivalent,
but is now independent. Take a look at gmane if you wish to use
This week’s newsletter is brought to you by Tim S.
and the ninja summariser.
[ Contribute to the next newsletter ]
Articles and Announcements
* Ruby on Rails Workshop in Kansas City ! ----------------------------------------- The Kansas City Ruby U.'s Group proudly present their "Ruby on Rails Workshop". "This one-and-half-day workshop will offer a quick introduction
Ruby and the Ruby on Rails web application framework."
"Sponsored by Reevik, Inc., it will provide web developers with a basic understanding of the concepts, tools and tips needed to
full-featured web applications using Ruby on Rails."
"The workshop is spread over three half-day sessions on June
20th, and 21st."
* It Will Get Better - Article Mini Series ------------------------------------------ Not exactly Ruby, but Zach D. has begun a mini-series called
Will Get Better which follows a journey “through my eyes and
experiences about agile software development, time management,
managing expectations, and system administration.”
* New leadership for ruby-spreadsheet ------------------------------------- Daniel B.'s looking for a new maintainer for the spreadsheet package. It's used to write Excel files (whereas parseexcel is for reading them). * Presentation proposals now being accepted for RubyConf 2006 ------------------------------------------------------------- David A. Black announced that proposals for presentations are now being accepted for RubyConf 2006, to be held in Colorado in
The deadline for submissions is June 30th. * Ruby papers in Linux Journal ------------------------------ Linux Journal this week: Ruby R. Ruby. A big "Ruby sign" on the cover, right next to DHH's head. Tim B.s says that Ruby is also on the cover of Dr. Dobbs.
place will get crowded soon.”
* Another Rails book announcement --------------------------------- Pat Eyler notes that Apress have announced a book "Beginning Ruby on Rails: From Novice to Professional", and say that more are in the pipeline. "Please feel free to drop some comments on the blog to voice your support for Ruby books and/or suggestions about how Apress can do them right (topics, how they can get involved in the community, etc.)" * a good home for some Ruby Projects ------------------------------------ Citing work commitments, Pat Eyler announces that he's going to have to orphan several of his Ruby projects. To prevent this,
in search of new maintainers for (among others):
* r43, an implementation of the 43 Things API. * The Ruby Web Bench, a toolkit for performing capacity and functional tests against a website. * Ironically, The Ruby P.ming Shop, a project to adopt orphaned Ruby projects.
User Group News
* Toronto RUG meeting Sun 4 June 2006 ------------------------------------- Mike S. says the next Toronto Ruby U. Group meeting will be
Sunday 4th June 2006, at the Linux Caffe on Harbord Street.
* Skåne/Sjælland Ruby U. Group -------------------------------- The Skåne/Sjælland Ruby U. Group (SSRUG) have been gaining momentum following their first two meetings, and are looking for new members. (Skåne is a province of Sweden, and Sjælland is an island of Denmark.) * Milwaukee Ruby U. Group Meeting ----------------------------------- The Milwaukee Ruby U.'s Group (Wisconsin) is pleased to
its first meeting, on Wednesday June 7, 2006.
"The Milwaukee RUG would like to thank SpiderLogic for providing space for the meeting."
Aaron P. asks whether it’s possible to prevent Ruby from
automatically coercing Fixnums into Bignums, since he wants the
behavior of 32-bit integer arithmetic. Various suggestions follow,
falling into roughly three categories:
1. Use pack/unpack to force the result into a 32-bit integer 2. Bitwise operations 3. Subclassing Integer to provide an Int32 class with the desired behavior
David B. notes that (absent that last solution), you’ll still
to use Bignums to represent 32-bit integers at times: on 32-bit
platforms, Fixnum has only a 31-bit range.
ruby-dev summary 28606-28636
Minero A. summarises the Japanese list ruby-dev, and includes a
on how to load a Ruby file `into’ a module:
Creating Daemon Processes in Windows
Jatinder S. wants to create a “daemon process” in Windows, in
words “start another process which should continue to run even after
the parent process dies.”
Victor S. replies that the daemon concept is called a “service”
in Windows, and the win32-service module from the win32utils project
lets you work with services from Ruby.
Jatinder S.: “Thanks Victor! Win32-service helped me achieve what
intended to do.”
Please kill the children as you’re leaving
Ohad L. asks a rather grimly-phrased question about processes on
Un*x: how does one ensure that forked child processes are reaped when
the parent process dies unexpectedly? Ordinarily those children would
live on, adopted by the init process.
Several people suggest setting up “heartbeat” pipes, read by the
process, to which the child processes write; when the parent dies,
pipe breaks, and the children are killed with SIGPIPE. Ara T. Howard
has even written slave, a library for exactly this purpose.
Sam R., in turn, hauls out R. Stevens and observes that in
the children should get killed automatically with SIGHUP if the
process has made itself their session leader.
What happened the week of March 19th?
Curt H. was looking over the download statistics for the One-Click
Ruby Installer for Windows and Instant Rails, and found a big jump
the week of March 19.
Prior to the 19th the one-click installer averaged 10,000 downloads
week, and had been at the level for quite some time. But starting
week of March 19th the downloads tripled to 30,000 a week where
have remained to this day.
“Does anybody know what happened that week?”
There were not (yet) any replies.
Trying to determine presentation author
James B. is trying to find an attribution for the presentation on
ruby-doc.org entitled “Ruby Language Talk” [zip]. “Does anyone know
the author is?”
LWP like library for Ruby?
Robert N. wonders if Ruby has any libraries similar to Perl’s
LWP (libwww-perl), i.e. libraries that act like a web browser to help
you to scrape data off web pages.
WWW::Mechanize and HTTPAccess2 are mentioned in the replies.
Where can one find examples of masterful Ruby code?
Alder G. asks for examples of masterful Ruby code he could read in
order to become a better Ruby programmer.
Greg D. says that rubyquiz.com is worth looking at (and
the Best of Ruby Q. book), while Ross B. points to the Facets
project (a collection of extensions to Ruby’s core and standard
libraries that includes many examples of excellent, short,
self-contained pieces of code).
Simon S. suggests looking at the code in Ruby’s standard
library itself, and others say that the blogs RedHanded (by
whytheluckystiff) and eigenclass (by Mauricio F.) often show
A. S. Bradbury says the gonzui code-browser on RAA (the Ruby
Application Archive) provides a web interface for quickly browing the
source code of Ruby projects without having to download them.
“If you see a project you’ve heard about or used, or one that just
looks interesting why not look through? Certainly, you may not always
be looking at great Ruby code, but I think you can learn a lot this
Christian N.: “I’d say that I’m pretty well-versed in Ruby. I
have not yet seen much masterful code. I’m not sure I could point out
medium-sized piece of Ruby that’s truly and completely
(“Does masterful code get less and less the more you advance?” he
Alexandru P.: “It may be like music, where the more one knows
the more one has heard, the harder it is to get excited about new
(though when you do find something good, it can be really
Hash to OpenStruct (#81)
This week’s Ruby Q. is by Hans F…
More than a few times I’ve wished I could get a nice nested
OpenStruct out of YAML data, instead of the more unwieldy nested
hashes. It’s mostly a matter of style. It’s a straightforward task
convert a nested hash structure into a nested OpenStruct, but it’s
the sort of task that you can do a lot of ways, and I’ll bet some
you can come up with more elegant and/or more efficient ways than I
have so far.
Some tough test cases are posted in the replies, including one by
MenTaLguY of a YAML document that’s not a tree.
I’m Collecting Media References for Ruby and Rails
Curt H. announces that he’s collecting URLs to articles, podcasts
and videos about Ruby, and about Rails.
“If have such a collections yourself (or just know of some good
references), could you please share them on this thread.”
James B.: http://del.icio.us/tag/ruby.
Nathaniel B. announces the “Ruby Manual”, a fully searchable Ruby
manual that allows you to add comments (like with the PHP
documentation). (Also: “Rails Manual”.)
The sites are generated entirely with Conor H.'s Rannotate tool,
are virtually identical to Conor’s “Ruby API Documentation” and
“Ruby on Rails API Documentation” sites.
There are questions about why Nathaniel created new sites, since
will now split the annotation information between them and Conor’s.
More on Conor’s blog.
Conor’s goals with Rannotate are to integrate it into
api.rubyonrails.org and ruby-doc.org, have collaborative
controlled by the community, and generate diffs that can be directly
applied to source code repositories, in order to merge updated
documentation into the Ruby (and other) source trees.
This is brain dead, but is it stupid?
Jeff P. starts writing an application to show some simple
for statistics from his Rails app.
He’s looked at the sparklines and gruff libraries, but finds that the
first only supports very simple charts, and the second requires too
much time to install.
It occurred to me that the reason they were requiring rmagic and
other stuff has to do with needing a way to so some really simple
drawing. Sort of like using photoshop to paint a mustache on your
girlfriends picture - it works and inspires the expected knee
in the girl, but it’s total overkill for the job.
Instead of using one of the existing libraries, he begins thinking
about drawing bar-charts by scaling a square block up by the required
amount in HTML. For example,
“What do you think, this is clearly brain dead, but is it stupid
Trevor S. points out css_graphs, a Ruby charting library that
only CSS, and Kate Rhodes lists SVG::Graph and PlotKit (supports
and SVG charts).
With respect to Jeff’s idea, Dave H. says that he could use
with background-coloured cells instead of the blublock.jpg.
foxGUIb v0.7 (for FXRuby 1.6)
As a followup to the recent release of FXRuby 1.6.0, Meinrad R.
announces foxGUIb v0.7, a GUI creator and code generator for FXRuby
similar in spirit to Glade and other applications which let you lay
widgets in a point-and-click fashion.
Assaph M. fixes some bugs in Pimki: The Wiki-based PIM to
Madeline, a transparent object persistence framework, re-emerges
a period of two years without any releases. Madeline 0.7.2 includes
* An automatic class with no methods would cause an error * System sanity check at first use * Now creates full path to storage files, not just the last
(reported by Wayne V.)
Timothy H. makes a new release of RMagick to fix an API
incompatibility with Image#level introduced in the last release.
“Thanks to Al Evans for reporting it and helping me find a fix.”
“RMagick is an interface to the ImageMagick and GraphicsMagick image
processing libraries. RMagick supports more than 90 image formats,
including GIF, JPEG, PNG. It includes RVG, a 2D drawing API. RMagick
comes with comprehensive HTML documentation.”
Timothy also encourages users to ask web hosting services with very
old versions to upgrade, as several memory leaks have been fixed
in recent releases.
(He later notes he’s been using valgrind to test for leaks.)
Aredridel: “Thank you for that. Fixed our memory usage problems that
was just in the process of narrowing down to the library. Beat me to
rcov 0.5.0: code coverage + callsite info, RubyGems, Rant…
Mauricio F. announces the recent release of rcov 0.5.0, a tool
useful for evaluating test coverage of Ruby code. For the first time,
rcov is now available in gem form, with both Win32 and
id3lib-ruby 0.3.0 (Windows binary gem)
Robin S. announces the 0.3.0 release of id3lib-ruby, this time
with a Windows binary gem. “id3lib-ruby provides a Ruby interface to
the id3lib C++ library for easily editing ID3 tags (v1 and v2) like
“Thanks go to Mauricio F. for his article on how to
cross-compile Ruby extensions and to Curt H. for his installer of
Daniel B.: “In the ongoing effort to Rubyify as much of the Win32
Utils project as we can, I’m pleased to announce the release of
It’s now pure Ruby, and (in keeping with the trend) now offers a gem.
ruby-breakpoint 0.5.1: Now with fewer bugs
Florian G. releases an update to ruby-breakpoint to fix some bugs,
and announces he’s going to be working on ruby-breakpoint for this
year’s Summary of Code.
“If there is anything else I can do to make ruby-breakpoint more
or easier to use please tell me. Now is the best time to suggest new
(Current TODOs include creating a cross-platform GTK2 front-end.)
“ruby-breakpoint lets you inspect and modify state at run time. This
allows you to diagnose bugs, patch applications and more all via IRB
simply doing a method call at the place you want to investigate.”
Nebular Gauntlet 0.1
Steven D. presents version 0.1 of Nebular Gauntlet, an
Asteroids-like multiplayer game written in Ruby with Ruby/SDL. It’s
still at a very early stage of its development, but the basics of
gameplay are already implemented.