Forum: Ruby Ruby Weekly News 14th - 20th November 2005

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
timsuth (Guest)
on 2005-11-22 10:23
(Received via mailing list)

Ruby Weekly News 14th - 20th November 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 S..

   [Contribute to the next newsletter.]

Articles and Announcements

     * RedCloth mailing list

       why the lucky stiff introduced a new mailing list for RedCloth,
       Ruby library for using the Textile humane text format.

     * Use of Ruby in Laboratory Automation

       Neil Benn is guest-editing 'The Journal of the Association for
       Laboratory Automation', and is looking for examples of how Ruby
       used in this area. (Or, even better, someone to write an

       Devin M. said that Brent Roman gave a presentation on this
       at RubyConf 2005 ("Embedding Ruby into a Robotic Marine
       and gave links to audio & video of the talk.

       He also mentioned the [SciRuby] project, which is concerned with
       use of Ruby in science.

     * Ruby/SDL for Mac OS X

       Duane J. wrote an article on using Ruby/SDL on Mac OS X.

       | Ruby/SDL is a binding for the Simple DirectMedia Layer, which
is a
       | library that makes 2D (and some 3D) graphics as well as sound
       | basic keyboard/mouse support available in a cross-platform way.
       | Perfect for building games with!

     * Fosdem : Developers Room, Presence

       Thomas R. said that, with the next Fosdem (Free and
       Developers' European Meeting) coming up in February 2006, we have
       opportunity to register a "presence", and arrange to have a room
       aside for Ruby.

       "Any help, and remarks are welcomed."

     * Help requested: new book

       Mark W. is planning on writing a new book on "Enterprise
       and asked for help defining the topics it will contain.

       "I am going to release this as a free PDF file under a Creative
       Commons license, but I would also like to find a publisher who
       make hard copy versions available to readers who want a physical

User Group News

     * Learning R. Hackfest Hosted by new_haven.rb this Friday

       Gregory B. announced a mini Hackfest run by the New Haven Ruby
       Brigade (Connecticut, U.S.) on November 18th. The aim is to pair
       experienced Ruby programmers with newbies and have them work
through a
       Ruby Q. together.

     * London Ruby U. Group meeting - 23 Nov

       Rob announced the London Ruby U. Group meeting on the 23rd of
       November. "Tiest will present a summary of what happened at
       2005. Followed by general Ruby chat and a move to the pub."

Image of the Week

  "LONELY IN THE CROWD" by napaey


  Ruby, SOAP and WSDL

   Henning Jansen wanted to write a Ruby server that provides a SOAP
   interface, matching an already-defined WSDL specification.

   He couldn't find any tool for generating Ruby code from a WSDL file,
   had also heard "Dyanamic languages like Ruby don't really need WSDL".

   The the first point, Hiroshi N. referred him to wsdl2ruby.rb,
   is part of the SOAP4R project, but not in the standard Ruby
   (which only includes the runtime components).

   It is also possible to simply call driver ="http://some/foo.wsdl").create_driver to
   the WSDL at runtime, instead of generating code.

   As to whether Ruby needs WSDL, Ryan L. said that being a
   language it can intercept and create methods "on the fly", so it
   necessary to know what the target methods are at `compile time'.

   James B. noted that WSDL is more than just method/type
declarations; it
   also provides information on what services are available, and how to
   invoke them.

  Equvialent of RoboCode and/or Terrarium for Ruby?

   Kyle H. wondered if Ruby had any equivalents to "RoboCode" or
   "Terrarium" (or RoboWar), multi-player systems where developers
create AI
   to compete with each other.

   Dave B. said there wasn't, yet. "Tim Bates started work on Rubots,
and I
   have early-stages code and ideas based on RoboCode, but that's the
   of it."

   There was lots of discussion and interest in creating such systems.

  ruby's weird operators (||=)

   Mark asked what was with all the "weird" operators in Ruby like ||=

   Guillaume M. said that they're not so weird; a <op>= b is just a
   shorter way of writing a = a <op> b.

   For example, x ||= 3 means x = x || 3, in other words, set x to 3 if
it is
   not defined, is nil, or is false.

   why the lucky stiff noted the [FunnySymbolsInCode] page on

  Converting between Time and DateTime

   This thread discussed the difference between Time, Date and DateTime,
   in particular how to convert between Time and DateTime.

   One technique was given by David A. Black, although it was observed
   it works by generating and parsing intermediate string
   which is less efficient than a more `direct' approach of initialising
   via the fields of another.

 # time =  ... some Time
 # date_time = ... some DateTime

 d = DateTime.parse(time.iso8601)
 t = Time.parse(date_time.strftime("%c"))

   Kirk H. said that this works because the parse method for both
   is based on a single shared method, while an alternative approach was
   given by Daniel S.: (although it doesn't handle timezones,
   fractional seconds etc.)

 class DateTime
  def to_time
    Time.mktime(year, mon, day, hour, min, sec)

 class Time
   def to_datetime
     DateTime.civil(year, mon, day, hour, min, sec)

   As to the reason for the separate classes, Kirk said that they are in
   different in significant ways.

   | Time and Date/DateTime use two entirely different mechanisms for
   | track of the passage of time. Time utilizes seconds since the start
   | 1970-standard Unix time tracking.
   | Date/DateTime uses keeps tracks of days and fractions of days using
   | Rational, and it's start of time is about the start of the year in
   | B.C.

   Ron M, noting limitations with Time on systems where time_t is
   thought it would be good if Time would automatically convert to some
   of BigTime object when the year is out of range. (In the same way
   Fixnum converts to Bignum.)

   "Today, that's not the case, and selecting fields representing a
   200-year-lease throws an error when done through DBI."

   Tanaka A. said that this would be hard, since Time just uses the
   underlying operating system's time support, from which information on
   out-of-range years is not readily available.

   A solution is to use an operating system that has 64-bit time_t.

   In the Time out of range when selecting from database? thread, Kirk
   that it wouldn't be too difficult to make DBI::Timestamp behave
   when the time doesn't fit in a Time.

  Euchre Hands (#55)

   James Edward G. II introduced Ruby Q. number 55, "Euchre Hands".

   The problem is to write a program that determines the "trump suit"
   hands in the card game Euchre.

  Small practice programs

   dark2: "For someone with some programming background and an interest
   learning Ruby, what are a few good "practice" programs to write?"

   Gregory B.:

   James B.: "Do you use a computer on a regular basis? Do you find
   yourself doing the same little things over and over, by hand? Write
   code to automate or simply them."

  Crash Course on Speed for Ruby

   Damphyr and his colleagues will be providing a three-hour
introduction to
   Ruby for a group of "high calibre, experienced professionals with
   good theoretical and practical background, so we only need to provide
   highspeed hands-on tour of Ruby and let nature take it's course".

   Has anyone already prepared material suitable for a three-hour

   Edwin van Leeuwen suggested the [WhyRuby] repository.

  A dRuby application running as a Windows service?

   Dominic M. asked how he could turn a druby (distributed Ruby)
   application into a Windows service.

   Jamey C. pointed out an example he'd written which uses the
   win32-service Ruby library.

New Releases

  isi.rb Version 0.8

   Takeshi Nishimatsu announced for "Rubies and TeXnichians" a new
version of
   the ISI Export Format to BibTeX Format convertor.

   Brian Schröder added a "shameless plug" for his rbibtex, a Ruby library
   for manipulating BibTeX.


   Ruby-GNOME2-0.14.1 was announced by Masao M., fixing some serious
   memory leaks. All users of 0.14.0 are advised to upgrade.

   Ruby-GNOME2 is a set of Ruby bindings for the GNOME 2 development

  Ruby RTF 0.1.0

   Peter Wood released the first version of Ruby RTF, a library for
   RTF (Rich Text Format) files.

  ruby-feedparser : RSS/Atom feed parser

   Lucas N. said that ruby-feedparser had been extracted from the
   Feed2Imap project and is now available as a standalone library. It is
   to parse Atom and RSS feeds, and is designed to be robust in the face
   invalid input.

   No formal release has been made, but the SVN (Subversion repository)
   version is usable.


   rubikitch announced the latest version of his tool allowing
developers to
   programatically update `rcfiles' (e.g. ".emacs"), while providing
   notifications and control to users.

  Nitro + Og 0.25.0 Og scope, dynamic finders, evolution, helpers, bug

   George M. was pleased to announce new versions of Nitro and
Og, a
   web application framework and object-relational mapping library,

   The focus of the release was on stability, but features were also
   including "constrained / scoped queries", dynamic finders/generators,
   an experimental schema evolution system.

  Ruby/GD2 1.0

   Rob L. improved the API of Ruby/GD2, a wrapper around the library
   creating images.

   Documentation was also added.

  Ferret 0.2.1 (port of Apache Lucene to pure ruby)

   David B. updated Ferret, his port of the Apache Lucene searching
   indexing library to Ruby.

   The query interface now supports searching across multiple fields at
   same time, the library is threadsafe, and simple interfaces for
   and deleting documents are provided. Primary keys were also added.

  ruby-growl 1.0.1

   Eric H. fixed ruby-growl to work with the version of Ruby
   with Mac OS X Tiger.

   "Growl is a global notification system for Mac OS X. Applications can
   register messages which Growl displays on the screen in a variety of
   depending upon your preferences."

   ruby-growl allows you to send growl messages from non-Mac OS systems
   not receive them).

  Nihongo Benkyo 0.3

   Mathieu B. let out a new release of Nihongo Benkyo, a tool for
   with Japanese dictionary files.

  Ruport 0.2.5: Enumerable DataSets, and things that go bump in the

   Gregory B. bumped through the "I'm releasing too often" edition of
   Ruport, a report generation framework.

   Robert Canieso has joined the project, and will be working on the
   Ruport::Format module.

   The query interface has been improved in this release.

  Reg - Ruby Extended Grammar 0.4.6

   Caleb C. made a new release of Reg, a mini-language for
   patterns in ruby object graphs".

   "Reg provides matchers for Strings (via Regexps), Symbols, Hashes,
   several alternatives for matching Objects, but the main feature is
   ability to match Arrays of arbitrary ruby data using vaguely

  FasterCSV 0.1.3--CSV parsing without the wait!

   James Edward G. II posted another version of FasterCSV, a library
   intended to be a faster (currently ~ 10x) parser of CSV than the
   library that comes standard with Ruby, while remaining pure-Ruby
This topic is locked and can not be replied to.