185181-186500 subjects 185606-248301

How to make readline work in IRB?
185329 [rhkramer@gm ] I did mention this in another thread, but (I think) think I've learned a
185347 [vjoel@pa h. ] You may need the devel version of the package, so the readline headers
185357 [rhkramer@gm ] Joel,
+ 185359 [steve@wa ts ] Also thought I'd just throw in that readline depends on ncurses.
+ 185360 [collinsj@se ] ...

A syntax question about nested 'each' blocks
185332 [stephen.tash] Would someone explain the syntax of nested blocs vis-a-vis the use of
185336 [cohen.jeff@g] Your code works for me, but I had to first replace the }} with ) at the
+ 185338 [stephen.tash] Thanks.  My code works for me too, with your corrections!  But does it
| 185344 [bob.news@gm ] Yes.
+ 185339 [stephen.tash] last_name = Array.new[] %w{ Groster Riplaid Pewley Lundrund Banks}
  185342 [stephen.tash] .... or rather
  185352 [jim@we ri hh] last_name = Array.[] *%w{ Groster Riplaid Pewley Lundrund Banks }

Re: Programming challenge: wildcard exclusion in cartesian products
185341 [dthierbach@u] [Had to drop alt.comp.lang.haskell, otherwise my newsserver doesn't accept it]
+ 185422 [wkehowski@co] "And it doesn't really matter what language you use to implement this
| 185495 [dthierbach@u] A classic is "Introduction to automata theory, languages and computation"
+ 185512 [dinko.tenev@] Given the requirements, did you mean taking the *union* and swapping
  185556 [dthierbach@u] Whatever the requirements were. Take your pick. :-)
  185576 [dinko.tenev@] OK :)
  + 185594 [wkehowski@co] Call a wc 'free' if it satisfies the propery that every letter 'a' in
  | + 185680 [dinko.tenev@] There would be no difference for single patterns, but I'm not sure into
  | + 185731 [dthierbach@u] Would '*ab*' be free or anchored?
  + 185661 [dthierbach@u] But you cannot get rid of this. Consider S = {a, b}, W = {a}.
    185673 [dinko.tenev@] Yes, but then, they are in the target set.  The point here is whether
    185709 [dthierbach@u] [One cannot escape exponential behaviour]
    185757 [dinko.tenev@] [A lot of stuff]
    185833 [dthierbach@u] Maybe it would help to just take a concrete example, and work through
    186211 [funkyj@gm il] Going in a slightly different direction ...
    186227 [cfc@sh ll 1.] Yes, there is literature on the generating side of the regular
    186420 [funkyj@gm il] If the language is Sigma* (rather than Sigma^n in the original post)

[ANN] mogilefs-1.0.1
185355 [drbrain@se m] == About
185358 [ezmobius@gm ] Awesome Eric Thanks!

Return code of process from IO
185367 [farrel.lifso] I'm using IO.popen to communicate with an external process. At some
185370 [farrel.lifso] Just solved it. Just run Process.wait after the call to the IO.popen
185387 [ null@vo d. ] #!/usr/bin/ruby
+ 185392 [farrel.lifso] Yeah that can be a problem, but luckily I'm not using any threads so
+ 185396 [ null@vo d. ] This should work in a mt env.
  185404 [ null@vo d. ] that should be #{Process.waitpid2(p.pid)[1].exitstatus}

Ruby history
185372 [cschweitzer@] I am writing a report on the language Ruby, and I was wondering if
185378 [Daniel.Berge] You may want to email Matz directly to request that information.  I
+ 185384 [dishmael@wi ] I thought there was a way to compile Ruby into an executable (similar, but
| + 185390 [Daniel.Berge] I believe you're thinking of either exerb or rubyscriptexe, which only work for
| | 185399 [dishmael@wi ] Yep, I just went back and looked, its just a collector: RubyScript2Exe.  My
| + 185395 [timothy.s.be] I remember finding a way to package a Ruby program in an executable,
+ 185403 [cschweitzer@] Thank you very much for your help...do you know how to contact Matz
  185415 [agorilla@gm ] Well, he reads this list, so there's a fair chance he'll see this
  185416 [steve@wa ts ] And while you're waiting to hear from Matz, check this out, if you
  185572 [cschweitzer@] Thank you all very much.  I might ask a question about how to write an

[ANN] XmlStruct-1.0.0 released
185379 [aldursys@gm ] XmlStruct
185391 [jgbailey@gm ] ...
185434 [zdennis@mk e] I don't like the reuse of xml inside of each of the blocks. IIRC it is why I dislike the CGI library. Visually it looks like

duplicate keys in a Hash
185382 [briankbuckle] ...
+ 185419 [rossrt@ro co] {}.eql? {}
+ 185424 [emk.lists@gm] The two empty hashes are equal, but they're not the same empty hash,

Best way to slurp a file into a string?
185383 [weyus@at .n ] All,
+ 185385 [Daniel.Berge] IO.read(@document.path)
| 185389 [weyus@at .n ] Isn't it better to do the block thing so that the file gets closed,
| + 185393 [weyus@at .n ] I see that IO.read takes care of that.
| + 185394 [Daniel.Berge] Nope.  No need to worry about that with IO.read.  It's not returning an open
+ 185603 [skhisma@gm i] Personally File.read makes more sense to me than IO.read... But i've

Introspection of method parameters
185398 [ksader@gm il] I'm trying to find out the number and name of a method's parameters.
+ 185402 [dishmael@wi ] Try this ...
| 185406 [ksader@gm il] Ok, I tried that and it gets me to where I am now, I can see the
| + 185410 [r.mark.volkm] Both can be answered using the arity method in the class Method.
| + 185411 [ mfp@ac .o g] RUBY_VERSION                                       # => "1.8.4"
| + 185412 [dishmael@wi ] Try this ...
+ 185425 [rossrt@ro co] method arguments, though with some limitations (no C methods, no

Re: Space Merchant (#71)
185401 [pfharlock@ya] This is awsome.  I've been thinking about writing a tradewars server for
185487 [timothy.s.be] I dunno about continuing with this as a quiz, but I think it'd be
185523 [semmons99@gm] I would be willing to help. I have been thinking for months on a way to

Ruby IPC In an OpenMosix Cluster
185418 [the.liberal.] I'm undertaking a project that will eventually become a processing
185420 [ara.t.howard] i recently built a system __exactly__ like this for noaa.  it's built upon
185441 [the.liberal.] Right on, Ara.  Thanks for your input!
+ 185473 [the.liberal.] Ok, so I went back and actually read through the entire rq article this
| 185493 [ara.t.howard] yup this would defintely push the limits __unless__ you can batch them.  i'm
| 185596 [the.liberal.] Not sure if this is an option yet.
+ 185492 [ara.t.howard] hmmm.  not quite clear on what you are asking - but we regularly add and
  185595 [the.liberal.] No, actually I really just spat out the wrong question before I read

Freeride on winxp doesn't capture output
185433 [fake@ad re s] I have Freeride 0.9.5.  I if have a script like 'puts "hello"', save it,
185475 [ml.chibbs@gm] Curt
185524 [fake@ad re s] I tried, but it didn't make any difference.  Nothing new happened.  Not
185654 [billb@ti co ] I am basically having the same problem.  With the standalone version I

bug in YAML for Ruby?
185436 [haazmatt@gm ] I'm getting some strange behavior with YAML in ruby regarding the
+ 185446 [dharple@ge e] It is not a bug, but it is confusing. According the the YAML spec[1]
+ 185447 [vjoel@pa h. ] I think so. The quotes are needed to disambiguate the string "01" from
+ 185450 [logancapaldo] Well just guessing here, but you  don't have to quote 08 because it

bug: segfault when using super and method_missing
185438 [bhilton@vp p] The following code produces a segfault with ruby-1.8.4 from gentoo,
+ 185448 [matz@ru y- a] A bug was in super without any argument.  The patch attached should
| 185454 [bhilton@vp p] Thanks for your help and the quick patch!
+ 185449 [vjoel@pa h. ] It's ok on
  185453 [matz@ru y- a] It happens only on CVS top.

RE : segfault when using super and method_missing
185443 [guillaume.be] ruby 1.8.2 (2004-12-25) [i386-mswin32] (Windows)

Re: XmlStruct-1.0.0 released
185457 [transfire@gm] I'll add that there's a partial E4X implementation on RubyForge that
185482 [jim@we ri hh] If you really want to, that style works fine with XML builder too.
185498 [aldursys@gm ] One man's meat is another man's poison.

what on earth..
185459 [joevandyk@gm] a = 5
+ 185460 [b.libbey@gm ] I'll admit I only started learning Ruby 3 days ago, so don't hold it
| + 185463 [b.libbey@gm ] 5.class === Fixnum => false
| + 185469 [dblack@wo bl] (I've fixed your Fux :-)
|   185471 [timothy.s.be] Ok, this is off the original track of discussion a bit, but I wanted
|   + 185474 [mike@st k. a] I think of it more as a relationship which has "direction", so in my
|   + 185476 [vikkous@gm i] Fixnum===Class #false
|   | 185483 [timothy.s.be] Hm, at least that makes sense.  However, it's hard for me to think of
|   | + 185488 [hal9000@hy e] I drew some (a little) criticism for spending four pages
|   | | 185490 [timothy.s.be] If four pages is what it takes....  I haven't read the Ruby Way yet
|   | | 185494 [dave@bu t. d] Actually there is a conceptual relationship between === and =~ - it is a
|   | + 185500 [pit@ca it in] After using it a couple of times, it's not that hard. I'm sure you have
|   + 185496 [noone@no he ] So that was what got me a few weeks ago when using a case statement!  I was
+ 185461 [timothy.s.be] case uses === for comparison, not ==
+ 185462 [mike@st k. a] a = 5
  + 185465 [timothy.s.be] Ok, out of the three of us that responded, Mike is the one who knows
  + 185468 [joevandyk@gm] Very nice, thanks!  Less code is always better.

C extensions question
185464 [jaredRMV-ric] I haven't done any "real" work in C in nearly 10 years and I'm still
+ 185467 [zengke@ce la] You'd better make the Makefile using extconf.rb, in which you can
| 185479 [jaredRMV-ric] Good point. I should've mentioned that I am already doing that.
+ 185491 [gerardo.sant] I'm not familiar with Ingres, but according to
| 185527 [jaredRMV-ric] My original code was written just like that but I cut it down for the
+ 185798 [jaredRMV-ric] I finally got this thing working so I thought I'd share the answer, even
  185800 [jaredRMV-ric] ruby -r mkmf

[ANN] Houston RoR/Ruby Group
185470 [klancaster19] (x-posted to Rails group)

Matrices, Gtk et al
185478 [rblove@ai ma] I have something working but it sure seems clumsy and I'm hoping for
+ 185629 [collinsj@se ] -Justin
| 185656 [rblove@ai ma] Thanks, I will look at.  I assume that it is for floating numbers only?
+ 185657 [matthew.moss] You can do 2d arrays in Ruby as an array of arrays. (Very much like

nkf #guess1 and #guess2 on html files
185497 [pere.noel@la] may be i'm not using correctly nkf #guess1 but it gaves me return type 3
185516 [kjana@dm la ] Unfortunately NKF is just for Japanese tool, so you can't use it for
185521 [pere.noel@la] ok, fine, i need just a tool in order to discriminate between ISO-8859-1

making use of buttons
185499 [sikar17@gm i] I am trying to create a user interface for a client side of a socket

drb over pipes
185505 [reto-ruby-ta] I'd like to establish a drb connection over ssh, preferably over the
+ 185506 [pertl@gm .o ] I would suggest using ssh-tunneling.
| 185508 [pertl@gm .o ] some
+ 185509 [john-rubytal] With drb, the client needs to talk to the agent and vice-versa, so this
| 185511 [reto-ruby-ta] A pipe provides two streams (in & out), and tcp does the same. The
| 185513 [pertl@gm .o ] the 'daemon' is just ssh which you already have.
| 185585 [reto-ruby-ta] Well.. yeah, there's no need for an additional daemon on the outside,
+ 185525 [jp-www@dc .g] I implemented a quick hack to do this. Hopefully the code below will help.
  185589 [reto-ruby-ta] That's great! exactly what I needed.
  + 185845 [jp-www@dc .g] I encountered that too; hence all those exception handlers and calls to
  + 185866 [ara.t.howard] i think this will fail with calls that use 'yield' or that return

Require Math
185518 [lindsay.boyd] I need to access the sqrt method in my rails app. I believe I need the
185519 [mike@st k. a] puts Math.sqrt(2)
185520 [lindsay.boyd] Thanks Mike - I was trying '2.sqrt'. No wonder that didn't work!
185536 [dave@bu t. d] class Numeric
185639 [lindsay.boyd] That's really elegant. I can see why Ruby has so many fans :-)

perl regexp to ruby one conversion ?
185526 [pere.noel@la] $field =~
185537 [james@gr yp ] The expression looks fine to me.  Did you try using it?
185541 [pere.noel@la] field='&?!tybvn?'
+ 185544 [rossrt@ro co] You'll need to switch those around, as I showed in my response to your
| 185548 [pere.noel@la] ok thanks for all, may be it could be better streaming out all of the
+ 185545 [james@gr yp ] utf8rgx = / ... /x
  + 185547 [pere.noel@la] ok, thanks, i see what u mean !
  + 185564 [pere.noel@la] the above regexp doesn't work as expected with ruby, i've compared the
    185566 [decoux@mo lo] moulon% cat b.rb
    185571 [pere.noel@la] i don't understand your post )))
    185573 [decoux@mo lo] my file is ISO-8859 encoded
    185586 [pere.noel@la] nil
    185623 [dbatml@gm .d] As I understand it utf8rgx matches any string that is utf8, which includes
    185624 [pere.noel@la] fine thanks a lot it works, you explained very well why the ruby version

Gateway Truncation (was: Re: drb over pipes)
185528 [bob.news@gm ] The code didn't make it into the newsgroup.  I can't detect something
185529 [jp-www@dc .g] Very strange. I sent the message to the mailing list, where it has shown

Re: Welcome to our (ruby-talk ML) You are added automatically
185532 [tserra@st de] Tiago Serra

[SUMMARY] Space Merchant (#71)
185534 [james@gr yp ] The primary focus of this quiz, for me, was to see how well a handful of
185549 [rossrt@ro co] Definitely agree :) Thanks for another fun and (for me, at least)

understanding aRegexp === aString
185538 [pere.noel@la] i'm experiencing with regexp and ruby and follo the page
185540 [rossrt@ro co] a = "HELLO"
+ 185542 [bob.news@gm ] Adding to Ross' excellent explanation: it helps to *not* view "===" as
| + 185575 [vjoel@pa h. ] irb(main):001:0> case [1,2,3]
| + 185580 [vjoel@pa h. ] irb(main):001:0> case [1,2,3]
| + 185636 [kjana@dm la ] Once that can be but "fixed" later since.... it can be a seed of
|   185670 [bob.news@gm ] Good point!  Thanks to you and Joel!
+ 185543 [pere.noel@la] fine, thanks, difficult to catch out typos particularly in regexps...

Problem with RubyWebDialogs and Ruby 1.8.4
185551 [devlists-rub] I try to use RubyWebDialogs 0.2.0 (which seems really great) under

Problem resolved: thanks and a followup question (was Re: How to make readline work in IRB?)
185552 [rhkramer@gm ] Thanks to all who replied!  I found the libreadline5-devel package, installed

Proxy question when using soap/wsdlDriver
185555 [jared.RMOVE_] I'm going through the Brian Marick web services article
185557 [dishmael@wi ] http_proxy=http://URL:PORT

DATA.readlines in an inner file
185561 [agorilla@gm ] Is there any way to use DATA.readlines to read the data (below
185570 [ara.t.howard] require 'dynaload'
185602 [agorilla@gm ] Thanks much, was hoping there was a more elegant solution.  I was just

Upgrading from Ruby 1.8.2. to 1.8.4
185567 [weyus@at .n ] All,

Problem seeing classes in rubygem
185568 [weyus@at .n ] Ruby 1.8.2
+ 185578 [rossrt@ro co] require_gem does (by default) actually require anything inside the gem -
| 185582 [r.mark.volkm] I assume you meant "doesn't" above. A caveat is what you mention below
| 185593 [rossrt@ro co] Oops, yes, typo there.
+ 185579 [dharple@ge e] Python actually.

What is the point of require_gem in Ruby 1.8.2?
185581 [weyus@at .n ] I just went through this mess over the last few hours...
185592 [jim@we ri hh] That's because the first argument is the name of the Gem to be
185604 [weyus@at .n ] Jim,
185638 [jim@we ri hh] (1) Activates a gem with an appropriate version number (see below for

unhandled exception in thread causes ruby to lose control
185588 [ null@vo d. ] <code>
185615 [james_b@ne r] WinXP pro, SP2: Code works just fine.

Ruby and RoR Book Roundup
185591 [rsanheim@gm ] I'm a big bookworm, so I decided to round up all the upcoming Ruby
185876 [me@ja on li ] I wanted to add my book to the stack. "Ruby Phrasebook" is also being
186039 [jzakiya@ma l] I'm glad to see an increasing proliferation of Rubyish books but
+ 186064 [logancapaldo] ...
| 186102 [jzakiya@ma l] inciteful is the phonetically correct substitute for insightful,
+ 186065 [hal9000@hy e] Just my opinion.

What is a stable way to use postgres with Ruby?
185600 [stephen.tash] ruby" are two different ways to use SQL from ruby via postgres.   Are
185627 [stephen.tash] "What is a Ruby Gem?
185630 [drbrain@se m] Its a way of distributing ruby libraries and applications similar to

FXRuby, FXList with (sunken) Frame
185605 [rretzbach@go] how can you make a FXLists' frame sunken?
+ 185625 [YKloubakov@f] @secondhframe = FXHorizontalFrame.new(parent,
| 185632 [rretzbach@go] Ha!, thank you for that. Dirty, but looks good!
+ 185631 [lyle.johnson] Like Yura said, you need to put FXList inside some other container