173909-178505

173741-175075 subjects 174137-175889

exerb and GUI's
173909 [hawkman.gelo] ...
+ 173915 [blargity@gm ] rubyscript2exe does packing of at least KDE ruby code just fine.
+ 173931 [alex@de et m] You can pack wxruby using Exerb. You'd use a line in your .exr recipe like
  173933 [blargity@gm ] Uh, seems less complicated from what you're saying about recipies?  All I do
  173958 [alex@de et m] Recipes are just for exerb. Annoying whatever GUI package you're using. One more good reason to use rs2exe.

Potential RCR: method_missing convention, opinions?
173913 [logancapaldo] I was pondering the other day, and an idea regarding "method_missing"
174051 [jim@we ri hh] Hmmmm ... an interesting idea.  It is possible to provide this in a
+ 174076 [itsme213@ho ] +1.
+ 174184 [logancapaldo] ...

Ruby One-click Installer and ruby 18.4.
173917 [danyc@no pa ] Greetings,
173921 [halostatue@g] Yes. Search for it. This is the fifth time that this has been asked.
173934 [steve@wa ts ] Wow.  This is how I imagine comp.lang.lisp acts.  Just in my imagination
+ 173943 [sigzero@gm i] If someone doesn't bother to search the list first, a short answer is
+ 173952 [ml.chibbs@gm] I'm working in it. It should be sometime this month, but I can't say
+ 173954 [halostatue@g] This is, as I said, the fifth time in less than TWO WEEKS. I'm not
  + 173987 [danyc@no pa ] Sincere apologies to the list, for the noise.  Austin's response was
  + 176141 [graemer@me k] Personally I find your answer arrogant in all possible ways.
    176165 [halostatue@g] You're welcome to do so.

Ruby users in the SE Wyoming / W Nebraska region?
173920 [khaines@en g] Just curious to see if there's anyoue else out there yet from the southeastern

Email Address Regex [was Re: silly regex question]
173923 [lukfugl@gm i] Be careful with email validation via regex, it's harder than you might
+ 174002 [twoggle@gm i] (doesn't look quite as messy :)
| 174078 [lukfugl@gm i] Yeah, as I said in the footnote, the regex I posted needed some
+ 174018 [dblack@wo bl] See also: http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html
| 174081 [lukfugl@gm i] Yeah, I've seen that one as well. My regex is only meant to match the
| 174101 [billk@ct .c ] In my experience, a certain percentage do.  I'm guessing
| + 174119 [hal9000@hy e] He probably already is.
| | 174126 [ysantoso-rub] In any case, many of the syntax put in rfc822 has been obseleted in
| + 174152 [perrin@ap th] It's possible that someone might copy and paste something in that format
| + 174177 [gwtmp01@ma .] It doesn't make you a bad person but it certainly makes
|   174194 [billk@ct .c ] I'd agree that ideally my web form should be smart enough to
|   174230 [perrin@ap th] You could always just specifically disallow non-standards-compliant
+ 174026 [f@an re s- .] It is trivial to create a formally correct address that makes absolutely
| + 174031 [M.B.Smillie@] Job security?  I mean, without pointer arithmetic and its associated
| + 174046 [twoggle@gm i] By "error prone" do you mean that it won't detect addresses that don't
| | 174084 [f@an re s- .] No, I mean that it might declare some addresses invalid although they
| | 174086 [lukfugl@gm i] You'll see from my comments in the original post[1] and in my reply to
| | 174096 [f@an re s- .] Possibly. Still, I prefer a simple solution over a complicated one. What
| | 174100 [lukfugl@gm i] Not possibly. Gauranteed. It's compliant to the portions of the RFC I mentioned.
| | + 174144 [f@an re s- .] I don't remember that. I dislike complex solutions like this Regex
| | | 174332 [lukfugl@gm i] [Jacob] Be careful with email validation via regex, it's harder than
| | + 174176 [jeff@op nd m] /^\s*([-a-z0-9&\'*+.\/=?^_{}~]+@([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?\.)+[a-z]{2,5}\s*(,\s*|\z))+$/i
| + 174121 [mental@ry ia] Well, I might actually have one.
| | 175091 [gavin@re in ] ?@hisdomain.net
| | 175096 [lukfugl@gm i] And my regex matches that address. :)
| + 174567 [ jupp@gm .d ] To give one example: On German keyboards "@" is entered using
+ 174458 [shot@sh t. l] It does match
  174508 [lukfugl@gm i] As I understand from Yohanes' post in this thread, RFC2822 (2001)supercedes RFC822, so I assume RFC2822 probably takes extended ASCII-- and hopefully UNICODE, as well -- into account. Time to update theregex! I'll leave it to someone else, however. ;)
  + 174922 [twoggle@gm i] The full RFC2822 regex is too big, but RMail has a parser for it.
  + 174928 [twoggle@gm i] The full RFC2822 regex is too big, but RMail has a parser for it.

singleton methods vs. class instance vars
173925 [placey@wa de] I'm liberally helping myself to some of the ActiveRecord code.  In

block and method local variables
173929 [uval@rz un -] consider follow code
+ 173950 [rosco@ro co ] Yes. The block captures the scope it is defined in, not the scope it's
| 173957 [rosco@ro co ] Okay, I'm too tired...
+ 173999 [bob.news@gm ] <snip/>

Ruby on Rails adoption rate?
173945 [mjfreshyfres] Does anyone have information on the RoR adoption rate?

Re: Changes to Ruby since pick-axe book came out
173955 [halostatue@g] Which Pickaxe are you talking about?
173960 [ay0305@qa i.] Second ed.
173972 [gregory.t.br] 1.8.3 broke something in YAML that caused RubyForge to not accept your
174003 [gene.tani@gm] bug tracker and changlogs

RAA download link issue?
173961 [djberg96@gm ] Has anyone else noticed the download link on their RAA project randomly
173964 [ara.t.howard] yes.

[ANN] Family Connection 1.0
173984 [duane.johnso] ...
+ 173990 [ara.t.howard] - had to chmod -R 777 . so the photo dir could be created.  standard stuff
+ 174444 [phil@pr co .] Duane,
  174493 [ara.t.howard] in linux you can simply do

Net::HTTP.post_form method undefined?
173988 [itsme213@ho ] I'm trying to do a POST using net/http.
173997 [alex@de et m] What ruby version are you running? I ran into this same problem last week, and it was because the standard stdlib documentation (on ruby-doc) refers to ruby 1.9, where the post_form method exists. It doesn't exist in ruby 1.8. Annoying huh?
+ 174004 [M.B.Smillie@] [Prospero:~] matt% ruby -v
+ 174064 [itsme213@ho ] Thanks Alex, that was it, I'm on 1.8.3.

Is there a way to clear the contents of a terminal?
173989 [info@ja eo a] MATLAB uses cls, in a bash shell I'd use clear. Is there a way to clear the contents of a terminal -safely-?
+ 173991 [gene.tani@gm] Control-L
| 173994 [info@ja eo a] I should've made myself clearer. Is there a way to do this via a ruby command?
| 174048 [slitt@ea th ] print 12.to_s
| 174052 [slitt@ea th ] Dooohhhhh. This would have printed "12". What I needed some sort of equivalent
| + 174053 [james@gr yp ] 12.chr ?
| + 174054 [cyclists@nc ] Something like this?
| + 174092 [rosco@ro co ] IIRC ASCII 0x0C is form-feed, right. Doesn't Ruby support "\f"? (seems to).
|   174094 [james@gr yp ] Correct on all accounts.  :)
|   174103 [rosco@ro co ] Wow, can't believe I remembered that... Now if only I could retain the
+ 173998 [rosco@ro co ] Safe, sure, reliable, probably not. But on most 'modern' systems I guess
| 174001 [rosco@ro co ] or "\e[2J\e[0;0H" to home the cursor too.
+ 174047 [slitt@ea th ] puts "\n" * 24
+ 174098 [ysantoso-rub] CLEAR_TERMINAL_CMD = `/usr/bin/clear`
+ 174108 [drbrain@se m] require 'curses'

FXRuby Samples
173992 [forest.aa@gm] FXRuby documentation says that you should use fox binding by
174000 [forest.aa@gm] i found solution myself. I just need to run then as follows

rio-0.3.4: rio#mkdir fails
173993 [wybo@se va y] ruby 1.8.3 or 1.8.4 and
174143 [vanek@ac .n ] no problemos.
174186 [wybo@se va y] Thanks, good to have finally a test.

need script: convert html-text to text
174006 [keal21@ma l.] i have html-text. i have to convert this text to simple text without
+ 174007 [gene.tani@gm] path o'least resistance
+ 174008 [bob.news@gm ] This is a very low cost variant - I guess the lynx approach is much more
+ 174009 [rosco@ro co ] It's tricky, there's more to it than you'd think. The best way is probably

Newbie tearing hair out
174013 [page77.offic] I am trying to get to grips with ruby as an alternative to PHP.
174014 [dsymonds@gm ] Chances are it just needs to be called "testcgi.cgi" (i.e. using the
174015 [page77.offic] Thanks for the tip.  I have had it called testcgi.cgi and I just get it
+ 174017 [ml.chibbs@gm] You'll need to do some searching for how to sertup CGI to execute Ruby
+ 174020 [bob.news@gm ] Once when I dealt with CGI scripts (a while ago) you had to create a
+ 174024 [dsymonds@gm ] (1) Turn on the CGI handler. You'll need a line like

Re: Newbie tearing hair out [OT]
174016 [dsymonds@gm ] To head off any other comments: My reference is RFC2616

Email address validation (was: silly regex question)
174021 [jeff@op nd m] I was just perfecting my email address validator, mine allows multiple
+ 174027 [bmc@sh oo co] It already exists.  Go buy the first edition of Mastering Regular
+ 174097 [blargity@gm ] Why do you lstrip and then rstrip?  Won't a simple strip work for you?
  174146 [jeff@op nd m] YES! Nice to know! Hehe.

Re: [ruby-talk] Newbie tearing hair out
174025 [prins@an nz ] I think you need to configure apache to know that .rb extension files
174069 [james_b@ne r] You'll need something like this in either a .htaccess file in the Web

Newbie question about nested sort
174028 [grehom@nt wo] what am I doing wrong?  I wanted to sort primarily on count (second
+ 174033 [bob.news@gm ] Generally you need to do conditional evaluation based on higher prio
| + 174037 [M.B.Smillie@] Perl  Ruby
| + 174039 [grehom@nt wo] Thanks! interesting stuff I'll read through this closely there are a
|   174041 [simon.kroege] hmmm, I don't think he realy *want's* this.
|   174045 [bob.news@gm ] I didn't think of using #nonzero? - this clearly resembles the perl
+ 174034 [cyclists@nc ] Is this what you want?
| 174036 [grehom@nt wo] Wow! thanks that's neat, I need to go back to my pickaxe book and study
+ 174035 [dblack@wo bl] Since 0 is true in Ruby (unlike Perl, where it's false), the || test
| 174044 [gwtmp01@ma .] The light bulb will go on with respect to this solution when
+ 174061 [grehom@nt wo] Thanks everyone, very interesting.  The sort_by method certainly will
  174082 [gene.tani@gm] just as background info, these techniques are called Schwartzian

File.new error
174029 [  k@eb y. om] I'm trying to create a file but I'm getting an error and can't find the
+ 174030 [cyclists@nc ] Try
| 174032 [bob.news@gm ] And please use the block form from the start, i.e.
+ 177980 [info@ja eo a] Could this method be extended to acept input from stdin? Something
  178505 [matz@ru y- a] require 'fileutils'

@@@@HELP......WANTED........NEW TO RUBY........@@@@@
174042 [smankan@ue d] 1. Beginner
+ 174058 [steve@wa ts ] Mankan,
+ 175356 [david@va ln ] Ye gods, PLEASE use sane and at least remotely informative e-mail subjects.
  175357 [steve@wa ts ] We mentioned this to Mankan once already, and if you'll follow the

What Continuous Integration Tool?
174049 [dhinz@en .m ] ...
174070 [damphyr@fr e] You come a little too early :)
174071 [deanwampler@] FWIW, I recently used CruiseControl for a C++/make project. I simply
174114 [obiefernande] Damage Control is what you want.

Is this a YAML bug?
174050 [narf968@gm i] require "http-access2"
174315 [narf968@gm i] $ ruby -v
174398 [rosco@ro co ] I don't think it's a bug, just that HTTPClient has a Method in one of it's
175380 [narf968@gm i] I see, that makes sense. I just need to save the parts I'm interested

gets bug?
174055 [ null@vo d. ] if ARGV.size > 0
+ 174060 [james@gr yp ] Yes it is.  Kernel.gets() reads from files specified as command-line
| 174083 [bob.news@gm ] I'd prefer to use OptionParser.parse! for this - but otherwise totally
+ 174062 [pfharlock@ya] I've run into this problem before as well, somebody pointed me to the ri

Help with the Win32API and DLL interface
174063 [smankan@ue d] Steve,
174099 [billk@ct .c ] The DWORD's are passed in as references?  Does that mean you
174104 [smankan@ue d] Bill,
174134 [billk@ct .c ] shell1 = Win32API.new("my.dll", "myfunc",['P','P','P'],'L')
174158 [smankan@ue d] Bill,
174190 [billk@ct .c ] If you have "ri" installed on your system, from a DOS prompt,
174287 [smankan@ue d] Bill,

[ANN] Phoenix Ruby Users Group January Meeting (reminder)
174066 [james_b@ne r] The 2006 kickoff meeting of the Phoenix Ruby Users Group will be on

Searching a file for keywords?
174068 [comtux@gm il] I am trying to find out how to search a file and find certain key words
+ 174085 [bob.news@gm ] ruby -ne 'puts "hda" if /hda/' /proc/partitions
+ 174089 [rosco@ro co ] File.open('/proc/partitions') do |f|
| 174095 [vjoel@pa h. ] irb(main):008:0> puts IO.read('/proc/partitions').grep(/hda/)
| + 174105 [rosco@ro co ] Ah thanks, that's better.
| + 174245 [twifkak@co c] puts open('/proc/partions/){|f|f.grep /hda/}
|   174333 [vjoel@pa h. ] You're quite right. Using grep on the File rather than on the string
+ 174115 [hal9000@hy e] str = `whatever_command`

win32-services - RPC server unavailable?
174072 [danielmcbrea] Trying to get a ruby win32 service running on my winxp. Downloaded the
174122 [leavengood@g] My suggestion would be to open the Windows Services console and make
174260 [danielmcbrea] Thanks. I've done that. Both are running, but I have the same error. I
174291 [djberg96@gm ] The "some_machine" is just a stub for whatever machine you want to
174441 [danielmcbrea] thanks. I found out how to find the docs for this now ... :-)

IRC like interface
174075 [juergen@fi d] I would like to try to write a text based Jabber client in Ruby, but
174150 [perrin@ap th] I don't know of Ruby projects of that sort, off the top of my head, but
174155 [juergen@fi d] Centericq is what I use when I don't play with new Jabber clients. It is
174224 [perrin@ap th] I get a list of 27 different dependencies, myself.

Repost: singleton methods vs. class instance vars
174090 [placey@wa de] Please excuse me if this message was already delivered.  I'm sending
174135 [akonsu@gm il] apparently ruby as most other languages has more than one way to
174141 [ptkwt@ar cn ] I'm not so sure it's faster; it uses a class_eval.
174153 [placey@wa de] There's a comment in the actual active record code that notes that
+ 174173 [rosco@ro co ] Seems to me the technique is about one-time creation of attribute
| 174174 [rosco@ro co ] Ahem, sorry.
| 174182 [placey@wa de] Maybe, but that's a lot of optimization for a little problem.  These
+ 174195 [ptkwt@ar cn ] ooops, I see that the class_eval is only called once so maybe it's correct
  174210 [placey@wa de] Final post in this thread.  It seems that the consensus is that these

Pure Ruby/Proxy Oracle Driver?
174107 [paul.dlug@gm] Is there an an equivalent of perl's DBD::Proxy for ruby? I'm working
174197 [jim@we ri hh] There is a proxy DBD driver included with the DBI stuff.

Question on iterating a hash
174109 [phil.swenson] I have a hash that looks like this : {"1"=>"0, "3"="1", "45"=>"1",
+ 174117 [james@gr yp ] => {"45"=>"1", "1"=>"0", "101"=>"0", "3"=>"1"}
| 174125 [dblack@wo bl] Wouldn't it be easier to iterate through the keys?  I'm not sure why
| + 174127 [dblack@wo bl] s/1/"1"/ :-)
| + 174129 [kevin.olbric] Since he wants the keys of the hash in an array, wouldn't you need to do
| | + 174131 [dblack@wo bl] No.  h.keys is an array, and select returns an array.
| | | 174133 [kevin.olbric] See, I told you I needed more coffee.
| | | 174138 [dblack@wo bl] I know the feeling well.  That's why we have multiple people on the
| | + 174263 [pere.noel@la] h.keys.select {|k| h[k] == "1"}
| + 174130 [SimonKroeger] h.select{|k, v| v == "1" }.transpose.first
|   174132 [dblack@wo bl] ...
+ 174118 [lopexx@au og] {"1"=>"0", "3"=>"1", "45"=>"1","101"=>"0"}.select{|k,v|
+ 174149 [leavengood@g] h.map{|k,v| k if v=='1'}.compact
  + 174165 [dblack@wo bl] If you're sure nil isn't a key :-)
  | 174171 [leavengood@g] True. But I'd love to see a real-world example of someone doing that.
  | 174187 [dblack@wo bl] I'd be very suprised if it ever happened.  But I still like the simple
  + 174259 [bob.news@gm ] h.inject([]) {|a,(k,v)| a << k if v == '1'; a}

Connecting to Oracle
174120 [chuck.day@me] "The procedure entry point OCIServerRelease could not be located in the
174199 [wilsonb@gm i] What version of the Oracle client are you using?  Make sure you have

Recommended command line options for new rubyists
174123 [info@ja eo a] There are loooads of ruby docs out there. There are also some good reference guides under /usr/share/doc/ruby-1.8.3,
174124 [dblack@wo bl] ruby -cw
174147 [info@ja eo a] I find it strange that ruby -c foo.rb gives "syntax OK" but ruby -w foo.rb shows me all of the syntax errors. In the example below i make a deliberate mistake..
174148 [dblack@wo bl] You do, but it's not a syntax error; it's a runtime error.  -c doesn't
174339 [avarab@gm il] $ cat div0

Re: [META][QUIZ] Proposed new rule
174128 [chneukirchen] I composed my list by running
threads.html
top