Ruby Weekly News 16th - 22nd January 2006


#1

http://www.rubyweeklynews.org/20060122.html

Ruby Weekly News 16th - 22nd January 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
you
by Tim S. and Jonathon Mah.

[ Contribute to the next newsletter ]

Articles and Announcements

 * "Learn to Program" is now available
 -------------------------------------

   Dave T.: "Just a quick note to say Chris P.'s new book, 

Learn to
Program, is now available and shipping."

   Surgeon asked how it relates to the online version that's been 

around
a while, and Dave B. said that the online version’s good, but
the
book is better.

 * JRuby at JavaOne 2006
 -----------------------

   Charles O Nutter and Tom Enebo will be giving a JRuby 

presentation at
the JavaOne 2006 conference.

   "We should have most of the milestones I talked about at RubyConf
   completed, and oughta have plenty more cool demos to run. If all 

goes
well, we may have Rails running under JRuby too."

   (JRuby is a Ruby interpreter written in Java. It also provides
   interoperability between Ruby and Java code - the two (?) 

Ruby-Java
bridges being an alternative approach.)

 * Calling all Freebsders.
 -------------------------

   Dick D. posted a heads up for FreeBSD users; the ports tree 

is
going to include 1.8.4 “Any Day Now”. It has been at 1.8.2 for a
while.

   Luc H. noted that DarwinPorts has recently done the same.

User Group News

 * Stockholm User Group
 ----------------------

   Dr Nic asked if Stockholm had a Ruby U. Group, and everyone 

said no,
but that’d be cool, and they met on January 19th at a restaurant
called “Grill Ruby”.

Threads

Script’s Parent Directory

Chris N. was “looking for a Ruby equivalent to Perl’s FindBin
module,”
which returns the directory containing the running script (as opposed
to
the current working directory). Austin Z. replied that
File.dirname(FILE) gives you this.

thousandth separator

bmgz is in need of a library for formatting numbers with thousandth
separators, e.g. 1000000.00 becomes “1,000,000.00”.

Gene T. posted a couple of options: a one-liner “snippet”, and the
flexible Numeric#format_s from Gavin S.'s Extensions library.

Delaying Quote Expansion

Kevin O. asked how to delay double-quoted expansion of “string
#{variables}”. Eero S. mentioned this simple method:

str = ‘“Value #{foo}”’
foo = 123
eval str #=> “Value 123”

James Edward G. II pointed to ERB, the standard templating library
included with Ruby.

require ‘erb’
str = ‘My number is <%= bar %>.’
bar = 1986
ERB.new(str).result(binding) #=> “My number is 1986.”

get the name of the day from Time.now

misiek wanted to get the current day of the week as a name like Mon
instead of the number returned by t.wday (where t = Time.now).

Antonio C. suggested t.strftime("%a") for “Mon” and
t.strftime("%A")
for “Monday”. (strftime = String-format-time.)

“ri strftime, will give you the complete list of options.”

Another option is to require ‘time’ then
Time::RFC2822_DAY_NAME[t.wday].

New Releases

Rake 0.7.0 Released

Jim W. added some interesting features to the Rake build tool,
including parallel execution of pre-requisites and namespace support
for
task names.

TeensyWeb 0.2.0

From Jon A. Lambert, TeensyWeb 2.0, “a combination Wiki, Forum and
Subversion Repository browser”.

Now with installation documentation and RSS feeds.

Radius 0.0.1 – Powerful Tag-Based Templates

John W. Long was pleased to come out with Radius, “a small, but
powerful
tag-based template language for Ruby inspired by the template
languages
used in MovableType”.

Nathaniel S. H. Brown: “Nice work. Would love to see a .rad extension
for
Rails at some point :)”

RMagick gets face-lift, book and movie deal

Timothy H. released RMagick 1.1.0, the Ruby interface to the
ImageMagick and GraphicsMagick image processing libraries. It also
includes a 2D drawing API.

One of the new methods is Image#vignette, which was originally an
RMagick
example program, but has now made its way into ImageMagick itself :slight_smile:

All known bugs were fixed, crop_resized added for creating
thumbnails, and
more.

In other RMagick news,

| Apress’s new book, The Definitive Guide to ImageMagick, by Michael
| Still, devotes a chapter to using ImageMagick from Ruby programs
via
| RMagick.

test-unit-benchmark-0.1

rubikitch created a tool called Test::Unit::Benchmark, used for
showing
how long each unit test took to run.

“Because this program is very short, it is an easy example of
AspectR,
aspect oriented programming for Ruby.”

TeensyMUD 2.7 released - Baby Got Back!

“Baby Got Back” said Jon A. Lambert, announcing TeensyMud 2.7, “the
original only ruby mud with smoking hot T&A action”.

ppp-1.0.0

rubikitch, announcing yet more software, introduced `ppp’, an
alternative
to Kernel#p, with ppp, pppp, ppm and ppmp commands.

All for debugging.

Nitro + Og 0.27.0 Client code, WebFile, Elements improved, New …

George M. released new Nitro and Og versions.

Nitro is a web application framework and Og an object-relational
database
mapping library.

As usual with these releases there are a huge number of interesting
features, including “groundbreaking client side action/scripting
support”,
where you write Ruby code that results in Javascript.

“A domain specific language is provided for the client action to
implement
stuff like ajax async updates, scriptaculous visual fx and more.”

This support also includes “morphers”, which enable you to set
properties
like draggable=“true” and "auto_complete=“true” on HTML input tags to
cause mystical wonders to occur.

A WebFile system was also added, to make it easy to upload files.

Lots lots more.

George: “The latest Nitro/Og releases are a real community effort
;-)”

Librend 0.4

Ilmari H. released version 0.4 of Librend, a realtime graphics
rendering library for Ruby.

It uses SDL, and also supports sound.

FreeRIDE 0.9.5 - The Free Ruby IDE

The release of FreeRIDE 0.9.5 was heralded by Laurent J…

Thanks to Jonathan M. for the new `projects’ support, and to
Martin
Leech for quick keystrokes to comment/uncomment blocks of code. Many
usability enhancements were also made.

“FreeRIDE aims to be a full-featured, first-class IDE on a par with
those
available for other languages, with all the best-of-breed features
that
you would expect in a high-end IDE.”

irbsh-1.0.0

rubikitch set forth irbsh, an extension of irb/inf-ruby.el for Emacs.

“You can easily execute shell commands and Ruby codes by using
irbsh.”

Mongrel 0.1.0 – A Fast As Hell Mostly Ruby Web Server

Zed S. released “a mostly Ruby webserver” called Mongrel. It’s
fast, but
allegedly cannot yet yet bake cheddar.


Now for the fun (and surely flamewar generating) statistics on how it
compares to WEBrick:

WEBrick/Linux: 175 req/sec
Mongrel/Linux: 1350 req/sec

WEBrick/OSX: 5.3 req/sec
Mongrel/OSX: 304.4 req/sec


There weren’t yet any flames, so we’ve put the quote in an
emotionally
coloured box to try and stir things up. (That’ll be asterixes for you
plain-text fellas. Pretend they’re masking swear words from Zed for
the
same effect.)

0.1.1 was later released, adding the “It Works Now, Maybe” feature.

RedHanded chipped in with comm’try.

testunitxml-0.1.3

Henrik M. introduced Test::Unit::XML, which adds assertions
for
checking XML documents.

RubyCLR first drop

John L. announced a new Ruby / .NET bridge called RubyCLR.
Generics aren’t yet supported, but it’s a “super high priority item”.

Ruby-GetText-Package-1.1.1

Ruby-GetText-Package now has a Greek locale (by damphyr), bugfixes
and
support for Rails tests.

Masao M.: “Thanks to: Kazuhiro NISHIYAMA, Nick S., damphyr,
Karel
Miarka.”

ICU4R 0.1.0 - initial release

Lugovoi N. let the initial release of ICU4R out of the bag.

“ICU4R is an attempt to provide better Unicode support for Ruby,
based on
ICU library.”

FarPy GUIE v0.4

FarPy GUIE, used for graphically designing wxWidget GUIs, now
supports
wxRuby.

Thanks for reading!


#2

Thanks for doing this!

-r

Technical editing and writing, programming, and web development:
http://www.cfcl.com/rdm/resume

Contact information: removed_email_address@domain.invalid, +1 650-873-7841