191676-199672 subjects 192157-193406

^ [OT] List problems?
191899 [rossrt rosco] Just wondering if anyone else is experiencing problems with the list?

^ Custom serialization scheme
191919 [weyus att.ne] I have an object with one attribute that is unserializable (due to it's

^ Fwd: Please Forward: Ruby Quiz Submission
191921 [james graypr] ...

^ How can I write the awesome kind of code?
191922 [pergesu gmai] I'm writing a small app to do poker simulations.  I read a lot of
+ 191925 [james graypr] class Hand
| 191929 [pergesu gmai] Okay so now I have
| 191933 [james graypr] You can remove the &init parameter to hand(), since you are using
| 191942 [pergesu gmai] I took out &init, I understand why I don't need that in there.
+ 191928 [logancapaldo] class Hand
  191935 [pergesu gmai] Hey Logan,
  191939 [logancapaldo] proc { h }.call is redundant.

^ Question about soap/wsdlDriver
191924 [robothor gma] I ran into an oddity the other day as I was chunking through
191927 [Daniel.Berge] My *guess* is that soap/wsdlDriver is being overzealous with a camelCase
191934 [robothor gma] Thanks, that is what I thought.  Or it is trying to avoid creation of

^ Ruby Quiz Contest Winner!
191930 [james graypr] Ross Bamford has submitted a quiz that exceeded the mark I said I
+ 191946 [belorion gma] Will his quiz be the next? You have defintely piqued my curiousity.
| 191947 [logancapaldo] Um, for him to have won, his quiz would have had to have already occured
| + 191950 [belorion gma] My apologies, I've been out of the RubyTalk loop for a couple of weeks.
| + 191952 [james graypr] too.  ;)
+ 192030 [rossrt rosco] Wow - I never win _anything_ :) Part of me wants to say I couldn't take
  192049 [james graypr] I too have enjoyed the contest and it just so happens that I have

^ ml style 'let' impl - fun with metaprogramming...
191940 [ara.t.howard] require 'let'
191944 [rubytalk eac] k }"

^ "load"ing a file and keeping the current scope?
191949 [ruby philip.] class A
+ 191951 [logancapaldo] class A
| + 191955 [logancapaldo] I realize this is against your "no other solutions" rule, but why won't
| | 191974 [ruby philip.] That worked. Thanks!
| | 191983 [logancapaldo] % cat magic_stuff.rb
| + 191956 [vshepelev im] Interesting solution. What about its effectivenes? And in general,
|   191959 [logancapaldo] Well require-ing only parses the file once. Other than that, this
+ 191954 [christoffer.] eval File.read("magic_file.rb")

^ Question about instance_eval
191961 [pergesu gmai] I'm trying to use instance_eval in a project I'm doing, and I
+ 191962 [james graypr] Ruby will always see the above as a local variable declaration.
| 191972 [pergesu gmai] Can I call pass in an object to instance_eval?  Let me show you the
| 191976 [pergesu gmai] Apparently I can't do that, so I changed the design up a bit so that I
+ 191964 [jgbailey gma] No. Define method missing to dispatch calls to "foo" to the accessor, and

^ Modifying Hash Default Value
191966 [louis.j.scor] Don't do this...This one bit me hard =)
191968 [james graypr] Hash.new { |hash, key| hash[key] = Array.new }
191971 [louis.j.scor] Heh, I knew it would end up being something obvious.  Still, don't do
192028 [shortcutter ] This comes up here roughly every three days. So you're not alone if
192041 [louis.j.scor] Heh.  Nope, I'm almost never comforted by other people's misfortunes,

^ IO#puts and arrays
191978 [daniel.schie] Exactly how does IO#puts determine if an argument is an array? That is,
191979 [daniel.schie] Oooops, it was #to_ary, and it's working like a charm :)

^ how are you  locating method signatures and sources?
191991 [vjraman83 ya] 1. given there is a method say, "save" within a ruby class, how are you
191993 [logancapaldo] You should check out ri, gem_server and http://www.ruby-doc.org/

^ Why not just create a new proc with the desired parameters?
191997 [strobel secu] 1. Binding parameters is useful sometimes.
192026 [vshepelev im] adder = proc { |a,b| self.output(a+b) }
194333 [strobel secu] If I'd ever see code like A.new.instance_exec(4, &adder) and I'd have

^ win32utils tail eventlog error upon change
192012 [botp delmont] I have the ff code.
192014 [djberg96 gma] Works fine for me.  The error you're seeing makes me wonder if the

^ Print Out Code in Program
192015 [strife045 ho] class Ab
+ 192018 [logancapaldo] Sounds like a job for xmp[1]
| 192022 [strife045 ho] Thanks, the code works, but is there still a way to print out everything
| 192027 [rubytalk eac] @ab =3D <<-CODE
| 192032 [kiaroskuro g] I was asking something similar about blocks in the near past.  After a
+ 192052 [gene.tani gm] SCRIPT_LINES__, maybe?

^ irb crash
192023 [curi curi.us] I'm new so I don't know if/where I should report this...
192025 [matz ruby-la] Re-assigning predefined class like String should cause serious

^ [QUIZ] Bracket Packing (#78) - Solution
192033 [benjohn fysh] even then didn't cover all the cases), and this substitution on. Solving
192038 [benjohn fysh] [QUIZ] Bracket Packing (#78) - Solution

^ Twisted for Ruby?
192040 [garbagecat10] On another thread ("Considering Ruby for a Network Application), Giles
+ 192042 [dharple gene] I think you will find a lot of interest, but IMO it would be best for
| 192047 [garbagecat10] I appreciate your comment. We did EventMachine in C++ for some particular
| 192050 [james graypr] Just a minor correction here:  Mac OS X is a Unix flavor so compilers
| 192051 [garbagecat10] Understood, but I was thinking about the masses of OSX machines out
| 192061 [wilig.ruby g] C++ or not, I think this would be an excellent addition to the
| 192066 [benjohn fysh] Would it be terrifically difficult to have both a c++ implementation,
| 192067 [garbagecat10] LOL! Considering we're doing essentially a completely parallel rewrite of
| 192083 [tsuraan tsur] Is libevent an option for this?  I don't really know much about it, but
| + 192088 [garbagecat10] I believe this has been tried and didn't work all that well. Among
| + 192473 [zedshaw zeds] Already did that a long time ago.
|   192474 [nohmad gmail] Is it true? If so, that means future ruby implementation wouldhave dependency with libevent?
+ 192043 [james graypr] My opinion is that this would make you a lot of new friends.  ;)

^ Problem with 2nd File.Read in small script.
192044 [pbailey bna.] Can someone look at my code below? I have a RUBY debugger that indicates
192089 [collinsj sea] I think part of the issue here is that you open the file for writing,
192095 [pbailey bna.] Thanks, Justin. Your comments made me dive deeper, and, it works!
192099 [logancapaldo] If you are going to File.read the whole file into memory anyway, I
192112 [pbailey bna.] Good idea! Thanks, Logan. I'll try it. I've got a pretty healthy box,
192190 [shortcutter ] If you cannot do that I guess it's still more efficient to open the

^ non-static way to get the filename?
192045 [peter rubyra] I am new to Ruby etc. etc. (all the usual disclaimer about how i can not
+ 192054 [ara.t.howard] require 'pathname'
+ 192055 [christoffer.] Look up Pathname, it's probably what you want.
  192062 [Daniel.Berge] I'm confused.  You're saying File.basename(file) is *too verbose*?  Or
  192161 [peter rubyra] Well, for me
  192164 [pit capitain] Peter, this syntax is very nice, indeed. But remember that your "file"
  192167 [peter rubyra] exist).

^ Method Size - Best Practices
192056 [jesusrubsyou] Poll (for everyone, not just Eric): What is good or acceptable method
+ 192057 [louis.j.scor] Well, I won't chime in on the _recomended_ line count for a method,
+ 192058 [ara.t.howard] i think this is a bit silly really,  i have several image processing programs
| + 192065 [benjohn fysh] *snip*
| + 192068 [shortcutter ] 4 cents now.
| + 192093 [drbrain segm] Exactly.
+ 192064 [benjohn fysh] A great method size is one line. Most of my methods come in at under
+ 192076 [chneukirchen] "I tend to break up a subprogram when there are too many local
+ 192094 [drbrain segm] A good and acceptable method size should be almost entirely based on
| + 192097 [toalett gmai] Exactly. Break everything down into comfertable units, but not any
| | 192100 [mike stok.ca] Heh.  Recently a 4,500 line method caught my eye at work.  I ignored
| | 192101 [Nuralanur ao] Can you say what that method was doing ?
| | + 192108 [pat.eyler gm] It sounds like it was gestating ... getting ready to give birth to a brood
| | + 192113 [mike stok.ca] Hmmm.  Mustn't give too much away here.
| |   192114 [Nuralanur ao] Well thank you for the insights - it sounds a little like the story
| + 192109 [james graypr] This is a good point, I think.
+ 192098 [james_b neur] I aim for zero lines of code.  Fewer bugs.
+ 192296 [peter.havens] There is an excellent book named "Code Complete" by Steve McConnell that

^ RUBY on 64-bit Windows PCs.
192071 [pbailey bna.] I can't seem to get Ruby's ftp to work on a new 64-bit Intel box I just
192072 [Daniel.Berge] There has been virtually no testing on 64 bit Windows because, well,
+ 192086 [pbailey bna.] Dan,
| 192090 [Daniel.Berge] I'm not sure it's related, but you're unnecessarily reopening your ftp
| 192096 [pbailey bna.] Yes, I know that I'm iterating ftps here. But, it works on multiple
| 192102 [Daniel.Berge] Good question.  I don't see anything in ftp.rb, but I could be missing
| + 192107 [pbailey bna.] Thanks for your ftp query. And, thanks for your persistence here. But,
| + 192120 [collinsj sea] cindexfiles = Dir.glob("*_*-*.pdf")
|   192183 [pbailey bna.] Yes, that's definitely smarter. I thought about it last night, and, of
+ 192125 [w3gat nwlaga] I've been using a 64 bit AMD and windows 2000 for months without any
  192181 [pbailey bna.] OK. Well, I guess it's another issue then. Maybe some ports are closed,

^ Ruby Quiz Vacation
192077 [james graypr] Well folks, I'm off for some rest and relaxation starting this
+ 192079 [matthew.moss] ...
| 192080 [lukfugl gmai] hooray!
| 192081 [logancapaldo] hooray!
| 192082 [anthony.mora] hooray!
| + 192118 [matthew.moss] You know...  There's something about this group cheer that makes me
| + 192212 [rossrt rosco] Awww, you guys :)
+ 192084 [deanwampler ] Oh, I figured the quiz would take take a vacation with the Car Talk

^ Generating an Atom Feed?
192085 [nathan.olber] Does anyone know of a library for generating an Atom feed? I've looked
+ 192087 [Nuralanur ao] Does this
+ 192091 [ray warmroom] feedtools can generate and parse atom feeds.
+ 192191 [snowzone5 ho] to create an rss feed. found parsers but no generators

^ FTP#mget, FTP#mput
192103 [Daniel.Berge] Is there a method in Net::FTP that corresponds to ftp's mget and mput functions?
+ 192104 [ara.t.howard] this grabs directories if you give it something like
+ 192106 [ara.t.howard] this does something like mput

^ What's the difference between a Thread and a Process?
192105 [groups grand] They seem similar, but by no means identical. My guess is that Ruby
+ 192110 [logancapaldo] Yes, but threads can also be implemented at the OS level. (Ruby's
| 192111 [work ashleym] The JRuby project maps Ruby threads to Java threads, and I think they
| 192117 [phurley gmai] Ruby uses what are often called green threads. The OS is unaware of
+ 192121 [lutzky gmail] I think the more notable difference is that threads share variables,
  192127 [groups grand] Aha. Now that's interesting. What DO forks share? Apparently Signals
  192133 [deanwampler ] They also share open file "handles", at least on *nix systems, at the
  192141 [garbagecat10] In Unix, every process in the system (except the very first one) is created

^ Compiler for Ruby
192115 [Jamal.Mazrui] I realize that a compiler is not necessarily important to a lot of Ruby
192119 [agorilla gma] Bill Guindon (aka aGorilla)
192197 [Jamal.Mazrui] Thanks for the links.  After reviewing several web pages, I have a few
192208 [logancapaldo] ack, top-posting evil!
192324 [rossrt rosco] $ ruby-yarv -v

^ Exponential calcs with very large exponents
192116 [doug dmeharr] Greetings all.
+ 192124 [gm.vlkv gmai] ## Use Fixnum#[] - Bit Reference
| + 192158 [sroberts uni] No, but in case its useful (a long shot), I have some source that does
| + 192162 [shortcutter ] Dunno whether any of these is faster
+ 192132 [john-rubytal] if e[j] == 1

^ Ruby documentation discovery
192122 [john.emerson] I spent the day trying to grok the examples in xmpp4r (xmpp/jabber library
+ 192126 [groups grand] Huh. I got so tired of trying to play "guess the spelling and
| + 192134 [john.emerson] It's not that I don't like hyperlinks - I love them! That's what I meant
| | 192137 [phil hagelb.] On a related note, is it possible to get RDoc in GNU Info format? IMHO
| | + 192139 [john.emerson] I guess that's exactly what I was getting at, Phil, without being clever
| | + 192252 [drbrain segm] $ ri --help
| | | 192297 [john.emerson] I'm not sure what you mean. GNU Info format (more specifically texinfo) doe=
| | | 192298 [hal9000 hype] I can't speak for Eric, but I would say: There's no such
| | | 192307 [drbrain segm] Yup.  You could even go a step further and add an option to RDoc
| | + 192309 [sroberts uni] Rdoc has a pretty flexible framework to output 'stuff'. I'd like gnu
| + 192288 [leslieviljoe] Well come on! Don't just say "it does this and that and makes coffee
+ 192130 [drbrain segm] The next release of Ruby and Rubygems will build ri for installed gems.
| 192135 [john.emerson] That will certainly help. But I am more concerned about having ri built for
| 192250 [drbrain segm] ri is rather twisty inside, so I haven't figured out how to make "you
| 192267 [james_b neur] James Britt
+ 192166 [benjohn fysh] *snip*
  + 192204 [louis.j.scor] You can always generate the documentation from the source.  Whenever I
  | 192253 [drbrain segm] Why not just run gem_server?  Most packages build their own RDoc anyhow.
  + 192300 [john.emerson] Callback might not have been the best example for me to use; it just

^ ruby game
192123 [curi curi.us] I would like to make a game in ruby. I've written tetris with python/
192129 [billk cts.co] Here's a recent post from Florian G. about a game written in Ruby / Gosu,

^ Intro to embedded Ruby
192128 [danxmstie ho] I'm relatively new to the world of Ruby, but I feel I'm catching on
+ 192131 [billk cts.co] Not quite what you asked, but you might want to check out Gosu's
+ 192142 [garbagecat10] I don't know anything about game programming so this may not be useful to
+ 192159 [sroberts uni] I'm a huge fan of ruby, I use it whenever I can, but not for everything.
  192186 [logancapaldo] Blasphemy! Burn him! Burn him! ;)

^ tr method
192136 [0011 hush.co] was the translate method deprecated, the book that i have used it as an
192138 [djberg96 gma] Nope, it's not deprecated.  What would make you think so?
192140 [0011 hush.co] oh never mind i was using wrong i was just using it like tr(arg,arg) its

^ command line rubygems and require
192143 [polypus yaho] given the file requires_foo.rb
+ 192145 [polypus yaho] ok i've rewritten my little shell script in ruby solving my main
+ 192146 [logancapaldo] You could do
| 192198 [polypus yaho] thanks guys
+ 192147 [jim weirichh] RubyGems wraps the require command in order to locate the gem

^ [ANN] New Ruby Garden Wiki Trial Run
192144 [jim weirichh] == Spam by the Numbers
+ 192155 [roys mindspr] Outstanding, Jim!  I've tried despamming RubyGarden before and it took
+ 192193 [james graypr] I think Jim Weirich is a hero!
+ 192199 [lyle.johnson] Sounds promising, Jim! I hope that if this proves successful it can be
+ 192464 [john.carter ] Good Lord Man! I knew I hated spammers before I saw that, but that's

^ short hand %w
192148 [0011 hush.co] how come when i do this m = %w[cat [dog dog] mouse] and then request
192149 [0011 hush.co] i tride it on the inner array and it return %w"[dog" so that doesnt
192150 [skurapat ucs] As mentioned a few weeks ago on this list, you must escape
192152 [0011 hush.co] oh ok thanks i am new to programming and have only been around this
192160 [skurapat ucs] <http://www.ruby-talk.org>. There you can find every discussion that

^ Intantiating a class by name
192151 [erichtimkar ] For the life of me I haven't been able to find the syntax to
+ 192153 [Ola.Bini ki.] obj_class = Object
+ 192154 [jake.mcarthu] class Foo
| 192156 [leavengood g] No offense to the OP, but this is about the 5th time this has been
| + 192168 [benjohn fysh] [Brief discussion, and then two solutions for the the general case,
| | 192171 [botp delmont] #
| | 192173 [benjohn fysh] I think that means you are in the tar pit - it's there to attract spam
| | 192176 [jim weirichh] If you think you are in the tarpit, send me an email with the host and
| | 192188 [shortcutter ] I think I remember another solution is to register with the Wiki and
| | 192278 [jim weirichh] Registering preferences with the wiki will work if you are triggering
| + 192302 [erichtimkar ] I appreciate the array of options expressed on this.  It really has
+ 192182 [daniel.schie] def get_class(name)
| 192185 [daniel.schie] name.to_sym.to_str.split(...
| 192187 [logancapaldo] You're right it doesn't, so how does explicitly converting name into
| 192201 [daniel.schie] Yup, it was supposed to read `to_sym.to_s'
+ 192189 [dharple gene] class Foo; end