174367-223889

174137-175889 subjects 174579-338681

Exception in for next item
174367 [dewie@it l. ] I retrieve a number of message 1 to n
174425 [dewie@it l. ] daniel-wijnands-powerbook58:~/Desktop/mailing danielwijnands$ ruby
174426 [dewie@it l. ] for message in messages

OS X Combobox Top-Level Display
174368 [ummaycoc@gm ] ...

How do you sort a text file?
174374 [dannyabc@co ] I'm new to Ruby and was wondering how to sort a text file?
+ 174379 [ara.t.howard] open("output.txt"){|f| f.write IO::readlines("input.txt").sort}
| 174403 [rosco@ro co ] cat input.txt | ruby -e 'puts $stdin.sort' > output.txt
+ 174431 [w_a_x_man@ya] ruby -e 'puts ARGF.sort' input1.txt input2.txt input3.txt
+ 174437 [bob.news@gm ] You are entitled to the "useless cat award".  :-) Any reason why you don't
| + 174438 [hal9000@hy e] My neighbor's cat won that already.
| | 174448 [bob.news@gm ] Oh, on what basis?  Does it catch no mice?
| + 174457 [hramrach@gm ] Well, cat does not write its arguments so you are pretty sure it isthe input argument whatever command you put next in the pipeline.Plus there was a shell once where input redirection did not work andone replaced it with cat and |. At least that is how I learned to useuseless cats extensively.Anyway, cats are nice :)
|   174474 [bob.news@gm ] I'm sorry, what do you mean by that?  Do you mean to say that cat only
|   174494 [ryansobol@gm] ...
+ 174686 [andreas_eder] Why not sort <input.txt >output.txt?
| 174737 [perrin@ap th] You don't need that input redirect.  Input takes a filename as an
+ 174769 [narf968@gm i] Why can't I just let these things go?

require 101
174376 [briankbuckle] ...
+ 174384 [bob_showalte] A false return means the file was already in $", and so wasn't loaded
| 174388 [briankbuckle] ...
| 174389 [bob_showalte] Sorry. I failed to consider that RubyGems was possibly coming into play
+ 174387 [jim@we ri hh] Because Builder has that stupid autorequire attribute set in its gem
  174396 [briankbuckle] ...
  174404 [ezmobius@gm ] Yes for the short answer. I have found that usually if it returns

ANTLR for Ruby (Was: Re: Ruby equivalent of Lex (or Flex)?)
174377 [mental@ry ia] It's worth noting that, thanks to grammarian Martin Traverso, the

[ANN] Rote 0.3.2 released
174391 [rosco@ro co ] Rote 0.3.2 is now available for download from http://rote.rubyforge.org
174421 [vjoel@pa h. ] Other than the user's guide, are there any gee-whiz examples posted
+ 174436 [rosco@ro co ] Unfortunately not :( I tend to think that the best example is probably the
+ 174442 [oliver.andri] Hopefully, by the end of the week I can show you something. I am
  174501 [rosco@ro co ] Cool. Let me know if you place your sources or samples online, It'd be

mod_ruby CGI file upload fails because of TypeError ?
174392 [lars.gersman] i have written an ruby script handling fileupload using the regular

OT: What is in a name?  (was: Demystifying Symbols)
174394 [gwtmp01@ma .] This is pretty far off topic but might be of some interest to some of
174405 [rosco@ro co ] That's exactly the kind of feeling I was going with when I made that naive
174496 [ysantoso-rub] It's not naive and it's closer to the truth then other descriptions so

user defined instance variables
174399 [info@ja eo a] Hey Chaps,
+ 174408 [dblack@wo bl] Can't you just get keyboard input and initialize the object with that?
+ 174410 [james@gr yp ] class Inspector

Re: (bitshift) performance (was: [SUMMARY] Numeric Maze (#60))
174401 [kero@ch ll .] [snip 3 examples with considerable speed differences]

[ANN] Looking for Ruby Developers in or near Chicago
174411 [hubrix@gm il] ...
174419 [ng@jo nw on ] Mark, I'd encourage you to post this to the Chicago Area Ruby Group's

[JOB] Open Source Software Engineer, Chicago, IL
174414 [beau@su er o] Open Source Software Engineer, Chicago, IL

Newbie question
174416 [mtscolony@gm] ...
174443 [simon.kroege] Welcome mac,
174451 [simon.kroege] def ae_6 session

Ruby syntax highlighting problem with Emacs
174417 [rjseagraves@] I was attempting to install ruby support into my emacs installation by
174418 [ef@al m. it ] (global-font-lock-mode 1)
174475 [rjseagraves@] That did it.  Thank you very much.

Oniguruma...
174423 [hal9000@hy e] My understanding is that Oniguruma is standard in 1.9 and
+ 174434 [rosco@ro co ] From what I can gather, the regular ('old') way doesn't support
+ 174544 [drbrain@se m] rev=1.1.1.8;content-type=text%2Fplain
  + 174558 [drbrain@se m] I had to apply one hunk of the patch by hand, but otherwise it was
  + 174559 [rdm@cf l. om] Googling around, the only information I found on Oniguruma
    174618 [sndgk393@yb ] Currently not supported.

How to access individual characters in a string (as strings)?
174427 [jgbailey@gm ] I'm embarrassed to ask such a seeminly simple question, but I can't
+ 174428 [hal9000@hy e] There's no good way. In future Ruby, you'll get strings anyway
+ 174433 [pere.noel@la] "abc"[0,1] ???
| + 174439 [robertbrook.] What are you doing withe the strings next?
| + 174502 [hawkman.gelo] ...
+ 174488 [slitt@ea th ] You can use a lot of the same methods on both Arrays and Strings.

fxri: command window flashes then disappears
174429 [basi_lio@ho ] I reinstalled Ruby in a new machine. And now when I try to restart fxri

Attribute writers
174440 [mjudge@su ve] I'm working on a survey system in Ruby and am having a style crisis with
+ 174445 [hal9000@hy e] I'd suggest doing a little metaprogramming and making the final code
+ 174446 [rosco@ro co ] Is this any help?
+ 174447 [hal9000@hy e] Here is the rest of my solution.
+ 174450 [bob.news@gm ] Hm, I wouldn't use a string internally at all - at least not if you are
  174843 [mjudge@su ve] I want to say thanks for everyone's responses.  It took me a couple days

What's the best practise in naming modules?
174452 [henrik.marte] I have a question about the best practise in naming Ruby modules.
+ 174453 [bob.news@gm ] Is this a general module for XML testing or is it a module for testing
| 174480 [henrik.marte] It is a generic framework. The goal is to write something along the
+ 174454 [eeklund@gm i] First of all, I'd coordinate this with Nathaniel (author of
  174469 [henrik.marte] I mailed him, but it was only yesterday, so he hasn't had very much time

How to write a destructive string method?
174462 [henrik@ny .s] I haven't been able to figure out how to write a destructive string
+ 174464 [decoux@mo lo] replace(upcase)
| + 174467 [henrik@ny .s] Worked fine, thanks! Got some help on #ruby-lang, apparently you can do
| + 174557 [dblack@wo bl] "self = self.upcase".replace("replace(upcase)")
+ 174465 [twifkak@co c] ri String#replace
+ 174472 [fritz.heinri] class String
+ 174482 [florgro@gm i] I'd do it like this: (Ignoring the more obvious replace solution)

PDF library
174463 [Chintakrindi] ...
+ 174473 [twifkak@co c] ...
+ 174477 [halostatue@g] On 06/01/06, Chintakrindi Meghanath
  174499 [ron@fu da em] You mean: Yes, yes, no no ;)

molruby release r-20060106
174470 [srinivas.j@s] Dear all,

out of order ruby-talk messages
174471 [gwtmp01@ma .] Does anyone else consistently receive ruby-talk messages out of order?
174505 [ezmobius@gm ] Yeah I get that all the time. Usually two or three answers to  a post

Confirmation required - initialising
174478 [info@ja eo a] Is i) and ii) just two different methods for initialising?
+ 174481 [james@gr yp ] class Song
| 174498 [james_b@ne r] Except that rdoc produces different output for each.
| 174561 [doug.pfeffer] I'm fairly new to Ruby, but aren't Florian's and James' examples
| 174628 [florgro@gm i] Yup, when there's no return the result of the last executed statement is
+ 174483 [bob.news@gm ] No.
+ 174485 [florgro@gm i] No, the first is basically the same as this: (Ignoring the syntax error)
  174657 [forest.aa@gm] attr_accessor = attr_reader + attr_writer ?
  174676 [florgro@gm i] Yes, exactly.

!!! TURN $5 INTO $15,000 IN ONLY 30 DAYS!READ IT!! How to TURN $5 INTO $15,000 IN ONLY 30 DAYS WITH PAYPAL!I TESTED IT AND I AM PRETTY SATISFIED TO HELP THE OTHERS AND MYSELF .txt (01/01)
174486 [PROUDHONEST@] begin 644 How to TURN $5 INTO $15,000 IN ONLY 30 DAYS WITH PAYPAL!I TESTED IT AND I AM PRETTY SATISFIED TO HELP THE OTHERS AND MYSELF .txt

!!! TURN $5 INTO $15,000 IN ONLY 30 DAYS!READ IT!! gro?artig! erhalten Sie viel Geld schnell mit paypal! Es ist total zugelassen..txt (01/01)
174487 [PROUDHONEST@] begin 644 gro?artig! erhalten Sie viel Geld schnell mit paypal! Es ist total zugelassen..txt

UTF-8
174490 [mreed@th re ] Okay, last I checked, strings were just treated as collections of bytes, and
174518 [pbattley@gm ] Regular expressions are UTF-8-aware if $KCODE is set to 'u' or there

ruby-dev summary 28027-28205
174492 [ttate@tt ky ] Here is a summary of ruby-dev mailing list.

How to override Numeric class
174504 [lists@mi el ] I am new to Ruby and am trying to overload "+" operator on Integer
+ 174509 [bob.news@gm ] Did you look at the error?
+ 174510 [james@gr yp ] ?>       value + other
  174522 [lists@mi el ] Thanks James. As I understand coerce method in Ruby classes is to assure
  174526 [james@gr yp ] Yes, that's correct.

[OT] cats (was: Re: How do you sort a text file?)
174507 [bob.news@gm ] Uh, oh, need to upload a picture of our "Tyron in the Sink". :-)
174513 [vjoel@pa h. ] Has the venerable tradition of Friday cat blogging made its way into

Re: How to access individual characters in a string (as stri
174515 [janchrister.] class String

Another milestone for Ruby!
174519 [jeremy@ch os] Jifty is written in Perl. If you're familiar with Ruby, Perl might
+ 174530 [perrin@ap th] Holy crap.  No kidding.
+ 174533 [chneukirchen] Quidquid id est, timeo Danaos et dona ferentes.
| 175353 [ jupp@gm .d ] This corresponds to "Do not trust Perl mongers - even if they say your
+ 175363 [doodpants@ma] <Yakov>

[QUIZ] Dice Roller (#61)
174521 [james@gr yp ] 1.  Please do not post any solutions or spoiler discussion for this quiz until
+ 174524 [ruby@an hr p] } [NOTE: The BNF above is simplified here for clarity and space. If
| 174552 [matthew.moss] ...
| 174553 [willshattuck] forgive my ignorance... BNF?
| 174554 [billk@ct .c ] HTH,
+ 174528 [lukfugl@gm i] I assume integer arithmetic? So if, for example, a 3 comes up on your
| 174536 [matthew.moss] ...
+ 174531 [ryansobol@gm] ...
| + 174534 [halostatue@g] I suspect user error.
| + 174535 [james@gr yp ] Hmm, that example looks wrong now that you mention it.  It should be
| + 174537 [matthew.moss] ...
|   + 174539 [willshattuck] Actually 3d6 means roll a 6 sided die 3 times so you would have a result of 3-18
|   | 174542 [matthew.moss] Actually, you're right, but actually my post was a half-joke. The
|   + 174540 [halostatue@g] Just don't tell me that the first one is 18/00.
|   | 174541 [james@gr yp ] <dies laughing>  They all were, of course.
|   + 174545 [ryansobol@gm] ...
|     174546 [james@gr yp ] 18 was the best stat a starting character could have.  If you got
|     174548 [halostatue@g] In most versions of D&D/AD&D, this was also limited to Strength attributes only.
|     174551 [james@gr yp ] Ah, yeah, you're right.  It's been too long.
+ 174556 [rosco@ro co ] Well, I'm no D&Der, but I think I'm gonna hand in my solution for this one
+ 174560 [jim@fr ez .o] rand(16)+3  rand(16)+3 rand(16)+3
| 174568 [halostatue@g] (1..3).inject(0) { |sum, ii| sum + (rand(6) + 1) }
| + 174585 [jim@fr ez .o] [great explanation snipped]
| | 174587 [james@gr yp ] A zero on the tens dice is 10.  On the one's dice, it's zero.  00 is
| | + 174590 [jim@fr ez .o] That doesn't jive with what was said earlier. There should be no zero
| | + 174595 [lukfugl@gm i] Actually, when rolled together, both dice are zero-based. The
| |   + 174597 [jim@fr ez .o] No wonder I don't play D&D. I don't think I am smart enough.
| |   | + 174605 [halostatue@g] d10 has size 0..9, generally because of size (the print on them is
| |   | + 174608 [james@gr yp ] It's really my fault.  I keep leading you astray.
| |   | | 174623 [rosco@ro co ] [snip involved dice discussion]
| |   | | 174639 [rosco@ro co ] Just to make sure I have the precedence and so on right, I used a loaded
| |   | | 174675 [chneukirchen] This is wrong, the maximum is 339: (25-4)d(16/1)+3.
| |   | | 174677 [rosco@ro co ] (5d5-4)d(16/d4)+3		= 87
| |   | | + 174679 [rretzbach@go] (5d5-4)d(16/d4)+3
| |   | | | 174681 [rretzbach@go] Ignore me for lifetime please.
| |   | | + 174680 [chneukirchen] Yeah.  I got your list wrong then, I thought the number means the
| |   | |   174685 [rosco@ro co ] Oh, I see. I guess it's a standard thing to do to find the maximum? As I
| |   | + 174616 [matthew.moss] For the purposes of this quiz, I propose that dice are 1-based.  Which
| |   | | 174624 [ryansobol@gm] Thank you all for pitching in your explanation of dice rollers to non-
| |   | | 174643 [james@gr yp ] Feel free to summarize here, but I generally don't add the discussion
| |   | + 174983 [lukfugl@gm i] Heh, I wouldn't say that. But I will admit that most of my attraction
| |   |   174985 [lukfugl@gm i] Ok, I must fix this previous apology to Jim Freeze. 0 -> 10 was *not*
| |   |   174992 [rretzbach@go] I really love this mailing list.
| |   + 174606 [james@gr yp ] Egad, I have been extra dumb today, haven't I?  I'm very sorry to
| + 174741 [rm_rails@ch ] Uh, of course you can make such a polyhedron.  Consider the
|   174990 [lukfugl@gm i] In fact, I've seen a variation on this for the infamous "d3" somtimes
+ 174569 [rretzbach@go] Huhu.
| + 174570 [matthew.moss] All binary operators are left associative, so 5d6d7 is (5d6)d7.
| | 174578 [davelee.com@] so 1+2*3 == (1+2)*3 == 9?
| + 174667 [henrik.marte] With the game systems I know, and I admit I haven't played for a couple
|   174725 [matthew.moss] Ahhh....  this must be a game system you don't know.  =)
+ 174582 [mow@gm il co] What's the execution order in this case?
| 174611 [p.barbierder] IMO, all the parenthesis must be resolved before going further.
+ 174726 [matthew.moss] Wow...  You guys are just having too much fun with
| 174786 [p.barbierder] Well, why do you say it's invalid ? Given the simplified BNF it must be
| + 174788 [rretzbach@go] Hmm so that expr has 18 as maximum result with fully loaded dice?
| + 174790 [ruby@an hr p] } > Wow...  You guys are just having too much fun with
|   174792 [p.barbierder] Well, I disagree ...
+ 174814 [a.mcguinness] My submission isn't going to win points for brevity - at 600+ lines it's
| 174912 [a.mcguinness] ...
+ 174815 [rosco@ro co ] This is my quiz entry for Ruby Quiz 61 (Dice Roller). It's actually the
| + 174817 [rosco@ro co ] Sorry, I changed that. It gives a block now.
| + 175040 [rosco@ro co ] Yeah, well, the penny dropped. That'll teach me to try and understand
|   175063 [warrenbrown@] OK, I tried, but I just can't stand it anymore...
|   175134 [rretzbach@go] haha, just imagine to join the *german* grammar police :>>>
+ 174829 [halostatue@g] ...
+ 174837 [mel@me ax s.] Here is my solution. I convert the expression into RPN (using the algorithm
  174849 [james@gr yp ] Wow.  That is very cool.  Thanks for sharing!

PDF Library - Reading the PDF Document
174525 [Chintakrindi] ...
174532 [halostatue@g] On 06/01/06, Chintakrindi Meghanath

Case-insensitive hash?
174543 [ruby@an hr p] So I understand that a hash can use keys of any type, not just string (or
+ 174547 [halostatue@g] You will need to write a wrapper. Look at HashWithIndifferentAccess in
+ 174564 [ruby-ml@ma i] ed

Reading Windows Registry Files under Linux?
174549 [x7@da is h. ] reading the Windows Registry is easy with Ruby - when under Windows.

Ruby and IBM MQ Series
174555 [juan.pablo.n] I'm thinking about doing web development on RoR for my shop, but most of
174577 [brianm@ap ch] You could probably do bindings to the XMS C api for MQSeries without
174604 [juan.pablo.n] That doesn't sound too impresive. I will give it a try.
223889 [reidmo@gm il] Don't know if you can still use it, but there is now a complete

Need help configuring LoginGenerator
174562 [texasjustica] I'm new to Rails and I'm trying to get user login working on my app.
+ 174565 [ryansobol@gm] The Rails mailing list is better suited to answer question about
+ 174581 [belorion@gm ] ...

variable
174571 [michaelaugus] controler  action  id   variable
+ 174573 [ef@al m. it ] <%=3D @params['permission'] %>
| 174637 [michaelaugus] thanks but it doesn't work too ! hmmm?
+ 174575 [halostatue@g] -austin

Re: Dice Roller (#61)
174572 [sascha.abel@] Moin,
+ 174574 [james@gr yp ] Na, if you get a 1 on the tens die and a 3 on the ones die, you have
| + 174580 [james@gr yp ] I misread.  Sorry.
| + 174583 [halostatue@g] That's for d%; I was referring to "Cyborg Commando" which had a d10x,
|   174596 [hitesh.jasan] You may want to review the precedence order again.
|   174602 [matthew.moss] Parse tree for: (5d5-4)d(16/d4)+3
|   174674 [chneukirchen] So what are the maximum and minimum values of this?
|   + 174699 [gavin@re in ] The min for ndm is always n, because all dice start at 1.
|   | + 174703 [gavin@re in ] ...
|   | + 174704 [gavin@re in ] Man, *and* I flipped the sign on that -4. *shakes head sadly*
|   |   + 174711 [chneukirchen] I claim 4 and 339.
|   |   | 174718 [M.B.Smillie@] Both (4, 87) and (4, 339) are correct depending on your definition of
|   |   + 174712 [billk@ct .c ] For max, should be (16/1) not (16/4), no?
|   |     174715 [gavin@re in ] You're all too damned smart. :)
|   + 174700 [reinder@ve l] (5d5-4)d(16/d4)+3 =        (adb = [a,a*b], so 5d5 = [5,25])
|     + 174705 [gavin@re in ] ...
|     | 174714 [janchrister.] d(16/[1,4]) must be [16/4,16/1] => [4,16]
|     | 174735 [matthew.moss] Off the top of my head, that seems right.
|     | 174820 [janchrister.] Very interesting, and different solutions, this time!
|     | 174889 [horndude77@g] I didn't try anything fancy for this. I did try to get eval to do all
|     + 174988 [lukfugl@gm i] As pointed out by others, the result should actually by [4,339]. The
+ 174576 [halostatue@g] In the same way that 3d6 is different than rand(16)+3. It's not
  174609 [p.barbierder] Not in that case ! Very simple : you have 100 possible values, ranging
  174649 [matt@te hn r] Wimps!  REAL gamers roll 100 sided dice (aka Zoccihedron)
  174658 [matthew.moss] I'm not sure whether this made it to the list first time I sent it, or
  174659 [matthew.moss] The quiz shows incorrect output for 3d6.  The line reading "72 64 113
  174660 [matthew.moss] This dice roller is, for the most part, a simple integer calculator
  174662 [matthew.moss] Resolve precedence before associativity.
threads.html
top