210306-214871

210080-212332 subjects 210531-212639

Code beautifiers, anyone?
210306 [kyrreny@br a] I'm looking for the best ways to create a line of code beautification
+ 210312 [ruby@an hr p] } I'm looking for the best ways to create a line of code beautification
| 210369 [kyrreny@br a] Please explain yourself Greg?
+ 210323 [rdm@cf l. om] I agree strongly with the importance of having clean,
+ 210370 [collinsj@se ] This topic has come up before...I see you found some projects focused on
| + 210410 [malvim@gm il] Yes, that is probably a problem for someone who wants to create a code
| + 210615 [kyrreny@br a] Yes you are absolutely right. I have to put a lot of thought into
+ 210423 [nospam@no it] I have written a relatively primitive Ruby beautifier (written in Ruby) that
  + 210617 [kyrreny@br a] A lot of respect to you for creating it man, it's a beautiful script
  + 210619 [pbattley@gm ] Thanks! I'm using your beautifier, and finding it pretty robust. I
    210822 [nospam@no it] / ...

Ruby-Lang Redesign Feedback
210314 [ng@jo nw on ] At about 4 this afternoon we are going to commence discussion of the
210324 [gavin@re in ] 4...in what timezone? 0400 GMT?
+ 210326 [ng@jo nw on ] Good question. Eastern.
+ 210338 [lukfugl@gm i] ...
  210613 [kyrreny@br a] On http://redhanded.hobix.com/redesign2005/
  + 210618 [ng@jo nw on ] Kyree, we have asked that discussion of the new redesign take place on
  + 210621 [james@gr yp ] We look forward to your site design submission and will definitely
  + 210689 [perrin@ap th] I've been reading their stuff for years, and you're right -- these
    210699 [ng@jo nw on ] John Long
    210703 [james.britt@] At dinner recently with a gang of Rubyists, someone mentioned that
    + 210704 [perrin@ap th] Considering my reply was to someone's overenthusiastic critique, and was
    | 210707 [james.britt@] Nothing veiled, no mark to miss; there was no insult intended.
    + 210712 [bulliver@ba ] charset="iso-8859-1"
    | + 210714 [curi@cu i. s] Heh. I don't think companies post (and often pay for) job ads as a
    | | 210716 [bulliver@ba ] charset="iso-8859-1"
    | + 210720 [hal9000@hy e] Agreed. In fact, I think despite their request, it's still permissible
    | + 210732 [james@gr yp ] Building this site has not been easy for us.
    + 210721 [ruby-talk@wh] I have hired every one of those people.  And wouldn't you know it -- they make
      210722 [hal9000@hy e] How delightfully ambiguous. Like the old headline
      210724 [rdm@cf l. om] Tom Christiansen (of Perl fame) likes this example of

bad for Ruby in RUBY
210321 [bitdoger2@ya] ...in the topic today Ruby in Ruby....talk about a hacking game using
+ 210343 [wccrawford@g] I have to totally disagree with that.  As far as going mainstream,
+ 210347 [robert.dober] ...
  210361 [bitdoger2@ya] just let me paraphrase a wall street journal article that i read a long
  + 210363 [collinsj@se ] ...
  + 210364 [cutter38@gm ] ...
    210367 [bitdoger2@ya] ...we are competing for mindshare ... and C & Perl had different
    210427 [robert.dober] ...

HistoryHash --was: A use case for an ordered Hash
210325 [software617r] the first is the semantics of replacement,

Hash again
210335 [robert.dober] ...
210444 [david@va ln ] The literal probably "compiles" to something like

Redefining class
210354 [hsavr@ya oo ] Thank you, guys, for help with my previous problems. With your
210392 [ mfp@ac .o g] class X; end
210466 [rick.denatal] Really? Was this under 1.8.x or 1.9, I'd be surprised if it was
210478 [ mfp@ac .o g] ==
210504 [rick.denatal] Okay, I missed that, I guess it's time for new eyeglasses.
210984 [dblack@wo bl] Or eigenglasses :-)

Ruby search
210355 [hsavr@ya oo ] I want to manage the way how Ruby searches modules to load. I found,
+ 210374 [james@gr yp ] => ["/usr/local/lib/ruby/site_ruby/1.8", "/usr/local/lib/ruby/
+ 210387 [vjoel@pa h. ] The _variable_ is read only, but the _object_ that it refers to (an

That's Ruby, Virginia!
210356 [hsavr@ya oo ] def array_101
+ 210366 [its.sec@gm .] for i in 0 ... self.length
| 210852 [hsavr@ya oo ] Thank you, guys for trying to fix the code. Sure, I had 1001 way to fix
| + 211178 [hsavr@ya oo ] Well, that is a modification. No public\private\irb  etc... :)))
| | 211249 [m_goldberg@a] I don't want to rain on your parade, especially because I can't
| | 212363 [hsavr@ya oo ] Well,
| | + 212368 [logancapaldo] It's a new array of size 1 though.
| | | 212374 [hsavr@ya oo ] Thank you very much, Logan Capaldo.
| | + 212372 [rimantas@gm ] => [1...5]
| |   212375 [hsavr@ya oo ] While I was writing, I got another message, thank you, Rimantas
| + 211253 [ruby@mu rm n] It was a bug in your code. You used [0..value] when you should have
|   212357 [hsavr@ya oo ] Why,
+ 210439 [w_a_x_man@ya] class Array
| 210448 [ruby@mu rm n] Much better this way.
+ 210460 [hal9000@hy e] it should do. It iterated over the
+ 210487 [m_goldberg@a] Your code only works in irb. You get an error, as you should, if you
  210634 [rick.denatal] It doesn't it gets added to the Kernel module, just like in real Ruby.
  210694 [m_goldberg@a] Thanks. You've cleared up my confusion as to why array_101 accepts an

PDF::Writer#x
210373 [dan@ep rk ab] Is there a way to get the current x position like you can get the
210391 [halostatue@g] No.

do not understand this closure
210375 [bitdoger2@ya] in The Ruby Way...chap 1...a crude example of closure doesn't work as
+ 210376 [ara.t.howard] ^  ^
+ 210378 [martindemell] You want square[11] or square.call(11)
  210381 [rakrok@gm il] ...
  + 210385 [martindemell] No, mostly because () is not a method, it's syntax. [] on the other
  | 210399 [bitdoger2@ya] oka...please explain for me where |base| parameter is comming
  + 210394 [ara.t.howard] def the_method() 'namespace one' end
  | + 210401 [rakrok@gm il] ...
  | + 210402 [ mfp@ac .o g] $ cat proc.rb
  |   210405 [ara.t.howard] huh.  so '()' is a method name now?
  |   210413 [ mfp@ac .o g] RUBY_VERSION                                       # => "1.9.0"
  |   210416 [ara.t.howard] hmmm.  seems pointless.  unless i can do
  + 210462 [hal9000@hy e] I think it's difficult. Ruby distinguishes between method names
    210464 [rakrok@gm il] ...
    210465 [hal9000@hy e] I just tried to explain why. A proc is stored in a variable.
    210468 [rakrok@gm il] ...
    + 210470 [dblack@wo bl] That's never going to work.  It would quickly become a nightmare of
    | 210517 [perrin@ap th] . . . except that in Lisps the () is list syntax, and the reason
    | 210558 [musical.matt] True, I was thinking of invocation and typed () where that doesn't
    | 210561 [perrin@ap th] I wasn't aware of that -- it seems like a pretty severe (if rarely
    | 210579 [musical.matt] This has been changed in Ruby 1.9 so it seems to open the possibility
    + 210556 [martindemell] Read up on the difference between a lisp 1 and a lisp 2. (Which is not

continuation called across trap
210377 [youngh@ca da] Does anyone know what the rather mysterious error "continuation

postgres-pr driver
210380 [junkone1@gm ] I am looking for some examples with the postgres-pr gem. especially

import  txt file to mysql with ruby & load data local ??
210393 [cit403@ho ma] I'm trying to run this sql from within a ruby program
210425 [nospam@no it] Yes, if it will work with MySQL directly, it should work here as well.

[SUMMARY] QAPrototype (#91)
210395 [james@gr yp ] While this quiz is based on the fun idea of an interactive Ruby conversation,

XLib (specifically, the swig xlib wrapper)
210407 [asivitz@ob r] I want to write a window manager in Ruby (or at least, write some sort
211153 [hramrach@ce ] Last time I looked at ruby-xlib-wrap it was far from ideal. The
211212 [kero@ch ll .] My Ruby/Wise is indeed incomplete.

(kein Betreff)
210408 [LHuynh-Huu@g] This is a multi-part message in MIME format.

Re: cURL in ruby? Faster than Net::HTTP? [OT]
210412 [david@va ln ] Odds are the process startup would take up more time than you'd gain.

inline yaml arrays (was Re: YAML or CSV?)
210418 [ruby-talk@wh] Right, the 'inline' is a formatting style.
210419 [ara.t.howard] i really rely on this these days - please don't change!  ;-)
210422 [ruby-talk@wh] Me too!  I rely on it, too!

Need Help With Net::HTTP
210428 [el.pibe06@ho] been learning it to make programs which goes to an online game webpage,
210429 [el.pibe06@ho] Oh and I forgot to put I checked at Google but havent really found any
+ 210432 [wccrawford@g] That kind of thing?
| 210434 [el.pibe06@ho] Yes :D! Thank you. If anyone has more resources then that would be great
+ 210463 [cdc@cy he s.] Out of curiosity, what are you using for your search string?  Here I'm
+ 210501 [aaron_patter] Try WWW::Mechanize.  http://mechanize.rubyforge.org/

Alternative to String#to_i ?
210435 [jeremy.lizt@] Is there an alternative method to String#to_i that will return nil
+ 210437 [billk@ct .c ] Integer("123")      # => 123
+ 210438 [ara.t.howard] int = Integer string
| 210442 [dblack@wo bl] That will raise an ArgumentError if string is invalid for the purpose.
+ 210440 [robin@ni or ] => 1
+ 210441 [dblack@wo bl] I don't think there's one that will do that out of the box, but you
+ 210443 [james@gr yp ] from (irb):2:in `Integer'
+ 210450 [jeremy.lizt@] Thanks to everyone for the quick response. The Integer suggestion works
  + 210453 [ara.t.howard] fyi.
  + 210469 [dblack@wo bl] def string_to_i(str)
    210479 [Gennady.Byst] Likewise ;-)
    210482 [dblack@wo bl] The only reason I like mine better than yours is that mine gives nil
    210592 [Gennady.Byst] You win :-) -- I like yours too, acrually. Simply could not resist, as
    210600 [robert.dober] ...

[(CORE/)LIB:PROPOSAL/DISCUSSION] Rifling Through Smalltalk's Drawers
210458 [thoran@th ra] Dear Rubytalkers,
+ 210477 [james@gr yp ] If you're trying to win us over to the idea with your message title,
| + 210488 [pat.eyler@gm] I agree completely, the idea was interesting but almost overpowered by
| | 210524 [ryand-ruby@z] thirded... partially to agree, and partially to demonstrate that
| + 210601 [robert.dober] ...
+ 210571 [chneukirchen] It's called "around advice" because the function to define it is
  210593 [cutter38@gm ] ...

Determinig if 3 characters in a row are the same?
210471 [bjohnson@me ] Sorry for the noob question, but is there a fast and efficient way to
+ 210473 [vjoel@pa h. ] irb(main):001:0> s1 = "1234aaa567"
+ 210474 [TimHunter@nc] irb(main):004:0> m = /(.)\1\1/.match('zyzyzxxx010101')
+ 210480 [ara.t.howard] require 'yaml'
| 210481 [vjoel@pa h. ] irb(main):005:0> re = %r/(...*?)\1/
| 210483 [wccrawford@g] I think he interpreted it as '3 characters in a row, twice in the
| 210484 [wccrawford@g] Sorry, that's 3 (or more) characters in a row, then the same characters
+ 210485 [m_goldberg@a] Here is a minor variation that's good to keep in mind should you ever

Creating/Installing a gem from a SVN repository?
210490 [joeat303@ya ] Is there an easy way to create a Ruby gem, or install a Ruby gem, from
210495 [ruby-talk@wh] svn co http://code.whytheluckystiff.net/svn/markaby/trunk markaby
210520 [joeat303@ya ] Thanks why, but after doing that and uninstalling Markaby 0.4, Mongrel
210522 [joeat303@ya ] Well, I tried also adding "require 'markaby/rails'" and that got rid of
+ 210544 [wccrawford@g] Did you try
+ 210606 [ruby-talk@wh] Right.  This new version of Markaby is much more strict about its use of
  214871 [joeat303@ya ] Hey Why,

What's the Ruby Way to hide class helpers?
210492 [ news@ja .f ] class C
210500 [vjoel@pa h. ] Why not just stick internal_helper in a nested module? (Or does
210550 [ news@ja .f ] That works for me in the current case; internal_helper routines don't need

RubyConf*MI open spot
210496 [headius@he d] ...

Calculating Odds
210499 [curi@cu i. s] I used Ruby to calculate which team will win Warcraft 3 matches

Can Anyone Explain This Memory Leak?
210506 [zedshaw@ze s] Sorry to get your attention.  :-)
+ 210507 [ara.t.howard] i don't think you have a leak.  try running under electric fence (ef).  when i
| + 210509 [srinivas.j@s] And why Apache with pre-fork is good for long-running applications :-)
| | 210514 [ara.t.howard] amen!
| + 210511 [vjoel@pa h. ] So, to test this hypothesis, the OP could try to instantiate a large
| | 210516 [zedshaw@ze s] This is actually what I refer to in the no-Mutex situation.  Create a
| + 210512 [zedshaw@ze s] Nope, I can't agree with this because the ram goes up, the OS will kill
|   + 210518 [ara.t.howard] that makes perfect sense.  with the gaurd only one thread at a time can be
|   + 210519 [ara.t.howard] "A couple of things: Some `malloc' implementations use mmap() to allocate
|   | 210771 [zedshaw@ze s] So, a posting to a news group from some guy in 2001 (5 years old) and a
|   | + 211231 [drbrain@se m] rev=1.90.2.1&content-type=text/x-cvsweb-markup&only_with_tag=RELENG_6
|   | | 211276 [gwtmp01@ma .] Gary Wright
|   | + 211273 [gwtmp01@ma .] Run your code under a process trace program such as ktrace (Mac OS X).
|   |   211427 [llasram@gm i] I posted this earlier, but gmane seems to have snarfed it.  Apologies if it
|   |   211433 [gwtmp01@ma .] Right, so brk/sbrk, but in the environment you are testing, the
|   + 210568 [znmeb@ce ma ] I've had a lot of experience with the "bizarre" behavior of the Linux
|     210651 [cdc@cy he s.] This isn't considered bizarre behavior and in fact is a feature.  Even
|     210653 [ara.t.howard] convincing zed of this might be hard ;-)
+ 210508 [ksruby@gm il] Have you tried to run it with the latest 1.8.5 prerelease?
| 210513 [zedshaw@ze s] You gotta be kidding me.  A damn bug?  Oh no, according to ara.t.howard
+ 210965 [llasram@gm i] On an otherwise quiet GNU/Linux system, I ran each of your scripts for half an
  210974 [znmeb@ce ma ] I'm more interested in what these tests do on Solaris :). We have

[ANN] Piston 1.0.1 - Remote Repository Copying
210510 [francois.bea] Piston is a utility that enables merge tracking of remoterepositories. This is similar to svn:externals, except you have alocal copy of the files, which you can modify at will. As long as thechanges are mergeable, you should have no problems.
+ 210620 [ezmobius@gm ] Very cool Francois!
| 210627 [tfwright@th ] From the Ruby-Talk list.  I didn't look into this too closely, but it
| 210630 [tfwright@th ] How embarrassing--normally I am capable of using email.  Please disregard.
+ 210644 [joshknowles@] ...
  210645 [francois.bea] Piston copies the contents of the remote repository to your localworking copy.  It then svn adds it.  So, you really have the fileslocally, ready to be changed / updated.
  210655 [jeremy@bi sw] ...
  210807 [francois.bea] 2006/8/25, Jeremy Kemper <jeremy@bitsweat.net>:> svn export url here> svn add here> svn propset merge-point 1234 here> svn propget merge-point here> svn diff -r1234 url | patch -p0> svn propset merge-point 4567

Collections of structured-data objects: what approach?
210515 [checkforreal] I'm new to Ruby, though not to programming in general. So I'm looking around
+ 210521 [alex@bl ck e] You can get away with just using an Array for almost all of this.
| 210529 [checkforreal] Ah-ha! Thanks for getting me on the right track.
| + 210530 [alex@bl ck e] a = "foo"
| | 210673 [checkforreal] Thanks,
| + 211404 [dblack@wo bl] Actually I don't talk about Array#insert, so my description of it
|   211694 [checkforreal] ... and for balance, I should say that I *am* enjoying other parts of the
+ 210527 [shortcutter@] ...
  210661 [checkforreal] as in several of your methods?
  + 210678 [toalett@gm i] Ruby returns the last value of a method. self on a line by itself returns self.
  | 210845 [checkforreal] Thanks for your reply....
  + 210709 [shortcutter@] Simen answered that one.  As an additional note, traditionally #each
    210853 [checkforreal] Thanks, and...
    210903 [shortcutter@] You're welcome!

Ruby 1.8.5 released
210528 [matz@ru y- a] We have just released the latest stable version of Ruby.
+ 210537 [ mfp@ac .o g] Good news!
| + 210549 [mortench@gm ] Great! I can't wait for the Windows Installer version of Ruby 1.8.5
| | + 210562 [dave@bu t. d] I don't think that version of Microsoft's programming suite is due for
| | + 210692 [halostatue@g] Not until certain things have been worked out. ;)
| |   211087 [snail@ob me ] I hope not. Visual Studio 8.0 has introduced all sorts of stupidities to
| |   + 211090 [jan.svitok@g] The name to look for is SideBySide. There is some redistributable
| |   + 211164 [ml.chibbs@gm] I can tell you for a fact that 1.8.5 version of the One-Click
| + 210572 [transfire@gm] #pretty_inspect, How's that different from #pp and why not just #pi?
| + 210573 [ara.t.howard] thanks mauricio!
| + 210581 [prakash.diby] ...
+ 210758 [acangiano@gm] Thank you matz. :-)
  210781 [ryan.raaum@g] Which compiler toolset?  mingw? vc6? something else?
  210844 [acangiano@gm] I've used VC 7.1 (Visual C++ Toolkit 2003).
threads.html
top