http://www.rubyweeklynews.org/20060604.html
Ruby Weekly News 29th May - 4th June 2006
=========================================
Ruby Weekly News is a summary of the week's activity for the ruby-talk
mailing list, and its mirror equivalents the ruby-talk google group and
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 usenet
reader.)
This week's newsletter is brought to you by Tim Sutherland
and the ninja summariser.
[ Contribute to the next newsletter ]
Articles and Announcements
==========================
* Ruby on Rails Workshop in Kansas City !
-----------------------------------------
The Kansas City Ruby User's Group proudly present their "Ruby on
Rails Workshop".
"This one-and-half-day workshop will offer a quick introduction to
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 build
full-featured web applications using Ruby on Rails."
"The workshop is spread over three half-day sessions on June 19th,
20th, and 21st."
* It Will Get Better - Article Mini Series
------------------------------------------
Not exactly Ruby, but Zach Dennis has begun a mini-series called It
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 Berger'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 October
20th-22nd.
The deadline for submissions is June 30th.
* Ruby papers in Linux Journal
------------------------------
Linux Journal this week: Ruby Ruby Ruby. A big "Ruby sign" on the
cover, right next to DHH's head.
Tim Beckers says that Ruby is also on the cover of Dr. Dobbs. "This
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, he's
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 Programming Shop, a project to adopt
orphaned Ruby projects.
User Group News
===============
* Toronto RUG meeting Sun 4 June 2006
-------------------------------------
Mike Stok says the next Toronto Ruby User Group meeting will be at
Sunday 4th June 2006, at the Linux Caffe on Harbord Street.
* Skåne/Sjælland Ruby User Group
--------------------------------
The Skåne/Sjælland Ruby User 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 User Group Meeting
-----------------------------------
The Milwaukee Ruby User's Group (Wisconsin) is pleased to announce
its first meeting, on Wednesday June 7, 2006.
"The Milwaukee RUG would like to thank SpiderLogic for providing
space for the meeting."
Threads
=======
Ruby's Bignum
-------------
Aaron Patterson 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 Balmain notes that (absent that last solution), you'll still have
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 Aoki summarises the Japanese list ruby-dev, and includes a note
on how to load a Ruby file `into' a module:
mod.module_eval(File.read("./x.rb")).
Creating Daemon Processes in Windows
------------------------------------
Jatinder Singh wants to create a "daemon process" in Windows, in other
words "start another process which should continue to run even after
the parent process dies."
Victor Shepelev 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 Singh: "Thanks Victor! Win32-service helped me achieve what I
intended to do."
Please kill the children as you're leaving
------------------------------------------
Ohad Lutzky 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 parent
process, to which the child processes write; when the parent dies, the
pipe breaks, and the children are killed with SIGPIPE. Ara T. Howard
has even written slave, a library for exactly this purpose.
Sam Roberts, in turn, hauls out R. Stevens and observes that in theory
the children should get killed automatically with SIGHUP if the parent
process has made itself their session leader.
What happened the week of March 19th?
-------------------------------------
Curt Hibbs was looking over the download statistics for the One-Click
Ruby Installer for Windows and Instant Rails, and found a big jump from
the week of March 19.
> Prior to the 19th the one-click installer averaged 10,000 downloads a
> week, and had been at the level for quite some time. But starting the
> week of March 19th the downloads tripled to 30,000 a week where they
> have remained to this day.
"Does anybody know what happened that week?"
There were not (yet) any replies.
Trying to determine presentation author
---------------------------------------
James Britt is trying to find an attribution for the presentation on
ruby-doc.org entitled "Ruby Language Talk" [zip]. "Does anyone know who
the author is?"
LWP like library for Ruby?
--------------------------
Robert Nicholson 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 Green asks for examples of masterful Ruby code he could read in
order to become a better Ruby programmer.
Greg Donald says that rubyquiz.com is worth looking at (and especially
the Best of Ruby Quiz book), while Ross Bamford 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 Strandgaard suggests looking at the code in Ruby's standard
library itself, and others say that the blogs RedHanded (by
whytheluckystiff) and eigenclass (by Mauricio Fernandez) often show
elegant code.
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
way."
Christian Neukirchen: "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 a
medium-sized piece of Ruby that's *truly* and *completely* masterful."
("Does masterful code get less and less the more you advance?" he
ponders.)
Alexandru Popescu: "It may be like music, where the more one knows and
the more one has heard, the harder it is to get excited about new music
(though when you do find something good, it can be *really* exciting)."
Hash to OpenStruct (#81)
------------------------
This week's Ruby Quiz is by Hans Fugal.
> 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 to
> convert a nested hash structure into a
...