[#98950] Strange behaviour of Strings in Range — Michael Neumann <mneumann@...>
Hi,
Hi,
[#98965] Don't understand hashing... — Michael Neumann <mneumann@...>
Hi,
[#98975] Why no Proc##[]=() ? Why no Proc##replace() ? — Jean-Hugues ROBERT <jean_hugues_robert@...>
Hi,
I'm not sure what your proposal means.
About class Proc; def []=(*args); self[*args] end end and the value of
I understand the concept of an lvalue in assignment. I just don't think it
About hypothetical class Proc; def []=(*args) self[*args] end end
On Monday 03 May 2004 7:54 am, Jean-Hugues ROBERT wrote:
Warning: I believe this thread of msgs is rather academic. Because I
On Sun, May 02, 2004 at 05:18:09PM +0900, Jean-Hugues ROBERT wrote:
At 22:10 02/05/2004 +0900, you wrote:
[#98980] Ruby Newbie (ooh, that rhymes!) - When do I use do/end, when {}? — glenn_m_smith@... (Glenn)
Hello all
Mark Hubbart wrote:
Jim Weirich wrote:
On Sunday, May 2, 2004, 9:53:40 AM, James wrote:
Gavin Sinclair wrote:
Hi --
Hi David, Robert & all...
[#99023] ruby 1.8 differences? — glenn_m_smith@... (Glenn)
Can anybody point me at a list of what's changed in Ruby
[#99045] ANNOUNCE: vflow 0.1 beta — jm <jm@...>
Module: vflow
[#99053] print <<XXX parses some text in scope ending with XXX -- Why? — "Richard Lionheart" <NoOne@...>
As I read Thomas&Hunt p. 205, Ruby should build a quoted string with the
[#99062] Re: rubygem BUG — "Mehr, Assaph (Assaph)" <assaph@...>
[#99102] model for my problem (network simulator) — Gergely Kontra <kgergely@...>
Hello!
[#99105] What do you use Ruby for? — glenn_m_smith@... (Glenn)
OK, the more I read about Ruby (currently on page 29 of the FAQ,
Glenn wrote:
[#99113] $SAFE = 3.5? — Guillaume Marcais <guslist@...>
Is there anyway to have the same restriction that $SAFE=4 would give
il Tue, 4 May 2004 04:14:06 +0900, Guillaume Marcais <guslist@free.fr>
Mark Hubbart wrote:
Hi,
>>>>> "H" == Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> writes:
Hi,
>>>>> "H" == Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> writes:
[#99119] YAML vs. Marshal — dejaspam@... (Bill Atkins)
Is there any reason to use Marshal instead of YAML? Is there anything
Bill Atkins wrote:
Joel VanderWerf wrote:
why the lucky stiff wrote:
Hal Fulton wrote:
On Wednesday, May 5, 2004, 3:35:08 AM, why wrote:
Gavin Sinclair wrote:
On Wed, 5 May 2004, Joel VanderWerf wrote:
[#99134] rubygems implementation question — Charles Comstock <cc1@...>
I was curious why the code in installer.rb in ruby gems was setup like this?
[#99136] IO::write — Charles Comstock <cc1@...>
Why is there only an IO::read, and no equivalent IO::write that takes a
Hi,
[#99173] Can a program be made to drop into irb? — Gavin Sinclair <gsinclair@...>
I'd like to be able to write a program that, halfway through
On Tue, 4 May 2004, Gavin Sinclair wrote:
[#99181] Re: Strange behaviour of Strings in Range — "Martin Elzen" <martinelzen@...>
Hi everyone.
[#99183] One class per file — "rolo" <rohitlodha@...>
Hi
[#99189] Using TkTree - Desperately need help — dejaspam@... (Bill Atkins)
Can anyone give me a step-by-step method of using TkTree on Win32? I
[#99196] madeleine gem problem (or rubygem one) — gabriele renzi <surrender_it@...1.vip.ukl.yahoo.com>
Hi gurus and nubys,
[#99204] What so special about PostgreSQL and other RDBMS? — "Sarah Tanembaum" <sarah.tanembaum@...>
Beside its an opensource and supported by community, what's the fundamental
"Daniel Morgan" <damorgan@x.washington.edu> wrote
[#99205] Gnome2 panel applets? — Jamis Buck <jgb3@...>
Is it possible to create panel applets for Gnome2 using the ruby-gnome2
[#99244] Re: RubyGem behind an authenticating proxy — "Mehr, Assaph (Assaph)" <assaph@...>
> I can't offer any real help; I can only say that RubyGems' proxy
[#99270] Is Ruby Top 1 of Programming Languages that are Loved? — "Park Heesob" <phasis68@...>
Hi all,
In article <c7b98v$4b7$1@orkan.itea.ntnu.no>,
Mark Hubbart <discord@mac.com> wrote:
In article <83173408.0405051506.5db85fe6@posting.google.com>,
* Phil Tomson <ptkwt@aracnet.com> [0554 02:54]:
On Thu, 6 May 2004, Dick Davies wrote:
il Fri, 7 May 2004 00:05:03 +0900, "Curt Hibbs" <curt@hibbs.com> ha
Ummm, folks, this is getting a bit tedious. You're "preaching to the
Matt Lawrence wrote:
On Fri, 7 May 2004, Curt Hibbs wrote:
[#99288] signaling another thread — "Ara.T.Howard" <Ara.T.Howard@...>
[#99294] 0.0 sign — Elias Athanasopoulos <elathan@...>
Hello!
[#99324] REXML bug? — Makoto Kuwata <kwa@...>
[#99326] RAA error - can't dup NilClass — Simon Strandgaard <neoneye@...>
When I try to enter my project page
Hi,
Hi, again,
"NAKAMURA, Hiroshi" <nahi@keynauts.com> wrote:
Hi,
Hi!
I'm not familiar with rubygems, but raa is the ruby equiv of cpan
[#99334] vim and make — Doug Kearns <djkea2@...>
We're having a bit of a discussion over on vim-ruby-devel about the
[#99352] iterator-0.7 — Simon Strandgaard <neoneye@...>
homepage:
[#99354] readlines — Martin Uruz <udlduz@...>
hi
[#99399] DRb Connection Closed Error?!?!?!? — "Ken Hilton" <kenosis@...>
Greetings,
[#99403] mod_ruby: Consequences of shared interpreter — Hal Fulton <hal9000@...>
After more than two years, I'm looking at mod_ruby again.
[#99438] What is Borges? — dejaspam@... (Bill Atkins)
Can someone please explain to me what Borges does? Its home page
* Bill Atkins <dejaspam@batkins.com> [0534 01:34]:
On Fri, 7 May 2004 19:58:29 +0900, Dick Davies wrote
* Kirk Haines <khaines@enigo.com> [0526 15:26]:
On Sat, 8 May 2004 05:56:09 +0900, Dick Davies wrote
Kirk Haines (khaines@enigo.com) wrote:
Dick Davies wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Kaspar Schiess wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Julian Fitzell <julian@beta4.com> wrote in message news:<409C0C0E.6040002@beta4.com>...>
[#99456] ruby replacement for net::patricia needed — jm <jm@...>
I'm looking for the ruby equivalent of the perl Net::Patricia module
[#99477] Encoding with TCPSocket — Michael Mueller <mueller@...>
Hello!
[#99498] test unit & singleton — Guillaume Marcais <guslist@...>
How do you get a fresh copy of a singleton between 2 unit test? It
That's why you want to avoid singletons as much as possible when it
[#99515] DBI, OCI8 and the 'tables' method — djberg96@... (Daniel Berger)
Hi all,
[#99527] Ruby Installer for Windows: use of Win32OLE bug causes crash — Jos Backus <jos@...>
This is with the latest Ruby Installer for Windows, 181-13-rc2.
[#99583] Ruby Installer for Windows 1.8.1-13 final — "Curt Hibbs" <curt@...>
The Ruby Installer 1.8.1-13 (final) for Windows has been released and
I'm pleased to announce the kickoff of RubyForge project called "Why Ruby?"
> I'm pleased to announce the kickoff of RubyForge project called "Why
Curt Hibbs wrote:
I have uploaded a release candidate for Ruby Installer that was built using
The original release candidate that I posted earlier today did not include
RC3 adds back the missing support for OpenGL. There were no other changes,
> RC3 adds back the missing support for OpenGL. There were no other changes,
Hello Curt,
Hi,
Hi,
nobu.nokada@softhome.net wrote:
Hi,
il Tue, 13 Jul 2004 21:46:30 +0900, "Curt Hibbs" <curt@hibbs.com> ha
Hello Curt,
Lothar Scholz wrote:
On Thu, 1 Jul 2004 04:45:43 +0900, Curt Hibbs <curt@hibbs.com> wrote:
Lyle Johnson wrote:
[#99597] How to get the last 5 elements of an array? — Gavin Sinclair <gsinclair@...>
Hi,
Hi --
[#99636] Can't build with Panther — Jim Freeze <jim@...>
Hi
[#99644] My favorite RCRs... — Hal Fulton <hal9000@...>
This is just to stir things up a little. Go to rcrchive.net and vote
[#99647] Code for a transparent proxy? — Michael Vondung <mvondung@...>
I'm dabbling in something that I have little to no understanding of
[#99660] interface 0.1.0 — djberg96@... (Daniel Berger)
Hi all,
[#99680] rubygarden homepage hacks — Simon Strandgaard <neoneye@...>
On daily basis the homepage at rubygarden is being edited.
On Mon, 10 May 2004 07:24:03 +0900, Simon Strandgaard
Simon Strandgaard <neoneye@adslhome.dk> wrote:
On Mon, 10 May 2004 17:55:44 +0900, Jean-Hugues ROBERT wrote:
On Mon, 10 May 2004, Kristof Bastiaensen wrote:
On Tue, May 11, 2004 at 01:13:16AM +0900, Hugh Sasse Staff Elec Eng wrote:
[#99681] Roundup of new RubyGems features — Gavin Sinclair <gsinclair@...>
Hi folks,
Gavin Sinclair wrote:
[#99686] running gem — Paul Vudmaska <paul@...>
I'm testing a new host. All is not so great. It is bsd. I'm kind of new
[#99734] in search of a compelling reason to use ruby.... — Ryan Paul <segphault@...>
i'm a python programmer, and I have recently been hearing a lot about
In article <pan.2004.05.10.10.37.41.800624@sbcglobal.net>,
[#99738] redcloth and dynamic content — Dick Davies <rasputnik@...>
[#99764] safe eval? — "Ara.T.Howard" <Ara.T.Howard@...>
Ara.T.Howard wrote:
>>>>> "F" == Florian Gross <flgr@ccan.de> writes:
ts wrote:
>>>>> "F" == Florian Gross <flgr@ccan.de> writes:
ts wrote:
>>>>> "F" == Florian Gross <flgr@ccan.de> writes:
[#99775] RCR: Unique Object for Each source file — dejaspam@... (Bill Atkins)
Each Ruby .rb file is currently executed within the class Object. So
[#99816] Web, Cookies and Sessions — "Dmitry V. Sabanin" <sdmitry@...>
Hi,
"Kirk Haines" <khaines@enigo.com> writes:
On Wednesday 12 May 2004 03:03, Eric Schwartz wrote:
On Wed, May 12, 2004 at 10:52:12AM +0900, Dmitry V. Sabanin wrote:
[#99850] Break points IN ruby code? — "Ken Hilton" <kenosis@...>
I've been having trouble setting break points in certain ruby constructs
[#99851] SciTE and Scintilla — Kaspar Schiess <eule@...>
-----BEGIN PGP SIGNED MESSAGE-----
[#99854] Proposal: Object#send(nil) -> self — Gavin Sinclair <gsinclair@...>
A quick one. I see some sense in Object#send accepting 'nil' as the
[#99879] Strange regexp behaviour in gsub — Kristof Bastiaensen <kristof@...>
Hi,
On Wed, 12 May 2004 08:15:28 +0900, Joel VanderWerf wrote:
[#99889] Ruby on AIX 4.3.3 — Matt Lawrence <matt@...>
I just built Ruby 1.8.1 on an AIX 4.3.3 box using gcc. When I try to run
On Wed, 12 May 2004, Mark Hubbart wrote:
Hi Matt,
On Wed, 12 May 2004, Zane Dodson wrote:
[#99892] popen3 on windows — Joel VanderWerf <vjoel@...>
[#99898] wikiwiki and authentication — jm <jm@...>
Looking a ruwiki (and others) it seems there is a great range of wikis
[#99910] Pure Ruby FastCGI performance bug? — Zev Blut <rubyzbibd@...>
Hello,
[#99945] Recommendations (Ruby making my head swim) — Mike Rhodes <rhodes553@...>
I recently bought "Programming Ruby" and set out to learn the language
On Wed, 12 May 2004 10:10:19 -0400, Mike Rhodes wrote:
[#99960] PStore vs. YAML::Store — "Ara.T.Howard" <Ara.T.Howard@...>
Ara.T.Howard wrote:
[#99966] Major Addition Bug? — "Sean O'Dell" <sean@...>
Doing this:
I guess, you guys are missing the point,
Mohammad Khan wrote:
>>>>> "S" == Sean O'Dell <sean@celsoft.com> writes:
On Wednesday 12 May 2004 09:53, ts wrote:
Sean O'Dell wrote:
Hal Fulton wrote:
[#100032] are there any ruby IDEs? — Ryan Paul <segphault@...>
I use vim most of the time, but i'm curious if there are any
Stephan K舂per <Stephan.Kaemper@Schleswig-Holstein.de> writes:
il Wed, 12 May 2004 21:06:22 GMT, Ryan Paul <segphault@sbcglobal.net>
il Thu, 13 May 2004 10:15:29 +0200, "E.-R. Bruecklmeier"
[#100051] 100000th ruby-talk post! — David Alan Black <dblack@...>
Hi --
[#100058] nasty regexp problem — sera@... (Francis Hwang)
Hi all,
[#100093] How to make combinations of an array to produce all possible expressions? — Erik Terpstra <erik@...>
I have an array 'conds', which contains some sub-expressions for an
[#100136] Ruby's Best -- Please Help — "Curt Hibbs" <curt@...>
On the "Why Ruby?" project wiki (http://whyruby.rubyforge.org/), I am trying
If you were an early visitor to:
[#100137] First Presentation Posted to Why Ruby! — "Curt Hibbs" <curt@...>
Assaph Mehr just posted the first presentation to Why Ruby
In article <EAENKKNOJPMNCDMLDOMLKEHHEFAA.curt@hibbs.com>,
> If I were a Ruby Newbie just coming into the language and community I
Phil Tomson wrote:
[#100147] Ruby productivity question — "Its Me" <itsme213@...>
After a moderate amount of quite enjoyable time working with Ruby, I find
[#100182] C++ Exception compatibility idea — Asfand Yar Qazi <im_not_giving_it_here@..._hate_spam.com>
Hi,
In article <40A3E539.2010204@hypermetrics.com>,
On Fri, 14 May 2004 08:23:51 +0900, Phil Tomson <ptkwt@aracnet.com> wrote:
I'm trying to install Ruby's readline module on OS X and am having the
On Friday, 14 May 2004 at 8:23:51 +0900, Phil Tomson wrote:
Jim Freeze wrote:
On Fri, 14 May 2004 08:23:51 +0900
[#100192] mahoro-0.1 — Shu-yu Guo <shu@...>
Mahoro is a (very) simple and straightforward interface to the libmagic
[#100193] subclasses of string as hash keys — Matthias Georgi <matti_g@...>
Hi,
[#100220] Exploratory testing with Ruby — Brian Marick <marick@...>
I wrote an article introducing testers to Ruby by way of showing how
[#100251] ruby and gnome-canvas — Ryan Paul <segphault@...>
I have been experimenting with the ruby gnome bindings, and I have found a
[#100273] Regexp Error? — "Robert Klemme" <bob.news@...>
What's wrong here?
[#100295] Re: Regexp Error? — Michael Campbell <michael_s_campbell@...>
ts wrote:
>>>>> "M" == Michael Campbell <michael_s_campbell@yahoo.com> writes:
ts <decoux@moulon.inra.fr> wrote:
>>>>> "S" == Simon Strandgaard <neoneye@adslhome.dk> writes:
On Fri, 14 May 2004 23:21:27 +0900
[#100325] Re: Please revisit Ruby's Best and vote for additions — "Curt Hibbs" <curt@...>
James Britt wrote:
On Sat, 15 May 2004 05:58:43 +0900, Sascha Ebach wrote:
Curt Hibbs wrote:
[#100333] getc windows != linux — Roeland Moors <roelandmoors@...>
I'm trying to communicate with a program (gnucap) using ruby.
[#100382] profiling ruby extensions — Elias Athanasopoulos <elathan@...>
Hello!
[#100395] Need Help Selecting a GUI — dejaspam@... (Bill Atkins)
As anyone can tell by looking at the topics of my recent posts, I'm
[#100411] GET-parameters an local vars — Dirk Einecke <dirk.einecke@...>
Hi.
[#100431] error in reg ex parser of 1.6.3 and 1.8.1? — "Christian Kaiser" <chk@...>
I would assume this to be an error:
[#100452] Singleton classes — "rolo" <rohitlodha@...>
Hi
[#100461] Ruby on Rails — Matt Lawrence <matt@...>
Very neat presentation, it kept me up way too late last night watching it.
> One thought that occurred to me while I was watching the video is that
Hi David,
On Saturday, 22 May 2004 at 23:15:38 +0900, David Heinemeier Hansson wrote:
[#100463] Spam attack on Ruby-Garden — Carsten Eckelmann <careck@...42.com>
Hi everybody,
[#100469] Is Ruby the Language for Me? — n.koren@... (Nathan Koren)
Greetings!
[#100497] Why do #dup and #clone behave differently with respect to instance methods — "Robert Klemme" <bob.news@...>
>> class Foo;end
[#100500] RCR: More enumerator functionality — Kristof Bastiaensen <kristof@...>
Hi,
[#100502] Method overloading — imodev@...
Hi all,
[#100510] Object#copy [rcr?] — "Ara.T.Howard" <Ara.T.Howard@...>
[#100511] How to duck type? - the psychology of static typing in Ruby — Tim Bates <tim@...>
Hi all,
Broken record time:
Robert Klemme wrote:
"Robert Klemme" <bob.news@gmx.net> wrote in message news:<2gs1pcF65u2uU1@uni-berlin.de>...
On Mon, 17 May 2004, Tim Bates wrote:
John Carter wrote:
On Tue, 18 May 2004, Tim Bates wrote:
John Carter wrote:
On Tue, 18 May 2004 21:56:52 +0900, Dave Thomas wrote:
On Thu, 20 May 2004 03:43:22 +0900, Dave Thomas wrote:
Marek Janukowicz wrote:
Hal Fulton wrote:
[#100526] How to a copy a file ? — "Florent 'flure' C." <flurePASDESPAM@...>
Hello
[#100573] Highlighting for unit testing output (console) — "Gavin Sinclair" <gsinclair@...>
I'll personally award three kudos points to anyone who implements a patch
[#100579] Re: CSV bug? — "Pe, Botp" <botp@...>
Nahi aka NAKAMURA, Hiroshi [mailto:nahi@keynauts.com] humbly replied:
[#100589] writable — paul@... (paul vudmaska)
Thanks to the help of a kind rubyist i'm able to write a script for
[#100613] FoX: removing widgets — Yuri Leikind <y.leikind@...>
Hello all,
Yuri Leikind wrote:
On Wed, 19 May 2004 08:43:49 +0900
Yuri Leikind wrote:
I won't ask which is better, since I've just read some of the colorful
[#100621] Problem using YAML — Carol Almquist <calmquist@...>
I am using ruby 1.8.1 and yaml to store data records. After a few minutes I
[#100629] Newbie installation problem: libraries? — Paul Emmons <pemmons@...>
I have recently installed ruby-1.8.1 on my Mandrake Linux system.
[#100640] Sprites in RUDL — glenn_m_smith@... (Glenn)
My attempt at writing PACMAN was going smoothly but now I've stalled.
[#100649] Windows desktop app w/ simple db; how? — "Kirk Haines" <khaines@...>
Imagine that you had a very simple web based application. It queries some
>
[#100653] Zero is true ... whoda thunk? — "Richard Lionheart" <NoOne@...>
Hi,
Richard Lionheart wrote:
On Wed, 19 May 2004 06:34:54 +0900, Mark Sparshatt wrote:
Jamis Buck <jgb3@email.byu.edu> writes:
Claus Spitzer wrote:
[#100676] RMagick jp2 problem — "Ara.T.Howard" <Ara.T.Howard@...>
[#100677] RCR: UNIX credentials — Guillaume Marcais <guslist@...>
To get a feel before submitting a real RCR:
Hi,
[#100678] Re: CSV bug? — "Pe, Botp" <botp@...>
Gavin Sinclair [mailto:gsinclair@soyabean.com.au] happily wrote:
[#100690] Re: Zero is true ... whoda thunk? — David Naseby <david.naseby@...>
>-----Original Message-----
[#100691] Re: Zero is true ... whoda thunk? — David Naseby <david.naseby@...>
>-----Original Message-----
David Naseby (david.naseby@eonesolutions.com.au) wrote:
nonzero? returned nil instead of false for me. Shouldn't it return false?
[#100699] IronPython: A fast Python implementation for .NET and Mono — ptkwt@... (Phil Tomson)
Hey
[#100721] irb or xterm crash with UTF-8 — Simon Strandgaard <neoneye@...>
server> irb
[#100735] UDP Asynchrone connection problems — <greg.burri@...2000.ch>
Hi all !
[#100793] Fortran Format? — qubert@... (Qubert)
OK, I have an algorithm that I created to format a series of numbers
[#100808] bad maths — Martin larsson <morg@...>
Hi
[#100817] Re: How to duck type? - the psychology of static typing in Ruby — David Naseby <david.naseby@...>
>-----Original Message-----
[#100837] Re: ODBC connection string for MS-Access — Shashank Date <shanko_date@...>
That worked ... thanks a million Joao !!!
[#100839] Where to download FXRuby library; where to put it; RUBYLIB, RUBYPATH env. vars — "Richard Lionheart" <NoOne@...>
Hi,
[#100857] Multicasting with Ruby? — Daemon Le <dle@...>
Hi,
[#100862] Ruby's builtin Datastructures — Brian Schroeder <spam0504@...>
Hello all,
Thanks for your answer. I should have looked in the raa by myself. Just a
Brian Schroeder wrote:
On Thu, May 20, 2004 at 09:45:12PM +0900, Simon Strandgaard wrote:
[#100863] Ruby/DBI 0.0.23 — Michael Neumann <mneumann@...>
Hi,
[#100867] seraching backward in files — Patrick Gundlach <clr1.10.randomuser@...>
Dear ruby hackers,
[#100886] Files ugly clone — Simon Strandgaard <neoneye@...>
I want to clone a filedescriptor, but no matter
[#100892] Re: Zero is true ... whoda thunk? — "Mills Thomas (app1tam)" <app1tam@...>
-> -----Original Message-----
[#100893] Include into class after instance is created — Brian Schroeder <spam0504@...>
Hello,
[#100910] make File#dup intuitive — Simon Strandgaard <neoneye@...>
position is not copied.. try this example for yourself
Hi,
nobu.nokada@softhome.net wrote:
Hi,
[#100922] vuby - VM for Ruby — "rolo" <rohitlodha@...>
Hi all,
[#100924] Re: vuby - VM for Ruby — "Gavri Savio Fernandez" <Gavri_F@...>
> From: rolo [mailto:rohitlodha@hotwireindia.com]
[#100926] Overriding "", [], and {} — dejaspam@... (Bill Atkins)
Is there any way to cause "", [], and {} to have different behaviors.
[#100962] Re: CSV bug? — "Pe, Botp" <botp@...>
Nahi aka NAKAMURA, Hiroshi [mailto:nahi@keynauts.com] wrote:
Hi,
I have begun work on a version of the One-Click Ruby Installer for Mac
[#101001] ISAAC Random Number Generator — "Kirk Haines" <khaines@...>
Iowa includes a class, Iowa::ISAAC, which is a pure ruby implementation of
[#101017] Is it possible to call functions from different scripts in a Ruby script ? — Axel Etzold <aetzold@...>
Dear experienced Rubyists,
[#101019] begging for a hint in app design — Benny <linux@...>
dear list,
[#101038] more mysql drivel — Paul Vudmaska <paul@...>
so if you are not interested delete please.
[#101070] Instiki markup — "Dave Burt" <burtdav@...>
I'm not bagging Instiki. It's cool. RedCloth, BlueCloth or RDoc are all very
[#101071] Concerning version numbers... — Hal Fulton <hal9000@...>
A few people in recent weeks have been bemoaning the fact that software
Trailing decimal places would serve the same purpose.
Nicholas Van Weerdenburg wrote:
On Sunday, May 23, 2004, 1:37:26 PM, Hal wrote:
What about those who use both?
This is an interesting discussion, as it's something that I have vacillated
[#101086] Segfault with win32ole, WMI and structs — djberg96@... (Daniel Berger)
Hi all,
[#101094] separate a HTML-tag in a hash — Dirk Einecke <dirk.einecke@...>
Hi.
Dirk Einecke said:
Hi.
[#101096] Mailinglist — Michael Neumann <mneumann@...>
Hi,
[#101104] Emacs Ruby-Mode — Charles Comstock <cc1@...>
Was something changed recently in emacs ruby mode in the way it parses lines
[#101110] Ruby for educational purposes and localization — Laurent Julliard <laurent__no__@__spam__moldus.org>
All,
il Sun, 23 May 2004 13:53:59 +0200, Laurent Julliard
gabriele renzi wrote:
On Mon, May 24, 2004 at 01:41:35AM +0900, Hal Fulton wrote:
[#101144] compiling mmap? — Mark Hubbart <discord@...>
Hi,
>>>>> "M" == Mark Hubbart <discord@mac.com> writes:
>>>>> "M" == Mark Hubbart <discord@mac.com> writes:
>>>>> "M" == Mark Hubbart <discord@mac.com> writes:
[#101146] mysql-ruby or ruby-mysql? — Randy Lawrence <jm@...>
We're currently using:
[#101151] Deutschsprachige Mailingliste — Michael Neumann <mneumann@...>
Hallo,
[#101160] an idea regarding map — Ryan Paul <segphault@...>
just some syntactic nitpicking:
[#101165] make faster Richards benchmark — dlissett0@... (Duncan Lissett)
I'd appreciate any suggestions on how to make a faster Ruby
[#101170] Which free windows debugger? — glenn_m_smith@... (Glenn)
Am I right in thinking FreeRIDE doesn't support 1.8.1 for debugging,
[#101174] mysql-ruby please help!!!!!! — Martin Uruz <udlduz@...>
hi
[#101176] Latest Ruby Stable Snapshot — Charles Comstock <cc1@...>
On the latest stable snapshot I got this error running the test suite. I
[#101198] YAML Segmentation fault while parsing 2M EUC file. — "Zev Blut" <rubyzbibd@...>
Hello,
>>>>> "Z" == Zev Blut <rubyzbibd@ubit.com> writes:
On Mon, 24 May 2004 23:56:35 +0900, ts <decoux@moulon.inra.fr> wrote:
[#101214] Why have a Symbol class? — "rolo" <rohitlodha@...>
Hi
On Tue, May 25, 2004 at 01:01:25AM +0900, rolo wrote:
I am having a small dillema. In a program I and a friend are writing I am
[#101226] Concerning package names — djberg96@... (Daniel Berger)
All,
Daniel Berger wrote:
I think perhaps the point being for in the Ruby-centric repositories
Interesting topic.
[#101228] Ruby on Rails questions — Carl Youngblood <carl@...>
I'm really interested in seeing Ruby on Rails. As far as I can tell it
[#101230] FXRuby widget suggesttion anybody? — Phil Roberts <philrob@...>
I'm looking to create a simple info grid such as the one shown in the
[#101249] How to pp-enable a class? — Hal Fulton <hal9000@...>
Are there good docs or even a tutorial on how to enable a class
[#101250] Webrick & HOWTO type docs? — "Kirk Haines" <khaines@...>
I think I know the answer to this already, but....
Kirk Haines (khaines@enigo.com) wrote:
[#101253] RCR? change Proc#inspect to show start..end lines — Joel VanderWerf <vjoel@...>
[#101274] pp and (my) sstruct — Hal Fulton <hal9000@...>
OK, I've narrowed the problem down a little further.
Hi --
David Alan Black wrote:
In article <40B29029.4080108@hypermetrics.com>,
Tanaka Akira wrote:
[#101282] mod_ruby/eruby for mswin32 for Ruby 1.8.1/Apache2.0.49 — Phil Wilson <canuckdba@...>
Does anybody have a solution for mod_ruby/eruby binaries for
[#101291] Ruby ftp class help — "Greg Brondo" <greg@...>
Ok. I seem to be the one to use the "not-so-well-written" classes in the
[#101292] Numeric#of — "Ara.T.Howard" <ahoward@...>
Hi --
On May 25, 2004, at 5:08 AM, David Alan Black wrote:
Hi,
On Tue, 25 May 2004, Yukihiro Matsumoto wrote:
Hi,
Yukihiro Matsumoto wrote:
Hal Fulton wrote:
il Wed, 26 May 2004 06:28:32 +0900, Harry Ohlsen <harryo@zip.com.au>
[#101329] separating ruby-talk from comp.lang.ruby? — David Alan Black <dblack@...>
Hi --
David Alan Black <dblack@wobblini.net> wrote:
In article <m3brkcda7g.fsf@wobblini.net>,
Hi --
Wrote "David A. Black" <dblack@wobblini.net>, on Wed, May 26, 2004 at 03:15:03AM +0900:
Hi --
On Wednesday 26 May 2004 09:55, David A. Black wrote:
Sean O'Dell wrote:
On Wednesday 26 May 2004 11:42, Hal Fulton wrote:
Sean O'Dell wrote:
[#101360] ruby-dev summary 23459-23562 — Minero Aoki <aamine@...>
Hi all,
* Multiple assignment takes care of only Values objects.
Minero Aoki wrote:
>>>>> "F" == Florian Gross <flgr@ccan.de> writes:
On Wed, May 26, 2004 at 05:52:02PM +0900, ts wrote:
>>>>> "P" == Paul Brannan <pbrannan@atdesk.com> writes:
On Wed, May 26, 2004 at 10:54:32PM +0900, ts wrote:
>>>>> "P" == Paul Brannan <pbrannan@atdesk.com> writes:
On Wed, May 26, 2004 at 11:07:27PM +0900, ts wrote:
[#101369] defining condititions — Florian Weber <csshsh@...>
hi!
On Wed, 26 May 2004, Florian Weber wrote:
[#101382] Enumerable#group_by — Michael Neumann <mneumann@...>
Hi,
[#101387] rb_frame_last_func() — Elias Athanasopoulos <elathan@...>
Hello!
[#101424] 3 yaml questions... — Martin Pirker <crf@...>
Hi.... I need help :-/
[#101437] net::imap non RFC compliance? — Dany Cayouette <danyc@...>
Greetings,
[#101457] Checking that an URL exists — "Imobach Gonz疝ez Sosa" <imodev@...>
Hi all,
[#101513] ot -bday (was RE: [RCR] Numeric#of) — "Pe, Botp" <botp@...>
Simon Strandgaard [mailto:neoneye@adslhome.dk] wrote:
"Pe, Botp" <botp@delmonte-phil.com> wrote:
[#101522] WEBrick and FastCGI response — Jim Freeze <jim@...>
Reply-To:
Hi Jim,
[#101527] Limiting Memory consumed by Ruby — Michael Neumann <mneumann@...>
Hi,
[#101530] RubySharp and MorphR — Robert Feldt <feldt@...>
Hi,
[#101545] Mutex re-entrancy — "Martin Hart" <martin@...>
Hi all,
[#101558] Web APIs — Aredridel <aredridel@...>
I've been working with web programming for a while now, and I've yet to
[#101560] Re: separating ruby-talk from comp.lang.ruby? — "Mills Thomas (app1tam)" <app1tam@...>
Here, here, hear, hear. No NNTP here.
Hi --
Hi --
Hi --
Sorry everyone, testing again.... small meaningless tweak to
>>>>> "D" == David A Black <dblack@wobblini.net> writes:
Hi --
David A. Black wrote:
Hi --
[#101572] true.respond_to?("clone") — "Sean O'Dell" <sean@...>
TrueClass responds to "clone" but when you call it, the method just throws an
[#101582] Re: true.respond_to?("clone") — "Sean O'Dell" <sean@...>
On Thursday 27 May 2004 15:05, David A. Black wrote:
[#101591] Calling global method — "Sean O'Dell" <sean@...>
How do you call a global method from a module method where there is another
[#101635] Visitor Pattern in Ruby — Charles Comstock <cc1@...>
I recently wrote a small compiler in java in which we used the visitor
[#101650] TkMenubar + Keyboard Shortcut — mhm26@... (matt)
Is there any easy way to do keyboard short cuts with tkmenubar /
[#101674] Andreas' practical language comparison — "Georgy" <no.mail@...>
Hi all!
I'll volunteer for some of the GUI stuff....Any specific timeframe we are
Zach Dennis wrote:
I've never used wxRuby. I'll print off some of it's documentation before I
[#101690] http://www.ruby-lang.org down? — "Ara.T.Howard" <Ara.T.Howard@...>
[#101701] enviroment variable for extensions — Elias Athanasopoulos <elathan@...>
Hello!
[#101713] segfault with rb_eval_string() — Elias Athanasopoulos <elathan@...>
Hello!
Hi,
[#101715] Re: Calling global method — "Austin Ziegler" <Austin.Ziegler@...>
>>S> There really should be a module called global, or
On Friday 28 May 2004 11:56, Austin Ziegler wrote:
[#101740] Metaobjects in Ruby — Claus Spitzer <DocBoobenstein@...>
I'm working on a paper for a class on Meta Programming Languages,
[#101745] Test::Unit: assert_follows_spec() (or something like that) — David Garamond <lists@...6.isreserved.com>
For deterministic functions/methods, the same set of inputs should
David Garamond wrote:
David Garamond (lists@zara.6.isreserved.com) wrote:
Jean-Hugues ROBERT wrote:
[#101747] helium.ruby-lang.org was cracked — Shugo Maeda <shugo@...>
-----BEGIN PGP SIGNED MESSAGE-----
[#101749] eruby vs php/jsp... — "Shannon Fang" <xrfang@...>
Hi All,
[#101767] Re: eruby vs php/jsp... — "Shannon Fang" <xrfang@...>
Thanks. I will check the template system while RAA returns operation. My
[#101784] comp.lang.ruby FAQ (DE): Rich Text Format (RTF) — "Josef 'Jupp' Schugt" <jupp@...>
Hi!
[#101787] Using TclTkAqua on Mac OS X? — Paul Sanchez <paul@...>
I know of and admire RubyCocoa, but I'm interested in being able to use
[#101813] Re: eruby vs php/jsp... — "Shannon Fang" <xrfang@...>
Thanks for all the comments and suggestions. A bit more information about
[#101821] yaml - ruby 1.8.1 (2003-12-25) [i686-linux] — Paul Vudmaska <paul@...>
Hello,
[#101823] gsub!, replace with \' — Patrick Gundlach <clr1.10.randomuser@...>
Dear Ruby-hackers,
[#101830] Behavior of application changes when adding non-relevant puts — felix.nawothnig@... (Felix Nawothnig)
Hi.
Felix Nawothnig wrote:
[#101852] String#split returns extra empty string — Simon Strandgaard <neoneye@...>
While extending my own regexp-engine with a split method,
[#101853] mysql-ruby — Paul Vudmaska <paul@...>
%$@#%$ i know i've abused this list with more questions than answers but
* Paul Vudmaska <paul@vudmaska.com> [0501 09:01]:
[#101855] elegant way to say "try this thing, one at a time, until condition is met" — David Garamond <lists@...6.isreserved.com>
Example: I need to unmount /usr and /usr2, but currently I can't because
Hi,
nobu.nokada@softhome.net wrote:
[#101885] variable -- set value — orbit@... (orbit)
Whot can I set value for variable which name cosist ather variable?
orbit@klientsky.ru (orbit) wrote in message news:<734420e9.0405310551.2526ea0@posting.google.com>...
[#101899] RMagick available on Windows — Tim Hunter <cyclists@...>
Thanks to Kaspar Schiess, RMagick for Windows is now available at
Question: I'm not too familiar with the way RubyGems works, but I was
On Tuesday, June 1, 2004, 4:19:40 AM, Carl wrote:
[#101923] Distributed wiki idea (was blank--resending) — Carl Youngblood <carl@...>
For a while now I've been really excited about using wikis to store my
> Though I haven't used it, I'm told that this is the idea behind GNU
How to duck type? - the psychology of static typing in Ruby
Hi all,
Following a discussion in #ruby-lang, I have a suggestion about how to
approach Duck Typing. Below is my dissertation on the subject. :P My
intention is to incorporate any comments people might have into the text
and then place it on the Wiki as an introduction to Duck Typing for the
static typist.
For those not in on the secret, the idea is that if an object walks like
a duck and quacks like a duck, it may as well be a duck - this being a
metaphor for an arbitrary object that may not be exactly the same class
your code was expecting, but still behaves the same way - see [1] if you
don't follow.
---
Many people coming to Ruby from a statically-typed language are somewhat
afraid of Ruby's dynamism, or "don't get it(TM)". David Black and I
believe that this is in part because it is thought that the uncertainty
and changeability built into Ruby are dangerous and one wants to find
shelter from them.
Please bear with me while I describe some of the possible approaches.
1) People with a Static Typing background often have the urge to do
something like this:
attr_reader :date
def date=(val)
raise ArgumentError.new("Not a Date") if val.class != Date
end
This is not duck typing - this is trying to get Ruby to do Static Typing.
2) Okay, you say, if that's not duck typing, let's do duck typing by
accepting a whole bunch of different input formats and trying to turn
them into something we know how to deal with, like this:
def date=(val)
class="keyword">case val
when Date
@date = val
when Time
@date = Date.new(val.year, val.month, val.day)
when String
if val =~ /(\d{4})\s*[-\/\\]\s*(\d{1,2})\s*[-\/\\]\s*(\d{1,2})/
@date = Date.new($1.to_i,$2.to_i,$3.to_i)
else
raise ArgumentError, "Unable to parse #{val} as date"
end
when Array
if val.length == 3
@date = Date.new(val[0], val[1], val[2])
end
else
raise ArgumentError, "Unable to parse #{val} as date"
end
end
This "normalization" approach has the advantage that the date attribute
getter will always return a Date (producing certainty), but the setter
can take input in a variety of formats.
2.a) Discussing this on #ruby-lang, David Black suggested the following
optimization:
def date=(val)
begin
@date = Date.new(val.year, val.month, val.day)
rescue
begin
val =~ /(\d{4})\s*[-\/\\]\s*(\d{1,2})\s*[-\/\\]\s*(\d{1,2})/
@date = Date.new($1.to_i,$2.to_i,$3.to_i)
rescue
begin
@date = Date.new(val[0], val[1], val[2])
rescue
raise ArgumentError, "Unable to parse #{val} as date"
end
end
end
end
This has the advantage over (2) that it doesn't depend upon the class of
val - if it acts enough like a string to use the =~ operator, then that
clause will handle it, even if it's not descended from String - unlike
the previous example. This makes it "more duck-typed", but still
addresses the static-typist's fear of uncertainty and dynamism by
providing a predictable response from #date (it will always be a Date).
Unfortunately it's also slow.
3) Even "more duck-typed" is the approach of just testing that it
responds to the appropriate methods, like so:
# Accepts an object which responds to the +year+, +month+ and +day+
# methods.
def date=(val)
[:year, :month, :day].each do |meth|
raise ArgumentError unless val.responds_to?(meth)
end
@date = val
end
In this case, we have removed the normalization instituted in example
(2), but we have still ensured that the #date attribute conforms to some
sort of interface, providing certainty. It is now the caller's
responsibility to make sure what they pass fits the [:year, :month,
:day] specification - but this responsibility is documented. However,
this approach violates the Don't Repeat Yourself principle - both the
code and the comment contain the specification, and are not therefore
guaranteed to be in sync.
This approach is what many people believe to be embodied by "Duck
Typing". Given an object, we're checking whether it walks and quacks
like a duck; we're not forcing our caller to use a particular class,
like example (1), but we are forcing our caller to put the data in a
format we can understand, unlike (2) which attempts to deal with every
possible representation of a date, causing volumes of maintenance work -
imagine trying to write a normalization routine like that for every
attribute of every class! In this way, we are moving the responsibility
of putting the data into a reasonable format to the caller, who knows
what format their data is in, from the receiver, who has to guess at
every possible format the caller might send them.
4) The fourth and final approach, which I believe to be the Zen of Duck
Typing, is as follows:
# Accepts an object which responds to the +year+, +month+ and +day+
# methods.
attr_accessor :date
"What?" I hear you cry. "There's no checking there at all! You could
pass it anything!" Yes, gentle reader, but why would you? After all, the
documentation for this method is exactly the same as the one above. If
the programmer using this method does what the documentation says then
the class's behaviour is exactly the same. If they hand it the wrong
thing (accidentally, we assume) then the only difference is that it
breaks when the setter is called, rather than some time after the getter
is called and we try and call a non-existent method on the result.
A common response to this often contains the phrase "meaningless error
messages", but the results of such a mistake are usually, if not always,
far from meaningless. For the most part, they look something like this:
NoMethodError: undefined method `year' for "notadate":String
This tells me a lot: namely, that some part of my code (whose location
is given in the subsequent backtrace) expected "notadate" to have a
:year method, and it didn't. From this it is fairly trivial to deduce
that something, somewhere, has fed the wrong thing to the date= setter
method. Chances are that if your code is well-factored, there aren't a
whole lot of places that set the date, and the location of the error can
be found through a little judicious testing; you've lost the certainty
and immediacy of the inline check, but not by much, and you've gained
the flexibility of dynamic typing, and a whole lot less code to maintain.
Now if you'd been writing and collecting unit tests as you went along,
instead of
NoMethodError: undefined method `year' for "notadate":String
you would be seeing
1) Failure:
test_stuff(MyClassTest) [./test/myclasstest.rb:13]:
<false> is not true.
which makes the error even easier to find: you go to test/myclasstest.rb
and see something like:
10: def test_date
11: @obj = Foo.new
12: @obj.date = MyClass.new.notadate
13: assert(@obj.date.respond_to?(:year))
14: end
and now the error is trivial to trace - the moral of the story being
that when Duck Typing, do your checking in your unit tests, rather than
in the live code. Type errors such as this one are usually the least
common and easiest to trace of errors; if the attribute's documentation
specifies what it is supposed to be, as in the example above, and the
callers of both the getter and the setter methods make no assumptions
about any more or less than what the documentation says, then apart from
keyboarding accidents this will never be a problem.
At [1], Dave Thomas describes Duck Typing as "a way of thinking about
programming in Ruby." I think he means to go a step further than that -
Duck Typing is the _best_ way of thinking about programming in Ruby, and
possibly the _only_ way; as David Black puts it:
"I think the concept of duck typing needs to be supplemented and
expanded on. if, as seems to be the case, Dave thinks of it as a
component of programming style, then it doesn't address language design
itself. As long as duck typing is viewed as a stylistic choice, rather
than a radical language principle, the door is always open to people
saying 'I don't do duck typing', by which they usually mean that they
use kind_of? a lot... of course Ruby itself *does* do duck typing,
whether a given programmer thinks they're doing it or not."
Using kind_of? (or responds_to?) a lot isn't "not doing Duck Typing",
it's simply adding in at run time the kinds of checks that Statically
Typed languages do at compile time, in a usually verbose and necessarily
incomplete fashion.
Rather than trying to make Ruby do Static Typing because one is from a
Static Typing background and that's what one is comfortable with, one
should become comfortable with the dynamic nature of Ruby instead. I
have found that once I stopped assuming that the callers of my method
(who may well be me, in five minutes time, or some user of my library on
the other side of the planet) are stupid and don't know how to read my
documentation (you did write some, didn't you?) then writing in Ruby
became a whole lot more natural and somewhat less verbose. The unit
tests took care of the psychological need to check, somewhere, that the
method was getting passed the right thing, but in reality the whole
debacle is a non-issue; type errors are the most trivial of bugs.
And if you're still worried about that date example, an alternative
solution is this:
def set_date(year, month, day)
@date = Date.new(year, month, day)
end
which, if year, month and day are not numeric, will catch the problem
straight away - without resorting to Static Typing or some approximation
of it. And the way it catches it is telling:
irb(main):027:0> Date.new(2004.0, Rational(12,2), "17")
ArgumentError: comparison of String with 0 failed
from /usr/lib/ruby/1.8/date.rb:560:in `<'
from /usr/lib/ruby/1.8/date.rb:560:in `valid_civil?'
from /usr/lib/ruby/1.8/date.rb:590:in `new'
from (irb):27
This is not "ArgumentError: parameters must be numbers" - the error is
discovered when the Date class attempts to compare that parameter to
zero and can't do it, after assuming that it was valid. And it didn't
make the mistake any harder to find, did it? Notice that it didn't balk
at Floats or Rationals, and with no extra coding from the implementor;
Floats and Rationals look, and quack, like numbers. That's Duck Typing
in action.
[1] http://rubygarden.org/ruby?DuckTyping
---
Tim.
--
Tim Bates
tim@bates.id.au