http://www.rubygarden.org/ruby?RubyNews/2004-11-8
(Ed Note: Chad Fowler has given me an account on RubyGarden so I can maintain
the old weekly news site at http://rubygarden.org/rurl/html/index.html.
I haven't got around to doing anything yet. I welcome suggestions on what to
do with this. Do people like these being on a Wiki or not?)
Ruby Weekly News 8th-14th November 2004
···
---------------------------------------
A summary of the week's activity on the ruby-talk mailing list / the
comp.lang.ruby newsgroup. There were around 918 messages in 181 threads.
This summary is brought to you by Tim Sutherland (TimSuth).
Articles and Announcements
* [Copland to Needle article on RubyGarden]
Chad Fowler pointed out [an article by Jamis Buck] describing his
journey into dependency injection (inversion of control). The
article was posted to RubyGarden.org; Chad is working to establish
regular articles and tutorials for RubyGarden.
* [Rubymine.org]
David Ross announced [Rubymine], a site containing articles,
blogs, forums and so on for Ruby. It is also the home of the Ruby
Windows QA team, a group of Ruby hackers who will improve the Ruby
experience on Windows by providing pre-build extensions and giving
support.
* [Rails, Injected]
Jamis Buck wrote an article citing "the Benefits of Dependency
Injection in a Web Framework". It describes an experiment of his
to introduce [Needle] to the [Rails] web framework.
* [ruby-dev summary 24628-24740]
Masayoshi Takahashi gave the latest summary of the Japanese list
ruby-dev. Changes to Oni Guruma (the regular expression engine for
Ruby 1.9) were discussed.
New Releases
* [Weft QDA - (Wx)Ruby application for qualitative data analysis]
Alex Fenton introduced [Weft QDA], a qualitative data analysis
tool "for use in various kinds of social science research to
analyse unstructured textual data, such as interview transcripts,
newspaper articles, ethnographic fieldnotes etc."
* [One-Click Installer 1.8.2-14 RC9 with RubyGems built-in]
Curt Hibbs announced a new release candidate of the Ruby One-Click
Installer for Windows. It now includes RubyGems.
* [rq-1.0.0]
Ara.T.Howard declared version one-dot-oh-dot-oh of [rq] (ruby
queue), a tool used to create "instant" Linux clusters for
distributed computing.
* [win32-file 0.3.0]
Daniel Berger presented a new release of [win32-file] on behalf of
the Win32Utils team. There are now methods for modifying file
attributes, for example File#hidden=.
* [ParseTree 1.0.0 Released]
Ryan Davis made known a new major version of [ParseTree], a C
extension that presents a representation of the parse tree for a
specified class or method.
* [Needle 1.1.0]
Jamis Buck released a new version of [Needle], a "dependency
injection container" library.
* [RubyPants 0.2]
Christian Neukirchen made the first public release of [RubyPants].
This is a Ruby port of [SmartyPants], used to transform ordinary
punctuation like " into "smart punctuation" like ``.
* [RedCloth 3.0.0 -- Textile and Markdown Elope!]
why the lucky stiff delivered version three of [RedCloth]. This is
a library for turning Textile markup into HTML. It now has
preliminary support for Markdown markup as well.
* [Ruby-GNOME2-0.11.0]
Masao Mutoh announced a new release of [Ruby-GNOME2], a bundle of
Ruby bindings for GNOME libraries. New in this release is
Ruby/GnomePrint (a binding for libgnomeprint-2.8.0),
Ruby/GnomePrintUI and Ruby/RSVG. Other improvements and bugfixes
were made.
* [MinDI: Minimalist Dependency Injection]
Joel VanderWerf was inspired by [Needle] to produce [MinDI], a
library that attempts to map dependency injection concepts into
standard Ruby constructs like classes and modules.
* [MemCache 0.0.1]
Michael Granger was "happy to announce the initial release of a
Ruby client library for memcached, a high-performance distributed
memory cache." ([Ruby-MemCache]) Memcached improves the
performance of dynamic web sites by adding a caching layer to
database requests, with a global cache that can be shared between
many machines. Websites using memcached include LiveJournal (for
which it was developed) and Slashdot.
* [Arachno Ruby 0.3 (patch 2)]
Lothar Scholz put out a new version of the commercial, proprietary
IDE [Arachno Ruby]. There was also a [thread discussing Arachno],
including some very positive comments on its debugger.
Threads
Interesting threads this week included:
[Ruby and Mozilla?]
Hal Fulton asked whether anyone had written Ruby code to interact with
Mozilla. He wanted to use Mozilla Mail but have his spam filtered with a
Ruby script. Todd Bradley suggested he have Ruby connect to his POP server
and act as a proxy for Mozilla Mail, only passing on those messages it
determined were not spam. [rbXPCOM] was also discussed. This is a Ruby
binding for XPCOM, the automation interface provided by Mozilla. Posters
were wary of using this since its last release was in 2001 and Mozilla has
had many changes since. Another idea was to use fetchmail, procmail and a
local mail server to do the filtering. Fetchmail would connect to the
ISP's POP server, procmail would use the Ruby code to filter the mail and
then Mozilla Mail would connect to localhost to fetch mail.
[A Wiki/Spam Report], [Another Wiki/Spam Update]
Jim Weirich reported on the fight against spam on the RubyGarden wiki. Now
that external links require a non-standard presentation that most bots
will not know about, he believes that the only spam getting through is
being posted by humans rather than by bots. A new anti-spam measure is to
wrap all external URLs with a redirection service Google has provided for
this purpose. It means that external links on RubyGarden will not get any
"PageRank" benefit with Google - the main motivation for people spreading
links over many wiki pages.
[Re: value provided for argument with default value - how to check inside
method?]
This is a thread from last week discussing how a method body can tell
whether a parameter was specified by the user or whether a default value
was used. Nobu Nakada gave a delightful solution: (Comments added by your
editor.)
def foo(x=(a=true; nil))
# a=true means the default value (nil) was used for x.
# a=nil means the caller specified the value.
end
[Trivial trick for looking at complex code]
Hal Fulton found the following useful for quickly seeing the structure of
a Ruby source file:
grep -E "^ *(class|module|attr|def)" file.rb
Curt Hibbs mentioned that FreeRIDE has a navigation pane with this
information in a collapsable tree (and best of all, you can click the
navigation pane to go straight to the code in the editor). Brian Schro:der
gave an rdoc command that provides a similar overview.
[[SUMMARY] GEDCOM Parser (#6)]
James Britt summarised last week's [Ruby Quiz] (to write a parser for the
GEDCOM genealogical data format).
[[QUIZ] Countdown (#7)]
Brian Candler gave this week's [Ruby Quiz]. The problem was to write a
program which can take a list of integers and a desired result, and output
ways that operations like + and * could be used with the input list to
generate the result we want. The idea comes from a UK TV show called
Countdown. After the usual 48 hour delay, Brian Schro:der [posted his
solution], which uses top-down dynamic programming (memoization). [Dennis
Ranke's solution] worked by composing sub-terms in a bottom-up manner as
opposed to Brian's top-down solution. [Hans Fugal asked] what the trick
was people were using to get such efficient solutions and some answers
were provided.