From: timsuth@... (Tim Sutherland) Date: 2004-12-07T17:57:36+09:00 Subject: Ruby Weekly News 29th Nov - 5th Dec 2004 http://www.rubygarden.org/ruby?RubyNews/2004-11-29 Ruby Weekly News 29th Nov - 5th Dec 2004 ---------------------------------------- A summary of the week's activity on the ruby-talk mailing list / the comp.lang.ruby newsgroup. This summary is brought to you by Tim Sutherland (TimSuth). Articles and Announcements -------------------------- * [Toronto Ruby User Group meeting 2004-12-05] Mike Stok announced the next meeting of the Toronto Ruby User Group, on 2004-12-05 and the meeting was later [summarised on the group's Wiki]. * [Ruby Central, Inc. Codefest Grant Program] On behalf of Ruby Central, Inc., David A. Black was pleased to announce the Ruby Codefest Grant Program. This is a mechanism for supporting "codefests" at which programmers develop a Ruby library. US$1500 will be awarded, with up to US$500 per group. [Applications] must be made by January 15 2005 and these will be judged by a number of well known Rubyists including Matz. James Britt suggested that a similar scheme for encouraging documentation writers would be beneficial. * [Ruby CVS IRC bot, and Ruby CVS RSS feed] David Ross wrote "[t]hanks to our wonderful Shugo, there is now RSS feed and a commit bot for the cvs. Each time there is a cvs commit, the scripts send information to the correct server for processing. The IRC bot messages the channel each commit for the Ruby CVS." * [KDevelop Technote for Ruby] Ryan Phillips reported that [Issue 3 of KDevelop TechNotes] (written by Alexander Dymo) talks about Rapid Application Development (RAD) with Ruby/Qt/KDE. It shows how to use a GUI created with the KDevelop forms designer in a Ruby program. * [Ruby Article at Linux Journal] pat eyler noticed an [article by Ara Howard] in the Linux Journal. It describes the use of Ruby Queue ([rq]) for Linux Clustering and includes some of the Ruby code from the implementation. * RAD with Ruby An [article on Slashdot] discussed KDevelop's improved Ruby support. Threads ------- Interesting threads this week included: [[OT] No-nonsense guide to Use Cases?] -------------------------------------- Lyle Johnson asked for suggestions from the Ruby Community on good books for learning about Use Cases. With many Ruby users in favour of agile software development methodologies like Extreme Programming, it's interesting to see what books they recommend for this subject. Lyle had seen Alistair Cockburn's book "Writing Effective Use Cases" get good reviews on Amazon and a number of people agreed that this is a very good book. Nicholas Van Weerdenburg's response was typical: "Cockburn is a great writer, and it's a totally awesome book. I quite like his treatment of use cases- and his writing is on par with Martin Fowler, the Pragmatic Programmers, and so on. It's one of top 10 software books I've ever read. I've probably bought six or seven copies for clients I've worked with." Sascha Ebach: "The thing is: After you are done with Cockburn you will not have to read any other books on use cases, if you are after a practical guide. He is very concise. ... The feeling I had after I was finished was comparable to the feeling I had after Pickaxe 2. ("Damn, that is all I ever need to know about that to get started really well")" Kloubakov, Yura thought that "Use Case Modeling" by Kurt Bittner and Ian Spence is also a good book on Use Cases. [Ruby Graphing/chart libraries?] -------------------------------- Chris Williams wanted to programatically generate graphs for his [Rails] website at work. Stoyan Zhekov gave examples using [ruby-gd] (by Ryuichi Tamura) and [ruby-gdchart] (by Kouhei Sutou). These are wrappers around C libraries that provide graphing capabilities. Although Chris had stated he had decided against SVG for the lack of browser support, Sam Goldman still thought it could still be a good solution and pointed out Sean Russell's [SVG::Graph]. [Does anyone have benchmark programs for YARV?] ----------------------------------------------- SASADA Koichi is developing [YARV] (Yet Another Ruby VM). It requires Ruby 1.9 and a small (~50 lines) patch to eval.c. The rest of the Virtual Machine is just a C extension. Koichi's aim is to develop the fastest VM for Ruby and maybe have it become the official version. With this in mind he asked for benchmarks and several were given. The [results of the benchmarks were posted] and they were impressive, with many benchmarks 5 or 6 times faster under YARV than in the normal Ruby interpreter. The RubyGarden Wiki has a page VirtualMachineOptions which lists different VM implementations. [[SUMMARY] Banned Words (#9)] ----------------------------- The summary of last week's [Ruby Quiz] was posted. [The problem] was to assume that there is a mail filter which rejects mail containing "banned words". Then we want to determine the list of banned words by sending as few test emails as we can. The mail filter can be represented by a method "clean?" rather than sending real emails. Some test cases (dictionary of words and list of banned words) were posted and people compared solutions. James Edward Gray II wrote in the summary "Of course, that's just the basics. Wayne Vucenic found a very clever optimization. If we check a big list and it gets banned, then we split it up and check the first half, which comes back clean, we know the second have would be banned and can skip the check. That could save a significant amount of messages that we would otherwise need to send. ... Brian Schroeder made a search for the optimal divisor for the word list, when breaking it into chunks. Brian landed on 3 as the magic number, but there has been some follow up discussion on Ruby Talk about his findings and if they are complete." [[QUIZ] Crosswords (#10)] ------------------------- James Edward Gray II chose a classic problem from Knuth as this week's [Ruby Quiz]. Given a simple crossword puzzle specification, output a layout for it using spaces, '#' and numbers. [[SOT]Signatures and one liners] -------------------------------- After comments in another thread about Brian Mitchell's signature, he began a thread to discuss Ruby code in signatures. "This all started with my less than perfect Sierpinski Triangle generator: ruby -e'32.times{|y|print" "*(31-y);(y+1).times{|x| rint"#{~y&x==0?"A":"."}"};puts}' I originally build the sig for my /. account but I use it from time to time on other things. This was greatly improved to: ruby -le'32.times{|y|print" "*(31-y),(0..y).map{|x|~y&x>0?" .":" A"}}' from input by the community." Christian Neukirchen posted an impressive Ruby Blog CGI server using only 126 characters: puts"Content-type: text/html\n\n