207544-256283 subjects 208055-250370

replace my symbolobject
207773 [junkone1@gm ] I havea symbolobject which i use as a array later. the definition is

Cardinal: Not dead yet?
207789 [jfh@ci e. fl] ...
+ 207872 [ptkwt@ar cn ] Several years ago (was it '02?) when I first proposed Cardinal and opened
+ 207903 [hal9000@hy e] It's not dead, it's just pining for the inodes.
  + 207944 [drjflam@gm i] Interop between different dynamic languages was one thing that we
  + 207954 [znmeb@ce ma ] Wait a minute -- the whole *point* is that the parrot is dead, isn't it?

[ANN} Ruby Performance Validator 1.14
207792 [snail@ob me ] Ruby Performance Validator 1.14 has been released.

Fix for rational.rb (accepting Rationals as num/den)
207797 [apeiros@gm .] Thanks.
207798 [apeiros@gm .] Whoops, that was the old code snippet...
207877 [renard@nc rr] Tested the code and it appears to do it correctly

Mechanize and Radiobuttons
207799 [barjunk@at g] I have found Mechanize fairly intuitive and easy to use. (after
208346 [aledonne.lis] That's probably an HTML problem in the form. See

ParseDate.parsedate() and Time.now()
207800 [patrick@pk p] irb(main):029:0> timeNow = Time.now().to_s()
+ 207823 [Daniel.Berge] This is a known issue, where long time zone names (i.e. "Central
+ 207852 [kbloom@gm il] It's you. Specifically, something's wrong with your locale, because
| 207855 [Daniel.Berge] Should?  No.  It's up to your OS (and how it was configured when it was
+ 208515 [patrick@pk p] The point I was trying to make is that the 1st element of the array
  208524 [halostatue@g] I'm not sure it'll change. You're on Windows, and Windows is stupid
  + 208539 [Daniel.Berge] Or did you mean something else?
  | + 208559 [halostatue@g] Useful. You realize it points to your own blog, don't you? ;)
  | + 208567 [ara.t.howard] why aren't you guys just using a decent date format?
  + 208586 [chneukirchen] It's time to make use of missing/strftime.c when on Windows.

Assign an unknown value to an unknown variable
207805 [vincent.arno] abcd = one
207840 [abergeron@gm] What you want is a DSL.

newbie question: how to create variable
207809 [KMichek@se n] how to create variable in the method that accepts string as name of the variable and the object?
207865 [shortcutter@] instance_variable_set("@#{name}", value)
207971 [mrpinto@gm i] ...
207977 [dblack@wo bl] ruby -e 'name="var"; value="3"; eval("#{name}=#{value}"); var'
208123 [KMichek@se n] editor.DrawGrid

Multiple scripts accessing one WEBrick session?
207828 [desijedi@gm ] I want to set up a a machine as a servlet container using WEBrick. But
207979 [jan.svitok@g] Just add your servlets and respective server.mount(url, servlet)
208000 [desijedi@gm ] Thanks Jan, I am quite new with Ruby, so I am grateful for your example

[ANN] Mongrel Pre-Release -- PID Files Working
207853 [zedshaw@ze s] sudo gem install mongrel

Ruby + openssl + self signed certificates = confusion
207856 [wneumann@gm ] I'm trying to work a bit of CA ability into some code that I'm writing,

How absurd is this?
207857 [khaines@en g] Imagine you have in a method a block.  Sometimes you will want that block
207858 [martindemell] I'd add a Mutex#synchronize_unless
+ 207859 [GENIE@pr di ] +1
+ 207861 [khaines@en g] That's perfect.  And obvious.  :)  Thanks much for helping me see it.

Crazy gsub/regex scheme - can this be done better?
207862 [weyus@at .n ] All,
207884 [eero.saynatk] You might want to just look into using Tidy, hpricot
207886 [weyus@at .n ] The problem with those kind of parsers (I'm using Rubyful Soup to some
207921 [weyus@at .n ] [ INSANE COMMENT: I just want to say that the black magic that is

Problem with Net::FTP#mtime
207863 [Daniel.Berge] Ruby 1.8.4
207866 [cribbsj@oa w] I've had the same problem.  Sometimes #mtime will work, sometimes not.

Trouble squashing Ruby bug
207876 [jbacigalupa@] I'm writing a c++ Ruby extension that seems to be running into some
208009 [rickhg12hs@g] Whether you are using SWIG or not, their Ruby memory management
208069 [jbacigalupa@] Thanks -  I'll check that out

Ruby Extensions
207883 [riteshtijori] I need to wrap/extend my C++ header file to be able to use it from Ruby.
207968 [interfecus@g] You could use SWIG to wrap just this header file. Only the classes and

Re: Pen and Paper (#90)
207885 [transfire@gm] I know I'm stupid and all that, but I'm not sure there's enough
207909 [skurapat@uc ] 1. Grab a pen and piece of paper.
+ 207927 [james@gr yp ] This is a great answer.  Let me just add one minor point...
+ 207929 [transfire@gm] Ah. okay. Consecutive order. That's what I was missing. Thanks Suraj.
+ 208146 [eric.duminil] Great explanation indeed!
  208149 [chiology@gm ] Eric, if you use Gmail, it'll show up twice because Gmail adds your
  208152 [eric.duminil] Thanks for your explanation Matt!

cannot require a file that doesnt have a prefix?
207890 [transfire@gm] Huh... why can't I require a file that has no prefix?

Re: cannot require a file that doesnt have a suffix?
207891 [transfire@gm] Er... s/prefix/suffix/
+ 207892 [collinsj@se ] ...
+ 207947 [gmurray@cl u] This is defined behavior, covered in the file eval.c around #6912
| 207956 [transfire@gm] Okay. Well, I expected it to try the literal path first, then try .rb,
+ 207948 [nobu@ru y- a] You can load it instead.

Ruby can't find installed gems
207894 [chet@no at r] I've been fighting this all day, and I can't grok where I've gone wrong.
+ 207900 [steverummel@] prompt$ irb -rrbconfig
+ 207931 [chet@no at r] That does appear to be at least part of my "something stupid n00b error"

Beginner's question: assigning same value to many variables
207905 [askhere@ya o] I'm just starting out in programming, using Ruby to learn.
+ 207906 [mvette13@gm ] ...
| + 207908 [mvette13@gm ] ...
| | + 207917 [skurapat@uc ] Isn't that considered _evil_? Using eval on a string, that is.
| | | 207920 [perrin@ap th] Maybe we should call it "evil" instead of "eval", then.
| | + 207923 [dblack@wo bl] the eval scope, and the #each block scope.
| |   207925 [perrin@ap th] . . . which is great if you're trying to construct a closure, but not so
| |   207926 [dblack@wo bl] I don't think it's ever good for variables you want to use to be out
| + 207918 [dblack@wo bl] a=b=c=''
+ 207950 [m_goldberg@a] I presume you want each variable initialized to a _different_ empty
  207960 [Gennady.Byst] irb(main):001:0> a, b, c = Array.new(3) { '' }
  208012 [m_goldberg@a] I like it. I's a much better idea than either of mine.
  208015 [alexandru@gl] a, b, c = Array.new(3,'')  OR
  208017 [m_goldberg@a] No, that doesn't work. We want each variable initialized to a

Re: Dire need for inject_with_index
207912 [james@gr yp ] => true
207967 [leslieviljoe] That most certainly does!
208048 [leslieviljoe] What I don't understand about your solution is the "do |str, (let, i)|",
208058 [james@gr yp ] I used the parens to split the arguments, as you can in Ruby

Re: Beginner's question: assigning same value to many variab
207916 [eero.saynatk] @a = @b = 0
207919 [askhere@ya o] Thank you, the first example will probably work in this case, but I can

207924 [barjunk@at g] Are folks just using net/ldap or are there some other ldap libraries
+ 207932 [greg.kujawa@] Personally I use net/ldap and for my needs it does the job. Plus I use
| 207934 [greg.kujawa@] Yeah, looking at the basic test cases for the library you can define a
+ 207933 [halostatue@g] According to what Francis has told me, it should be possible to do
+ 207942 [garbagecat10] ...

String#split(/\s+/) vs. String#split(/(\s+)/)
207937 [sam.s.kong@g] I'm reading Ruby Cookbook.
+ 207939 [dblack@wo bl] When you use (), you get the delimiter (the thing you're splitting on)
| 207943 [kendrhyd@sy ] Why does using the parentheses cause the separator string/character
+ 207952 [eero.saynatk] # Try this one
  208036 [jan.svitok@g] Seems like all groups in the separator regex are output to the result array.
  208045 [rick.denatal] "If pattern is a Regexp, str is divided where the pattern matches.

Regexp Parsing -- What's the right way?
207957 [skelastic@gm] Greetings,
+ 207965 [SimonKroeger] t = "00608 P 135 001 LEC Tu 2-5P 210 WHEELER Information Tech and Soceity 3
| 208053 [sukhchander@] That's pretty cool.
| 208066 [shortcutter@] - probably faster because you don't have to split and then combine again
+ 207970 [jan.svitok@g] although in this case I'd prefer the array.split solution here's how
| 208052 [sukhchander@] I worked on the regexp some more before I saw everyone's response.
+ 207973 [shortcutter@] Looks pretty ok to me apart from that I'd use \s instead of . to parse white

string parity module
207961 [snacktime@gm] Anyone know of an existing module for settings odd/even/space parity on strings?
208130 [snacktime@gm] If anyone has any input on how to write this better or a better way to

Documentation/examples for mcrypt/mhash
207964 [Meino.Cramer] I am looking for some documentation about the mhash and mcrypt ruby

Re: Starting IRB and interfacing with it...
207966 [interfecus@g] Does it need to work via IRC? You need to be aware that there are

perl tr and ruby String#tr
207969 [snacktime@gm] $str  =~ tr/\0\200/\200\0/;
207974 [shortcutter@] Input data?  Output data?  Expected results?
208021 [snacktime@gm] my $even_bits = "\0";
208028 [jan.svitok@g] - odd_bits = even_bits
208030 [snacktime@gm] Ok now I feel stupid:)  Thanks for pointing that out.
208042 [jan.svitok@g] Well, I looked at it for quite a long time before I realized what's
208097 [snacktime@gm] Ok almost there one more question on using tr.  If the to_string is a
208102 [mike@st k. a] Have you tried the seemingly simple approach like this, which avoids
208106 [snacktime@gm] Yes I tried it without eval also, but it won't produce the same output
+ 208110 [snacktime@gm] Here is a shortened version.  the ruby and perl code do not produce
+ 208112 [mike@st k. a] Can you give me a hint as to what doesn't work?  For a simple upper
  208115 [snacktime@gm] I'm implementing string parity functions using perl's String::Parity
  + 208121 [mike@st k. a] I think it's due to multiple interpolations - first in double quotish
  + 208122 [snacktime@gm] I figured out the problem.  Ruby tr doesn't handle octal numbers like

gets give me last arg of script ???
207972 [pere.noel@la] something i don't understand : gets give me last arg of script ???
+ 207983 [logancapaldo] Kernel#gets (what you get when you just use gets) calls ARGF.gets.
| 207999 [pere.noel@la] ok fine thanks ;-)
+ 207984 [decoux@mo lo] It's normal : it make the right thing.
  207998 [yvonthoraval] ...

[ANN] Zerenity 1.0
207976 [farrel.lifso] = Zerenity Changelog
209210 [leslieviljoe] Go Farrel!

[OT] sh command that ascends dir tree for executable
207981 [transfire@gm] Before I do and implement this myself, want to make sure it doesn;t
208251 [kbloom@gm il] require 'pathname'
208291 [kbloom@gm il] I have a habit of writing really really long one-liners.

IRB and rb files
207987 [jctown@nb sy] As I make my way through the Pragmatic Programmer's Guide I am puzzled
207988 [mguterl@gm i] ...
207991 [sambient@gm ] I thought you use the load command ?
207993 [dudley@mi no] Either will work, but 'load' will reload the file even if it's

map or collect with multidimension arrays
207990 [sambient@gm ] What would be the proper call to a multi array either collect or map ?
207992 [dblack@wo bl] There's no single proper thing to do; it depends entirely on the task
+ 207994 [sambient@gm ] David - I'm trying to replicate some of the things in your r4r, but
| + 207996 [rubytalk@ea ] ...
| + 208008 [daniel.schie] Regarding your question of when to use #map and when to use #collect, I
+ 207995 [shortcutter@] DA, note also that map and collect are synonyms.  It doesn't matter which of
  208001 [sambient@gm ] I know they are interchangeable
  + 208002 [dblack@wo bl] That should give you an error, because you're trying to add a string
  + 208014 [m_goldberg@a] Try
    208018 [dblack@wo bl] The disadvantage of that is that it changes the original objects
    208019 [m_goldberg@a] You're right.  Shouldn't use << in this case. If OP wanted x
    208083 [sambient@gm ] Just wanted to thank everyone for the help.

Ruby on Rails and Star Schemas Question.
207997 [acgarcia21@y] Good morning,
208003 [logancapaldo] Well first, you want the ruby on rails mailing list. Secondly, you

Getting Things Done in IRB (A sort of TODO list thing)
208004 [gregory.t.br] Just a little script to share with any folks who've read and follow
208117 [chiology@gm ] So your .irbc will include

PATCH to make internal Hash class retain order...
208011 [thieso@gm il] beeing new to ruby (thru rails) and coming from a strong php background
+ 208013 [decoux@mo lo] Why you don't first write a C extension, rather than modifying ruby ?
| 208077 [hal9000@hy e] Interesting question... do you mean a C extension implementing a
+ 208016 [brianm@ap ch] <snip />
| + 208020 [thieso@gm il] i wasn't aware of that list;-) subscribed...
| | + 208023 [dblack@wo bl] The problem you likely face, though, is that no one will use it (which
| | | 208079 [hal9000@hy e] My impression was that this was for play and for testing
| | | 208081 [dblack@wo bl] Like I said -- he may not care whether anyone uses it (in this phase
| | | 208082 [hal9000@hy e] That's a very interesting question. I'd like to think so.
| | | 208084 [ mfp@ac .o g] I don't think this is easily implementable as an extension without patching
| | + 208068 [shortcutter@] Adding to David's comments: you're changing semantics of one of the core
| |   208073 [transfire@gm] All good points. I still think it would be nice if such a class were
| + 208078 [hal9000@hy e] Well, if it were another class, then you would lose the order
|   208088 [rick.denatal] The case of initializing with a hash is problematical, but
|   208091 [chiology@gm ] This is a very interesting hack, though I don't really think it is a
|   208128 [hal9000@hy e] I tentatively disagree...
+ 208137 [thieso@gm il] * it cannot be implemented "as-cool" in a C-Extension cause it would
  + 208143 [chiology@gm ] Wow, you worked on PHP? You brave soul! :) I've made some suggestions
  + 208151 [ mfp@ac .o g] Not Hash.new ;)
  + 208163 [daniel.schie] This is a question that has been raised during an earlier discussion of
    208209 [hal9000@hy e] I once discussed this with Matz, and he said that two hashes

Rubygems on Mac OS X
208022 [ghulette@gm ] I am having a problem getting gems configured properly on my Mac (OS X
+ 208025 [lists@ka am ] ruby -e "require 'rubygems'; require 'xml-simple'"
+ 208034 [canyonrat@ma] require 'rubygems'
+ 208035 [jim@we ri hh] Rubygems is not loaded with your program.  There several ways to
  208041 [ghulette@gm ] That works, thanks!
  208089 [chiology@gm ] You can also do

Pickaxe Question
208031 [canyonrat@ma] On page 53 of the Pickaxe Book there is a little example illustrating
208040 [dave@pr gp o] ...
208046 [canyonrat@ma] Thanks for the quick reply, Dave. I've been using Ruby off and on for

[ANN] Cerberus 0.2.0 Released
208038 [anatol.pomoz] What Cerberus is? Cerberus is a Continuous Builder software for Ruby.

SCALE 5x Call For Papers Is Now Open
208039 [irabinovitch] I would like to invite you to participate in the 2007 Southern

require FireRuby
208043 [tomas_fische] require 'rubygems'

[ANN] Phoenix Ruby User Group August Meeting
208044 [james.britt@] The Phoenix Ruby Users Group will hold its August meeting on Monday,

Ruby and games
208051 [fred@la av .] Python seems to be used as a scripting language by quite a few big games
+ 208062 [garbagecat10] Games have some uniquely challenging requirements. Python has an
+ 208113 [WikipedianKi] I never heard of game companies use Ruby to program games before. But
| + 208116 [znmeb@ce ma ] There's a (fairly disappointing) book on the market that addresses
| + 208157 [fred@la av .] Well, sometimes, I try to develop games too.  I didn't know about
|   208159 [toalett@gm i] There's also Shattered Ruby [http://shatteredruby.com/] which takes
+ 208120 [logancapaldo] I believe the Japanese RPG Maker 2005 uses Ruby as it's scripting
  208170 [hawkman.gelo] ...

ruby equiv of perl pos
208054 [snacktime@gm] Or to be more exact, how would I do the following in ruby?
+ 208063 [GGarramuno@a] #!/usr/bin/env ruby
+ 208064 [james@gr yp ] $ ri -T IO#pos
+ 208065 [robin@ni or ] string = "one\0two\0threeeeeee\0"
| 208070 [GGarramuno@a] This is simpler to write, but will be slower on longer strings.
| 208072 [robin@ni or ] You're right, it's much slower! I didn't think about speed while writing
| + 208076 [snacktime@gm] Thanks guys.  I'm having to write a module to set parity on strings.
| + 208216 [GGarramuno@a] Yes.  That way you can use any sort of regexp, not just a single
+ 208200 [logancapaldo] if perldoc -f pos is describing what pos does in this case,
  208218 [GGarramuno@a] This won't work.   Regexp in ruby does not support Perl's /g option.
  208220 [logancapaldo] Oops, out of practice with my perl. Forgot that /g with a while loop
  208294 [GGarramuno@a] That should work okay (well, it should be new_string << ..., thou).
  208316 [snowzone5@ho] i noticed that all the ruby solutions presented were longer than the
  209033 [Thomas.Mark@] Well, I wouldn't consider it unusual for the code to be longer when you