Ruby Weekly News 11th - 17th April 2005

T

Tim Sutherland

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

Ruby Weekly News 11th - 17th April 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
Tim Sutherland.

Articles and Announcements
--------------------------

* CFP: DLS05: ACM Dynamic Languages Symposium

Roel Wuyts posted the Call For Papers for the 2005 ACM Dynamic
Languages Symposium, to be held in California in October. The deadline
for submissions is June 24th 2005. "The goal of this symposium is to
provide a highly visible, international forum for researchers working
on dynamic features and languages."

* Should Ruby Be Added to Your Programming Repertoire?

An introduction to Ruby by W. Jason Gilmore, the author of books on
PHP and MySQL.

* A neat post on Rails & FastCGI...

Tom Copeland linked to an article entitled
"Ruby on Rails and FastCGI: Scaling using processes instead of threads"
by Jon Tirsen.

User Group News
---------------

* Meetup.com changes

Many of the Ruby User Groups have been using Meetup.com to organise
meetings. Robby Russell warned that the site was going to soon require
meetup groups to pay a monthly fee.

"Perhaps this would be a good time for the community to build
something (in Rails of course) for all the .rb groups that are popping
up around the world."

* PDX.rb meeting: Rails presentation

Phil Tomson announced a meeting in the Portland Oregon area, held on
the 13th of April. The topic was Rails, presented by Lucas Carlson.
Phil later reported that the talk went very well, and had around 50
attendees.

* Phoenix.rb this week

James Britt announced the Phoenix group was meeting on the 14th of
April.

* MexicoCity.rb?

David Moreno Garza is looking for other Rubyists near Mexico city.

* detroit.rb

Not that close to Mexico city, but Patrick Hurley is looking for users
in South East Michigan.

Threads
-------

Interesting threads this week included:

All Quiet on the Western Front: Is Rails overshadowing Ruby?
------------------------------------------------------------

Trans thought that ruby-talk had become quieter in the last few months.
The exception had been discussion on the topic of Rails. "So I wonder, is
Ruby at risk of becoming little more than a subset techonolgy of Rails?"

Ryan Leavengood added "It is pretty amazing that a web framework could all
of a sudden make Ruby so much more marketable."

It seemed to James Britt that ruby-talk traffic had actually been steadily
increasing. As far as Rails goes, "There may be some chance of Ruby
"Strutsification", where increasing numbers of people are familiar with a
specific API or tool but have little understanding of the underlying
technology."

Continuing down a different path, James added that he thought the
existence of RubyGems had helped Rails' popularity, by making it easier to
install.

David Heinemeier Hansson (the creator of Rails) said that it was RubyGem's
support for library versioning that made it so useful. "It's funny,
though. I remember some early discussion on RubyGems where someone pointed
out that while library versioning was nice in theory, but who would
_really_ want to have multiple versions of the same library installed?
Hehe."

David A. Black clarified, "You can specify version numbers in your
configuration for each app, which is nice because it means you don't have
to upgrade all your Rails apps as soon as a new version of Rails comes
out."

In a related thread, NYC Meetup?, New York Rubyists discussed Matt
Pelletier's idea of creating a Rails-specific New York User Group, in
addition to the Ruby-NYC group that already exists.

There was some opposition to this, and Matt decided to create a separate
mailing list for Rails users, but keep going to the Ruby-NYC group. (For
now?)

Madlibs
-------

James Edward Gray II posted this week's Ruby Quiz.

The quiz is to implement "Madlibs" - a system which allows you to specify
a story with placeholders for verbs, nouns etc. The user is then asked to
supply words that match the requirements and the output is a new story.

Multiple asserts in a single unit test
--------------------------------------

Daniel Berger came across an article which asserted that it was bad
practice to have more than one assertion in a single unit test. The idea
was that multiple test failures would give you a better idea of where an
issue was.

"This sparked a conversation on IRC regarding coming up with a way to have
asserts continue even if one of them fails within a unit test. Is there a
way to alter the behavior of test-unit so that it doesn't bail out on
subsequent asserts if one fails? Something builtin to test-unit or a
simple hack?"

Pit Capitain replied "It may not be simple, but at least it's a hack", and
included some code to enable that behaviour.

BNF-like grammar specified DIRECTLY in Ruby
-------------------------------------------

Eric Mahurin wrote a library that lets you to define a BNF-style grammar
as Ruby code, by (ab)using Ruby's syntax.

He included an example, noting "To get an idea of what this is, there is a
simple expression evaluator example below. This is pure Ruby code - no
yacc type compiling necessary. That's what I love about it."

What's beyond Rails?
--------------------

James Toomey launched into a "Somewhat off-topic rant". Rails and other
web application frameworks are still oriented around outputting basically
static HTML. "It seems to me that there needs to be a next-generation of
HTML that enables web apps to truly be like rich client apps". The idea of
implementing a Photoshop-like program as a web application was given as an
example.

Francis Hwang advised "There's an inherent trade-off: Compared to desktop
apps, web apps are pretty crappy interaction-wise, but you can use web
apps in a lot more places. There are lots of efforts to bring more rich
interactivity to web apps: Java, Flash, AJAX, XForms, even Mozilla's XUL
might count depending on how you look at it."

Richard Kilmer is "working on implementing on open-source set of
components in Flash", using ActionStep, an implementation of a subset of
the OpenStep Application Kit. From the website, "The intent is to create
an open-source component framework for writing Rich Internet Applications
for the Flash Player."

Matt Pelletier gave a detailed summary of some of the options.

Several people said that REST (stateless) web applications were good, and
having "rich" applications works against that.

ettiquette question
-------------------

Chris Pine asked "How do you spell ettiquette? No, no, that's not really
my question..."

Whenever a link to his Learn to Program tutorial is posted to the mailing
list, Chris gets emails of thanks and questions. "Now my tutorial has been
around for a while, but people who are new are, of course, not going to
know that."

Would it be okay to post an announcement for it every fortnight or month?

Curt Hibbs and others thought it would be good to include a number of
different links in the post, not just Chris' tutorial. Curt offered to
maintain a Wiki page.

Ruby Java Bridge: Are there any?
--------------------------------

Richard Cole did query, "What's a good way to communicate from a ruby
process to Java process, SOAP? RMI? Corba? A socket? Are there any
wrappers that let me go from ruby straight to the JVM presumably via the
java native call interface?"

Takaaki Tateishi suggested rjb, a bridge between Ruby and Java. It allows
you to use Java libraries (almost) as if they were implemented in Ruby.

Another option, proposed by David Corbin, is to use JRuby - a Ruby
interpreter written in Java that "allows direct calls to Java objects".

Locales
-------

Stephen L Molitor wanted to know if there were any libraries for handling
locale-specific formatting of time, money, numbers etc.

Austin Ziegler said that he wasn't aware of any, but he had written some
code that does similar formatting for numbers. It is included in Gavin
Sinclair's Extensions module.

when 1.6 != 1.6?-newbie
-----------------------

Mel Bohince was confused. He had a unit test where an assert_equals was
failing with "<1.6> expected but was <1.6>".

Florian Frank explained that it is a bad idea (in any language) to compare
two floating point numbers by equality. (Because of rounding errors.)
assert_in_delta should be used instead.

Mark Hubbart suggested reading the article What Every Computer Scientist
Should Know About Floating-Point Arithmetic.

Neil Stevens noted the BigDecimal library could be useful in some cases -
it offers user-selectable precision for floating-point numbers.

Ruby and Logo?
--------------

Brian Candler was nostaligic for Logo, "a teaching language from the 80's?
Its big plus was that you could use it to drive a `turtle' around the
floor and draw shapes."

He thought that Ruby would be very good for this, for example

fred = Turtle.new
fred.pendown
3.times { fred.forward 50; fred.turn 120 }

gabriele renzi found a Ruby Turtles package, which he recalled as being
usable.

James Edward Gray II was interested in using the Turtle Graphics idea in a
future Ruby Quiz.

ruby-fltk project abandoned?
----------------------------

Thursday found that the ruby-fltk binding was out of date. (FLTK is a
lightweight GUI toolkit.)

Jeremy Henty announced that he had recently taken over the project, and
would be starting to make improvements soon.

Really quick question - How do I convert a string to a date
-----------------------------------------------------------

Glenn Smith wanted to know how to convert a String like "13/04/2005" into
a Date.

WATANABE Hirofumi suggested Date.strptime("13/04/2005", "%d/%m/%Y").

will $ for global disapears in ruby2?
-------------------------------------

Lionel Thiry asked if $ global variables would still exist in Ruby2.

Matz replied "$-variables will not disappear. Some of perlistic $
variables might."

Seven new VMs, all in a row
---------------------------

There has been more discussion in this thread since last week. As this
edition of Ruby Weekly News goes out, there are 121 posts in the thread.

There's too much to summarise, but it's very interesting reading if you're
into Virtual Machines. (A particular focus of the thread is Peter Suk's
plan to write a Ruby VM on top of Smalltalk VMs.)

New Releases
------------

* fxri 0.3.1

Martin Ankerl updated fxri, a GUI front-end to the RI documentation
program. The layout is now "slightly slicker" and startup is faster.
Version 0.3.2 was released the next day to fix a glitch.

* Ruby Facets 0.6.3

Trans announced version 0.6.3 of the Fantastic Atomic Core Extensions
(Facets). Facets is a collection of extra methods for classes in the
Ruby standard library.

This release includes new methods for Array and Hash.

* midilib 0.8.5

Jim Menard enhanced his midilib library, used for reading and writing
MIDI music files and handling MIDI event data. Bugs have been fixed
and the MIDI::Track#quantize method API has been changed.

* FXRuby 1.2.6

Lyle Johnson announced the latest bindings for the Fox GUI toolkit. A
Win32 installer (and binary gem) are available for Windows, and a
source gem and tarball can be used for other platforms.

* Bishop 0.3.0 - bayesian classifier for Ruby ported from Python

Matt Mower ported the Python `Bayesian' classifier "Reverend" to Ruby,
naming the port "Bishop".

It includes the Robinson and Robinson-Fisher algorithms, and the
trained classifier can be saved to and loaded from YAML.

* Ruby/Odeum 0.2

Zed A. Shaw posted "Just another announcement" for Ruby/Odeum.
"Ruby/Odeum is an extension that wraps Mikio Hirabayashi's QDBM Odeum
library for fast reverse indexing of documents."

Documentation has been improved, and bugs related to memory management
have been fixed.

* PageTemplate 2.0

Brian Wisti, with assistance from Greg Millam, released PageTemplate
2.0. "PageTemplate is a Ruby package which allows you to utilize text
templates for your Web projects."

This is a major release. The entire code base has been rewritten and
there are many API changes.

* FreeRide 0.9.4 - The Free Ruby IDE

Laurent Julliard heralded the latest FreeRide release. FreeRide is an
IDE for Ruby, written in Ruby.

Two major new features have been added. The first is a Documentation
plugin, which gives you context-sensitive help on methods and classes.
The second is a code-template plugin.

(The Documentation plugin uses Martin Ankerl's fxri.)

* FireRuby 0.2.2

Peter Wood updated his Ruby interface to the Firebird RDBMS. It now
builds on Linux.

* KirbyBase 2.1

Jamey Cribbs enhanced KirbyBase, a pure-Ruby database management
system that stores its data in plain-text files. He thanked Hal Fulton
for his assistance in this release.

The API was improved, tables can be encrypted and data can be imported
from CSV.

* fxirb 0.2.1 - gets support

Martin DeMello announced that FXIrb now supports gets, thanks to help
from Csaba Henk.

* Amrita2 1.9.4

Taku Nakajima added a couple of features to Amrita2, an XML/HTML
templating library. One of the new features was partial rendering for
ERB output.

How's this for good feedback: Aredridel replied "I'd say Amrita2 is
quite possibly the most brilliant templating library I have ever seen,
and both the sheer pragmatism and elegance of it are both
overwhelming."

* JRuby 0.8.1

Thomas E Enebo released JRuby 0.8.1, an implementation of Ruby in
Java. Changes include "Some java interfaces are being adorned to quack
like some ruby counterparts", for example java.util.List is
Enumerable.
 
T

Trans

Here's your quote of the week from Jim Freeze:

"David and his RubyOnRails is to Ruby what Michelangelo and
Michelangelo's David are to a large of stone."

BTW, Tim, I dare say you are on the verge of becoming an honest to God
journalist. Excellent writ!
 
C

Curt Hibbs

Trans said:
Here's your quote of the week from Jim Freeze:

"David and his RubyOnRails is to Ruby what Michelangelo and
Michelangelo's David are to a large of stone."

BTW, Tim, I dare say you are on the verge of becoming an honest to God
journalist. Excellent writ!

+1 on the excellent writing!

Curt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top