26th February - 4th March 2007
Ruby Weekly News is a summary of the week’s activity on the ruby-talk mailing list / the comp.lang.ruby newsgroup / Ruby forum, brought to you this week by Tim Sutherland (email firstname.lastname at gmail.com), with contributions from Robert Postill.
Articles and Announcements
- CVS services will be permanently unavailable
- Ruby-doc.org search for your browser toolbar
- Erlang book is in beta...
- rb-appscript developments (Ruby-AppleScript)
Shugo Maeda announced that the Ruby interpreter’s CVS repositories will be no longer be available. “The source code repositry has been moved to SVN.”
This is unrelated to rubyforge CVS services.
James Britt recently added a new search feature to ruby-doc.org, and it soon became even better:
Greg [Whiteley] took this a step further and created a browser search toolbar auto-discovery file. Users of Firefox 2 and IE7 (and possibly others) who visit the site should now see the search toolbar icon (usually in the upper right of the browser) become highlighted. Clicking the icon will then give you the option of adding the ruby-doc.org search to your search toolbar.
“We were lucky to get Joe Armstrong, one of the inventors of Erlang, to write our latest beta book, Programming Erlang”, wrote Dave Thomas.
Erlang is [a programming language] designed from the ground up to help programmers create highly concurrently (read thousands or processes), highly reliable (read 99.99999% uptime) applications. It’s a real world language—it is used to write telephone switches, banking applications, trading systems…you name it.
There were many excited responses, and also questions about the possibility of books on other interesting programming languages. Dave said he’d love to publish books on IO, Haskell, OCaml, etc. “It’s a question of finding the right author.”
Has noted that “a great introduction to rb-appscript at O’Reilly’s MacDevCenter” was just written by the author of “AppleScript: The Definitive Guide”, Matt Neuburg.
In a related thread, Laurent Sansonetti announced RubyOSA 0.3.0.
“RubyOSA is a bridge that connects Ruby to the Apple Event Manager infrastructure. In big words, it allows you to do in Ruby what you could do in AppleScript.”
Among other new features, it is now possible to script remote machines.
User Group News
- Munich.rb meets on Thursday 15th March
- Swiss Ruby User Group Meeting on 1.3.2007
- South East Michigan Ruby Brigade Meeting
The Munich.rb group are meeting on Thursday 15th March. Urban Hafner will be wearing his Munich.rb T-Shirt, “but I guess a group like that will likely stand out anyway ;)”.
The SwissRUB met on March 1st, in Zürich.
The South East Michigan Ruby Brigade had a meeting on March 5th, with free pizza, soft drinks, books, and friendly people, announced Patrick Hurley.
Threads
Making Ruby faster with Judy
Tomasz Wegrzanowski improved the performance of the Ruby interpreter by using the Judy sparse-array library to replace some of Ruby’s internal hash tables.
These tables are used for example to do method lookups. Performance increased by about 5%, and memory usage dropped by 4%.
Mauricio Fernandez said he’d done a similar thing back in 2002. The biggest problem was that Judy is under the LGPL, which has more restrictions than Ruby’s license.
win32::changenotify and multiple events
Martin DeMello asked how to get win32::changenotify to capture multiple events when e.g. “mkdir -p a/b/c” is executed.
There were not yet any replies.
is there something method in ruby like python's reduce()
Huang Huangliang wanted to know if Ruby has a standard method that’s similar to Python’s “reduce”, i.e. to turn an array of values into a single value, by repeatedly applying a function (block) of two arguments.
This is sometimes called “accumulate”, “fold” or “inject” in different programming languages.
Bira said, yes, it’s Enumerable#inject in Ruby, and gave several good examples of its use, with the simplest being
# Sum some numbers
(5..10).inject {|sum, n| sum + n } #=> 45
The name “inject” came to Ruby via the Smalltalk programming language. (Your editor finds it easier to think “accumulate” whenever he sees “inject”. Your mileage may vary.)
Ruby and COM
“Does anyone know of a stable Ruby-COM bridge which will let one do things like importing DLLs, querying for interfaces and calling their methods?” queried 11×22.
Robert Klemme linked to a page of Ruby win32 libraries, and Patrick Hurley suggested using the standard Ruby libraries Win32OLE (for calling COM interfaces) and DL (for calling functions in a DLL directly).
New Releases
Holy Telephony Batman! It's Batphone 0.1.0
Hans Fugal: “Does the world need yet another Ruby Asterisk Gateway Interface library? Does the world need a guy who dresses up like a bat?”
This one was written to be easy to learn and use.
Ruby In Steel Personal Edition v 1.0
Huw Collingbourne announced that Ruby in Steel has got to version one. It is “a Ruby editing and debugging environment for Microsoft’s Visual Studio 2005”.
Other releases
See the rubyforge news page for more release announcements.
sapnwrfc next Generation RFC Connector for SAP NetWeaver
Piers Harding announced the first “next generation” Ruby RFC connector for SAP NetWeaver.
“SAP have undertaken a redevelopment of the RFC connection libraries, and as a result the new Ruby Connector is now unicode enabled, and can handle complex parameter types.”