Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Ruby Weekly News 29th August - 4th September 2005

Reply
Thread Tools

Ruby Weekly News 29th August - 4th September 2005

 
 
Tim Sutherland
Guest
Posts: n/a
 
      09-07-2005
http://www.rubyweeklynews.org/20050904.html

Ruby Weekly News 29th August - 4th September 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 Sutherland.

If you're reading the online version of this newsletter then you may
notice a few changes. RubyWeeklyNews.org is now a Rails application,
allowing anyone to contribute summaries at any stage.

Thanks to everyone involved with Rails for making this so easy!

A special `shout out' to nzkoz (Michael Koziarski) from the #rubyonrails
IRC channel for pointing me in the right direction when a simple redirect
was taking 15 seconds. [Solution.]

Articles and Announcements
--------------------------

* Rubyists in Rio de Janeiro
----------------------------

Daniel Amelang: "Any rubyists in Rio interested in getting together
sometime the next couple weeks? I'll be there on vacation."

There were a couple of yes's.

* Friendly community petition - official IBM DB2 drivers for Ruby
-----------------------------------------------------------------

Andrew Stuart contacted IBM to encourage them to develop an official
DB2 driver for Ruby, as they do for Perl.

While acknowledging Michael Neumann's unofficial driver, Andrew noted
that its webpage says it is missing rigorous testing, and a number of
features.

| It would be a great thing if IBM was to build a set of drivers that
| are expose the full functionality of DB2, and are subject to IBM's
| testing and quality assurance processes, and had the "IBM official
| DB2 drivers" stamped on them. IT managers and operations departments
| will get warm fuzzy feelings from code that uses such drivers.

Andrew received a response from Grant Hutchison, Technical Manager,
Developer Initiatives - Cloudscape, DB2, Informix, who asked that
Rubyists interested in official drivers contact him to register their
support.

"Based on the response I receive I will build a proposal to get more
involved."

* Please register *soon* -- time is short!
------------------------------------------

David A. Black announced that anyone who doesn't want to miss RubyConf
2005 should register soon ( = now).

| Full registration is going to end in about two weeks! Non-full (no
| meals) registration may continue a little bit after that, but not
| forever.

("in about two weeks" = "September 16th 2005".)

As of 6th September 2005, there are 148 registrations from 13
countries. Looking good.

User Group News
---------------

* Hamburg.rb in September
-------------------------

Stephan Ka:mper announced the next Hamburb.rb meeting, at 6pm on
September 7th 2005.

"There's a mailing list about Hamburg.rb; if you like to join that
list and the meetings drop me an e-mail."

Threads
-------

Watir attracts Ruby Newbies
---------------------------

(See also [Watir, Selenium and other testing tools.])

Bret Pettichord reported that the Watir web-application testing tool is
"rapidly attracting users".

Watir (pronounced "Water") allows you to write automated tests that work
by driving Internet Explorer.

Bret was looking for knowledgable Ruby users to join the Watir mailing
list to help out with the Ruby queries there.

| Many of our users are new to Ruby and even new to object-oriented
| languages.
|
| In fact, they can't tell where Watir ends and Ruby begins. Thus, they
| end up asking lots of questions to the Watir mailing list that are
| really just Ruby questions.

Phil Tomson said that Watir users with Ruby questions should just join
ruby-talk.

Bret responded:

| Well, part of the problem is that they don't know what part of their
| question is Ruby and what part is Watir. Often they are mixed up, even
| though the solution is just learning more about Ruby or some other Ruby
| library other than Watir.
|
| Please let me know whether you want these kinds of mixed up questions on
| this list. Remember, testers are used to being beat up by developers,
| and will be reticent. I know this is a polite list, but i guess i want
| more reassurance that this kind of thing would be welcome here.

Dave Burt: "This list loves ruby nubies."

David Brady: "...They're DELICIOUS!",

| "You mean there's a whole programming language based on Watir?!?"

(This is a good reminder that we should all try to be friendly and polite
on ruby-talk/comp.lang.ruby, especially with projects like Rails and Watir
picking up so many new users.)

Ruby "Game" (Graphics & Sound) Frameworks
-----------------------------------------

The state of Ruby's Gaming Frameworks was the topic of this thread,
started by David Brady who asked:

"If you had to do an interactive graphics-and-sound presentation in Ruby
this weekend, where would you start?"

Peter Thoman said that he found the most usable framework to be RUDL. "I
used it in 3 projects so far and never had any serious problems."

RUDL provides high-level functions on top of the SDL library, and is
similar to Python's pygame.

Florian Gross suggested the 2D game development library Ruby-Gosu.

Ruby and WSH How?
-----------------

Andres M. Hidalgo asked for "any ideas" on using WSH (Windows Scripting
Host) from within Ruby.

Zach Dennis said that Win32OLE was the way to go. Example:

---
require 'win32ole'
wscript_shell = WIN32OLE.new( 'WScript.Shell' )
wscript_shell.Popup( 'message', 0, 'title', 1 )
---

Dave Burt also pointed out the ole_methods method on Win32OLE objects,
which gives you a list of method names that you can use - useful when
you're playing around with an API.

Semantics of << and <<-
-----------------------

Anders Ho:ckersten was wondering about << and <<-, in particular, what it
meant to use a quoted string after <<.

William James explained that these operators are used for `here
documents', a way of writing string literals.

"The purpose of quoting the here-document label is to make the text be
treated as though it were enclosed in single quotes."
---
puts <<'HERE'
#{3**3} bells.
HERE

puts <<"HERE"
#{3**3} bells.
HERE

puts <<HERE
#{3**3} bells.
HERE

# outputs:
# #{3**3} bells.
# 27 bells.
# 27 bells.
---

Examples of WWW::Mechanize with cookies and redirect?
-----------------------------------------------------

Lloyd Zusman was going to use Michael Neumann's WWW::Mechanize library to
do some "web scraping", but couldn't find any examples of how to handle
cookies and redirection.

Michael himself replied:

| A redirect is automatically followed, so you don't have to think about
| it. Cookies are handled automatically as well, but just in a very
| primitive way (every cookie is sent back to the server, regardless of
| it's PATH or timeout).

So none of the examples show how to do it ... because you don't need to do
anything!

breakpoint and scite
--------------------

A discussion about using breakpoint with the SciTE led Florian Gross to
mention that he's working on a GUI front-end for breakpoint.

A [tantalising screenshot] was posted.

(The breakpoint library allows you to add breakpoint method calls to your
code, and then connect with an irb console when the point is hit. Useful
for remote debugging!)

MUD Client (#45)
----------------

This week's Ruby Quiz by James Edward Gray II is to create a scriptable
MUD client.

---
>look dagger

The all-powerful blade begs to be stolen!

>get dagger

You take the dagger. (Well, that was easy, wasn't it?)

>equip dagger

You are now the most dangerous warrior in the kingdom!
---

A new Ruby Quiz challenge is posted each week, and is followed by in-depth
discussion of the solutions people publish.

Do not be afraid to take part if you are new to Ruby - the quiz is a great
way to get motivated to write some code, and to learn through seeing how
other people solve the same problem.

Ruby and COM(ActiveX)
---------------------

D'Andrew Thompson asked if there is a "COM component for Ruby offering an
interface to COM (ActiveX) controls?"

Wes Moxam pointed out the Win32OLE library, a standard part of Ruby on
Windows.

Time (leap year??)
------------------

csjasnoch queried whether there is a built-in way of determining if a year
is a leap year.

David A. Black said that Date#leap? is it.

---
require 'date'
p Date.today.leap?
---

Yet Another Shameless Plug for RubyStuff
----------------------------------------

James Britt posted a "shameless plug" for RubyStuff.com.

Hang your head Sir! We at the Ruby Weekly News will never stoop to such
blatant commercialism.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|Mortgage rates as low as 2.98% REFlNANCE NOW!!! 100% genuine Mortgage|
|rates as low as 2.98% REFlNANCE NOW!!! 100% genuine Mortgage rates as|
|low as 2.98% REFlNANCE NOW!!! 100% genuine Mortgage rates as low as |
| 2.98% REFlNANCE NOW!!! 100% genuine Mortgage rates as low as 2.98% |
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

New at the Ruby Stuff Store are U.S. stamps with a Ruby theme, including
Rails and heavy-metal-umlat logos.

James uses the store to fund www.ruby-doc.org and www.rubyxml.com.

[Sorry James ]

Replacing RDoc: what do you want to see?
----------------------------------------

ES pondered writing a replacement for RDoc.

| There is only so much data to be gathered from the source code and RDoc
| is fairly good at that. What it is not good at is keeping things simple
| while producing a usable data structure. Those are things that would be
| automatically corrected. Are there any other `mechanical' things that
| need to be fixed?

James Britt said that the ruby-doc.org mailing list had discussed the
similar topic of replacing ri.

There was some defence of RDoc, with Austin Ziegler saying that it would
be better to fix any problems with it rather than coming out with
something entirely new.

Mathew requested that any new tool accept the same input as RDoc -
otherwise it will be too much of a pain to migrate all the existing
documentation.

params vs @params in rails?
---------------------------

Barry noticed that both params and @params do the same thing in his Rails
controller class, which left him "wondering what's the difference and when
should each one be used?"

He later posted that he'd discovered that params was just an accessor for
the instance variable:

---
class ActionController::Base
...
attr_accessor arams
...
end
---

David Heinemeier Hansson gave the authoritative answer:

| Direct access to these instance variables is deprecated. The same goes
| for cookies, session, request, response, and the other accessors. Use
| the accessor instead of going directly, so it's request.get? instead of
| @request.get?.

New Releases
------------

gmailer-0.0.8
-------------

Park Heesob released version 0.0.8 of gmailer, a library for accessing
your Gmail account.

| GMailer can fetch mails, save attachments, get cotact lists, invite
| someone or send message with file attachments. It provides edit methods
| for labels, preference settings, starring and archiving message.

MouseHole 1.1 -- rose-colored spectacles for the Web
----------------------------------------------------

why the lucky stiff announced version 1.1 of MouseHole, a "scriptable web
proxy" that is an alternative to Firefox's Greasemonkey extension.

| You start up MouseHole, you set it as your web proxy in your browser's
| configuration, you surf the web, installing scripts you find on the web
| and letting those scripts effect your view of the web.
|
| User scripts can mount themselves as applications as well. For example,
| there's an Instiki-clone for MouseHole, which mounts itself at /wiki.

Phil Tomson spaketh: "Wow, it's already slicing and dicing and making
julienne fries! Very fast progress indeed. It'll be singing "Daisy" by
next week. Keep plugging in those plexiglass blocks."

_why added:

| Here's a few other folks I'd like to thank:
|
| MouseHole 1.0, derived from Hoodlum by MenTaLguY.
| Many thanks to Tanaka Akira for HTree.
| And also Sean Russell for REXML.
| And don't forget Rafael R. Sevilla for Ruby-JSON.
| And also Erik Veenstra for RubyScript2EXE.

Ruby-GetText-Package-1.0.0
--------------------------

Masao Mutoh released version 1.0.0 of Ruby-GetText, a Native Language
Support Library. (Congratulations!)

Ruby on Rails is now supported, a gem is available, new translations added
and more.

Ruby/Event and Myriad 0.4
-------------------------

Zed A. Shaw shot off a beta release of Ruby/Event and Myriad. (Quickly
followed by a 0.4.1 version to fix a bug.)

Ruby/Event wraps the libevent "asynchronous event notification library",
and Myriad is a framework built on top of this that makes it easy to write
performant client-server applications.

Of particular note in this release is support for running Ruby on Rails
(or other web frameworks) under Myriad.

Nitro + Og 0.23.0 Scaffolding reloaded, Taggable, Nano/Mega integration...
--------------------------------------------------------------------------

George Moschovitis released new versions of the Nitro web application
framework and Og object-relational mapper.

New features include better scaffolding, tagging, and an experimental
admin component.

From an implementation viewpoint, the software has been refactored to make
use of the Nano/Mega libraries.

Speaking of Nitro, George also released new versions of Spark and Flare,
two applications written to demonstrate how to write a good Nitro
application.

Spark is a wiki system and Flare is a blog engine.

ruby-co.de: now with more flexible redirection
----------------------------------------------

Jan `jast' Krueger up-featurefied ruby-co.de, a free web redirection
service with a cool name.

| [I]n a YubNub-ish fashion, RC subdomains now support source-based
| dynamic redirection, which is tech babble for "it's now possible to do
| this":
|
| <http://foo.ruby-co.de/(bar)> redirects to
| <http://foo.example.org/x(bar)x>.

The above would be implemented by having a target URL of
http://foo.example.org/x%sx. The %s gets replaced with the non-domain part
of the user's request.

Typically you might use a target URL of http://mydomain.example.org/%s.

Nano Methods & Mega Modules
---------------------------

Trans announced Nano Methods 0.8.1 (Ruby's Atomic Extensions Library) and
Mega Modules 0.3.1 (Ruby's Massive Class and Module Additions Library).

James Britt: "Neat. Ruby on RAEL".

| Nano Methods is a cornicopia of extension methods for the Ruby
| programming language. Nano's extensions are unique by virtue of thier
| atomicity. Methods are stored in their own files, allowing for highly
| granular control of requirements.
|
| Mega Modules is a large and growing collection of quality classes amd
| modules suitable to a wide variety of applications.

Lots of goodness.

Priority Queue 0.0.0 Homepage
-----------------------------

Brian Schro:der uploaded his Priority Queue implementation (binomial
queue). It has:

| O(1) insertion
| Amortized O(1) decrease key
| Amortized O(log n) delete min

Ruport 0.1.0
------------

Gregory Brown released the first version of Ruport.

| Ruport is a powerful report generation engine that allows users to
| generate custom ERb templates and easily query various forms of SQL
| databases via DBI. It provides helper methods and utilities to generate
| professional reports quickly and cleanly.

...

| What's new in this release?
| ---------------------------
|
| EVERYTHING! It's the first release

traits-0.6.0
------------

Ara.T.Howard fixed a bug in traits.rb, a "set of attr_* like methods on
steroids, caffeine, and botox".
 
Reply With Quote
 
 
 
 
Brian Schröder
Guest
Posts: n/a
 
      09-07-2005
> [snip news]
>=20
> Priority Queue 0.0.0 Homepage
> -----------------------------
>=20
> Brian Schro:der uploaded his Priority Queue implementation (binomial
> queue). It has:
>=20
> | O(1) insertion
> | Amortized O(1) decrease key
> | Amortized O(log n) delete min
>=20
> [snip more news]


It may be my own fault, as I probably wrote something wrong in my
original announcement due to sleep deprivation, but it is a fibonaccy
heap not a binomial queue. Binomial queues have O(log n) decrease key
and O(log n) insertion costs.

thanks,

Brian


--=20
http://ruby.brian-schroeder.de/

Stringed instrument chords: http://chordlist.brian-schroeder.de/


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ruby Weekly News 4th - 10th September 2006 Tim Sutherland Ruby 0 09-13-2006 08:34 AM
Ruby Weekly News 23rd - 29th January 2006 Tim Sutherland Ruby 1 02-01-2006 12:56 PM
PyPy sprint announcement: Heidelberg 22nd - 29th August 2005 Carl Friedrich Bolz Python 0 07-30-2005 11:16 AM
Ruby Weekly News 23rd - 29th May 2005 Tim Sutherland Ruby 2 05-31-2005 02:58 PM
Ruby Weekly News 29th Nov - 5th Dec 2004 Tim Sutherland Ruby 11 12-08-2004 10:20 AM



Advertisments