Ruby Weekly News

Ruby Weekly News: 08/26/2002

A summary of activity on the ruby-talk mailing list, brought to you
this week by Holden Glova.

ANNOUNCEMENTS

···

=============

FXRuby-1.0.13
Lyle Johnson has announced a new version of FXRuby. FXRuby is a
set of Ruby GUI bindings for the FOX([1]) toolkit. Get
FXRuby([2]).

ZenWeb 2.12.0
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([3]).

TCLink credit card processing extension
Dan Helfman has implemented an extension to allow for credit
card processing via the Trust-Commerce payment gateway. Get
TCLink([4]).

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([5]).

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
Installer([6]).

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.

INTERESTING THREADS

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([7]) 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([8]) for those interested.

Win32 Scripting
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([9]) module in the RAA.

Idiomatic write
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([10]) 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
Ruby folk!

OSX 10.2 ships with Ruby
Luc Heinrich let us know that MacOS X (10.2 aka Jaguar) ships
with Ruby 1.6.7.

References

  1. file://localhost/tmp/www.fox-toolkit.org/
  2. http://www.fxruby.org/
  3. http://sourceforge.net/projects/zenweb/
  4. http://trustcommerce.com/tclink.html
  5. http://rubyhacker.com/code/scanf/
  6. http://rubygarden.com/ruby?WindowsInstaller
  7. http://www.ruby-talk.orb/47687
  8. http://www.ruby-talk.org/47831
  9. http://www.ruby-lang.org/en/raa-list.rhtml?name=Win32OLE
  10. http://www.ruby-talk.org/48120