[#89088] More questions about =~ — GGarramuno@... (GGarramuno)
irb(main):006:1* class String
[#89093] Good article on Open Source, GPL, copyright, etc. — Tim Hunter <cyclists@...>
There is periodically some discussion on c.l.r. about Open Source
[#89115] Drb and observer pattern — Stephan K舂per <Stephan.Kaemper@...>
Hi all and have a happy new year everybody!
[#89118] Confused abour 'ri' in 1.8.1? — Frank Mitchell <fmitchell@...>
Sorry if this has been asked before, but ...
[#89119] Loop/Iterator questions — GGarramuno@... (GGarramuno)
1) Is there anything like Perl's continue block available? This is
ts <decoux@moulon.inra.fr> wrote in message news:<200401041500.i04F0jg04445@moulon.inra.fr>...
[#89141] mod_ruby and win2k — David Tillman <dtillman@...>
Hello all, I first sent this to the mod_ruby list - after
[#89159] Ruby general question — "Greg Brondo" <greg@...>
Ok. I'm sold on Ruby (it really is great). I have a question though: Why
[#89162] Dir.chdir '~' — Joel VanderWerf <vjoel@...>
[#89171] Execute code on descendant class init — Chris Morris <chrismo@...>
I've got the following code:
[#89174] DRb question — Jos Backus <jos@...>
I am trying to write a simple remote execution framework, and am running into a
[#89180] nuby question: f.rename(x,y) does not work — "Boris \"BXS\" Schulz" <bxs@...>
Hi,
[#89185] Ruby explained to Python programmers — "Gilles Lenfant" <glenfant-nospam@...>
Hi,
Gilles Lenfant wrote:
[#89189] Best way to send mail in ruby — Bauduin Raphael <rb@...>
Hi,
Bauduin Raphael (rb@raphinou.com) wrote:
Thanks :-)
A lot of these things are snippets on the RubyGarden Wiki, and there is also
[#89192] successive chroots thanks to continuations? — Bauduin Raphael <rb@...>
Hi again,
[#89193] Simple Ruby DB apps/programs ... — Useko Netsumi <usenets@...>
I was wondering if there are some example of small Ruby(1.8.1) Database
Thanks Ara.
Useko Netsumi wrote:
Carl Youngblood wrote:
[#89194] Rublog questions — Hal Fulton <hal9000@...>
I probably "just don't get it" yet. So feel free to say,
[#89206] How to disconnect a drb client? — Nathaniel Talbott <nathaniel@...>
I have a drb client/server application, and I'd like the server to be
[#89222] webhosting with ruby? — "Chris Pine" <cpine@...>
Does anyone know of any webhosters offering Ruby (or mod_ruby)?
[#89261] class Time doesn't pass year 2038? — Jean-Baptiste <temuphaey0@...>
Hi!
On Wed, Jan 07, 2004 at 10:06:24AM +0900, Josef 'Jupp' SCHUGT wrote:
On Wed, Jan 07, 2004 at 10:36:42AM +0900, Mark J. Reed wrote:
[#89271] name of current ruby iterpreter — Joel VanderWerf <vjoel@...>
[#89285] proc question and instance_methods — GGarramuno@... (GGarramuno)
Continuing with the sets of newbie questions...
[#89294] problems compiling ruby 1.8.1 on AIX 4.3.3 — biblia99@... (paul)
Hi,
[#89301] Re: Ruby.exe crashing with WIN32OLE WMI example? — "Pe, Botp" <botp@...>
Yonatan of yonatan_avraham at hotmail.com humbly asked:
[#89312] rub 1.8.1 and $= — Patrick Gundlach <clr1.10.randomuser@...>
Hello out there,
[#89322] Ruby and QT/KDE — "Greg Brondo" <greg@...>
Is there any mature bindings (like Python has) for KDE/QT and Ruby?
Greg Brondo wrote:
[#89339] Compression (besides Huffman) and Ruby — "Josef 'Jupp' SCHUGT" <jupp@...>
Hi!
[#89353] ruby-1.8.1/ext/tk/sample/demos-en/ : none works! — Paul.Sue@... (Paul)
Hi,
[#89359] RDoc & other questions... — GGarramuno@... (GGarramuno)
1) Is there any document describing the syntax and rules that rdoc
[#89367] Database applications and OOness — Tim Bates <tim@...>
People,
I've been watching this thread with a great deal of interest. I'm
On Fri, 9 Jan 2004 04:33:15 +0900, Pete y wrote:
On Thursday 08 January 2004 03:46 pm, Austin Ziegler wrote:
In article <3FFE2A2E.5040604@po.cwru.edu>, Dan Doel wrote:
Quoting Joe Mason <joe@notcharles.ca>:
jason r tibbetts wrote:
On Sat, Jan 10, 2004 at 12:29:24AM +0900, Jamis Buck wrote:
il Wed, 7 Jan 2004 19:06:32 +0900, Tim Bates <tim@bates.id.au> ha
On Wed, Jan 07, 2004 at 08:16:40PM +0900, gabriele renzi wrote:
Tim Bates wrote:
Tim Bates <tim@bates.id.au> wrote in message news:<20040108230256.GB12826@bates.id.au>...
On Fri, 9 Jan 2004 13:41:44 +0900
A bit of background before I respond to the question of using Critera for
[#89407] Re: rexml and external entities — "Volkmann, Mark" <Mark.Volkmann@...>
> -----Original Message-----
"Volkmann, Mark" <Mark.Volkmann@AGEDWARDS.com> wrote in
[#89418] ruby 1.8.1 crosscompiling for armv4l (iPAQ) — Kero <kero@...>
Hi all!
[#89434] convert a C/C++ array to a Ruby array — elathan@...
Hello!
[#89446] testunit and infinite loop — Bil Kleb <Bil.Kleb@...>
My searching abilities are failing me today...
[#89453] ruby 1.8.1 windows installer — KONTRA Gergely <kgergely@...>
Hi!
On Thu, 2004-01-08 at 12:37, KONTRA Gergely wrote:
>
> Since the first edition of the Pickaxe book didn't exactly fly off the
On Wed, Jan 14, 2004 at 09:41:38PM +0900, Alan Davies wrote:
On Thu, 15 Jan 2004, Mauricio Fern疣dez wrote:
[#89460] Re: block delimiting — "Mike Wilson" <wmwilson01@...>
On Thursday 08 January 2004 03:24 pm, Mike Wilson wrote:
Pete Yadlowsky wrote:
In article <Law12-F38fDGCl9FopY000082ac@hotmail.com>, Mike Wilson wrote:
[#89494] ANN: First release of Perl's Getopt::Declare for ruby — GGarramuno@... (GGarramuno)
Okay, as a way of returning the favor for all my recent silly
GGarramuno wrote:
[#89545] Should a newbie learn 1.6 or 1.8? — stevec890@... (Steve Cooper)
I'm just starting to learn Ruby, and I've purchased Ruby in a Nutshell
[#89565] Ruby 1.8.0 bugs on Dir — ggarramuno@... (GGarramuno)
Okay, two separate bugs. One probably on all platforms and one more serious
[#89589] Anonymous CVS access — Bil Kleb <Bil.Kleb@...>
Hello.
[#89590] regex to NOT match? — Ruby Baby <ruby@...>
Sorry it seems like the smallest thing, but I'm stuck on this.
[#89605] How to reproduce the tk dialect? — shasckaw <shasckaw@...>
Hello,
[#89611] Converting a string to an array of tokens — "John W. Long" <ws@...>
Is there a fast way to convert a string into a list of tokens?
[#89630] RDoc/Ruby1.9 problems — Jim Menard <jimm@...>
I had previously installed RDoc. I checked out the latest Ruby via CVS,
[#89652] Game Programming with Python, Lua and Ruby — Carsten Eckelmann <careck@...42.com>
Just read this over at the Daily Python-URL!:
[#89664] efficient way to get the first found (or a random) key/value of a large hash — David Garamond <lists@...6.isreserved.com>
# a large hash
[#89672] faster integer arithmetics & arbitrary precision floating number — David Garamond <lists@...6.isreserved.com>
1. Is there a way in Ruby to speed up 32bit integer arithmetics (only
David Garamond wrote:
On Tue, 13 Jan 2004, David Garamond wrote:
What abouts Rubys design would make integer arithmetic slower than integer
On Tue, 13 Jan 2004, Dave Thomas wrote:
David Garamond wrote:
Emmanuel Touzery wrote:
On Monday 12 of January 2004 16:59, David Garamond wrote:
On Monday 12 of January 2004 20:36, Emmanuel Touzery wrote:
[#89699] Problem using https:// — Dave Thomas <dave@...>
For the first time I'm trying to connect to an https server. However,
[#89718] Getting the tail of a list? — Carsten Eckelmann <careck@...42.com>
Hi everybody,
Carsten Eckelmann wrote:
[#89737] Ruby binding for OpenDX? — Bil Kleb <Bil.Kleb@...>
I've googled and bladed, but to no avail...
In article <40036FDA.6080509@NASA.Gov>, Bil Kleb <Bil.Kleb@NASA.Gov> wrote:
[#89756] : how can I write a goto in ruby — "smayemba" <aidez.moi@...>
Hi all,
[#89796] Ruby OS mentioned on /. — intc_ctor@... (Phil Tomson)
http://developers.slashdot.org/developers/04/01/13/0123250.shtml?tid=185&tid=190
./ normally does not have vaporware... are a bunch of ruby (a very high
Somehow i have this strange feeling that not all ruby peeps are strictly
On Wed, 14 Jan 2004, Zach Dennis wrote:
[#89797] HP-UX+mkmf.rb -- compilation problems with 1.8.1 — Kero <kero@...>
Hi,
[#89816] configuring openssl and ruby — Joel VanderWerf <vjoel@...>
[#89831] What object-configuration approach to use? — Mike Williams <mwilliams@...>
Consider a class that supports a number of configurable properties.
> Consider a class that supports a number of configurable properties.
On Wed, Jan 14, 2004 at 02:07:43PM +0900, Gavin Sinclair wrote:
On Wednesday, January 14, 2004, 7:15:58 PM, Mauricio wrote:
[#89864] Updated documentation — "Imobach =?iso-8859-15?q?Gonz=E1lez_Sosa?=" <imobachgs@...>
Hi all,
[#89865] Array.delete — "E.-R. Bruecklmeier" <news01@...>
Hello
[#89869] Concatenating variable number of Arrays ? — Johan Holmberg <holmberg@...>
[#89872] collect! and Enumerable — Jim Freeze <jim@...>
Hi
[#89897] ruby-dev summary 22435-22573 — Minero Aoki <aamine@...>
Hi all,
Robert Feldt <feldt@ce.chalmers.se> wrote in message
[#89900] Stack level too deep (SystemStackError) — "Jesper Olsen" <Jesper@...>
I have a program where I'm getting a Stack level too deep (SystemStackError)
[#89902] Nested scopes and the Singleton pattern — Hal Fulton <hal9000@...>
Hello all,
Hi,
nobu.nokada@softhome.net wrote:
[#89951] NULL pointer given, Win32API — "Berger, Daniel" <djberge@...>
Hi all,
[#89966] Quick Input -- Sockets vs. HTTP — "dhtapp" <dhtapp@...>
Hi,
[#89975] drb, firewall, ssh tunneling, and yield — Joel VanderWerf <vjoel@...>
On Jan 15, 2004, at 19:10, Joel VanderWerf wrote:
Nathaniel Talbott wrote:
On Jan 15, 2004, at 19:49, Joel VanderWerf wrote:
On Friday, 16 January 2004 at 9:29:59 +0900, Nathaniel Talbott wrote:
On Jan 15, 2004, at 20:16, Jim Freeze wrote:
On Friday, 16 January 2004 at 11:21:40 +0900, Nathaniel Talbott wrote:
[#89990] HTML templating that works in more than one language? — Ruby Baby <ruby@...>
Has anyone seen an HTML templating system that would be
Hello Ruby,
On Fri, Jan 16, 2004 at 11:46:14PM +0900, Lothar Scholz wrote:
[#90013] Fighting Ruby's bad fame — gabriele renzi <surrender_it@...1.vip.ukl.yahoo.com>
Hi gurus and nubys,
Hello gabriele,
In article <af53b0ba.0401171921.7cf9b9b7@posting.google.com>,
>can you elaborate? Ruby has namespaces defined by modules.
[#90023] Installing a program Unix-like — Malte Milatz <malteDELETETHIS@...>
Users of Linux, FreeBSD etc. are used to downloading an archive,
On Sat, Jan 17, 2004 at 05:00:05AM +0900, Malte Milatz wrote:
I wrote:
On Tue, Jan 20, 2004 at 09:05:00PM +0900, Malte Milatz wrote:
On Tue, Jan 20, 2004 at 11:01:25PM +0900, Mauricio Fern?ndez wrote:
[#90058] SOAP4R and WSDL — Ian Macdonald <ian@...>
Hello,
[#90071] In which order are files looked for when loaded/requierd - and what's the order of suffixes? — Stephan K舂per <Stephan.Kaemper@...>
Hi all,
[#90077] long expression syntax — rick.hu@... (Rick Hu)
why do I get a syntax error for
On Sun, Jan 18, 2004 at 08:10:01AM +0900, Rick Hu wrote:
messju mohr wrote:
On Sun, Jan 18, 2004 at 08:37:49AM +0900, Jamis Buck wrote:
[#90086] is Ruby the right language for these projects? — Ruby Baby <ruby@...>
Please forgive my self-centered question. I've been learning all about Ruby
[#90102] mod_ruby(.rbx) newbie — Ruby Tuesday <rubytuzdayz@...>
Hi, I was wondering why my .rbx script just print the out out of my ruby
> Hi, I was wondering why my .rbx script just print the out out of my
[#90103] C++ from Ruby ARRRGGHH!! — Asfand Yar Qazi <im_not_giving_it_here@..._hate_spam.com>
Yes, I know there's a wrapper available already that can wrap C++
[#90113] running external process? — Ferenc Engard <ferenc@...>
Hi all,
[#90126] setting instance variable "dynamically" — Bauduin Raphael <rb@...>
I saw in the pickaxe there's a way to call methods dynamically, with
[#90139] segfaults on mandrake... — Ferenc Engard <ferenc@...>
Hello,
nobu.nokada@softhome.net wrote:
[#90140] mysql-ruby troubles — Armin Preis <preisa@...>
Hi!
[#90157] Ruby1.8.1 on FreeBSD — Carsten Eckelmann <careck@...42.com>
Hi,
[#90161] List of defined classes/modules — "Mark J. Reed" <markjreed@...>
How can I programmatically determine what classes and modules
[#90183] Re: setting instance variable "dynamically" — "Weirich, James" <James.Weirich@...>
> > The following will work with arbitrary objects ...
[#90200] regex help — Chris Morris <chrismo@...>
I need a re such that:
On Tue, 20 Jan 2004 04:38:12 +0900, Chris Morris wrote:
Simon Strandgaard wrote:
[#90213] Help! cannot recursive call — "Greg Brondo" <greg@...>
Having a problem with following code. It will drop to the first directory
[#90214] detecting Win95/Win98/WinME — Joel VanderWerf <vjoel@...>
[#90228] Re: New to Python: my impression v. Perl/Ruby — ptkwt@... (Phil Tomson)
In article <mailman.493.1074484056.12720.python-list@python.org>,
>>>>> "Phil" == Phil Tomson <ptkwt@aracnet.com> writes:
Ville>Though "sending messages" to int literals is a syntax error.
"Zach Dennis" <zdennis@mktec.com> wrote in message news:<AKEKIKLMCFIHPEAHKAAICEOHHFAA.zdennis@mktec.com>...
Received: Wed, 21 Jan 2004 16:59:59 +0900
[#90233] eRuby on Mac OS X — kevin_mcconnell@... (Kevin M)
I'm trying to get eRuby and mod_ruby running on OS X (Panther).
[#90255] Re: recvfrom(2) error on OS X 10.3.2 — fukumoto@...
On Jan 20, 2004, at 09:06, fukumoto@nospam.imasy.or.jp wrote:
[#90291] question about blocks — Ferenc Engard <ferenc@...>
Hello,
[#90309] Proposal for programming language of the year — Christian Szegedy <szegedy@...>
Pragmatic Programmers wrote, that every year a new language should be
[#90317] Re: Proposal for programming language of the year — "Volkmann, Mark" <Mark.Volkmann@...>
I think one of the main points of learning a new language each year is that
In article <89539780CB9BD51182270002A5897DF605ED006B@hqempn04.agedwards.com>, Volkmann, Mark wrote:
[#90319] Parsing periods of time: Code and questions — "Josef 'Jupp' SCHUGT" <jupp@...>
Hi!
[#90353] no timeslicing? — Rasputin <rasputnik@...>
[#90354] Modules as namespace — gm@... (George Moschovitis)
Hello everyone,
George Moschovitis wrote:
[#90375] gsub oddity? — Ralph Mason <ralph.mason@...>
What am I missing here. I am trying to replace a single quote with the
[#90378] Boost Protein Expression by Codon Optimization — Sally Wang <service@...>
Dear Colleague,
[#90379] Trouble installing eRuby on MacOS X 10.3 — Gavin Kistner <gavin@...>
All day I have been trying to get mod_ruby and eRuby installed on MacOS
[#90405] Very basic Ruby docs/books/tutorial? — Robert Feldt <feldt@...>
Hello,
[#90420] BibTeX parser — Daniel Carrera <dcarrera@...>
Hi all,
[#90422] Parse Date bug? — Guillaume Marcais <guslist@...>
Parse Date returns illegal values in a date. Ex:
[#90437] how to broadcast UDP packets — Joel VanderWerf <vjoel@...>
On Thu, 2004-01-22 at 22:38, Joel VanderWerf wrote:
[#90472] Ruby/Extensions v0.3 released — Gavin Sinclair <gsinclair@...>
A new version of Ruby/Extensions, a suite of useful methods added to
On Friday 23 January 2004 02:06 pm, Gavin Sinclair wrote:
On Saturday, January 24, 2004, 5:07:40 AM, T. wrote:
[#90473] Usage of 'super' — Michael Weller <michael@...>
Hi!
[#90491] FXRuby: adding child widgets after #run has started — Yuri Leikind <y.leikind@...>
Hello all,
[#90495] Regular Expressions — Rove Monteux <rove.monteux@...>
Hi there,
Rove Monteux wrote:
[#90505] Why is to_a going to be obsolete? — Patrick Bennett <patrick.bennett@...>
I find it immensely useful when dealing with arrays to be able to
Patrick Bennett wrote:
Hmmm, thanks, but it's a bit 'non-obvious' to casual Ruby programmers
On Friday 23 January 2004 06:43 pm, Gennady wrote:
Hi,
Ah, thanks! I see that it returns the object as-is if it's already an
[#90513] detecting default parameters — Ian Macdonald <ian@...>
Hello,
[#90559] RubyGems news? — ptkwt@... (Phil Tomson)
After RubyConf2002 some people decided that a package
[#90574] cgi.rb params initialize_query() — Dan Janowski <danj@3skel.com>
I assert that initialize_query is broken. CGI::parse should _always_ be
[#90589] Re: determine method passed and determine the receiver that received the method — "Robert Klemme" <bob.news@...>
[#90598] perl bug File::Basename and Perl's nature — xah@... (Xah Lee)
Just bumped into another irresponsibility in perl.
[#90602] Keyword arguments in Ruby — grom_3@... (grom)
Is it possbile for Ruby to have keyword arguments added in like in
[#90612] Constant inheritance — David Heinemeier Hansson <david@...>
Is there anyway to let a subclass overwrite a constant in the
[#90613] Running a specific test in a suite from the command-line — David Heinemeier Hansson <david@...>
I remember being able to write "ruby my_test_suite.rb
[#90640] Regurgitating the contents of a file — Philip Mak <pmak@...>
What's the shortest way to regurgitate the contents of a file? I mean
Philip Mak wrote:
[#90655] Re: nuby: determine method passed and determine the receiver that rec eived the method — "Pe, Botp" <botp@...>
On Mon, Jan 26, 2004 at 12:02:11PM +0900, "Pe, Botp" wrote:
[#90667] ruby-math and "why is ** not abelian?" — vanjac12@... (Van Jacques)
I was reading the 1st thread in the ruby-math discussion at
[#90693] rdoc and hyperlinks — Joel VanderWerf <vjoel@...>
For some reason, my rdoc installation isn't generating hyperlinks for
I thought "hyperlinks, rdoc can do that now? cool!" and updated to the latest
Ack, forget this.
Sam Roberts wrote:
[#90699] def foo[](x) — Gavin Kistner <gavin@...>
#Works
> ....without having to create a new class for bar and define the []
David Heinemeier Hansson wrote:
[#90706] programming languages — KONTRA Gergely <kgergely@...>
Hi!
[#90735] storing message in exception object — David Garamond <lists@...6.isreserved.com>
I found myself using exception object (instead of ) more and more. They
[#90750] choosing ruby? — Piergiuliano Bossi <p_bossi_AGAINST_SPAM@...>
We are on the way to start a new project, a web application with a bunch
On Tue, Jan 27, 2004 at 10:29:56PM +0900, Robert Klemme wrote:
Mauricio Fern疣dez wrote:
On Wed, Jan 28, 2004 at 01:21:37PM +0900, Joel VanderWerf wrote:
On Thu, 2004-01-29 at 11:34, Mauricio Fern叩ndez wrote:
[#90756] Editor — Safran von Twesla <me@...>
Hi,
The windows installer comes with SciTE. I'm happy with it.
On Wed, 28 Jan 2004 00:14:35 +0900, "Zach Dennis" <zdennis@mktec.com>
[#90763] fltk build and doc access problems — Jim Freeze <jim@...>
Hi
[#90768] checksum with ruby, how? — shasckaw <shasckaw@...>
Hello there, I need help.
[#90770] newbee question about "missing" hash methods +, += and << — benny <linux@...>
Hi,
>>>>> "b" == benny <linux@marcrenearns.de> writes:
[#90774] ./configure problem — William Sundberg <william@...4trade.com>
uname -a
[#90793] Re: nuby: can't get an image via http — Emmanuel Touzery <emmanuel.touzery@...>
Hello,
In article <200401271823.35269.emmanuel.touzery@wanadoo.fr>,
[#90803] MiniRubyWiki in action? — phlip_cpp@... (Phlip)
Rubies:
[#90845] float types — elathan@...
Hello!
[#90875] Ruby & gd — Safran von Twesla <me@...>
Hi,
[#90876] Why does DBI insist on using it's own date/time classes? — David Heinemeier Hansson <david@...>
I can't seem to figure out why DBI uses its own set of date/time
[#90879] hostname -> www.codeforpeople.com — "Ara.T.Howard" <Ara.T.Howard@...>
[#90913] vimrc for Ruby or rubytidy — Theodore Knab <tjk@...>
Does someone have a '.vimrc' file they will share
> Does someone have a '.vimrc' file they will share
Hi,
[#90934] Bignums and return — Andre Nathan <andre@...>
Hello
On Thu, 29 Jan 2004 22:41:42 +0900, Andre Nathan <andre@digirati.com.br>
On Fri, 2004-01-30 at 05:20, Jason Hutchens wrote:
>>>>> "A" == Andre Nathan <andre@digirati.com.br> writes:
On Fri, Jan 30, 2004 at 08:05:03PM +0900, ts wrote:
[#90948] why won't ruby chomp for me? — Emmanuel Touzery <emmanuel.touzery@...>
Hello,
[#90971] time comparison — tony summerfelt <snowzone5@...>
i want to parse and trim a log file. the date format log file looks like:
t3 = t2 - 24 * 2600 * x # - for Time work on the seconds
On Thu, 29 Jan 2004 at 18:51 GMT, Guillaume Marcais <guslist@free.fr> wrote:
[#90976] Why is def foo? legal but @foo? illegal? — Gavin Kistner <gavin@...>
Can someone tell me why you can define a method with a question mark in
[#90981] Checking the parameters "type" — "Imobach =?iso-8859-15?q?Gonz=E1lez_Sosa?=" <imodev@...>
Hi all,
[#90988] fallbacks using contiuations — Joel VanderWerf <vjoel@...>
"Jim Weirich" <jim@weirichhouse.org> wrote in message news:<33737.216.23.36.251.1075442652.squirrel@jimweirich.umlcoop.net>...
[#90992] rescue *[] — Joel VanderWerf <vjoel@...>
Hi,
[#91005] Ruby and Perl Integration — "John W. Long" <ws@...>
All this talk about RJNI has gotten me thinking. Has anyone attempted to
--- "John W. Long" <ws@johnwlong.com> wrote:
In article <4019C0B9.6090207@qiqsolutions.com>,
[#91041] Windows 1.8.1 installer ready — Andrew Hunt <andy@...>
rubyinstaller.sourceforge.net now has the latest installer, built for
[#91053] Changes to "Programming Ruby" book for 1.8.x — intc_ctor@... (Phil Tomson)
Since the text to Dave & Andy's "Programming Ruby" book is freely
[#91056] principle of most suprise — tony summerfelt <snowzone5@...>
gah, ruby is doing it to me again:
[#91071] Accesing to private attributes — "Imobach =?iso-8859-15?q?Gonz=E1lez_Sosa?=" <imodev@...>
Hi all,
[#91088] flip flop operator and assignment — ptkwt@... (Phil Tomson)
I'm working on the pattern matching section for
In article <200401311343.i0VDh2Z00793@moulon.inra.fr>,
Jamis Buck <jgb3@email.byu.edu> wrote in message news:<401F1E82.1080008@email.byu.edu>...
Phil Tomson wrote:
[#91089] No difference between .. and ... flip/flop operators? — ptkwt@... (Phil Tomson)
When constructing ranges of values (such as Fixnums), ... excludes the
Dan Doel wrote:
On Jan 31, 2004, at 09:38, Michael campbell wrote:
Nathaniel Talbott wrote:
On Jan 31, 2004, at 10:58, Michael campbell wrote:
In article <401B6792.10204@po.cwru.edu>, Dan Doel <djd15@po.cwru.edu> wrote:
In article <E15487A8-540F-11D8-83F8-000A95CD7A8E@talbott.ws>,
Phil Tomson wrote:
Hal Fulton wrote:
In article <401C50D5.601@yahoo.com>,
[#91099] Ruby 1.8.1 REXML performance — Steven Jenkins <steven.jenkins@...>
I have a script that uses REXML to stream parse an XML file and load a
Open source == Learn it yourself by trying and get it right if you can,
Steven Jenkins <steven.jenkins@ieee.org> wrote in message news:<401C268F.80805@ieee.org>...
Daniel Berger wrote:
I've repeated all the tests with Ruby 1.8.0 and it sure looks like
[#91101] credit card processing — Armin Roehrl <armin@...>
Hi,
[#91104] graphics lib? — Alwin Blok <alwinblok@...>
Hello,
On Sun, 01 Feb 2004 16:18:50 -0600, Charles Comstock wrote:
[#91109] cascading message sends — paulmg@... (Paul MG)
In Smalltalk, which Ruby is much like in some ways, you can 'cascade'
Re: drbssl problem with certificates
Hi,
> From: "Joel VanderWerf" <vjoel@PATH.Berkeley.EDU>
> Sent: Wednesday, January 14, 2004 5:54 PM
> > Maybe, the next issue might be "how to generate key and certificate"
> > -> "how to create CA (certificate authority)" -> "how to setup
> > drbssl client/server with key/certificate". If you are really a
> > ssl newbie (sorry), it's rather a long road. Do you really need
> > SSL?
>
> Well, maybe not. In my distributed app, users have passwords that they
> use in their drb clients to access their own data in the server. The
> data itself is not critical, though, so a stolen password is not the end
> of the world (and the server itself will be SAFE enough not to do any
> harm). I was hoping SSL would be easy to plug in to drb, and generating
> keys would be as easy as it is for SSH (maybe it is?).
Unfortunately, no. You'll know...
> > I'll be able to post setup log of this tomorrow or the next if you
> > want. Though I've not used drb with ssl yet.
>
> Only if you feel like it, NaHi. But I have a feeling the next step is
> for me to read the openssl man page....
Setting CA up with openssl command line sample can be found
from Google. But I love ruby. I feel like it. Here we go.
###
## Get setup scripts.
#
0$ mkdir ~/drbssldemo
0$ cd ~/drbssldemo
0$ wget http://rrr.jin.gr.jp/dav/NaHi/casetupssample/casetupsample_20040115.tar.gz
--12:05:08-- http://rrr.jin.gr.jp/dav/NaHi/casetupssample/casetupsample_20040115.tar.gz
=> `casetupsample_20040115.tar.gz'
Resolving rrr.jin.gr.jp... 61.120.18.100
Connecting to rrr.jin.gr.jp[61.120.18.100]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3,038 [application/x-tar]
100%[====================================>] 3,038 --.--K/s
12:05:09 (28.97 MB/s) - `casetupsample_20040115.tar.gz' saved [3038/3038]
0$ gzip -dc casetupsample_20040115.tar.gz | tar xvf -
ca_config.rb # CA configuration file
drbssl_c.rb # DRb SSL server sample based on drb/sample/drbssl_s.rb
drbssl_s.rb # DRb SSL client sample based on drb/sample/drbssl_c.rb
gen_cert.rb # generates certificate
gen_rsakey.rb # generates RSA keypair
init_ca.rb # initializes files for CA
###
## Setup CA
#
0$ mkdir ~/demoCA
0$ cd ~/demoCA
0$ cp -p ~/drbssldemo/ca_config.rb .
0$ cat ca_config.rb
class CAConfig
BASE_DIR = "/home/nakahiro/demoCA"
KEYPAIR_FILE = "#{BASE_DIR}/private/cakeypair.pem"
CERT_FILE = "#{BASE_DIR}/cacert.pem"
SERIAL_FILE = "#{BASE_DIR}/serial"
NEW_CERTS_DIR = "#{BASE_DIR}/newcerts"
NEW_KEYPAIR_DIR = "#{BASE_DIR}/private/keypair_backup"
CRL_DIR = "#{BASE_DIR}/crl"
NAME = [['C', 'JP'], ['O', 'JIN.GR.JP'], ['OU', 'RRR']]
CA_CERT_DAYS = 5 * 365
CA_RSA_KEY_LENGTH = 2048
CERT_DAYS = 365
CERT_KEY_LENGTH_MIN = 1024
CERT_KEY_LENGTH_MAX = 2048
CDP_LOCATION = nil
OCSP_LOCATION = nil
CRL_FILE = "#{CRL_DIR}/rrr.crl"
CRL_PEM_FILE = "#{CRL_DIR}/rrr.pem"
CRL_DAYS = 14
PASSWD_CB = Proc.new { |flag|
print "Enter password: "
pass = $stdin.gets.chop!
# when the flag is true, this passphrase
# will be used to perform encryption; otherwise it will
# be used to perform decryption.
if flag
print "Verify password: "
pass2 = $stdin.gets.chop!
raise "verify failed." if pass != pass2
end
pass
}
end
0$ vi ca_config.rb # Edit for your env.
# BASE_DIR is a must. NAME should be changed once
# after you succeeded initial setup.
0$ ~/drbssldemo/init_ca.rb
Generating CA keypair: ............................................................
Writing keypair.
Enter password: 1234 # Set a password for CA's private key. Don't forget
# this password. The private key cannot be activated
# without this password. You can't do anything without
# the private key activated.
Verify password: 1234 # Input again.
Writing /home/nakahiro/demoCA/cacert.pem.
DONE. (Generated certificate for '/C=JP/O=JIN.GR.JP/OU=RRR/CN=CA')
0$ ls # init_ca.rb generates following files.
ca_config.rb cacert.pem crl/ newcerts/ private/ serial
###
## Generate SSL server certificate
#
## Create private/public keypair
0$ mkdir ~/demoserver
0$ cd ~/demoserver
0$ ~/drbssldemo/gen_rsakey.rb keypair.pem
Generating CA keypair: .....................................................
Writing keypair.
Enter password: 5678 # Set a password for SSL server's private key. You
# need this password to activate the private key. SSL
# server requires private key activated at running.
# So you must type this password each time to wake SSL
# server up.
Verify password: 5678 # Input again.
## Create CSR: Certificate Signing Request
0$ ~/cvs/ruby/HEAD/sample/openssl/gen_csr.rb --key keypair.pem /C=JP/O=JIN.GR.JP/OU=RRR/OU=CA/CN=localhost # Creates
"localhost" server certificate.
# You can specify hostname here.
# gen_csr.rb is included in ruby package.
Enter PEM pass phrase: 5678 # To create CSR, you must use private key to
# show your identity. So you need to type the
# password here.
Generating CSR for [["C", "JP"], ["O", "JIN.GR.JP"], ["OU", "RRR"], ["OU", "CA"], ["CN", "localhost"]]
Writing csr.pem...
## Send CSR to CA
0$ cp -p csr.pem ~/demoCA/csr_localhost.pem
## CA creates a certificate from CSR
0$ cd ~/demoCA
0$ ~/drbssldemo/gen_cert.rb --type server --out cert_localhost.pem csr_localhost.pem
Reading CA cert (from /home/nakahiro/demoCA/cacert.pem)
Reading CA keypair (from /home/nakahiro/demoCA/private/cakeypair.pem)
Enter password: 1234 # To create certificate, you need to type the password
# of CA.
Writing cert.pem...
DONE. (Generated certificate for '/C=JP/O=JIN.GR.JP/OU=RRR/OU=CA/CN=localhost')
## Send back the certificate to SSL server
0$ mv cert_localhost.pem ~/demoserver
0$ cp -p cacert.pem ~/demoserver
###
## Genertes SSL client certificate
#
0$ mkdir ~/democlient
0$ cd ~/democlient
## At the SSL server certificate section, I generated a keypair then pass it to
## gen_csr.rb with --key option. gen_csr.rb can do it at once as below. But
## bear in mind that the private key which gen_csr.rb generates is not
## protected by a password so anyone who get the keypair.pem file can use the
## private key without any protect.
0$ ~/cvs/ruby/HEAD/sample/openssl/gen_csr.rb /C=JP/O=JIN.GR.JP/OU=RRR/OU=CA/CN=NaHi/emailAddress=nahi@keynauts.com
[["C", "JP"], ["O", "JIN.GR.JP"], ["OU", "RRR"], ["OU", "CA"], ["CN", "NaHi"], ["emailAddress", "nahi@keynauts.com"]]
...........................................................
Writing keypair.pem...
Generating CSR for [["C", "JP"], ["O", "JIN.GR.JP"], ["OU", "RRR"], ["OU", "CA"], ["CN", "NaHi"], ["emailAddress",
"nahi@keynauts.com"]]
Writing csr.pem...
0$ ls
csr.pem keypair.pem
0$ cp -p csr.pem ~/demoCA/csr_nahi.pem
0$ cd ~/demoCA
0$ ~/drbssldemo/gen_cert.rb --type client --out cert_nahi.pem csr_nahi.pem
Reading CA cert (from /home/nakahiro/demoCA/cacert.pem)
Reading CA keypair (from /home/nakahiro/demoCA/private/cakeypair.pem)
Enter password: 1234
Writing cert.pem...
DONE. (Generated certificate for '/C=JP/O=JIN.GR.JP/OU=RRR/OU=CA/CN=NaHi/emailAddress=nahi@keynauts.com')
0$ mv cert_nahi.pem ~/democlient
0$ cp -p cacert.pem ~/democlient
###
## Run DRb SSL server
#
0$ cd ~/demoserver
0$ cp -p ~/drbssldemo/drbssl_s.rb .
0$ cat drbssl_s.rb
#!/usr/bin/env ruby
require 'drb'
require 'drb/ssl'
here = ARGV.shift || "drbssl://localhost:3456"
class HelloWorld
include DRbUndumped
def hello(name)
"Hello, #{name}."
end
end
config = Hash.new
config[:verbose] = true
config[:SSLPrivateKey] = OpenSSL::PKey::RSA.new(File.read("keypair.pem"))
config[:SSLCertificate] =
OpenSSL::X509::Certificate.new(File.read("cert_localhost.pem"))
DRb.start_service(here, HelloWorld.new, config)
puts DRb.uri
$stdin.gets
DRb.stop_service
0$ ruby drbssl_s.rb
Enter PEM pass phrase:
drbssl://localhost:3456
###
## Run DRb SSL client (on another terminal)
#
0$ cd ~/democlient
0$ cp -p ~/drbssldemo/drbssl_c.rb .
0$ cat drbssl_c.rb
#!/usr/bin/env ruby
require 'drb'
require 'drb/ssl'
there = ARGV.shift || "drbssl://localhost:3456"
config = Hash.new
config[:SSLVerifyMode] = OpenSSL::SSL::VERIFY_PEER
config[:SSLCACertificateFile] = "cacert.pem"
# config[:SSLPrivateKey] = OpenSSL::PKey::RSA.new(File.read("keypair.pem"))
# config[:SSLCertificate] =
# OpenSSL::X509::Certificate.new(File.read("cert_nahi.pem"))
config[:SSLVerifyCallback] = lambda { |ok, store|
p [ok, store.error_string]
ok
}
DRb.start_service(nil,nil,config)
h = DRbObject.new(nil, there)
while line = gets
p h.hello(line.chomp)
end
0$ ruby drbssl_c.rb
# Type something here and see the result.
Above example does not use SSL client certificate for authentication.
Here is the DRb SSL server which requires client certificate to
connect. Try to connect with drbssl_c.rb.
====
#!/usr/bin/env ruby
require 'drb'
require 'drb/ssl'
here = ARGV.shift || "drbssl://localhost:3456"
class HelloWorld
include DRbUndumped
def hello(name)
"Hello, #{name}."
end
end
config = Hash.new
config[:verbose] = true
config[:SSLVerifyMode] = OpenSSL::SSL::VERIFY_PEER | OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT
config[:SSLCACertificateFile] = "cacert.pem"
config[:SSLPrivateKey] = OpenSSL::PKey::RSA.new(File.read("keypair.pem"))
config[:SSLCertificate] =
OpenSSL::X509::Certificate.new(File.read("cert_localhost.pem"))
config[:SSLVerifyCallback] = lambda { |ok, store|
p [ok, store.error_string]
ok
}
DRb.start_service(here, HelloWorld.new, config)
puts DRb.uri
$stdin.gets
DRb.stop_service
====
You'll know if you try, current DRb SSL server implementation
hangs when SSLError raises. It's not good maybe. I'll talk to
the author.
Regards,
// NaHi