[#111185] accessing superclass variables — Nicolaj Soendberg Madsen <nicolaj@...>
How do I access an outer variable from within a nested class?
[#111191] invisible Infinity — gabriele renzi <rff_rff@...>
Hi gurus and nubys,
[#111202] Ruby blog software. — Lloyd Zusman <ljz@...>
As a favor to a friend, I'm setting up a blog for her on my server.
Lloyd Zusman ha scritto:
Lloyd Zusman wrote:
Mike Clark wrote:
Dave Thomas wrote:
On Thu, 2 Sep 2004 06:01:14 +0900, Lloyd Zusman <ljz@asfast.com> wrote:
[#111212] - EZFX Editor 0.6.0 — Richard Lyman <lymans@...>
Download:
Hi,
Richard Lyman wrote:
[#111214] ruby sidebar for firefox? — djberg96@... (Daniel Berger)
Hi all,
James Britt wrote:
> James Britt wrote:
Bill Guindon wrote:
> Which you can see here:
Robert McGovern wrote:
> I followed whatever instructions I could find on making this happen; all
>>If anyone knows of a better way to get the pages added as a true
>>> If anyone knows of a better way to get the pages added as a true
On Tue, Sep 07, 2004 at 02:55:02PM +0900, James Britt wrote:
Michal 'hramrach' Suchanek wrote:
On Fri, Sep 10, 2004 at 12:26:58AM +0900, James Britt wrote:
Michal 'hramrach' Suchanek wrote:
On Fri, Sep 10, 2004 at 05:34:28AM +0900, James Britt wrote:
[#111220] rpa update request — "Pe, Botp" <botp@...>
It would be nice if "rpa update" also reports the new ports added and newly
On Thu, 2 Sep 2004 09:54:29 +0900, "Pe, Botp" <botp@delmonte-phil.com> wrote:
Well, I talked with batsman not too long ago about
I already made the same suggestions and Mauricio said he would
[#111245] Not just $SAFE, but damn $SAFE — Aredridel <aredridel@...>
I've been toying with an IRC bot that takes input from users in channel,
Aredridel wrote:
>>>>> "F" == Florian Gross <flgr@ccan.de> writes:
ts wrote:
> Sincerely I don't understand (I know, I'm stupid) but why don't you define
[#111253] Math.log2 ? — Brian Schroeder <spam0504@...>
Hello Group,
[#111260] Dumping Ruby Parse Tree — Kaspar Schiess <eule@...>
-----BEGIN PGP SIGNED MESSAGE-----
[#111270] newer ruby for Tiger (OSX 10.4)? — Dick Davies <rasputnik@...>
[#111300] autochomp? — Martin DeMello <martindemello@...>
Any way to make IO.readlines chomp each line before adding it to the
On Fri, 3 Sep 2004, Robert Klemme wrote:
I have been suffering from what appears to be an pre-PickAxe 2 Suspense
Zach Dennis wrote:
James Britt wrote:
Stephan K舂per wrote:
Henrik Horneber wrote:
[#111313] ri-ruby 0.1.1 — Kristof Bastiaensen <kristof@...>
[ANN] ri-ruby 0.1.1
[#111335] - Journals 1.0.0 — Richard Lyman <lymans@...>
Download:
Does it run in platforms other than Windows ?
It could, but you'd have to have SQLite and FOX and FXRuby installed,
[#111351] Nuby book advice — Jason Lane <jason@...10.net>
Hi list ;)
[#111364] Pickaxe 2 and rpa-base — Carl Youngblood <carl.youngblood@...>
I was just drooling in anticipation for pickaxe 2 and looking through
On Fri, 3 Sep 2004 07:32:05 +0900, Carl Youngblood
I think I understand the basic difference, but I was mainly commenting
[#111416] including a file as code ('as is') — Benny <linux@...>
dear list,
[#111430] RubyForge BitTorrents? — James Britt <jamesUNDERBARb@...>
I was just grabbing the latest RC for the Windows 1-click installer, and
On Fri, 2004-09-03 at 11:06, James Britt wrote:
Tom Copeland wrote:
On Fri, 2004-09-03 at 11:39, James Britt wrote:
[#111477] Hashes and ordering — Hal Fulton <hal9000@...>
I've been wondering something today...
> Do people test equality of hashes very often? I, for one,
Markus wrote:
On Fri, 2004-09-03 at 20:39, Hal Fulton wrote:
Markus wrote:
Hal wrote:
Markus wrote:
[#111488] OK... :) question about hash and array literals — Hal Fulton <hal9000@...>
It has always bothered me a little that [...] and {...} do not
Hi,
Hi --
David A. Black ha scritto:
Yukihiro Matsumoto wrote:
Hi,
Yukihiro Matsumoto wrote:
Hi,
Yukihiro Matsumoto wrote:
On Mon, 6 Sep 2004 08:31:38 +0900, Hal Fulton <hal9000@hypermetrics.com> wrote:
Hi,
On Mon, 6 Sep 2004, Yukihiro Matsumoto wrote:
[#111500] unknown node type 0. Very Weird. — Andrew Walrond <andrew@...>
I'm getting this:
>>>>> "A" == Andrew Walrond <andrew@walrond.org> writes:
On Saturday 04 Sep 2004 12:37, ts wrote:
[#111503] Marshal and allocating objects — "Stephen Sykes" <sdsykes@...>
I would find it useful if Marshal were to use "allocate" to generate
On Sat, Sep 04, 2004 at 07:45:22PM +0900, Stephen Sykes wrote:
>>>>> "P" == Paul Brannan <pbrannan@atdesk.com> writes:
[#111531] Anyone using Copland? I need feedback! — Jamis Buck <jgb3@...>
Copland (an IoC container for Ruby) is moving forward, and I *think*
Jamis Buck wrote:
Hal Fulton wrote:
Dear Jamis,
Sascha Ebach wrote:
[#111537] arrayfields-3.4.0 — "Ara.T.Howard" <Ara.T.Howard@...>
[#111543] Videos of Ruby Conference — Carl Youngblood <carl.youngblood@...>
Is anyone going to be filming rubycon? I would really like to watch
On Sun, 5 Sep 2004 07:20:14 +0900, Carl Youngblood
> I have a digital video camera of my own and am also planning to try to
Robert McGovern (robert.mcgovern@gmail.com) wrote:
On Thursday, September 9, 2004, 5:06:10 PM, Eric wrote:
Gavin Sinclair wrote:
We are going to have my buddy's audio mixing board, a wireless mic, and a
On Fri, 10 Sep 2004 00:08:22 +0900, Richard Kilmer <rich@infoether.com> wrote:
Please don't 'bittorrent-only' anything. There are those of use who
Richard Lyman wrote:
On Fri, 10 Sep 2004 01:38:34 +0900, James Britt
> What are the reasons people do not use bittorrent?
Chris Morris wrote:
> Um, what does this mean in English?
Chad Fowler wrote:
> Does anyone have, or know of, snake-simple instructions on how to host
On Thu, 2004-09-09 at 13:18, Aredridel wrote:
Tom Copeland wrote:
[#111559] stress testing rublog — Dave Thomas <dave@...>
Folks:
[#111564] RubyGarden woes — djberg96@... (Daniel Berger)
Is RubyGarden still working? I can't seem to login, nor can I get to
[#111575] IRB segfaults on latest one click installer — gabriele renzi <rff_rff@...>
Hi gurus and nubys,
[#111577] Style Question — Brian Schroeder <spam0504@...>
Hello everybody,
[#111578] rublog - word support — Armin Roehrl <armin@...>
Hi all,
[#111603] Rakeforms — "T. Onoma" <transami@...>
I sent off an email too "Jim Weirich" <jim@weirichhouse.org> but I'm not sure
[#111624] Building postgresql on Windows — djberg96@... (Daniel Berger)
Hi all,
[#111625] Problem Having Ruby Wait for a User Input — "Phanixis" <phanixis@...>
I am new to Ruby an have what should be a simple problem. I want to create
[#111632] Re: Problem Having Ruby Wait for a User Input — "Mehr, Assaph (Assaph)" <assaph@...>
[#111654] Can't get non-blocking TCP connect to work — Henrik Warne <henrik.warne@...3micro.com>
Hello,
Hi,
[#111663] Gmail-based blog — ptkwt@... (Phil Tomson)
I just saw this on /.:
In article <chid2k$32l$1@newsreader.wustl.edu>,
[#111669] ruby archiver — Martin DeMello <martindemello@...>
Is there any pure-ruby way to pack multiple files into a single file,
[#111675] include? only true once — Matthew Margolis <mrmargolis@...>
blockFile = File.new("blocklist.txt", "a+")
[#111687] Ruby-Nuby forum — Alexey Verkhovsky <alex@...>
Dear fellow ruby-talkers,
Alexey Verkhovsky wrote:
On Tue, 2004-09-07 at 04:04, James Britt wrote:
On Sep 6, 2004, at 8:04 PM, James Britt wrote:
On Tue, 2004-09-07 at 10:05, Robert Klemme wrote:
> There will always be some folks who think that all
That is a very good idea. I have a few thoughts to add
On Sep 8, 2004, at 8:30 AM, David Ross wrote:
your second accessment is what I meant.
I am trying to get the following to work:
Zach Dennis wrote:
Hi --
On Sep 7, 2004, at 12:39 PM, David A. Black wrote:
* James Edward Gray II <james@grayproductions.net> [2004-09-08 03:41:43 +0900]:
[#111703] Archive::Tar::Minitar 0.5.0 — Austin Ziegler <halostatue@...>
Archive::Tar::Minitar README
[#111725] net/https package for Windows — Joaquin Cuenca Abela <e98cuenc@...>
Hi!
Joaquin,
Any word on when openssl will be available in the one-click windows
Carl Youngblood wrote:
[#111757] Request for ideas: simple, useful web app — "Kirk Haines" <khaines@...>
I'm working on a much broader set of IOWA documentation, and core to this is
Kirk Haines ha scritto:
[#111759] Reporting errors/problem with modules part of ruby base — Dany Cayouette <danyc@...>
I am a ruby newbie and am intimitaded by posting to this newsgroup... I only made two postings related to modules included with base ruby 1.8.0 and 1.8.1 (net/imap and net/telnet). I think I did my homework in researching the behavior I observed, but never saw any replies to my postings.
[#111782] 1.8.2preview2 does not use LDFLAGS — "Michal 'hramrach' Suchanek" <hramrach@...>
Hello
Hi,
On Wed, Sep 08, 2004 at 04:29:41AM +0900, Michal 'hramrach' Suchanek wrote:
[#111785] regexp 0.11 (useful for debugging big regexps) — Simon Strandgaard <neoneye@...>
Debugging regular expressions becomes easier with this package.
[#111786] Unified type conversion framework — gabriele renzi <rff_rff@...>
Hi gurus and nubys,
Cool! Occasionally I think about doing something like this, so I can
Sam McCall ha scritto:
On Wed, Sep 08, 2004 at 06:40:06PM +0900, gabriele renzi wrote:
Paul Brannan wrote:
Florian Gross wrote:
> Florian Gross wrote:
[#111808] Extending ruby with crypto++ — dwerder@... (Dominik Werder)
Hello everybody,
[#111833] Creating new scope — "George Moschovitis" <george.moschovitis@...>
Hello everyone,
[#111839] ruby-dev summary 24171-24235 — Minero Aoki <aamine@...>
Hi all,
[#111849] Traffic Dip? — "Robert Klemme" <bob.news@...>
I have been getting many messages a day (30-50). What
[#111875] Korundum 3.3.1 beta — Richard Dale <Richard_Dale@...>
Download:
[#111883] method by string ? — Roeland Moors <roelandmoors@...>
I'm creating a program which uses a ruby source file as config
[#111894] module_function question — Martin Pirker <crf@...>
Hi...
[#111898] using a hash in eval — Florian Weber <csshsh@...>
hi!
[#111918] Are there known issues with rubyzip on WIndows? — James Britt <jamesUNDERBARb@...>
I've been using rubyzip to manipulate OpenOffice.org files,and it works
James Britt wrote:
James Britt wrote:
[#111922] Ruby-Nuby forum — Alexey Verkhovsky <alex@...>
Hi all!
Alexey Verkhovsky wrote:
On Thursday, September 9, 2004, 7:33:07 AM, Alexey wrote:
On Thu, 2004-09-09 at 01:51, Gavin Sinclair wrote:
Alexey Verkhovsky wrote:
On Sep 8, 2004, at 4:33 PM, Alexey Verkhovsky wrote:
On Thu, 2004-09-09 at 02:28, James Edward Gray II wrote:
[#111938] Q: Should String.upcase! work on a segment of a string? — Mike Hall <mghallNO@...>
Question: Should String.upcase! work on a segment of a string?
[#111972] Problem with ensuring consistency .. Finalization?? — Charles Hixson <charleshixsn@...>
I want to have a class which occasionally updates a file, but I want to
On Thu, 9 Sep 2004 16:38:07 +0900, Charles Hixson
[#112019] Kernel#syscall on x86_64 linux — Andrew Walrond <andrew@...>
Hi,
On Friday 10 Sep 2004 03:19, nobu.nokada@softhome.net wrote:
[#112055] SQLite/Ruby 2.0.0 BETA — Jamis Buck <jgb3@...>
SQLite/Ruby is an interface for Ruby into the SQLite database engine. It
[#112057] Listening for Keypress while Working — James Edward Gray II <james@...>
I have this long running process which shows output as it goes. I need
[#112070] SQLite/Ruby -- one more thing — Jamis Buck <jgb3@...>
One more thing I should have mentioned in the announcement: the license
[#112096] OpenGL on MacOS X (again) — Gavin Kistner <gavin@...>
I'm trying to get Ruby/OpenGL working for just me on my MacOS X box;
On Sep 9, 2004, at 4:53 PM, Gavin Kistner wrote:
Hi,
On Sep 10, 2004, at 11:27 AM, Vincent Isambart wrote:
Hi,
[#112097] IOWA again — Mark Probert <probertm@...>
[#112125] Names for these setting helper methods — "T. Onoma" <transami@...>
[#112140] Oracle DBI problem — Wirianto Djunaidi <wirianto.djunaidi@...>
Hi,
Robert Klemme wrote:
Thanks, I'll see if I can compile it with 9i driver..unless of course
[#112145] Aliasing a singleton method of a Class object — Yuri Leikind <y.leikind@...>
Hello all,
[#112154] REXML: Got stuck... — Meino Christian Cramer <Meino.Cramer@...>
Hi Rubyaner ! :)
Meino Christian Cramer wrote:
From: Henrik Horneber <ryco@gmx.net>
[#112157] methods in eruby — Florian Weber <csshsh@...>
hi!
[#112177] Variable scoping — Brian Candler <B.Candler@...>
I've been away from this list for a while, so I don't know what the current
[#112191] Test::Unit can't handle Exceptions ? (neither IRB) — gabriele renzi <rff_rff@...>
Hi gurus and nubys,
[#112193] Martin Fowler demystifying closures — "Gavri Savio Fernandez" <Gavri_F@...>
http://martinfowler.com/bliki/Closures.html using Ruby for the examples.
[#112194] SQLite/Ruby 2.0.1 BETA — Jamis Buck <jgb3@...>
Another beta release for SQLite/Ruby is available, hard on the heels of
Hi,
Vincent Isambart wrote:
What about searching to see if there is no SELECT in the SQL and
Carl Youngblood wrote:
You're right of course. Thanks for pointing that out. I obviously
Carl Youngblood wrote:
Ok, despite a to late of a night.... last night and some wasted posts (i
[#112195] hob x 0.2 .. blogink for ample abilities .. come into the arms of .. — why the lucky stiff <ruby-talk@...>
ok, ruby-talk. enough.
On Friday 10 September 2004 02:13 pm, why the lucky stiff wrote:
On Sat, Sep 11, 2004 at 04:45:53AM +0900, trans. (T. Onoma) wrote:
On Saturday, September 11, 2004, 6:43:08 AM, Marcel wrote:
Gavin Sinclair wrote:
[#112205] SQLite/Ruby binaries for windows — Jamis Buck <jgb3@...>
Binaries for windows are now available for SQLite/Ruby 2.0.1. Just go to
[#112229] Rails and RubyGems — Jim Menard <jimm@...>
I have two issues with installing Rails via RubyGems. I'm on Mac OS X.
On Sat, 11 Sep 2004 09:26:42 +0900, Jim Menard <jimm@io.com> wrote:
[#112246] Problem setting main file for rdoc — James Britt <jamesUNDERBARb@...>
I'm running ruby 1.8.2 (2004-07-29) [i386-mswin32] with RDoc V1.0pr1:
Dave Thomas wrote:
[#112253] Singleton method on object via define_method? — Hal Fulton <hal9000@...>
OK, I have this variable called box.
"trans. (T. Onoma)" <transami@runbox.com> wrote:
On Sunday 12 September 2004 02:19 pm, Martin DeMello wrote:
Hi --
D. A. Black wrote:
On Mon, 13 Sep 2004, Gavin Sinclair wrote:
> On Mon, 13 Sep 2004, Gavin Sinclair wrote:
Gavin Sinclair wrote:
On Monday 13 September 2004 01:45 am, Hal Fulton wrote:
In article <4581.218.214.1.200.1095117526.squirrel@webmail.imagineis.com>,
Phil wrote:
[#112263] Net-SSH Threaded PortForward Script Problems — "otaku" <justin@...>
Greetings to all
[#112276] Re: Net-SSH Threaded PortForward Script Problems — "otaku" <justin@...>
jamis,
[#112311] look-behind in oniguruma — ptkwt@... (Phil Tomson)
Apparently oniguruma supports look-behind. Is there any documentation on how
[#112323] rmagick problem? — Roeland Moors <roelandmoors@...>
I have a simple but wierd problem.
[#112327] What governs the order of methods returned by object.public_methods( false ) ? — "Tom Counsell" <tamc2@...>
Hello
[#112389] How to extract filename from a request? — Daniel Vkerts <dvoelkerts@...>
Hi,
[#112395] Ruby regex engine behavior question — djberg96@... (Daniel Berger)
I read this in a journal entry:
[#112418] Ruby for .NET — Arich Chanachai <macrocosm@...>
A few questions for the Ruby community:
[#112420] Perl to Ruby — Arich Chanachai <macrocosm@...>
Also looking for a Perl to Ruby conversion utility.
On Sep 13, 2004, at 7:49 PM, Arich Chanachai wrote:
[#112429] Picking up the torch.... — Arich Chanachai <macrocosm@...>
What does picking up the torch entail?
[#112437] JRuby article — "trans. (T. Onoma)" <transami@...>
JRuby article here.
[#112464] Catching undefined global variable errors — "George Moschovitis" <george.moschovitis@...>
Hello everyone,
Sorry everyone,
On Tue, Sep 14, 2004 at 07:34:52PM +0900, George Moschovitis wrote:
Thanks the $VEBOSE = true does the job!
[#112489] Ruby 2 roadmap — imodev@...
Hi all,
[#112506] Ruby Image — Brian Schroeder <spam0504@...>
Hello Group,
On Sep 14, 2004, at 9:04 AM, Brian Schroeder wrote:
James Edward Gray II wrote:
[#112526] Ruby SVG — Arich Chanachai <macrocosm@...>
Anyone know of any Ruby interfaces to SVG tech?
[#112535] Modules as namespaces — Sam Stephenson <sstephenson@...>
I'm trying to nest modules to create namespaces, but I'm not having
[#112543] Pre-order PickAxe II — James Britt <jamesUNDERBARb@...>
[#112549] Programming Ruby available for pre-order — Dave Thomas <dave@...>
Folks:
Dave Thomas <dave@pragprog.com> wrote in message news:<67DE2869-06A6-11D9-9ECA-000A95676A62@pragprog.com>...
On Thu, 16 Sep 2004 00:01:54 +0200, Dietmar Gack wrote:
> UK-based rubyists (or even European ones) might like to know that
[#112565] web-based progress bar — Bill Guindon <agorilla@...>
Trying to display output from a ruby script that has a command line
On Tuesday 14 September 2004 11:18 pm, Bill Guindon wrote:
You just need to make a page refresh for a easy
On Sep 15, 2004, at 6:29 AM, David Ross wrote:
On Wed, 15 Sep 2004 21:54:45 +0900, Gavin Kistner <gavin@refinery.com> wrote:
[#112570] Ruby equiv of Perl's HTML::Template module? — ChrisO <ceo@...>
Hopefully someone here fairly familiar with Perl can point me to a Ruby
> Hopefully someone here fairly familiar with Perl can point me to a Ruby
[#112605] Bignum Troubles — James Edward Gray II <james@...>
I'm running a Ruby program that relies on Bignum values.
[#112608] Ex-Perl coders: Howz it feel to convert to Ruby? — Chris <ceo@...>
I didn't even think about asking this question until now, based on a
On Sep 16, 2004, at 2:44 AM, Robert Klemme wrote:
> Under which circumstances do you need to_s for numbers? What's wrong with
Chris wrote:
Being a long time Perl programmer I tend to reach for Perl when I have a
On Wed, 15 Sep 2004 23:54:51 +0900, Chris <ceo@nospan.on.net> wrote:
In article <20040915160327.GA4046@lb.tenfour>,
Hi,
Bill Kelly wrote:
In article <20040915185304.GD4046@lb.tenfour>,
In article <ER32d.2786$Qv5.1325@newssvr33.news.prodigy.com>,
Phil Tomson wrote:
In article <Pine.LNX.4.44.0409160342510.17156-100000@wobblini>,
On Thu, 16 Sep 2004 13:32:12 GMT, Chris <ceo@nospan.on.net> wrote:
Andrew Johnson wrote:
Hello all,
On Thu, 2004-09-16 at 10:28, Nate Smith wrote:
[#112613] Truly modular — Jesse van den Kieboom <troplosti@...>
Hi,
[#112615] Setting up my website - mod_ruby and Apache V2 - Naive questions. — Victor Reyes <victor.reyes@...>
I am in the process of setting up a website on my own hardware.
[#112646] Ruby and LD_RUN_PATH — Lennon Day-Reynolds <rcoder@...>
I'm trying to distribute a version of Ruby along with an application,
[#112668] ruby-dev summary 24236-24254 — "Takaaki Tateishi" <ttate@...>
Hello,
[#112692] Hacking the Ruby interpreter — Tim Hunter <cyclists@...>
I've got an idea for a hack^H^H^H^H enhancement to the interpreter that I'd
On Thu, Sep 16, 2004 at 08:04:50AM +0900, Tim Hunter wrote:
> I've got an idea for a hack^H^H^H^H enhancement to the interpreter that I'd
[#112702] Tidy binding using DL — "Kevin Howe" <khowe@...>
After reading the recent post re: Ruby's DL functions I decided to see if I
[#112726] RubyGems 0.8.0 — Chad Fowler <chad@...>
Marking the 3000th download of RubyGems
On Thu, 16 Sep 2004 12:55:59 +0900, Chad Fowler <chad@chadfowler.com> wrote:
[#112755] Debugging wxruby programs. — cheungr@... (R. Cheung)
Hi,
[#112787] Re: [ANN] Programming Ruby available for pre-order — Dale Martenson <dmartenson@...>
> -----Original Message-----
[#112814] horribly impossible debugging task — "Ara.T.Howard" <Ara.T.Howard@...>
Ara.T.Howard wrote:
Ara.T.Howard wrote:
On Wed, 22 Sep 2004, Kevin McConnell wrote:
[#112815] Re: [ANN] Programming Ruby available for pre-order — Dale Martenson <dmartenson@...>
> -----Original Message-----
Well,
[#112831] Want a regular Ruby Quiz? (long) — James Edward Gray II <james@...>
I'm a fan of short, but regular programming "challenges" or "quizzes".
James Edward Gray II <james@grayproductions.net> wrote:
[#112843] colorized Test::Unit console testrunner — martin.ankerl@... (Martin Ankerl)
Hi, I have modified the existing console testrunner of the Ruby's unit
[#112868] http-access2 error — nkb <nkb@...>
Hi.
[#112871] Re: Debugging wxruby programs. — "Mehr, Assaph (Assaph)" <assaph@...>
[#112879] rdoc bug (and rdoc bug tracker site is down) — Brian Schrer <mail@...>
Hello Group,
[#112881] Automatic class conversion / function overloading — torehalv@... (Tore Halvorsen)
Hi! Rather new to ruby, and I'm not quite sure where to look for the
On Fri, Sep 17, 2004 at 07:04:53PM +0900, Tore Halvorsen wrote:
[#112883] rdoc help needed — Brian Schrer <mail@...>
Hello,
[#112928] Ruby on WinXP (was Debugging wxruby programs.) — Bill Guindon <agorilla@...>
On Fri, 17 Sep 2004 16:24:48 +0900, R. Cheung <cheungr@ecid.cig.mot.com> wrote:
On Sat, 18 Sep 2004 01:39:51 +0900, Bill Guindon <agorilla@gmail.com> wrote:
On Sat, 18 Sep 2004 04:59:10 +0900, Cristi BALAN <mental@gmail.com> wrote:
[#112939] This showed up on a Java blogs site... — Tom Copeland <tom@...>
...Ruby's everywhere!
[#112940] Accessing Hash elements in sorted order? — Chris <ceo@...>
Problem: I wanted to access the elements of a Hash (specifically from
Chris wrote:
On Saturday, September 18, 2004, 4:39:45 AM, Florian wrote:
Florian Gross wrote:
[#112976] Return value of while loop. — Brian Schrer <ruby@...>
Maybe this question would be more adequate for the ruby-nuby forum ;), but
> :~$ irb
Markus <markus@reality.com> wrote:
wxRuby Layout Manager Library 0.0.3 has been released.
David Ross wrote:
[#112977] Beginner question on how to get info on keywords — nkb <nkb@...>
Hi.
[#113007] watermarking libraries ? — Daniel Cremer <daniel@...>
Hi,
Daniel Cremer wrote:
[#113026] Method improvement request .-- — Charles Hixson <charleshixsn@...>
I'm sure there must be a more idiomatic+efficient way to do this, but I
On Sep 18, 2004, at 4:29 PM, Charles Hixson wrote:
On Sep 18, 2004, at 5:04 PM, James Edward Gray II wrote:
James Edward Gray II wrote:
On Sep 18, 2004, at 6:14 PM, Charles Hixson wrote:
James Edward Gray II wrote:
On Sep 19, 2004, at 4:03 PM, Charles Hixson wrote:
Hi --
On Sun, 19 Sep 2004 06:29:43 +0900, Charles Hixson
Bill Guindon wrote:
On Mon, 20 Sep 2004 07:24:29 +0900, Charles Hixson
Bill Guindon wrote:
[#113048] Planet Ruby started — MoonWolf <moonwolf@...>
Hello World! from TOKYO,Japan.
[#113049] bug bytes — Bill Guindon <agorilla@...>
for starters, I have my cheesy little debugger, forgive the globals, I
[#113055] Array#index block and rdetect — "trans. (T. Onoma)" <transami@...>
Tiny RCR suggestion:
Hi,
Hi --
Hi,
Hi --
Hi,
Hi --
Hi,
Hi --
Hi,
Hi --
Hi,
Robert Klemme wrote:
Hi --
David A. Black wrote:
[#113067] TCP Socket read and write — Brian Schrer <ruby@...>
Hello Group,
[#113074] Vim/Ruby Configuration Files, 2004.09.20 — Gavin Sinclair <gsinclair@...>
Hi all,
[#113080] Validating eRuby files — Alexey Verkhovsky <alex@...>
Returning our programming back to the epic struggle with typos :)
Alexey Verkhovsky wrote:
[#113108] Re: Nuby question about symbols — "Mehr, Assaph (Assaph)" <assaph@...>
[#113118] Re: [ANN] Vim/Ruby Configuration Files, 2004.09.20 — "Mehr, Assaph (Assaph)" <assaph@...>
Assaph wrote:
On Mon, 20 Sep 2004 15:30:58 +0900, Gavin Sinclair
On Tue, 21 Sep 2004 23:12:34 +0900, Cristi BALAN <mental@gmail.com> wrote:
[#113141] methods with and without ! — Jani Monoses <jani@...>
Hello
[#113192] Store object in on disk / mini database — Kristian Sensen <ks@...>
Hi!
Thanks for both your suggestions! That was just what I needed! :-)
From: "trans. (T. Onoma)" <transami@runbox.com>
On Tue, 21 Sep 2004, Bill Kelly wrote:
On Tue, Sep 21, 2004 at 06:24:39AM +0900, Ara.T.Howard@noaa.gov wrote:
Mauricio Fern疣dez wrote:
On Tue, Sep 21, 2004 at 06:49:41AM +0900, why the lucky stiff wrote:
On Tue, 21 Sep 2004, Mauricio [iso-8859-1] Fern=E1ndez wrote:
On Tue, Sep 21, 2004 at 07:44:39AM +0900, Ara.T.Howard@noaa.gov wrote:
[#113205] WEBrick causing ruby process to hang? (on windows) — kevin_mcconnell@... (Kevin M)
When I run a ruby script that uses webrick, it seems to hang on exit.
Just to follow up... I checked on my home machines (one Linux, one Max
On Tue, Sep 21, 2004 at 01:59:37PM +0900, Kevin M wrote:
[#113222] - install.rb hack # 42 — "Ara.T.Howard" <Ara.T.Howard@...>
Ara.T.Howard wrote:
On Tue, 21 Sep 2004, Tim Hunter wrote:
On Monday 20 September 2004 08:54 pm, Ara.T.Howard@noaa.gov wrote:
Hi,
On Monday 20 September 2004 11:27 pm, Minero Aoki wrote:
[#113274] Spanish Ruby Community. — pedro.baldanta@... (Pedro Baldanta)
Hi friends.
[#113281] Ruby Quiz Website Live — James Edward Gray II <james@...>
The Ruby Quiz website for FAQ and archives is now live. You can find
[#113309] Why's Poignant Guide to Ruby, Chapter Five: Them What Make the Rules and Them What Live the Dream — why the lucky stiff <ruby-talk@...>
Beloved friends and key witnesses: Holy highkick! I (at last) present
Very nice _why. I like reading your sites often. My
[#113320] Bulgarian Makarov — "SER" <ser@...>
Hi,
[#113328] text analyzator — "martinus" <martin.ankerl@...>
I have created a little text analyzation tool, that tries to extract
Thought I'd given this simple program a go and review it for those
I decided to do a somewhat more ambitious test. After training on
On Wed, 2004-09-22 at 00:54, martinus wrote:
[#113340] How to output result to text file? — nkb <nkb@...>
Hi.
[#113347] soap4r. I just dont get it. — nkb <nkb@...>
Hi.
Hi,
What is the Fault that the server is giving you? You should be able
Thanks for the prompt reply.
[#113366] Is anyone using FXScintilla? — "Curt Hibbs" <curt@...>
I'm trying to track down a scrolling problem in FreeRIDE that occurs in the
[#113378] DirectoryWatcher 0.8 — Gavin Kistner <gavin@...>
http://phrogz.net/RubyLibs/rdoc/classes/Dir/DirectoryWatcher.html
[#113382] mozilla bookmarks — Dick Davies <rasputnik@...>
long shot but what the hell - don't suppose any of you good
[#113404] negative numbers and binary formats — paul.rogers@... (Paul)
Im trying to take a negative integer value, convert it to its binary
[#113407] Regexp Arity — "trans. (T. Onoma)" <transami@...>
Just ran into a need to know how many parenthetical groupings a Regexp has.
Hi,
On Thu, 23 Sep 2004 03:54:31 +0900, Yukihiro Matsumoto
On Thursday, September 23, 2004, 4:56:23 AM, Austin wrote:
* Gavin Sinclair <gsinclair@soyabean.com.au> [Sep 23, 2004 01:50]:
On Thu, 2004-09-23 at 02:03, Nikolai Weibull wrote:
[#113419] not greedy enough — "trans. (T. Onoma)" <transami@...>
Honestly, I really dislike regular expressions. Some people love them for
[#113435] html email through SMTP? — Chris Morris <the.chrismo@...>
Anyone have a snippet or link to a snippet for setting up an email
[#113443] Newbie: Case statement — "Graham Foster" <graham@...>
As a newbie I'm confused about the Case construct. All the
[#113456] DrbUndumped and GC — "Ara.T.Howard" <Ara.T.Howard@...>
[#113479] whitespace string only — Henrik Horneber <ryco@...>
Hi!
Henrik Horneber <ryco@gmx.net> writes:
So which method is fastest?
"trans. (T. Onoma)" <transami@runbox.com> writes:
In Message-Id: <4152820A.9080408@gmx.net>
On Thu, 23 Sep 2004, YANAGAWA Kazuhisa wrote:
>>>>> "A" == Ara T Howard <Ara.T.Howard@noaa.gov> writes:
On Thu, 23 Sep 2004, ts wrote:
On Thu, 2004-09-23 at 08:34, Ara.T.Howard@noaa.gov wrote:
On Thu, 23 Sep 2004, Robert Klemme wrote:
[#113496] String#pad ? — Jani Monoses <jani@...>
Hello
[#113513] ruby-dev summary 24255 - 24297 — Kazuo Saito <ksaito@...>
Hello all,
[#113533] Design Advice: Sub-Class 'Instances' — Gavin Kistner <gavin@...>
Summary
> I'm looking for advice on how to design code so that I can dynamically
INTRODUCTION
>>>>> "M" == Markus <markus@reality.com> writes:
[#113561] "no block given" with closure? — Bob Sidebotham <bob@...>
When I execute this code, I get "no block given (LocalJumpError)":
[#113577] mixin with A::B syntax — eagle eyes joe <jalotta@...>
Greetings,
[#113578] Rubilicious 0.1.0 — Paul Duncan <pabs@...>
Hi,
[#113585] Re: Newbie: Case statement — "Warren Brown" <WBrown@...>
Graham,
[#113590] No room at the inn — Matt Lawrence <matt@...>
I just called the conference hotel and was told that they are completely
[#113614] Instiki RSS features — Nikos Polizotis <npolizotis@...>
We 're experimenting on wikis and we like instiki because of the rich
Nikos Polizotis wrote:
[#113615] The Solitaire Cipher (#1) — Ruby Quiz <james@...>
The three rules of Ruby Quiz:
Ruby Quiz wrote:
Moin!
[#113627] Ruby Code to HTML — James Edward Gray II <james@...>
I need to HTMLify some Ruby code. Before I go make some crude
James Edward Gray II wrote:
[#113648] openssl examples and docs — "Ara.T.Howard" <Ara.T.Howard@...>
Ara.T.Howard wrote:
* Jamis Buck (jgb3@email.byu.edu) wrote:
Paul Duncan wrote:
[#113649] AOP bigger picture — "trans. (T. Onoma)" <transami@...>
Here's a brief report of some my AOP research[1] related to the "bigger
[#113666] Question on organizing local RDoc documentation — Alexey Verkhovsky <alex@...>
My Ruby installation is a bit of a mess, especially so far as the
[#113667] Ruby extconf.rb / autoconf (in?)compatibility — Alexey Verkhovsky <alex@...>
To all who said that Ruby Forum was a good idea (and all who said it
[#113697] Proc / def / yield semantics (long) — Markus <markus@...>
I support all that you have written, as I have been bitten by this
On Sat, 2004-09-25 at 09:59, Brian Candler wrote:
On Sun, Sep 26, 2004 at 04:19:55AM +0900, Markus wrote:
[#113705] Ruby Programming Language Tutor — Paul van Tilburg <paul@...>
Hi all,
[#113708] Formatting addresses question — Matthew Margolis <mrmargolis@...>
I currently have a large text file based address book(for myself, not
[#113723] RubyGems 0.8.1: installation of log4r 1.0.5 failed — benny <listen@...>
dear list
[#113726] Nuby: How do I find out what exception was thrown? — rpardee@... (Roy Pardee)
Greetings all,
[#113746] Re: mixin with A::B syntax — eagle eyes joe <jalotta@...>
Greetings,
[#113750] local_method_missing possible — "trans. (T. Onoma)" <transami@...>
On Saturday 25 September 2004 10:42 pm, Markus wrote:
* trans. (T. Onoma) <transami@runbox.com> [2004-09-26 12:10:59 +0900]:
On Sunday 26 September 2004 10:33 pm, jim@freeze.org wrote:
[#113751] Diff::LCS 1.1.1 — Austin Ziegler <halostatue@...>
I am pleased to announce the release of Diff::LCS 1.1.1, a bugfix
[#113765] Uploading a multipart form with Net::HTTP — Austin Ziegler <halostatue@...>
Did anyone ever figure this out?
[#113770] Archive::Tar::Minitar 0.5.1 — Austin Ziegler <halostatue@...>
I am pleased to announce the release of Archive::Tar::Minitar 0.5.1, a
On Mon, Sep 27, 2004 at 12:07:03AM +0900, Austin Ziegler wrote:
On Mon, 27 Sep 2004 01:36:00 +0900, Mauricio Fern疣dez
[#113779] Rubydium 0.1 - Tech Preview — Alexander Kellett <ruby-lists@...>
Whoa, say what?
[#113803] RPM of Ruby 1.8.x — Matt Lawrence <matt@...>
I'm trying to find rpms for the latest released version of Ruby. After I
If all else fails, it's dirt simple to install from source,
On Mon, 27 Sep 2004, Markus wrote:
On Monday, September 27, 2004, 8:31:31 AM, Matt wrote:
On Sun, 2004-09-26 at 16:33, Gavin Sinclair wrote:
[snip]
On Tue, 28 Sep 2004, vruz wrote:
> > [snip]
[#113824] Object#send and blocks/procs — "Mehr, Assaph (Assaph)" <assaph@...>
[#113830] ncache 0.9 — "George Moschovitis" <george.moschovitis@...>
n/cache
[#113837] ML services will be stop for maintenance — Shugo Maeda <shugo@...>
Hi,
[#113841] BlueCloth bug? — Brian Schrer <ruby@...>
Hello Group,
[#113850] vim code completion — Roeland Moors <roelandmoors@...>
Is there a possibility to use code completion in vim for ruby?
[#113873] RubyConf: Comfort Suites? — Hal Fulton <hal9000@...>
Out of curiosity, is anyone else staying at the Comfort Suites? The
[#113885] {newb} Each statements — STEPHEN BECKER I V <Becker004@...>
Do each statements change the thing that they are using?
On Sep 27, 2004, at 3:13 PM, STEPHEN BECKER I V wrote:
nope
ndata = ndata.split(//).map { | c | ((c-97)+rand(10))%26 }.join
[#113888] Any YARV pre-questions in RubyConf2004? — SASADA Koichi <ko1@...>
Hi,
SASADA Koichi wrote:
Hi,
On Tue, 28 Sep 2004 08:49:21 +0900, Yukihiro Matsumoto
Hi,
Yukihiro Matsumoto wrote:
Hi --
[#113899] keep changes in string outside of scope? — Matthew Margolis <mrmargolis@...>
The code below is supposed to scan through a string and put a ','
Hi --
[#113914] safety of timeout() — leon breedt <bitserf@...>
hi,
On Tue, Sep 28, 2004 at 07:24:48AM +0900, leon breedt wrote:
On Tue, Sep 28, 2004 at 08:47:29PM +0900, Brian Candler wrote:
[#113923] Best name for "this method" ? — "trans. (T. Onoma)" <transami@...>
Wondering what the conscensus is on the best name for "this method". Right now
> Wondering what the conscensus is on the best name for "this method". Right now
On Monday 27 September 2004 08:01 pm, vruz wrote:
Hi,
Hi --
On Tuesday, September 28, 2004, 5:49:21 PM, Robert wrote:
On Tuesday 28 September 2004 05:44 am, Gavin Sinclair wrote:
On Tuesday 28 September 2004 05:44 am, Gavin Sinclair wrote:
Hi --
On Tuesday 28 September 2004 05:27 pm, David A. Black wrote:
Hi --
On Tuesday 28 September 2004 06:31 pm, David A. Black wrote:
trans. (T. Onoma) wrote:
On Monday 27 September 2004 08:49 pm, Florian Gross wrote:
On Monday 27 September 2004 08:49 pm, Florian Gross wrote:
trans. (T. Onoma) wrote:
On Tuesday 28 September 2004 04:19 am, Florian Gross wrote:
[#113946] irb configure options — James Edward Gray II <james@...>
Where is a good source I can learn irb configuration options from?
James Edward Gray II wrote:
On Sep 28, 2004, at 5:00 AM, Brian Schrer wrote:
James Edward Gray II wrote:
On Sep 28, 2004, at 8:37 AM, Brian Schrer wrote:
James Edward Gray II wrote:
[#113965] Wish list for 2.0 — STEPHEN BECKER I V <Becker004@...>
In ref to http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/31099
Hi,
does that work for end lines in the middle of a string? or a tab? I
Hi,
On Tuesday, September 28, 2004, 2:40:02 PM, Yukihiro wrote:
Hi,
On Tuesday, September 28, 2004, 5:45:08 PM, Yukihiro wrote:
STEPHEN BECKER I V <Becker004@gmail.com> wrote in message news:<3703ec2d04093011303c14c44b@mail.gmail.com>...
[#113967] RubyConf2004 - list of attendees' interests — Rob <rob_02004@...>
RubyConf2004 attendees, let's give serendipity a hand.
[#113969] Binding of the Caller (redux) — Gavin Kistner <gavin@...>
I'm trying to use Florian's Binding.of_caller, and it ain't working. In
On Tue, Sep 28, 2004 at 12:56:25PM +0900, Gavin Kistner wrote:
On Sep 28, 2004, at 2:16 AM, Mauricio Fern疣dez wrote:
[#113976] RubyGarden Spam — James Britt <jamesUNDERBARb@...>
The rubygarden wiki has been over-run with spam links.
You should create a way to generate images with text
> You should create a way to generate images with text
Hello,
Hello,
On Wed, 6 Oct 2004 11:53:55 +0900, Patrick May <patrick@hexane.org> wrote:
Here is one step of which many could be applied.
On Tue, 26 Oct 2004 04:56:53 +0900, David Ross <dross@code-exec.net> wrote:
Chad Fowler wrote:
On Monday 25 October 2004 08:50 pm, David Ross wrote:
On Tue, 28 Sep 2004 13:29:04 +0900, James Britt
Chad Fowler wrote:
[#113989] rpa auto-updates; first time experience — "Pe, Botp" <botp@...>
This is my first experience on rpa's autoupdate feature.
[#114030] RubyGarden Spam — "Curt Hibbs" <curt@...>
Robert McGovern wrote:
Curt Hibbs [mailto:curt@hibbs.com]
On Tuesday, September 28, 2004, 10:53:17 PM, Curt wrote:
Gavin Sinclair wrote:
[#114053] rindex with array of arrays — STEPHEN BECKER I V <Becker004@...>
Should rindex work for an array of arrays? I am starting the playfair
[#114065] NYC Ruby job listing — Jim Menard <jimm@...>
I just saw this on Craigslist:
In article <4159F5BE.9010700@infofiend.com>,
[#114072] setup.rb and/or gem assist — Hal Fulton <hal9000@...>
Hello all...
On Wed, Sep 29, 2004 at 01:17:27AM +0900, Hal Fulton wrote:
[#114089] weird behavior pushing an array onto an array — eagle eyes joe <jalotta@...>
Greetings,
[#114092] Bus Error in kstat extension — djberg96@... (Daniel Berger)
Hi all,
[#114099] autoconf for ruby — saiph <order@...>
On Wed, 29 Sep 2004 04:34:18 +0900, saiph <order@intrage.it> wrote:
Eivind Eklund wrote:
[#114103] metaprogramming question, alternatives to "class ..." — Kevin McConnell <kevin_mcconnell@...>
Folks,
[#114105] DRY ruby idiom — stevetuckner <stevetuckner@...>
I often use the ||= idiom in ruby for late initialization. But was
[#114122] ri Feature proposal — Brian Schrer <ruby@...>
Hello Group,
[#114146] A nerdy multiplayer game "ants". — Brian Schrer <ruby@...>
Hello Group,
[#114152] Ruby gems crash on OpenBSD Sparc64 — Wes Moxam <wildwildwes@...>
Hi,
>>>>> "W" == Wes Moxam <wildwildwes@gmail.com> writes:
[#114172] ruboids (on mac os) - singleton instance() returns nil? — "Michal 'hramrach' Suchanek" <hramrach@...>
Hello
[#114197] ruby-dev summary 24298-24353 — SASADA Koichi <ko1@...>
Hi all,
On Sep 29, 2004, at 09:38, SASADA Koichi wrote:
On Wednesday 29 September 2004 10:23 am, Nathaniel Talbott wrote:
On Thu, Sep 30, 2004 at 04:42:02AM +0900, trans. (T. Onoma) wrote:
> "SASADA Koichi" <ko1@atdot.net> schrieb im Newsbeitrag
Hi,
On Thursday 30 September 2004 08:17 pm, Yukihiro Matsumoto wrote:
Hi,
[#114199] scan regular expression and strings — STEPHEN BECKER I V <Becker004@...>
tr="meet"
[#114209] Re: autoconf for ruby — Brian Candler <B.Candler@...>
> i need also something to test a generic lib.
[#114229] Purely static build of Ruby — "rcoder@..." <rcoder@...>
I'm trying to find out whether it's possible to build a completely
[#114249] FXRuby help — Jamis Buck <jgb3@...>
Having some troubles getting FXRuby to work for me. Any script that I
Jamis Buck wrote:
craig duncan wrote:
[#114250] Math Tricks — James Edward Gray II <james@...>
Quick question. When I run:
[#114265] AClass() vs. AClass[] constuctors (was Best name for "this method") — "trans. (T. Onoma)" <transami@...>
For reference:
[#114278] Too Many Ways? — Gavin Kistner <gavin@...>
At what point do you cross over from:
Hi --
On Sep 30, 2004, at 4:04 AM, David A. Black wrote:
I have been thinking lately about rangess and I will give you the two
On Sep 30, 2004, at 7:30 AM, Zach Dennis wrote:
Hi!
On Thu, 30 Sep 2004 22:58:26 +0900, Henrik Horneber <ryco@gmx.net> wrote:
Austin Ziegler wrote:
Zach Dennis ha scritto:
gabriele renzi wrote:
Peter Hickman wrote:
On Sep 30, 2004, at 9:41 AM, Zach Dennis wrote:
Zach Dennis <zdennis@mktec.com> writes:
On Thu, 30 Sep 2004 11:09:33 +0900, Gavin Kistner wrote:
> "Duplicate names and techniques to do the same
Brian Candler wrote:
On Sunday, October 3, 2004, 3:34:57 AM, Bob wrote:
On Saturday 02 October 2004 10:12 pm, Gavin Sinclair wrote:
On Sun, Oct 03, 2004 at 12:29:39PM +0900, trans. (T. Onoma) wrote:
On Monday 04 October 2004 04:06 am, Brian Candler wrote:
On Mon, Oct 04, 2004 at 11:08:42PM +0900, trans. (T. Onoma) wrote:
On Mon, Oct 04, 2004 at 11:37:09PM +0900, Brian Candler wrote:
On Monday 04 October 2004 10:42 am, Brian Candler wrote:
On Mon, Oct 04, 2004 at 11:46:15PM +0900, trans. (T. Onoma) wrote:
On Monday 04 October 2004 11:09 am, Brian Candler wrote:
On Tue, Oct 05, 2004 at 04:00:11AM +0900, trans. (T. Onoma) wrote:
[#114289] Funtionality of 'case'-Expression — Ralf Mler <r_mueller@...>
Salve!
On Thu, 30 Sep 2004 16:50:03 +0900, Robert Klemme <bob.news@gmx.net> wrote:
> > You can do
On Thu, 2004-09-30 at 12:13, Brian Candler wrote:
> But "factoring out the variable" largely misses the point. Try it
[#114362] Re: Range syntax theory — "Mills Thomas (app1tam)" <app1tam@...>
Okay, maybe we think of it this way. '..' is a club. '...' is a club, with
This has been a very fun discussion. I'll shut up now unless anyone
Zach wrote:
Gavin Sinclair wrote:
Zach wrote:
Hello! I'd like to help translate some of the Japanese documentation to
On Fri, Oct 01, 2004 at 03:52:07PM +0900, Steve Brumbaugh wrote:
[#114378] Webrick gets stuck with certain exceptions? — tom.counsell@... (Tom Counsell)
I've written a servlet using webrick. I've written it badly. Some
I'm not sure at all if this is it, but there was a bug in ruby 1.8
[#114380] redcloth - multiline comments — Simon Strandgaard <neoneye@...>
Hi,
[#114381] The new Pickaxe II book is a reality! — "Warren Brown" <WBrown@...>
To everyone eagerly awaiting Dave's new book:
> as of today
Got mine in Colorado today. I *love* the lay-flat binding. And
PLEASSSSSSSSSSSSSSSSSSSSSSSEEEEEEEEEEEE stop enjoying it so much. I am
On Fri, Oct 01, 2004 at 10:30:17PM +0900, Florian Weber wrote:
How huge??
Richard Lyman wrote:
Dave Thomas <dave@pragprog.com> wrote in message news:<BC763752-130B-11D9-9B57-000A95676A62@pragprog.com>...
That's a spectacular idea. Any volunteers?
When I get mine in the mail, I was thinking of posting one somewhere
[#114392] Calling super methods — Grzegorz Dostatni <grzegorz@...>
On Thu, 2004-09-30 at 22:20, Andrew Johnson wrote:
[#114398] irb: a great tool in it's own right — ptkwt@... (Phil Tomson)
irb (and a little Ruby knowledge) is great for system tasks, especially on
Yup -- it's like a shell with (*gasp*) intelligent handling of
-----BEGIN PGP SIGNED MESSAGE-----
[#114410] Regexp question — Mark Probert <probertm@...>
[SOLUTION] The Solitaire Cipher (#1)
Class-oriented, but kinda long maybe. Hey, it has unit tests . . .
Reads in a file, deck.yaml, if it exists to specify the deck order. Zip
of the files is attached. If you run it out of the box it will use the
non-default deck in deck.yaml.
Thanks for the quiz, it was fun!
Moses
########################################################################
########
# solitaire.rb
########################################################################
########
#!/usr/bin/env ruby
require 'cipher'
require 'yaml'
module Solitaire
text = ARGV.join(" ")
if FileTest::readable?("deck.yaml")
deck = Deck.new(YAML::load(File.open("deck.yaml")))
else
deck = Deck.new
end
cipher = Cipher.new(text, deck)
puts "#{cipher.mode}ed: #{cipher.crypt}"
end
########################################################################
########
# cipher.rb
########################################################################
########
#!/usr/bin/env ruby
require 'util'
require 'deck'
module Solitaire
ASCII_OFFSET = 64
ALPHABET_SIZE = 26
class Chunker
CHUNK_SIZE = 5
def initialize(text)
@legal_chars_only = text.gsub(/[^A-Za-z]/, "").upcase
@legal_chars_only <<= "X" * (-@legal_chars_only.size % CHUNK_SIZE)
raise "Nothing to chunk (non-alphabet characters removed): #{text}"
if @legal_chars_only.size==0
@chunks = []
@number_chunks = []
end
def chunks
@chunks if @chunks.size > 0
@chunks = @legal_chars_only.gsub(/(.{#{CHUNK_SIZE}})/, '\1
').rstrip.split(" ")
end
def number_chunks
@number_chunks if @number_chunks.size > 0
chunks.collect { |chunk| chunk.split("").collect { |char_string|
char_string[0]-ASCII_OFFSET } }
end
def Chunker.to_letters(number_chunks)
number_chunks.collect { |chunk| chunk.collect { |num|
(num+ASCII_OFFSET).chr }.join }
end
end
class Keystream
A_JOKER = Card.joker(?A)
B_JOKER = Card.joker(?B)
def initialize(deck=Deck.new)
@deck = deck
end
def keystream_letters(chunks)
chunks.collect { |chunk| (1..chunk.size).collect {
next_keystream_letter }.join }
end
def Keystream.card_to_letter(card)
return "" if card.is_joker?
(card.value.offset_mod(ALPHABET_SIZE)+ASCII_OFFSET).chr
end
private
def next_keystream_letter
process_deck
top_card = @deck[0]
keystream_card = @deck[top_card.value]
letter = Keystream.card_to_letter(keystream_card)
letter = next_keystream_letter if letter==""
letter
end
def process_deck
@deck.move_card!(A_JOKER, +1)
@deck.move_card!(B_JOKER, +2)
@deck.triple_cut!([A_JOKER, B_JOKER])
@deck.count_cut!
end
end
class Cipher
ENCRYPTED_TEXT_PATTERN = /\A[A-Z]{5}( [A-Z]{5})*\Z/
def initialize(text, deck=Deck.new)
@chunker = Chunker.new(text)
keystream = Keystream.new(deck)
@keystream_chunker =
Chunker.new(keystream.keystream_letters(@chunker.chunks).join)
if text =~ ENCRYPTED_TEXT_PATTERN
@mode = "decrypt"
@calc_number = proc { |num, keystream_num| num - keystream_num }
else
@mode = "encrypt"
@calc_number = proc { |num, keystream_num| num + keystream_num }
end
end
attr_reader :mode
def crypt
ciphered = [@chunker.number_chunks,
@keystream_chunker.number_chunks].collect_peel do |num_chunk,
keystream_num_chunk|
[num_chunk, keystream_num_chunk].collect_peel do |num,
keystream_num|
@calc_number.call(num,keystream_num).offset_mod(ALPHABET_SIZE)
end
end
Chunker.to_letters(ciphered).join(" ").rstrip
end
end
end
########################################################################
########
# deck.rb
########################################################################
########
require 'util'
module Solitaire
class Deck
NUM_CARDS = 54
def initialize(order=nil)
if order.nil?
@order = Array.new(NUM_CARDS) { |x| x+1 }
else
@order = order.collect { |val| val.instance_of?(Range) ? val.to_a :
val }.flatten
@order.collect! { |val| Card.parse(val).code }
end
end
attr_reader :order
protected :order
def [](index)
Card.parse(@order[index])
end
def move_card!(card, offset)
current_index = @order.index(card.code)
new_index = current_index+offset
if new_index >= NUM_CARDS
new_index -= NUM_CARDS - 1
elsif new_index < 0
new_index += NUM_CARDS - 1
end
@order.delete_at(current_index)
@order.insert(new_index, card.code)
end
def triple_cut!(cards)
raise "exactly two cards required for triple cut: #{cards}" unless
cards.size==2
indices = [@order.index(cards[0].code),
@order.index(cards[1].code)].sort
@order = @order[(indices[1]+1)..@order.size] +
@order[indices[0]..indices[1]] + @order[0..(indices[0]-1)]
end
def count_cut!
num_moved = Card.parse(@order.last).value
if num_moved!=53
@order = @order[num_moved, NUM_CARDS - num_moved - 1] +
@order[0..(num_moved-1)] + [@order.last]
end
self
end
def to_s
"<Deck: #{@order.inspect}>"
end
def ==(val)
@order == val.order
end
end
class Card
ACE = 1
JACK = 11
QUEEN = 12
KING = 13
def initialize(suit, value)
@code = suit.value + value
end
attr_reader :code
alias_method :value, :code
def Card.parse(code)
if (1..52).member?(code)
Card.new(Suit.by_value(code), code.offset_mod(13))
elsif (53..54).member?(code)
Card.joker(code+12)
elsif (65..66).member?(code)
Card.joker(code)
elsif code =~ /\A[AB]\Z/
Card.joker(code[0])
else
raise "Illegal class or value for parameter value, #{code.class}
#{code.inspect}"
end
end
def Card.joker(char)
JokerCard.new(char.chr)
end
def is_joker?
false
end
def ==(other)
code==other.code
end
def <=>(other)
code<=>other.code
end
def to_s
"Card: #{@code}"
end
end
class JokerCard < Card
JOKER_VALUE = 53
def initialize(which_one)
raise "No such joker: #{which_one}" unless which_one =~ /\A[AB]\Z/
@code = 52 + (which_one[0].to_i-64)
end
def is_joker?
true
end
def value
JOKER_VALUE
end
end
class Suit
@@byValue = {}
def Suit.by_value(val)
@@byValue[(val-1)/13*13]
end
def initialize(name, value)
@name = name
@value = value
@@byValue[value] = self
end
attr_reader :name, :value
CLUBS = Suit.new("clubs", 0)
DIAMONDS = Suit.new("diamonds", 13)
HEARTS = Suit.new("hearts", 26)
SPADES = Suit.new("spades", 39)
end
end
########################################################################
########
# util.rb
########################################################################
########
#!/usr/bin/env ruby
class Array
# "Peels" off a tuple of the elements at each successive index across
multiple arrays.
# Assumes self is an array of these multiple arrays. Stops when any of
the arrays is
# exhausted. I stole this from a ruby mailing list somewhere. I also
considered calling this each_tuple
def peel(&p)
collect { |a|
a.length
}.min.times { |i|
yield collect { |a| a[i] }
}
end
# syntactic sugar for Cipher
def collect_peel(&p)
collected = []
peel { |a,b| collected << p.call(a,b) }
collected
end
end
class Fixnum
def offset_mod(base)
((self-1)%base)+1
end
end
########################################################################
########
# deck.yaml
########################################################################
########
# Array of numbers (1 through 54), ranges of those numbers,
# and "A" or "B" that describes the order of the keyed deck
---
- 25
- !ruby/range 1..24
- !ruby/range 26..54
########################################################################
########
# testsuite.rb
########################################################################
########
#!/usr/bin/env ruby
require 'test/unit'
require 'test_cipher'
require 'test_deck'
require 'test_util'
########################################################################
########
# test_cipher.rb
########################################################################
########
#!/usr/bin/env ruby
require 'test/unit'
require 'cipher'
module Solitaire
class TestChunker < Test::Unit::TestCase
def test_chunks
chunker = Chunker.new("Code in Ruby, live longer!")
assert_equal(["CODEI","NRUBY","LIVEL","ONGER"], chunker.chunks)
end
def test_pads_with_Xs
chunker = Chunker.new("sty")
assert_equal(["STYXX"], chunker.chunks)
end
def test_number_chunks
chunker = Chunker.new("Code in Ruby, live longer!")
assert_equal([[3,15,4,5,9], [14,18,21,2,25], [12,9,22,5,12],
[15,14,7,5,18]], chunker.number_chunks)
end
def test_to_letters
assert_equal(["CODEI","NRUBY","LIVEL","ONGER"],
Chunker.to_letters([[3,15,4,5,9], [14,18,21,2,25], [12,9,22,5,12],
[15,14,7,5,18]]))
end
end
class TestKeystream < Test::Unit::TestCase
def setup
@keystream = Keystream.new
end
def test_keystream_letters
chunker = Chunker.new("Code in Ruby, live longer!")
assert_equal(["DWJXH","YRFDG","TMSHP","UURXJ"],
@keystream.keystream_letters(chunker.chunks))
end
def test_card_to_letter
assert_equal("", Keystream.card_to_letter(Card.joker(?A)), "A joker")
assert_equal("", Keystream.card_to_letter(Card.joker(?B)), "B joker")
assert_equal("A", Keystream.card_to_letter(Card.new(Suit::CLUBS,
Card::ACE)), "AC")
assert_equal("Z", Keystream.card_to_letter(Card.new(Suit::DIAMONDS,
Card::KING)), "KD")
assert_equal("A", Keystream.card_to_letter(Card.new(Suit::HEARTS,
Card::ACE)), "AH")
assert_equal("Z", Keystream.card_to_letter(Card.new(Suit::SPADES,
Card::KING)), "KS")
end
end
class TestCipher < Test::Unit::TestCase
def test_encrypt
cipher = Cipher.new("Code in Ruby, live longer!")
assert_equal("encrypt", cipher.mode)
assert_equal("GLNCQ MJAFF FVOMB JIYCB", cipher.crypt)
end
def test_decrypt
cipher = Cipher.new("GLNCQ MJAFF FVOMB JIYCB")
assert_equal("decrypt", cipher.mode)
assert_equal("CODEI NRUBY LIVEL ONGER", cipher.crypt)
end
def test_crypt_idempotent
cipher = Cipher.new("GLNCQ MJAFF FVOMB JIYCB")
assert_equal("decrypt", cipher.mode)
assert_equal("CODEI NRUBY LIVEL ONGER", cipher.crypt)
assert_equal("CODEI NRUBY LIVEL ONGER", cipher.crypt)
end
end
end
########################################################################
########
# test_deck.rb
########################################################################
########
#!/usr/bin/env ruby
require 'test/unit'
require 'deck'
module Solitaire
class TestDeck < Test::Unit::TestCase
def test_constructor_accepts_ranges_in_array
assert_equal(Deck.new, Deck.new([1, 2, 3, 4..52, 53..54]))
end
def test_construcor_accepts_chars_for_jokers
assert_equal(Deck.new, Deck.new((1..52).to_a + [?A, ?B]))
end
def test_move_card_lower
deck = Deck.new
deck.move_card!(Card.new(Suit::DIAMONDS, 6), +5)
assert_equal(Deck.new([1..18,20..24,19,25..54]).to_s, deck.to_s)
end
def test_move_card_one_lower
deck = Deck.new
deck.move_card!(Card.new(Suit::DIAMONDS, 6), +1)
assert_equal(Deck.new([1..18,20,19,21..54]).to_s, deck.to_s)
end
def test_move_card_higher
deck = Deck.new
deck.move_card!(Card.new(Suit::DIAMONDS, 6), -5)
assert_equal(Deck.new([1..13,19,14..18,20..54]), deck)
end
def test_move_card_is_cyclic_plus_1
deck = Deck.new
deck.move_card!(Card.joker(?A), +2)
assert_equal(Deck.new([1,53,2..52,54]), deck)
end
def test_move_card_to_end
deck = Deck.new
deck.move_card!(Card.joker(?A), +1)
assert_equal(Deck.new([1..52,54,53]), deck)
end
def test_move_card_to_one_before_end
deck = Deck.new([2..54,1])
deck.move_card!(Card.joker(?A), +1)
assert_equal(Deck.new([2..52,54,53,1]).to_s, deck.to_s)
end
def test_move_card_to_beginning
deck = Deck.new
deck.move_card!(Card.new(Suit::CLUBS, 2), -1)
assert_equal(Deck.new([2,1,3..54]), deck)
end
def test_move_card_is_cyclic_pass_end_forward
deck = Deck.new
deck.move_card!(Card.joker(?B), +1)
assert_equal(Deck.new([1,54,2..53]), deck)
end
def test_move_card_is_cyclic_pass_end_backward
deck = Deck.new
deck.move_card!(Card.new(Suit::CLUBS, Card::ACE), -1)
assert_equal(Deck.new([2..53,1,54]), deck)
end
def test_move_card_cyclic_backward_five
deck = Deck.new
deck.move_card!(Card.new(Suit::CLUBS, 5), -5)
assert_equal(Deck.new([1..4,6..53,5,54]), deck)
end
def test_triple_cut
deck = Deck.new
deck.triple_cut!([Card.new(Suit::CLUBS, Card::JACK),
Card.new(Suit::HEARTS, Card::KING)])
assert_equal(Deck.new([40..54,11..39,1..10]), deck)
end
def test_triple_cut_with_empty_side
deck = Deck.new([2..53,1,54])
deck.triple_cut!([Card.joker(?A), Card.joker(?B)])
assert_equal(Deck.new([53,1,54,2..52]), deck)
end
def test_count_cut
deck = Deck.new
deck.move_card!(Card.new(Suit::CLUBS, 5), 49)
deck.count_cut!
assert_equal(Deck.new([7..54,1..4,6,5]), deck)
end
end
class TestCard < Test::Unit::TestCase
def test_parse_joker_string
assert_equal(Card.joker(?A), Card.parse("A"))
end
def test_parse_joker_char
assert_equal(Card.joker(?A), Card.parse(?A))
end
def test_parse_normal_card
assert_equal(Card.new(Suit::CLUBS, 5), Card.parse(5))
end
def test_value
assert_equal(1, Card.new(Suit::CLUBS, Card::ACE).value, "AC")
assert_equal(7, Card.new(Suit::CLUBS, 7).value, "7C")
assert_equal(11, Card.new(Suit::CLUBS, Card::JACK).value, "JC")
assert_equal(13, Card.new(Suit::CLUBS, Card::KING).value, "KC")
assert_equal(14, Card.new(Suit::DIAMONDS, Card::ACE).value, "AD")
assert_equal(26, Card.new(Suit::DIAMONDS, Card::KING).value, "KD")
assert_equal(29, Card.new(Suit::HEARTS, 3).value, "3H")
assert_equal(39, Card.new(Suit::HEARTS, Card::KING).value, "KH")
assert_equal(40, Card.new(Suit::SPADES, Card::ACE).value, "AS")
assert_equal(52, Card.new(Suit::SPADES, Card::KING).value, "KS")
assert_equal(53, Card.joker(?A).value, "A Joker")
assert_equal(53, Card.joker(?B).value, "B Joker")
end
def test_is_joker_when_joker
assert(Card.joker(?A).is_joker?, "A joker not joker")
assert(Card.joker(?B).is_joker?, "B joker not joker")
end
def test_is_joker_when_not_joker
assert(!Card.new(Suit::SPADES, 7).is_joker?)
end
end
class TestSuit < Test::Unit::TestCase
def test_by_value_clubs
assert_equal("clubs", Suit.by_value(1).name)
end
def test_by_value_hearts
assert_equal("hearts", Suit.by_value(27).name)
end
def test_hearts
assert_equal("hearts", Suit::HEARTS.name)
end
end
end
########################################################################
########
# test_util.rb
########################################################################
########
#!/usr/bin/env ruby
require 'test/unit'
require 'util'
class TestArray < Test::Unit::TestCase
def test_peel_all_arrays_same_length
tuples = []
a1 = [1,3,5]
a2 = [2,4,6]
a3 = [1,4,9]
[a1, a2, a3].peel { |x,y,z| tuples << [x,y,z] }
assert_equal([[1,2,1],[3,4,4],[5,6,9]], tuples)
end
def test_peel_one_array_shorter
tuples = []
a1 = [1,3,5]
a2 = [2,4]
a3 = [1,4,9]
[a1, a2, a3].peel { |x,y,z| tuples << [x,y,z] }
assert_equal([[1,2,1],[3,4,4]], tuples)
end
def test_collect_peel
a1 = [1,3,5]
a2 = [2,4,6]
assert_equal([3,7,11], [a1, a2].collect_peel { |a,b| a+b })
end
end
class TestFixnum < Test::Unit::TestCase
def test_offset_mod
assert_equal(1, 27.offset_mod(26), "27 wrong")
assert_equal(26, 26.offset_mod(26), "26 wrong")
assert_equal(26, 0.offset_mod(26), "0 wrong")
assert_equal(25, -1.offset_mod(26), "-1 wrong")
end
end