113068-115477 subjects 113561-114279

How to output result to text file?
113340 [nkb@pa if c.] I would like to pipe the output of a ruby script to a text file. On
113342 [billk@ct .c ] That's odd.... Which version of windows are you running?
113345 [jamesUNDERBA] Is the code is writing to STDERR?
113346 [nkb@pa if c.] Fabulous! This works! What exactly does '2' means? Where do I get info
113348 [hal9000@hy e] about bash or whatever shell you're using.
113359 [bob.news@gm ] "Hal Fulton" <hal9000@hypermetrics.com> schrieb im Newsbeitrag
113379 [assaph@av ya] Stdout is redirected in this fashion, but stderr is not. My guess is

soap4r. I just dont get it.
113347 [nkb@pa if c.] I have tried for a hours but I still cannot get it. What is wrong with
113349 [nakahiro@gm ] Do you have the WSDL for the service you want to connect with?
+ 113351 [justin.rudd@] What is the Fault that the server is giving you?  You should be able
| + 113353 [nkb@pa if c.] ya. I did check the server error. It says Data Does not exist. Which I
| | 113354 [justin.rudd@] Without going into a lot of detail, the WSDL is the contract.  It
| + 113460 [nakahiro@gm ] Thank you for great advice about ASP.NET!  It much help me to answer
+ 113352 [nkb@pa if c.] Thanks for the prompt reply.
| + 113390 [rcoder@gm il] Personally, I was unable to get any Ruby SOAP client to work until our
| | + 113391 [nkb@pa if c.] I am giving up on the soap4r for now. I think it is a great library to
| | | 113467 [nakahiro@gm ] Doh, I should have read this first!  Ignore previous mail I asked to try.
| | + 113466 [nakahiro@gm ] For my testing purpose, can I see the WSDL which is not RPC encoding
| + 113461 [nakahiro@gm ] Doh.  This API (generate_explicit_type=) is recently added.  Can you
+ 113365 [drossruby@ya] I might asd well start writing english SOAP
  113464 [nakahiro@gm ] Speaking about myself, I don't very often read documents...  Generally
  113583 [drossruby@ya] Well what I am going to write will make it easy for

Is anyone using FXScintilla?
113366 [curt@hi bs c] I'm trying to track down a scrolling problem in FreeRIDE that occurs in the
113368 [mailinglists] I can only say that there is at least one problem in the FOX mouse wheel
+ 113369 [curt@hi bs c] The mouse wheel works just fine in FreeRIDE's FXRuby/FOX controls. The
| 113372 [mailinglists] If this helps: the Mondrian Ruby IDE  www.mondrian-ide.com  had the
| 113381 [curt@hi bs c] I'll take a look, thanks...
+ 113374 [lymans@gm il] I had the same problem - then I upgraded to 1.2.
  113380 [curt@hi bs c] No need to test on Linux. I know that for FreeRIDE the problem happens on

[OT] Re: text analyzator
113367 [eule@sp ce c] That post made me smile, since it was ambigous in its heading at the
113383 [markus@re li] I love reading his stuff.  I have, however, been asked to wait a
113430 [onurb@xi ud ] LOL

Re: [Q] What does Ruby/DL do?
113370 [tad.bochan@b] Has anyone been able to visit this site ?
113371 [decoux@mo lo] Work fine.
113373 [tad.bochan@b] I still can't reach this site.  Don't know what's the problem.

[ANN] DirectoryWatcher 0.8
113378 [gavin@re in ] A DirectoryWatcher keeps an eye on a certain directory, firing off your
+ 113385 [khaines@en g] Awesome.  I have a use for it _today_.  I'll let you know if I run into
+ 113393 [Ara.T.Howard] awesome!  i seriously just started coding this myself this morning - i'll
| 113397 [carl.youngbl] ...
+ 113403 [drossruby@ya] oh neat. what if the file attributes are modified?

mozilla bookmarks
113382 [rasputnik@he] long shot but what the hell - don't suppose any of you good
+ 113387 [jgb3@em il b] ...
| 113539 [rasputnik@he] Thanks a lot, it was handy to get a feel for it - I gave up on a parser too (I'd prefer not to require extra libs), and did a
+ 113388 [bg-rubytalk@] I have successfully used my htmltokenizer module to parse them.  It
+ 113389 [jamesUNDERBA] Do you use the Ruby/Tidy wrapper?
  113523 [rasputnik@he] I will eventually, I think - though to be honest even on my monster bookmark

negative numbers and binary formats
113404 [paul.rogers@] Im trying to take a negative integer value, convert it to its binary
+ 113408 [flgr@cc n. e] Moin!
| 113487 [bob.news@gm ] "Florian Gross" <flgr@ccan.de> schrieb im Newsbeitrag
| 113516 [flgr@cc n. e] Very nice, thank you. I wasn't aware of the range limit at first. Only
| 113525 [bob.news@gm ] "Florian Gross" <flgr@ccan.de> schrieb im Newsbeitrag
| 113541 [markus@re li] 1. the array can't be referenced after the first/shift returns
| 113554 [bob.news@gm ] "Markus" <markus@reality.com> schrieb im Newsbeitrag
+ 113409 [Ara.T.Howard] class Fixnum
| + 113413 [WBrown@is ft] Paul,
| | 113529 [paul.rogers@] Thanks for all the replies on this. Im using ruby to simulate some
| + 113484 [bob.news@gm ] <Ara.T.Howard@noaa.gov> schrieb im Newsbeitrag
+ 113418 [markus@re li] So, are you wanting it in binary or in hex?
+ 113438 [discord@ma .] class Integer

Regexp Arity
113407 [transami@ru ] Just ran into a need to know how many parenthetical groupings a Regexp has.
+ 113410 [matz@ru y- a] I'm not sure if it should be named 'arity'.
| + 113411 [halostatue@g] Regexp#groups ?
| | + 113414 [WBrown@is ft] T.,
| | | 113425 [transami@ru ] And /[(]/ too. More yuk.
| | | 113436 [ruby-talk@pc] Absolutely not.  The length of a regular expression has nothing to do
| | + 113448 [gsinclair@so] Regexp#ngroups
| |   113450 [ruby-talk@pc] Best by far, so far,
| |   113453 [flori@ni e. ] Which groups are counted here? There are capturing groups and
| |   + 113454 [ruby-talk@pc] Precisely why it isn't great.
| |   + 113455 [dblack@wo bl] I agree.  It's sounding like this is being informally proposed as a
| |     113485 [transami@ru ] Well, you may be right. Most scenarios can be adjusted for *after the match*.
| |     113490 [transami@ru ] BTW --What's the use case of #casefold?
| |     113492 [bob.news@gm ] "trans. (T. Onoma)" <transami@runbox.com> schrieb im Newsbeitrag
| + 113423 [transami@ru ] Perhaps not, but I really can't think of a better word. Everything else seems
|   113427 [dblack@wo bl] To back up slightly: I can't help wondering under what conditions you
|   + 113429 [neoneye@ad l] Maybe I should advertise some more for my regexp package
|   + 113437 [transami@ru ] I'm pattern matching a document. When a match is found the match/submatches
+ 113422 [neoneye@ad l] hmm...

Socket help
113412 [sbeckeriv@gm] I am running windows XP with ruby 1.8.3 beta
113416 [WBrown@is ft] Becker,

[Ruby Forum] Forum digest by email
113415 [alex@ve k. n] Following some popular demand, Ruby Forum now provides a regular (daily,

not greedy enough
113419 [transami@ru ] Honestly, I really dislike regular expressions. Some people love them for
+ 113420 [dblack@wo bl] I think what you want is:  match one or more consecutive occurrences
| + 113421 [hal9000@hy e] Umm... in the regexp as in the other, isn't an m needed at the end?
| | + 113424 [hal9000@hy e] No, sorry, ignore me. I was quite wrong.
| | + 113426 [dblack@wo bl] No, because if you put an /m, then the dot will match \n, and .* will
| + 113431 [transami@ru ] /(^\ *-.*\n)+\ *\n/
+ 113432 [pit@ca it in] The repeating group in your regexp is (.*\n)+ and this matches every line. You
  113503 [transami@ru ] That makes sense. Thanks all!

Re: [OT] text analyzator
113428 [onurb@xi ud ] Pardon my profound ignorance, but what do you call '419s' ?
113434 [hal9000@hy e] I didn't know either, but a google for '419 spam' gave me

html email through SMTP?
113435 [the.chrismo@] Anyone have a snippet or link to a snippet for setting up an email
+ 113439 [khaines@en g] If you want it to be an HTML only email, it's trivial.
| 113442 [rcoder@gm il] Once you have that TMail::Mail instance built, it's not much harder to
+ 113452 [jamesUNDERBA] This may help
+ 113520 [B.Candler@po] You _can_ just put HTML in it, with Content-Type: text/html

Newbie: Case statement
113443 [graham@in a.] As a newbie I'm confused about the Case construct. All the
+ 113444 [hal9000@hy e] It's a strict multi-way branch; there's no fall-through from
| 113445 [WBrown@is ft] Graham,
| 113451 [spam0504@bs ] I think that this is dangerous if x or y are equal to 0. In this case
+ 113446 [markus@re li] x_range = (x=min_x ? x : x-1)..(x=max_x ? x : x+1)
+ 113447 [spam0504@bs ] what exactly do you want to know? Do you want to test for each cell if it
| 113570 [graham@in a.] thanks to everyone who replied. It is really interesting seeing the
| 113572 [flgr@cc n. e] If you have any questions I'd be pleased to answer them. :)
+ 113457 [dblack@wo bl] I'm not sure about fastest, but in case you collect implementations
+ 113519 [flgr@cc n. e] def greedy_case(obj, cases)
| + 113537 [markus@re li] Nice.  Thats the best examples of writing your own control structure
| + 113574 [graham@in a.] OK - Does this do the following (roughly)
|   113575 [markus@re li] More or less, though there is no requirement that the conditions be
|   113581 [flgr@cc n. e] Also the 'pointer' part is a bit misleading. It's just a normal object.
+ 113582 [graham@in a.] I'm embarassed to post this.. but this is the (completely braindead)
  + 113585 [WBrown@is ft] Graham,
  | + 113586 [james@gr yp ] I'm aware this is a common approach, but I'm personally not found of it.
  | | 113587 [WBrown@is ft] James,
  | | 113596 [flgr@cc n. e] world = Array.new(rows + 2) { Array.new(columns + 2) }
  | + 113588 [cmills@fr es] The 1 dimensional version of what you just described is how sqlite
  + 113591 [james@gr yp ] Don't be!  We're all learning from each other, just at different levels.

DrbUndumped and GC
113456 [Ara.T.Howard] if one has a drb server that returns objects extended by DrbUndumped to the
+ 113458 [m_seki@mv .b] How about TimerIdConv?
| 113462 [Ara.T.Howard] in my case the code is
+ 113459 [drbrain@se m] Nope, DRb is not that smart by default.  Your Proxy instance is
  113463 [Ara.T.Howard] my gut was right.
  113473 [drbrain@se m] come back and pick their reference back up.  Also look at TupleSpace,
  113621 [Ara.T.Howard] eric-

113465 [james@gr yp ] I've been wondering lately, is there any particular reason Array
+ 113468 [assaph@av ya] ary.sort_by {rand}
| 113469 [james@gr yp ] Very clever.  Thanks for the lesson.
| 113470 [assaph@av ya] ...
| 113517 [flgr@cc n. e] You're welcome, glad I could help. :)
+ 113488 [bob.news@gm ] "James Edward Gray II" <james@grayproductions.net> schrieb im Newsbeitrag

[ANN] wxRuby Layout Manager Library 0.0.3 source file is Released!
113471 [zdennis@mk e] A source gz file has been release for wxrubylayouts 0.0.3 as well. It

Directory reading produces differnt files
113474 [Becker004@gm] I am running ruby and exploring the different things i have this code
+ 113475 [ml-ruby@th p] SciTE probably sets the current working directory to the directory
+ 113545 [halostatue@g] @echo off

ruby-postgresql extension for windows
113477 [davinciSINSP] Anybody know how can I use ruby-postgresql extension in Windows? I need
113568 [justin.rudd@] I have an SO file that I built.  You can read about it here [1].  I
113613 [davinciSINSP] Great! Are you working on it for testing well?...

How to stop files auto-prompting in irb?
113478 [xiangyu.yang] I installed ruby182-14_RC8a (for Windows) just now. I find irb will

whitespace string only
113479 [ryco@gm .n t] What's the best way to test if a string only consists of whitespaces and
+ 113480 [evan@fa li g] def only_whitespace?
| 113482 [ mig@19 4. z] I think regexp should be is faster than each_byte. What about this?
| 113483 [evan@fa li g] I highly doubt a regex is faster than each_byte. each_byte has very
+ 113486 [transami@ru ] str.strip.length == 0
+ 113489 [bob.news@gm ] "Henrik Horneber" <ryco@gmx.net> schrieb im Newsbeitrag
| 113493 [ryco@gm .n t] Obviously there is more than one way to do it ...and all are better than
+ 113494 [mikael@ph bu] class String
| 113495 [decoux@mo lo] 1) \n is in \s with a character class, /m is useless
| 113499 [mikael@ph bu] self !~ /[^\s]/
| + 113500 [decoux@mo lo] or
| + 113501 [bob.news@gm ] "Mikael Brockman" <mikael@phubuh.org> schrieb im Newsbeitrag
|   113504 [transami@ru ] So which method is fastest?
|   + 113506 [dblack@wo bl] Not *everything* can be a core method :-)  Also, the regex engine is
|   + 113509 [mikael@ph bu] $ ruby whitespace.rb
|     + 113511 [  jani@iv ro] doesn't this make the arrays the same? Isn't $nonwhitespace just a reference to $whitespace?
|     | 113512 [mikael@ph bu] Er, yes.  Duh.  I haven't really awoken yet.  Duping whitespace doesn't
|     + 113514 [dblack@wo bl] self !~ /\S/
|       113515 [decoux@mo lo] svg% ruby -rjj -e '/[^\s]/.dump'
|       + 113521 [kh.wild@wi o] Maybe I've missed something most important :-)
|       + 113522 [dblack@wo bl] irb(main):008:0> /[\s]/.match("\013")
+ 113531 [kjana@dm la ] string !~ /\S/
  113532 [Ara.T.Howard] if s.strip.empty?
  113535 [decoux@mo lo] svg% ruby -e 'a = " \000\000"; p "OK" if a.strip.empty?'
  + 113536 [bob.news@gm ] "ts" <decoux@moulon.inra.fr> schrieb im Newsbeitrag
  | 113548 [Ara.T.Howard] elapsed : 0.0081329345703125
  | + 113549 [decoux@mo lo] /o is useless and you make something too complex for the regexp engine
  | | 113556 [Ara.T.Howard] why useless?  you mean because there's nothing to interplate here - that's
  | | 113558 [decoux@mo lo] For you, not for this "poor" regexp engine :-)
  | | + 113560 [Ara.T.Howard] fascinating!
  | | + 113832 [bob.news@gm ] "ts" <decoux@moulon.inra.fr> schrieb im Newsbeitrag
  | |   113836 [decoux@mo lo] In this case the result is not important : this is just to show that
  | + 113553 [bob.news@gm ] ...
  + 113544 [Ara.T.Howard] ahh!  that's terrible - i didn't know String#strip did that!  the docs say
    113555 [markus@re li] ?????
    113559 [Ara.T.Howard] from man
    113562 [markus@re li] [abundant online rebuttal snipped]
    + 113564 [ryco@gm .n t] ... ask one simple question and you end up being involved in regexp
    + 113571 [Ara.T.Howard] lol.

RŮ«. : whitespace string only
113481 [tad.bochan@b] Anything wrong with

Regexp#match(str, *offset*)
113491 [transami@ru ] str.index(/re/,offset)
+ 113527 [james@gr yp ] Regexps already include that ability natively.  For example if you
+ 114283 [nobu.nokada@] $ ruby19 -ve 'p(/\s/.match(" abc def", 0).begin(0))'
  114375 [neoneye@ad l] Wonderful Nobu.. This is a feature I always have needed without knowing it.

String#pad  ?
113496 [  jani@iv ro] is there a nicer way of padding a string to a power of two length than for example
+ 113498 [usenet@an re] data.ljust(data.size + data.size % 2)
+ 113502 [martindemell] And doesn't even work :)
| 113508 [  jani@iv ro] It does work the power of two is 4.That's why I said for example :)
+ 113505 [bob.news@gm ] "Jani Monoses" <jani@iv.ro> schrieb im Newsbeitrag
  113510 [  jani@iv ro] definitely my bad wording since I mislead both of you :)
  113524 [bob.news@gm ] "Jani Monoses" <jani@iv.ro> schrieb im Newsbeitrag

[ANN] extensions-0.4.0
113497 [gsinclair@so] I'm pleased to announce the long-awaited (by me, anyway) version 0.4.0 of
113526 [george.mosch] This is a very usefull library, thank you for your efforts!

Ruby Documentation Bibliography
113507 [spam0504@bs ] has anyone by chance a ruby bibligraphy file for latex, that I could use.
113534 [jamesUNDERBA] This sounds useful.  Are you referring to Bibtex?
113540 [spam0504@bs ] Yes, that was the intention.

ruby-dev summary 24255 - 24297
113513 [ksaito@ur nu] This is a summary of ruby-dev mailing list.
113528 [drbrain@se m] If this gets rid of all those globals in the parser
113543 [matz@ru y- a] Not yet.  But taking a first step.

Design Advice: Sub-Class 'Instances'
113533 [gavin@re in ] ...
+ 113538 [hal9000@hy e] This pleases me more than I can say.
| 113550 [gavin@re in ] Sweet. I'll probably run out of steam myself at some point, but so far
| 113551 [hal9000@hy e] I concur totally.
+ 113542 [bob.news@gm ] "Gavin Kistner" <gavin@refinery.com> schrieb im Newsbeitrag
| 113601 [gavin@re in ] Whoa.
| + 113602 [drossruby@ya] What? You mean you haven't read ruby source code? Its
| + 113624 [bob.news@gm ] "Gavin Kistner" <gavin@refinery.com> schrieb im Newsbeitrag
+ 113547 [gavin@re in ] Oops. I confused inheritance hierarchy with namespace hierarchy.
+ 113552 [B.Candler@po] I think it will turn out to be much simpler than the examples you have
  + 113557 [spam0504@bs ] You should put this onto the web somewhere. Maybe in ruby-garden.org
  + 113603 [gavin@re in ] I agree with a lot of what you say in general, Brian. Although with the
    + 113604 [gavin@re in ] Oops, I forgot that Hashes in Ruby aren't ordered. But you get the
    + 113616 [B.Candler@po] If I understand rightly, I think the main constraint here is that you want
    | 113691 [gavin@re in ] I'd say it's one of two main constraints, and I'd expand upon it a
    + 113619 [eeklund@gm i] (Referring to design of a home automation system, using hierarchies to manage )