30144-31505 subjects 30512-131829

OT: Re: Sorting a Hash by value of integer stored in the Hash
30336 [rokosm@kl ka] Is there any "automatic" way to create hash from ary (above). I
+ 30337 [nobu.nokada@] What about this?
| + 30338 [dabigdemp@ho] ...
| | 30340 [rokosm@kl ka] I know about h = Hash[*ary], but does it fork for [[1,2],[3,4]]
| + 30339 [rokosm@kl ka] Yes, sure, but are we able to make it part of STD. Ruby?
|   30441 [matz@ru y- a] * "to_hash" is reserved for implicit type conversion (like to_str,
+ 30341 [aamine@mx ed] Hash[ *ary.flatten ]
| 30343 [rokosm@kl ka] a = [[1,[2,3]],[4,[5,6]]]
| 30349 [list@ch om t] Well, so you'll have to convert it to something acceptable from Hash
| 30352 [rokosm@kl ka] Good.
| 30382 [list@ch om t] class Array
+ 30584 [matz@ru y- a] If you're using 1.7.x

How to convert character code to a String?
30347 [furufuru@cc ] I fear I might be missing something obvious, but I'm wondering how to
+ 30346 [kentda@st d.] int.chr -> aString
+ 30389 [matz@ru y- a] Fixnum#chr
  30495 [furufuru@cc ] Thank you, Kent and Matz!  Yes, I was missing something

RubyGem Question (was: Ruby/zlib 0.5.0-pre1)
30348 [curt@hi bs c] Are there any plans for RubyGems to make use of this (in the same way that
30820 [thomass@de t] rely on ruby-zlib for decompression. It's available at

[ANN: ossl-0.1.0 released]
30354 [rokosm@kl ka] OpenSSL for Ruby - (ossl-0.1.0) has been released.

snippet exchange (was: Re:  Re: chomp for arrays?)
30357 [dblack@ca dl] See [ruby-talk:14556] for a kind of cry-from-the-deep about this from
+ 30369 [mchahn@fa el] A daydream of mine is a "super-require" that if the file was not found, the
| 30401 [dan@si he or] That's a rather dangerous thing to implement. There are an awful lot of
| + 30403 [dabigdemp@ho] Sounds great! Perhaps something like 'net-require' or 'net-load'...I'll
| + 30405 [rich@in oe h] Right and the way to address this is to have a public/private encryption key
| | + 30407 [dabigdemp@ho] too many to make it worth it? any that would be too hard to eliminate?
| | | 30409 [Dave@Pr gm t] If a cookbook won't work, would a wiki be a interim solution?
| | + 30410 [dan@si he or] I'm not entirely sure that this would be sufficient.
| |   + 30412 [dabigdemp@ho] I think that'd be great.  If the others on the list who mentioned the key
| |   | 30416 [dsafari@xt a] I believe this is how Loki (http://www.lokigames.com - games for the penguin)
| |   + 30421 [list@ch om t] Sorry, I must be missing something or just be mad, because I installed
| |   | 30430 [dan@si he or] They can't, though. I doubt they do.
| |   | + 30431 [dabigdemp@ho] The way i was thinking of this working would be this: someone has heard of a
| |   | | + 30436 [mchahn@fa el] A person could use this however they want.  I personally want to be able to
| |   | | + 30438 [dan@si he or] If you want the equivalent of perl's CPAN module (that connects to the CPAN
| |   | | + 30455 [dsafari@xt a] Jack,
| |   | |   30460 [dabigdemp@ho] Yeah, I think so...to be honest, it was kinda hard to get a feel for what
| |   | + 30497 [list@ch om t] Oh, of course they don't have *any* kind of warranty, I wasn't
| |   |   30504 [dan@si he or] Neither was I.
| |   + 30426 [dan@si he or] That does the end-user no good, though. One of the ways to attack this sort
| |   | + 30427 [dabigdemp@ho] My opinion is this: anything downloaded from anywhere is suspect if you
| |   | | 30437 [dan@si he or] Sure. That doesn't mean it's safe. But, more importantly, they have to
| |   | | 30513 [curt@hi bs c] This fact had escaped my attention. I certainly would not want to be
| |   | | 30538 [dabigdemp@ho] just to jump in for a sec: I never suggested downloading the same file every
| |   | + 30439 [rich@in oe h] First, I want to say there is no such thing as perfect security.
| |   |   30505 [dan@si he or] And the more usable, or at least convenient, something is, generally the
| |   + 30428 [mchahn@fa el] I don't understand.   I seriously doubt the cia would be interested in this
| |     + 30435 [dan@si he or] Unless you've got some sort of authentication token from them you can
| |     | 30442 [mchahn@fa el] Thanks, I will.
| |     | 30449 [dsafari@xt a] I believe this is how Loki (http://www.lokigames.com - games for the penguin)
| |     | 30506 [dan@si he or] They and Blizzard both distribute patches via the net, but they're signed
| |     + 30509 [curt@hi bs c] I think doing this is just fine as long as the user has the option to
| + 30424 [mchahn@fa el] Can you give me an example?
+ 30383 [list@ch om t] That cleared up the few remaining doubts about the need (or extreme
  30398 [mchahn@fa el] Thanks. I'd be happy to host the repository.  I could get a unique .org

possible addition to rubycookbook.org
30359 [dabigdemp@ho] ...
30375 [ptkwt@sh ll ] But why not just post the snippets to rubycookbook as it is now?  What is
30384 [list@ch om t] Just a personal opinion: lazyness.  I guess that, no matter how small

possible addition to ruby weekly news
30360 [dabigdemp@ho] ...
30451 [dsafari@xt a] if there is enough interest for this, I'd be keen to rumage through the weeks

obfuscated ruby contest
30361 [dabigdemp@ho] ...
+ 30363 [dblack@ca dl] Not me.  No moral objection -- just that given the shortness of life,
+ 30370 [tom.hurst@cl] I don't see why creating obfuscated code in Ruby is likely to be more
| + 30371 [vruz@ww .d g] One of the things I enjoy most here is biodiversity.
| | 30537 [ser@ge ma e-] You can learn much about a language by trying to do obtuse things with it,
| + 30374 [ptkwt@sh ll ] YES!  I agree wholeheartedly with this last sentiment.  Let's apply our
|   30381 [list@ch om t] Yesyesyes!  My hand's up and beyond!
+ 30377 [taw@us rs so] Challenge, you say :)
+ 30378 [chadfowler@c] ...
| 31016 [jwheeler@ne ] it in Ruby?
+ 30390 [mkelly2002NO] I got a better idea.  How 'bout we go on the Perl
  30393 [dabigdemp@ho] ...
  + 30396 [dblack@ca dl] You could resurrect the "Code Amelioration Contest", which was supposed
  + 30419 [mkelly2002NO] Ahhhhhh, it's always a two-edged sword ain't it?
    30420 [dabigdemp@ho] hehe, very true.....i start to comment some of my ruby code, but its so damn
    30534 [mkelly2002NO] btw-even the term "unobfuscated" seems kind of, well, obscure,

class name reported differently in different contexts
30366 [vjoel@PA H. ] I don't know if this is expected behavior. If it is, how do I work
30380 [chr_news@gm ] Well in cvs you could write
30496 [ale@cr ms n.] The tricky part here is that when the interpreter executes the row marked
+ 30514 [decoux@mo lo] You have removed the only line interesting :-)
+ 30530 [chr_news@gm ] Yep if you look a threaded example the situation looks pretty hopeless
+ 30577 [chr_news@gm ] Well, I replaced the three offending lines 322-224
  30609 [decoux@mo lo] Well, for me this is not a technical problem.
  + 30628 [matz@ru y- a] Guy, do you have a magic device to peek in my brain?
  + 30650 [chr_news@gm ] Well,
  | 30684 [decoux@mo lo] Like I've said previously
  | 30713 [chr_news@gm ] Besides making a fool of myself by playing the devils advocate, I do
  + 30712 [nobu.nokada@] I guess post-init hook should be separated from self-init.
    30776 [matz@ru y- a] It's OK to commit them; please.
    30779 [nobu.nokada@] Also to 1.6.6?
    30794 [matz@ru y- a] Hmm, ... let me think about it ... yes.
    30804 [vjoel@PA H. ] I kinda got lost during all the patching and mind-reading... does this
    + 30809 [chr_news@gm ] yes
    + 30810 [matz@ru y- a] The patch solves the problem.
    + 30856 [decoux@mo lo] Someone can explain me what is the problem ? Personnaly I've seen only a
      30882 [chr_news@gm ] From the point of view of someone who is pretty much clueless about
      30885 [decoux@mo lo] yes,
      + 30895 [chr_news@gm ] So what you are saying is that you can do something like
      + 30927 [chr_news@gm ] Sorry Guy the first example from my previous post was a little bit
      + 30984 [matz@ru y- a] Interesting.  You consider this fact useful.  Hmm.
        30986 [decoux@mo lo] In a very special (and private) extension yes, but probably this can be
        + 30998 [matz@ru y- a] That's OK.  It is interesting that my kludge __classid__ was useful in
        + 31007 [chr_news@gm ] Hm, continuing the language layering;-) the ability of retrieving a constant
          31009 [decoux@mo lo] You are in a block form and in my case this is not really a problem :-)
          + 31013 [chr_news@gm ] Well, I needed to use the block form (which neither set classpath or classid)
          + 31039 [chr_news@gm ] Anyway my point was that retrieval of constants on the face of it does not

30367 [kevinethridg] I downloaded mysql-ruby today and I can't get the extconf.rb to find my

[ANN] Invitation to join LotY (Language of the Year) project, 2002: learning Haskell
30372 [dblack@ca dl] Dear fellow programmers,
+ 30373 [mchahn@fa el] You should remove the colon and the end of the url.  I was about to report
+ 30376 [feldt@ce ch ] Cool idea!
| 30379 [perin@pa ix ] What is it about the language (not the development environment) you
| 30385 [feldt@ce ch ] * Uniqueness typing -
+ 30386 [ptkwt@sh ll ] Maybe I'm a little slow, but can I get special permission from the
| 30452 [dsafari@xt a] I believe yahoogroups archives them for you.
| 30487 [chadfowler@c] Haskell,
+ 30499 [harryo@zi wo] Excellent!  I went to the trouble of buying a book on Haskell about
+ 30572 [mikkelj-anti] Interesting!

Efficient "lexing" in Ruby (maybe an RCR?)
30391 [1010799012.8] I notice that many of the Ruby packages that do hard core parsing make
+ 30402 [kjana@dm la ] s = "foobarbaz"
| 30414 [1010805477.0] Thanks to both of you.  Good tip!  Then my proposed
+ 30406 [nobu.nokada@] I agree, and once posted a patch, [ruby-dev:12781].
  30422 [1010809088.3] I liked your idea at first, but this method is actually slower in my
  30432 [nobu.nokada@] Use \G instead.  \A always matches the beginning of the string.

Question abut folks reading material.
30394 [ruby@ja es r] Out of curiosity, how many folks here have read (or heard of) the book How Buildings
+ 30397 [emeade@ge kf] ...
+ 30408 [alwagner@tc ] I haven't, but I'll check it out.
  30411 [alwagner@tc ] Can I have two?  Then also...

help with connect method in fxruby?
30395 [mchahn@fa el] ... This new model was introduced with the FXRuby-0.99.179 release ...
30511 [ljohnson@re ] the

how do I "pop up" a scaled jpg image
30413 [W.L.Kleb@La ] So I created a small script (I welcome criticism) to
+ 30433 [daniel@ze ed] Here's a quick-and-dirty solution, it isn't pretty but it should
| 30553 [nconway@kl m] `display #{file} &`
| + 30558 [armin@ap ro ] you can add a -size 150 to the display command to get
| + 30592 [daniel@ze ed] No, it is not, because it won't work the way you think.
| + 30612 [nobu.nokada@] trap(:CHLD) {wait(-1, Process::WNOHANG)}
+ 30445 [nightblade@n] "Programming Ruby: The Pragmatic Programmer's Guide" has a chapter on Ruby

modifier form of rescue
30415 [dabigdemp@ho] ...
30425 [nobu.nokada@] The modifier catches only StandardError and its subclasses.
30429 [dabigdemp@ho] ahh, knew it had to be something like that...thanks!

"[ruby-talk:12345]" tag is removed
30443 [matz@ru y- a] From now on, [ruby-talk:12345] is removed.
+ 30457 [mchahn@fa el] Thanks.  I can finally see threads.
+ 30458 [dsafari@xt a] Is there another way to reference on www.ruby-talk.org ?
  30463 [matz@ru y- a] field to get the mail number.
  30467 [dsafari@xt a] Thanks, I'll do that for links within the ruby weekly news.

netrequire 0.000001
30444 [mchahn@fa el] This is only for the brave (my apologies to Dan for lack of security).
30477 [decoux@mo lo] I must say that I'm totally agree with Dan Sugalski on this subject.

Re: [ruby-talk:30440] net_require
30447 [akr@m1 n. rg] I had similar idea few weeks ago.
+ 30440 [mchahn@fa el] Amazing coincidence.  The name even matches.
| 30446 [mchahn@fa el] ...
+ 30448 [mchahn@fa el] Amazing coincidence.  The name even matches.
  30459 [mchahn@fa el] This is getting really big, but how about this bootstrap code that uses the
  30780 [rokosm@kl ka] You can maybe use 'OpenSSL for Ruby' - it has RSA signing, SSL

a diff net-require
30450 [dabigdemp@ho] ...
30540 [mkelly2002NO] Also there was some distributed variant of C or something out

30453 [dabigdemp@ho] ...

the [ruby-talk] is gone?
30454 [dabigdemp@ho] ...
+ 30456 [matz@ru y- a] Sorry, I can't satisfy all.
| + 30461 [dabigdemp@ho] No joke, just wondering why the [ruby-talk 23552] type stamps were taken out
| | 30466 [matz@ru y- a] OK, many repeatedly ask me to remove them, to see the list mails in
| | + 30468 [geniusj@bl e] is it possible to keep the ruby-talk but remove the message number so
| | | 30469 [matz@ru y- a] I felt it's too verbose without numbers.  If you really want it, I can
| | | 30475 [tobiasreif@p] That would be really great: threading should work, and users know which
| | | + 30478 [WYS@he bl ng] ...why don't you "filter" your emails depending on the to:-field, which, in
| | | | 30483 [tobiasreif@p] In NN6.2's messenger, I see
| | | | 30486 [WYS@he bl ng] NN6.x "Message filters" do allow filtering on the to:-field
| | | + 30491 [dblack@ca dl] I would definitely prefer having [ruby-talk] at the beginning, rather
| | |   + 30492 [ruby-talk-us] Please no. If we don't have the numbers, what's the point to having
| | |   | 30508 [hutch@xa pl ] Yes, the [ruby-talk] would be redundant... though, sometimes redundant
| | |   | 30520 [Dave@Pr gm t] You folks settle on something and I'll hack it accordingly. That's not
| | |   | 30605 [schneiker@ju] Given how this was originally decided, shouldn't this be settled by another
| | |   + 30493 [tobiasreif@p] I agree;
| | |     30500 [tony_hammond] I'm seconding this. The simple prefix "[ruby-talk]" is an wonderfully
| | + 30548 [drosih@rp .e] Just to have "my vote" on record, I do prefer it this way.  I prefer
| |   30549 [200201121456] ruby-talk should be run by a Majordomo II list server -- then each
| + 30462 [mchahn@fa el] By the way, I thought only the number was to be removed.  A subject was to
|   30464 [mchahn@fa el] By the way, I thought only the number was to be removed.  A subject was to
|   30465 [matt@gr en i] If you're trying to filter the messages, try to filter on the X-ML-Name
+ 30474 [tobiasreif@p] Yes, for me too. I need to scan through hundred(s) of ruby-talk emails,
+ 30488 [tom.hurst@cl] They upset threading if you set your client to create new threads on
  30502 [gehlker@fa t] I have to agree with Thomas here. The new way is *much* nicer. There seems

Ruby Weekly News now available
30470 [ptkwt@sh ll ] The Ruby Weekly News for the week ending 01/06/2002 is now available at

BUG: ruby-mode.el 1.41 disables font-lock coloring
30476 [mulperi@ik .] The 1.41 from CVS disables coloring. I'm using FSF emacs 21.1.1 for NT.
30479 [nobu.nokada@] Sorry, I didn't check for FSF emacs.  Does it fix by this?
30485 [mulperi@ik .] Yes. This patch fixes FSF emacs coloring. Thanks a lot.

English.rb typo?
30484 [nightblade@n] Does anyone else's 'English.rb' have the following typo?
+ 30524 [1010855257.8] That problem is not in 1.6.5 or in the current CVS version.
+ 30587 [matz@ru y- a] Thank you.
  30599 [nightblade@n] Wow, Sensei Matz spoke to me.  *bows*   :-)

Re: "" tag is removed
30489 [nat.pryce@b1] Sorry for sounding so clueless, but can anyone tell me how to set up a
30490 [WYS@he bl ng] ...take the To-field which will be 'ruby-talk@ruby-lang.org'

Segfault with druby and fork
30494 [mike@le to .] While playing with DRb, I experienced some segfaults.
+ 30510 [matz@ru y- a] I guess I fixed.  Try ruby 1.7.2 (2002-01-07).
| 30543 [mike@le to .] hash_accessor.rb:38: [BUG] Segmentation fault
| 30640 [matz@ru y- a] Hmm, I couldn't reproduce the segfault by
+ 30517 [nobu.nokada@] Not sure but I guess it's a known problem about fork of

RE: RAA.succ (was: one liner / overriden class repository)
30501 [curt@hi bs c] I would like to see RAA.succ have both a browser-based web interface (for
+ 30536 [vruz@in er e] In practice, an application (such as FreeRIDE in the future) could
| 30550 [tobiasreif@p] Tobi
| 30560 [vruz@in er e] great :-)
+ 30590 [chadfowler@c] At RubyConf (http://www.rubyconf.org), we had a brainstorming session in

regex/BNF for class names
30503 [tobiasreif@p] what's the regex or BNF for class names?
30516 [nobu.nokada@] /^[A-Z][a-zA-Z0-9_]*$/, or more exactly, /^[A-Z][\w\d]*$/.
30668 [dblack@ca dl] /^[A-Z]\w*$/
30670 [nobu.nokada@] Oops, yes.  \w exactly matches digit.