Ruby Weekly News: 08/26/2002
A summary of activity on the ruby-talk mailing list, brought to you
this week by Holden Glova.
Lyle Johnson has announced a new version of FXRuby. FXRuby is a
set of Ruby GUI bindings for the FOX() toolkit. Get
ZenWeb is a tool for building websites (not web pages). It
applies a defined set of filters to files of content (often
flat text or lightly marked up text (think wiki)) and created
hierarchically navigable pages with a consistent theme and
design. Get ZenWeb().
TCLink credit card processing extension
Dan Helfman has implemented an extension to allow for credit
card processing via the Trust-Commerce payment gateway. Get
scanf for Ruby
The Austin Ruby Code-fest for 2002 produced scanf for Ruby.
This is a pure Ruby implementation of the C scanf(3) function.
Get scanf for Ruby().
Ruby Windows Installer 1.6.7-3
Andrew Hunt has released another version of the Ruby Windows
Installer version. This version contains some new packages such
as: REXML, MySQL, RubyMock, SWin, and VRuby. Get Ruby Windows
Amrita 0.8.5 and amx
Taku Nakajima has released a new version of Amrita. Amrita is a
html/xhtml template library for Ruby. This release contains a
new experimental feature called “amx” - AMrita eXtension for
XML. amx converts an XML document into an HTML document.
Embedding Ruby in C/C++
Edward Wilson asked about the possibility of embedding Ruby in
a C/C++ application. Paul Brannan responded by saying yes this
is doable but there might be some issues() to consider. Phil
Tomson suggested a different mindset which involves exposing
only a Ruby view onto the application. The Ruby view will
manipulate C++ objects underneath.
What makes a “good” Ruby extension?
Tim Hunter asked what makes a good Ruby extension. If you are
writing Ruby extensions this thread is worth a read to see what
the community has come to expect.
Puzzled by Range object?
Do you think a Range object should be able to go from top to
bottom? It sounds logical. Time Hunter discovered that this is
not the case. Guy Decoux explained that a Range can only work
up due to Range#each using #succ and it’s difficult to define
the inverse of #succ for any type.
How to negate regexps in a case statement
Ever wondered how to negate a regexp in a case statement?
Reimer Behrends shows how() for those interested.
The question was asked about using Ruby for win32 OLE
automation. The answer is “yes”. You can use Ruby for win32
scripting with the WIN32::OLE() module in the RAA.
Searching and replacing text in files is a common task. So
common that it is easily done from the command line. WATANABE
Hirofumi illustrated that it can be easily done from the
command line with something like ruby -i~ -pe ‘gsub(/pattern/,
“replace”)’ myfile . It should be noted that this will produce
a magical temp file that Ruby will create and then delete for
you after the replacements are done.
Why Ruby Uses Mark-and-Sweep GC?
A rather long thread was started asking why Ruby uses mark and
sweep garbage collection. The question spawned a discussion
around general GC principles and problems associated with them.
A good read if this sort of problem interests you.
Ruby and Judy
Judy is a set of functions written in C libraries for creating
and accessing dynamic arrays. Judy arrays are both speed and
memory efficient. Talk was centered around the amazement that
it could be done so fast. Lyle Johnson let the cat out of the
bag in saying() that he has been working on this already.
IRC channel for Ruby
It was asked if Ruby existed on IRC. I’ve seen Ruby channels on
both DALnet and OPN (I’m sure there are others). I think the
biggest channel is on the Open Projects Network in #ruby-lang
on irc.openprojects.net . Come by and say hello to many great
OSX 10.2 ships with Ruby
Luc Heinrich let us know that MacOS X (10.2 aka Jaguar) ships
with Ruby 1.6.7.