156857-158930 subjects 157223-159757

Hash#select and Hash#reject
157011 [pan@er kv en] Enumerable#select is kind of the opposite of Enumerable#reject.

157012 [eustaquioran] Hey, what %w exactly is (I mean, I know it's the string array creator part)?
157017 [logancapaldo] Its syntax (of the sugary variety).
157019 [l.francke@gm] and if you really want to see how it is implemented have a look at the
157038 [eustaquioran] To be honest, for both answers. :-)

Integer Confusion
157041 [roastie@ro h] We have class Numeric, class Integer, class Fixnum, and class Bignum.
+ 157043 [james@gr yp ] Fixnums is for small C-style computer numbers.  Bignums are for the
+ 157096 [bob.news@gm ] Adding to James very comprehensible answer: Numeric and Integer are not

Widget toolkits - layout methodolgy
157044 [logancapaldo] First thing I want to talk about is layout in Tk, Gtk and WxWidgets.
+ 157053 [blargity@gm ] I don't know much about Tk, but I'm finding Qt/KDE programming with Korundum
| 157056 [logancapaldo] Hmm, I hadn't really considered Qt until just now, but looking at
| + 157067 [blargity@gm ] Glad to help...  Do please note that currently the ruby bindings for Qt/KDE
| + 157068 [mailinglists] I tried QT on MacOSX and i must say i still don't like it. For MacOSX
| + 157071 [Richard_Dale] The Qt3 version of QtRuby runs on Linux, BSD* etc and Mac OS X, but not
+ 157059 [nagai@ai ky ] Please see TkHBox and TkVBox class of "ext/tk/sample/tkalignbox.rb"
| + 157070 [logancapaldo] I will definitely check those out. Thanks
| + 157147 [logancapaldo] I just got around to actually looking at those classes, and they look
+ 157141 [rhkramer@gm ] Partly because any discussion it may provoke may help me, have you considered

Parsing one-liners
157049 [kevin.olbric] read in a string containing an arbitrary number of comma separated
+ 157050 [sean.ohalpin] w1=input_string.split(/,\s*/).map{|x| x.to_f}
| 157073 [simon.kroege] as to_f ignores leading whitespaces
+ 157109 [email55555@g] If your numbers are *true* floats (for example 123.0 instead of 123),
  157110 [derek@de ek ] w = input_string.split(/,\s*/).map { |n| n.to_f }

hi, i'm new. plus one question
157051 [wrong@so al ] I've been forced to work on some php lately and found myself
+ 157052 [tshiget1@gw ] i am also a ruby-newbie.
| 157066 [daniels@pr n] pop (and it's cousin 'shift') can't return a new array, because they're
| + 157075 [simon.kroege] p xy.transpose
| + 157089 [twifkak@co c] Well....
+ 157092 [ruby.brian@g] bschroed@black:~/svn/projekte/ruby-things$ cat rotate.rb
| + 157093 [dblack@wo bl] ...
| + 157233 [wrong@so al ] you guys are magicians, thanks
|   + 157237 [logancapaldo] Yeah, thats O(n!) IIRC. What you can try is
|   | 157238 [Neville.Burn] Well, if beating her is that important, take a look at
|   | 157250 [martindemell] Or http://carolravi.com/ScrWeb/LeXpert/Default.aspx if you're on windows
|   + 157247 [martindemell] Permutations are not an efficient way to find anagrams, note. Something
+ 157094 [michael.eheh] idea = ["a","b","c","d"]
  + 157097 [dblack@wo bl] I think Travis wanted to do that without changing the original array
  + 157098 [bob.news@gm ] As Travis wanted the original array unchanged, you'd have to insert a #dup

Rich User-interface..
157054 [Erland.Eriks] I am very new to Ruby. I have a question as im working on a Desktop
+ 157119 [roys@mi ds r] The only stable solution right now is FXRuby.  http://www.fxruby.org/
+ 157123 [sgnezdov@fa ] Get yourself "The Ruby Way" book by Hal Fulton.  He covers UI
| 157166 [daryl@br nd ] +1
+ 157212 [florgro@gm i] It might sound odd, but I would go with GTK2 -- there is a theme that
+ 157229 [ng@jo nw on ] vRuby looks pretty cool for native Windows stuff.
| 157240 [brian.takita] You can also use the Ruby/.Net bridge to integrate Ruby with .NET.
+ 157390 [reid.thompso] widestudio is another alternative

Re: hi, i'm new. plus one question | true answer
157057 [tshiget1@gw ] this is a known phenomenon, named 'decay'.
157060 [wrong@so al ] like playing golf near the ocean?
157064 [tshiget1@gw ] you've got the point!

Visual IDEs??
157063 [Erland.Eriks] Are there any Visual IDEs available for windows platform ? Please
+ 157072 [michael.eheh] - FreeRIDE
| + 157083 [waqas.younas] Many thanks for your message. Which you would you prefer? :-)
| | 157086 [michael.eheh] I'm a newbie and checked the IDE's only for a few days. My prefer at this
| | 157088 [rob.02004@gm] ...
| + 157152 [mailinglists] I don't think so, under Visual IDEs i understand the same as RAD
|   + 157234 [michael.eheh] if the "Visual" in the subject correspondend to GUI, then you are rigth and
|   | + 157278 [curt.hibbs@g] Lothar is the author of the Arachno Ruby IDE.
|   | + 157310 [mailinglists] No as i said there is no GUI Builder for ruby out there, even Arachno
|   |   157315 [shanko_date@] There is none that is actively maintained and cross-platform.
|   + 157246 [Richard_Dale] I wouldn't call Qt Designer a 'half ready workaround'. I certainly prefer
|   | 157309 [mailinglists] It is still far from what people expect. There is IMHO no direct GUI <->
|   | + 157323 [Richard_Dale] You can run the UI in 'test mode' as you develop it with Qt Designer. I
|   | | 157381 [botp@de mo t] #There is none that is actively maintained and cross-platform.
|   | + 157460 [roys@mi ds r] One of the other threads in here just mentioned WideStudio
|   + 158184 [aemadrid@gm ] visualWX. Check it out here: http://visualwx.altervista.org/
|     158254 [martindemell] There's also Glade and ruby/libglade, and QT's UI designer.
+ 157078 [the.mindstor] #: Erland changed the world a bit at a time by saying on  9/22/2005 8:16 AM :#
+ 157105 [talha.syed@g] I'm learning Ruby because of Rails, and I use the Ruby plugin for JEdit
+ 157391 [reid.thompso] Locana is a GUI interface or GUI toolkit for the Ruby programming
| + 157396 [dandrew.thom] or
| + 157407 [just-for-new] Strange I downlaoded it installed it and started the gui_builder, it
| + 157626 [snowzone5@ho] this came close to running on my system. locana_builder.rb ran but
| + 157637 [just-for-new] Strange I downlaoded it installed it and started the gui_builder, it
+ 157484 [ronaldc@ju o] visualWx is one that can be used with lots of languages including Ruby.

Argument passing with |boofar| (fwd)
157076 [blurg@Ju ge ] Lo Fellow listers,
157077 [jtregunna@bl] It's iterating over the range, not the list; but that's a minor point.
157079 [simon.kroege] 1) the one you may be familiar with, like
157081 [blurg@Ju ge ] Thanks Jeremy and Simon,

A question about Intelligent Systems and using Ruby
157080 [danieljohnle] Yesterday (21/09/2005) I sent an email to Dave Thomas (author of
+ 157100 [josh.charles] I'm interested in this as well, but for a different reason.  I'm
| + 157103 [danieljohnle] Yes, any basic AI in Ruby. Any type of AI in ruby to be honest, I want
| | 157115 [Ara.T.Howard] you may want to ping joel vanderwerf (frequents this group) was doing some
| | 157557 [vjoel@pa h. ] I like to call our simulations "artificial stupidity" rather than
| + 157144 [ptkwt@ar cn ] What kind of ai are you trying to integegrate with your web app?  Or maybe I
|   157146 [josh.charles] Well, I have a few ideas that would effect usability and create a
|   157199 [ptkwt@ar cn ] Good question. It may not be.  Could be simply that they check each of the
|   + 157208 [billk@ct .c ] I'd guess something like that, with more popular search
|   | 157264 [twifkak@co c] Definitely. I've had it recommend mispelled words over correctly spelled
|   + 157266 [paolo_verone] I come in not as a Ruby programmer,I just follow your postings from a
+ 157114 [Ara.T.Howard] hth.
| 157117 [shanko_date@] HTH,
| 157125 [ef@al m. it ] I'd suggest you find a good introduction to AI techniques, and then
| 157261 [twa@po t. om] I'm trying to pick up AI programming and ruby, I found
+ 157145 [ptkwt@ar cn ] I haven't done any Fuzzy Logic, but I have used Ruby to develop genetic

157087 [scott@ho ti ] I'm sorry if this is the wrong place to ask, but I didn't really find where
157177 [tom@in oe he] Are you interested, perchance, in hosting a mirror for RubyForge file

[SUMMARY] Ruby Jobs Site (#47)
157099 [james@gr yp ] Naturally I always hope that the Ruby Quizzes are timely, but this one was maybe

Instantiating a subclass of NilClass.
157101 [transfire@gm] I've subclasses NilClass, but don't know how to instantiate it. Any
+ 157112 [bob.news@gm ] Hm...  I guess NilClass in Java lingo would be a final class, i.e., no
| 157122 [transfire@gm] Yea, but the boolean behavior is important. I'm using it in a
| + 157126 [bob.news@gm ] <snip/>
| + 157129 [pit@ca it in] I thought you'd use the null-object pattern to avoid the nil? tests. You
|   157138 [transfire@gm] In particular, I use the boolean behavior to redefine an element of the
|   157148 [logancapaldo] Whats the problem with just doing
|   157150 [transfire@gm] I eat lots of cake ;)
+ 157113 [nobu.nokada@] Impossible in current implementation.
  157124 [transfire@gm] I oucld take robert's suggestion if I could get it to act like
  + 157127 [jeff.darklig] Uh, isn't there a NilComparable object in the Nano/Mega stuff?
  | 157139 [transfire@gm] Not the same thing though.
  + 157185 [nobu.nokada@] In Ruby, truth-ness is determined by the object itself, not by
    157187 [transfire@gm] How does that work in an 'if' statement?
    + 157194 [nobu.nokada@] not (nil.equals?(foo) or false.equals?(foo))
    + 157205 [florgro@gm i] It uses the RTEST() macro which currently checks if the object is either

Kernel Docs MIA
157111 [james@gr yp ] $ ri -T Kernel
157227 [james@gr yp ] No one is seeing this but me???
157245 [matz@ru y- a] I confirmed the problem but haven't identified a cause.

Net::Netrc request for comments
157128 [Bob_Showalte] I'm a Perl-er learning ruby. I'm creating a ruby port of Perl's Net::Netrc
+ 157134 [nobu.nokada@] I'm using <http://www.rubyist.net/~nobu/ruby/netrc.rb>.
| 157135 [bob.news@gm ] "Internal Server Error" - Hm...
| 157190 [nobu.nokada@] Hmmm, I can't stop it from seeing .rb as CGI.  Try
| 157201 [bob_showalte] Thanks, I can see it now. Looks like you subclassed Hash. I will study your
| + 157202 [bob_showalte] [ snip excellent comments]
| | 157248 [bob.news@gm ] Yes, certainly.  You can reopen Net::FTP in your code and add methods.  But
| | 157286 [bob_showalte] Yes, I meant to do the extension as part of my code, not by changing the
| + 157591 [nobuyoshi.na] Thank you, I haven't noticed it.  But is that behaviors better?
+ 157136 [bob.news@gm ] I'd use locate only and probably make new private.  Reason is that locate

gui's for ruby?
157140 [hawkman.gelo] ...
+ 157143 [tom@in oe he] It uses the Simple DirectMedia Layer (SDL) toolkit.
+ 157154 [mailinglists] For good games you need to create your own GUI on top of SDL  http://www.libsdl.org/index.php
  157158 [hawkman.gelo] ...
  157159 [oeaniz@gm il] I have no idea, but maybe you could also look at gosu[1]. Don't know
  157163 [hawkman.gelo] ...

Identifying where bad XML is
157157 [bburdick@gm ] I am somewhat new to ruby and would appreciate any help on this
+ 157164 [james_b@ne r] Um, depends on what is making it bad.
+ 157167 [bob.news@gm ] What exactly do you mean by "bad"?  Do you mean "ill formed"?  In that case

Outputting custom YAML types in 1.8.3
157171 [aaron@sc ra ] I just upgraded my main development box (Debian unstable) to the new
+ 157302 [ruby-talk@wh] Or I would recommend switching to taguris completely in your code.
| 157325 [aaron@sc ra ] Presumably you mean to use that argument when calling map on the
+ 157415 [sylvain.joye] I don't know if it is related but the 1.8.3 from Debian unstable broke

Re: File::stat(any).ino => 0 [WAS] Re: Help me clean up this method
157174 [djberg96@gm ] Upon further review, this is not a bug.  From the MSDN documentation on
157179 [Ara.T.Howard] thanks for that!  any idea how to tell if a file is unique on that file system
157183 [nobu.nokada@] eban has suggested File.identical? for that purpose.
157186 [Ara.T.Howard] that sounds great - but how would it be implemented on windows if there is no
157192 [nobu.nokada@] Of course, comparing expanded pathes ;)
+ 157196 [Ara.T.Howard] lol!
+ 157214 [halostatue@g] 1. There is, at least on NTFS, a unique file identifier that is
  157221 [sean.ohalpin] The file's unique ID is assigned by the system and is stored in the
  157265 [nobu.nokada@] Thank you for the info.  I've forgotton it.  It will be used in

Mock the Server
157180 [phlipcpp@ya ] [A repost from the TFUI mailing list]

Inspect, looking in from the outside
157182 [transfire@gm] I've been hadling a lot of OpenStruct like classes the last few days.
157210 [florgro@gm i] I dunno, I've been fine with Object.instance_method(:inspect).bind(obj)
157228 [transfire@gm] Ah! You are right. Though writing this out is way too long if you do
157326 [transfire@gm] I've refined the module idea. I moved the methods to ObjectSpace
157419 [chneukirchen] ObjectSpace.object_id_of(ObjectSpace)  #=> -605307980

"The class that it is mixed in to..."
157189 [john.carter@] Ok, so I'm documenting a Mixin.
+ 157191 [Ara.T.Howard] clearly the 'mixer'.  tonic for example.
| 157561 [john.carter@] I like that. Cocktail. Included, not stirred, nor shaken. (Sorry, I was
| 157564 [twifkak@co c] That seems very anti-duck. I see no reason why an Object's meaning could
+ 157193 [wmorgan-ruby] Mixee.
| 157271 [dblack@wo bl] That would be the module itself -- the thing getting mixed [in] :-)
| + 157275 [bob.news@gm ] This mixup is probably a result of mixing confusion with uncertainty... ;-)
| + 157292 [rhkramer@gm ] I guess when I hear "mixee" I expect a "mixer" to exist.  So one would be the
|   + 157293 [wmorgan-ruby] My thought pattern exactly. Unfortunately "mixin" is the official name
|   | + 157305 [rhkramer@gm ] For me (not the OP), one of those sounds better, less opportunity for
|   | + 157328 [logancapaldo] ...
|   |   + 157336 [sean.ohalpin] Where does the term 'mixin' come from?
|   |   | 157346 [rhkramer@gm ] * the mixin terminology is pretty well established.  Still, if a
|   |   | 157430 [benbelly@gm ] I'm new, so maybe this is a terrible idea, or maybe it has been
|   |   + 157337 [rhkramer@gm ] (Again, I'm not the OP, but) mixin/mixture has some promise.
|   + 157491 [dblack@wo bl] Employer employs employee.
|     157499 [sean.ohalpin] My point was that Ruby has two ways of 'mixing in' a module -
+ 157207 [florgro@gm i] I have no fancy name for the inclusion target, but I have implemented
+ 157274 [dblack@wo bl] Array mixes in Enumerable.  Array is that class that mixes in
  157335 [nseckar@gm i] In addition,

Switching code in or out.
157195 [john.carter@] I tend to do a mix of Test Driven Development and Design By Contract.
+ 157198 [wmorgan-ruby] Here's a very rough way of doing this. It rewrites the methods at load
+ 157200 [jason@jv eg ] charset="iso-8859-1"
+ 157215 [twifkak@co c] Would this suffice? Its syntax is limited compared to the 'raise'
+ 157249 [bob.news@gm ] Just in case you're not aware of this: there is an implementation of DBC
+ 157280 [florgro@gm i] I'm exploring this with http://ruby-contract.rubyforge.org/ -- comments

static local variables
157197 [ xyz@xy .c m] i'm trying to create what C calls a static local variable inside a particular
+ 157216 [halostatue@g] There is no equivalent in Ruby. Use instance variables.
+ 157225 [1337p337@gm ] While there isn't a direct equivalent, you can do something similar.
+ 157239 [ruby-ml@ma i] I would recommend just creating an object of some sort but if you really
+ 157241 [logancapaldo] Closures are your friends
+ 157253 [bob.news@gm ] Just don't do it.  As you see attempts to simulate this queer feature of C
+ 157277 [nobu.nokada@] I'd suggested EVAL_ONCE but not accepted yet.

class methods
157203 [r.mark.volkm] I thought this would be easy, so it's embarassing to ask.
+ 157204 [transfire@gm] Class is an Object too, so
| 157209 [r.mark.volkm] The method "methods" returns ALL the methods.
| + 157211 [bob_showalte] Thread.methods - Thread.class.methods
| + 157213 [jason@jv eg ] charset="iso-8859-1"
| | 157217 [twifkak@co c] Thread.methods(false) works, too. This is new to 1.8, so you're not
| + 157252 [bob.news@gm ] $ ruby -e 'p Thread.methods.grep(/alive/)'
| + 157394 [joevandyk@gm] Didn't you see my post?
+ 157206 [joevandyk@gm] MyClass.methods
+ 157269 [dblack@wo bl] puts array

[ANN] RDE 1.0.0 released
157222 [qzs01353@ni ] I released RDE 1.0.0.
+ 157260 [doc@do on el] Thanks. As a Ruby beginner RDE has been a great help to me.
+ 157262 [bogus@bo us ] thanks, sakazuki. Looks marvellous.
| 157263 [simon.kroege] (ruby 1.8.2 (2004-12-25) [i386-mswin32])
| + 157285 [qzs01353@ni ] Hm.
| | 157313 [dooby@d1 .k ] Real thanks sakazuki-san - I can see you've put a lot of work in !
| | + 157331 [nowahere@ho ] OK.. I get exactly the same error.. and I didn't understand the replies
| | | 157356 [dooby@d1 .k ] It's so difficult to know what /finished/ software looks like :p
| | | 157414 [nowahere@ho ] many assumptions in the installer package, and once I figure out what
| | + 157493 [qzs01353@ni ] Auch! Yes, infinite. These are bug. I will fix these in next release.
| | + 157593 [damphyr@fr e] Don't want to be a spoilsport (RDE is pretty nice), but to test out the
| |   + 157604 [simon.kroege] thanks for your reply.
| |   | + 157605 [simon.kroege] rereading my post I fear it got a far more aggressive
| |   | + 157612 [the.mindstor] I am another guy looking to desactivate the underline thing :-). Couldn't find it so far.
| |   | + 157927 [dooby@d1 .k ] In summary, the author has recognized that you have an
| |   | | 157941 [SimonKroeger] thanks for your effort!
| |   | | 157955 [dooby@d1 .k ] Then I must get my apology in quickly.  You've convinced me.
| |   | + 157934 [qzs01353@ni ] Ok, maybe, something bug is there. I will try to find and fix them.
| |   + 157929 [dooby@d1 .k ] Start it up, paste your snippet into [Untitled] ...
| |     158007 [damphyr@fr e] Nope, just like everyone else, I have my own ways of working with my
| + 157778 [rocioestrada] I had the RDE 0.990 installed I didn't uninstall or nothing...
+ 157363 [paniagua@pc ] A really great tool!... Congrutulations.... Any plans of a Linux version ?
  + 157384 [yasagure@um ] I guess you can compile it for Linux from the source he gives online,
  + 157489 [qzs01353@ni ] I have no plan of Linux version. I have not used GUI on Linux.