182746-228519 subjects 183072-389659

182938 [briankbuckle] ...
+ 182943 [matthew.moss] I get the error "wrong argument type Symbol (expected Proc)
| 182944 [matthew.moss] Ack, nevermind. I'm a silly person, ignore me.
+ 182948 [dblack@wo bl] I'm only guessing but could it be flattening the outer array?
+ 182987 [logancapaldo] I figured it out! I figured it out!

[SOLUTION] The Golden Fibonacci Ratio (#69)
182950 [email55555@g] A PDF version "translate" from Christian Neukirchen's Postscript Code.

Valid email address from CGI input?
182954 [info@jo na e] Is there any Ruby package that will check a input email for validity?  I
+ 182984 [collinsj@se ] You could possibly use the socket library for simple domain verification...
| 182999 [info@jo na e] Justin,
+ 182986 [logancapaldo] Yech. What if your DNS happens to be down when you "validate" the
| 182996 [info@jo na e] Logan
| 183013 [rtilley@vt e] Good luck with it John... I think that's about as good as you'll get...
+ 182989 [rtilley@vt e] I don't think this is possible in any language as the RFC basically says
| 183022 [steve@fi ha ] =20
| 183028 [rtilley@vt e] Yes, I agree. It's as accurate as we'll get. I'm not critizing it. Just
+ 183026 [julian.kamil] def email_valid?(email_address)
+ 183032 [julian.kamil] def email_valid?(email_address)
  183111 [info@jo na e] Julian,
  183117 [julian.kamil] John, from the above if there is anything missing from the

StackError: stack level too deep
182955 [sebastian@fe] i'm currently learning Ruby. So, while learning about code blocks and
182964 [brian.matter] If I'm not mistaken, the "for foo in bar" construct uses the each method. (It

RubyCocoa and libxml-ruby-0.3.6
182956 [pere.noel@la] i have two versions of Ruby with my computer, the default Tiger one
182962 [info@jo na e] Use DarwinPorts to install ruby which will put yet another ruby
+ 182966 [pere.noel@la] obviously we could also rubygems with darwinports ?
| 182971 [demmer12@fa ] I do, and it has worked very well.... Although, I haven't been able to
| + 182974 [dharple@ge e] I made a libxml-ruby portfile for DarwinPorts. It has been in
| + 182976 [pere.noel@la] unfortunately, this isn't my case ;-)
|   + 182982 [pere.noel@la] rm -rf /opt/local/lib/ruby/gems
|   + 182995 [info@jo na e] Une,
|     183044 [pere.noel@la] no, only those related to ruby.
|     + 183047 [groups@gr nd] Nope. It only affects what you get when you type "ruby" at the command
|     | 183048 [pere.noel@la] i agree very much with you, the ruby Darwinports install is worst than
|     | 183096 [dharple@ge e] The DP ruby applies several patches to ruby so you get a full working
|     | + 183107 [pere.noel@la] ruby ext/xml/extconf.rb --with-iconv-dir=/usr
|     | + 183110 [info@jo na e] Both from a thread on the DP list and the experience of at least two fellow
|     | + 183164 [info@jo na e] Daniel,
|     |   + 183277 [pere.noel@la] the reason i didn't use dp at first time is because i had really bad
|     |   + 183297 [dharple@ge e] They accepted the port. You may now install ruby-libxml with "port
|     |     + 183304 [info@jo na e] Did you tell them to include this in the dependencies for RubyCocoa?
|     |     | 183340 [pere.noel@la] why ? this is not a rubycocoa dependency ?
|     |     + 183341 [pere.noel@la] ok thanks very much.
|     |       183345 [dharple@ge e] Maybe, did you install using DP ruby? If DP complains remove /opt/
|     |       183353 [pere.noel@la] yes, it appears first in my PATH.
|     |       183361 [dharple@ge e] The latest Apple security update broke rsync. Do a port install rsync
|     |       183365 [pere.noel@la] ok done that works right now
|     + 183085 [info@jo na e] Your making this much harder then needed.  If you use DP to install
|       183102 [pere.noel@la] i didn't said the contrary...
+ 182990 [pere.noel@la] i not sure about that, having done a complete re-install of ruby,

OK.rb's First Meeting Reminder--One Week From Today
182957 [james@gr yp ] Just a quick reminder here.

ruby and database connection
182959 [seidma@ho ma] any body know how to connect to mysql database in ruby?
+ 182969 [jesusrubsyou] Enjoy.
| 182977 [collinsj@se ] ...
+ 182970 [r.mark.volkm] There are many ways to do this ... DBI, Og, ActiveRecord.
+ 183535 [info@jo na e] If you want to do anything more then connect, such as move data and present

Accessing variables/constants from another file
182961 [saudaziz@gm ] How can i access "myvariable" in the provided code from
182979 [dblack@wo bl] The whole idea of "local" variables is to be local :-)  If you want

libxml utf-8 locale
182963 [mage@ma e. u] honestly if I was to select two things I hate about computers, they
182981 [logancapaldo] Have you tried putting
183137 [mage@ma e. u] Didn't help.

Re: Is there link extractor or similar html processing libs
182967 [jesusrubsyou] Rubyful Soup looks great!  I'm going to give it a whirl.  And I've been
182972 [jesusrubsyou] I see what you're getting at: If you're trying to do
182973 [james@gr yp ] Or you can load RubyfulSoup and call find() a few times.  About they

YARV 0.4.0 and ActiveRecord 1.13.2 rubygem
182975 [corbanbrook@] ...
182978 [f@an re s- .] I'm surprised that YARV is even ready to run ActiveRecord yet. Did you

[ANN] Phoenix Ruby Users Group March Meeting
182980 [james_b@ne r] The Phoenix Ruby Users Group will hold its monthly meeting on March 13,

wired text_field and text_area
182988 [michaelaugus] I need to return some values to the form

Running windows shell command
182992 [dfaroi@gm il] Sorry for my english, I'm french.
+ 182994 [logancapaldo] You may be 'over-escaping'. You shouldn't need to escape double-
+ 183004 [agorilla@gm ] It's better than my french ;)
  + 183046 [dfaroi@gm il] Actually I'm at working.
  + 183216 [dfaroi@gm il] Thanks for your help.
    + 183223 [vanek@ac .n ] If you just want to synchronize 2 directories, in my experience
    | 183287 [dfaroi@gm il] Commercial license for using rsync is too expensive.
    | 183300 [chneukirchen] rsync is GPL, you don't need a license to use it in any way.
    | 183504 [dfaroi@gm il] Are you sure you can package rsync with a commercial product under GPL
    | 183506 [dave.m@em il] 1: It's not part of your work.
    | 183645 [dfaroi@gm il] Thanks for your answer.
    | 183955 [polyergic@gm] ...
    + 183326 [barbaros@pt ] You may want to have a look at
      183505 [dfaroi@gm il] Thanks for the link. I will give a look this week end.

Whatever happened to the improved Ruby website proj?
182993 [ptkwt@ar cn ] This came up in another thread, but I haven't seen an answer there so here's
+ 183008 [ng@jo nw on ] We have a crew of enthusiastic, but very busy people. :-) The design has
| + 183014 [cohen.jeff@g] I'd be willing to donate some time if there's any way I can help?  (I'm
| | 183017 [jperkins@sn ] I'm willing to donate some time to that cause.
| | 183143 [ml.chibbs@gm] Thanks for your offer to help.
| + 183036 [gwtmp01@ma .] Thanks for all your efforts.  I'm curious as to what requirements led
| | + 183037 [ken@me as il] Perhaps the reason was "eating your own dog food"? A Ruby CMS?
| | | + 183039 [gwtmp01@ma .] I know of the various wiki and blog frameworks in Ruby.
| | | | 183161 [julian.kamil] Gary, have you looked at Pandora (http://pandora.rubyveil.com/)?  Not
| | | | 183182 [gwtmp01@ma .] Thanks for the pointer. I'll check it out.
| | | + 183173 [ptkwt@ar cn ] Yes, this seems important for a Ruby site to have a CMS written in Ruby.  We've
| | + 183038 [ng@jo nw on ] For starters we were looking for something in Ruby. At the moment there
| |   183040 [jesusrubsyou] I really can't wait for you to release the code for this.  Please do so
| |   183041 [ng@jo nw on ] I can't wait to release it either. All in good time though. As I've said
| + 183171 [ptkwt@ar cn ] Good to hear that there is ongoing work on the project.
| | 183246 [ng@jo nw on ] Yup. As soon as I can break away from the Ruby Web site long enough to
| + 183387 [martindemell] Better than stopping to write TeX first, at least :) Looking forward to
+ 183009 [somacore@gm ] ...

[ANN] Rails demo application for web page scraping
182997 [david@tr ns ] allow you to weave these pieces together into your own personal page,

Trying to do cvs updates inside back accent environments
183001 [xeno@es im .] I am unable to do:  `cd somewhere ; cvs update`
+ 183005 [james_b@ne r] Off the top of my head: User full paths for the cvs binary and the
+ 183007 [logancapaldo] Dir.chdir, preferably with a block.

strange Complex behaviour
183011 [uval@rz un -] I encountered a strange behaviour
183025 [matthew.moss] Doesn't Complex hold floats?  Rounding errors?

Passing the same argument(s) to several methods at once
183015 [ivanvega@gm ] I'm a Ruby beginner, but I remember I read somewhere something
183018 [ara.t.howard] %w( function_a function_b ).each{|m| receiver.send(m, *args, &block)}
183021 [ivanvega@gm ] Thanks but could you explain me a little bit more how that works? Ruby
+ 183023 [wilsonb@gm i] ['function_a', 'function_b']
| 183029 [ivanvega@gm ] Oh I understand now!
+ 183024 [ara.t.howard] a method that takes a block will/can have this signature
  183030 [ivanvega@gm ] That's kind of what I remember reading, and it was indeed on 'the ruby

Having a block executed in the context of an instance
183016 [noone@no he ] button = Button.new do
183019 [ara.t.howard] class Button
+ 183031 [noone@no he ] Thanks, that works well.  But as you note, prepending 'self' kind of defeats
| + 183066 [bob.news@gm ] No, there isn't.  However, often using a hash as argument solves this
| + 183089 [itsme213@ho ] I personally would like some such distinction. I don't having to use
|   183098 [dblack@wo bl] I have to say, I've been wondering for many years... is self.x = 1
|   + 183105 [rmagick@gm i] +1
|   | 183129 [noone@no he ] It may be a minor syntax thing, but I think it creates unnecessary ambiguity.
|   | + 183131 [dblack@wo bl] You can look at it the other way around, though: you *always* specify
|   | | 183211 [itsme213@ho ] Not quite. I believe
|   | | 183220 [dblack@wo bl] I don't think that's an exception to what I said, though.  A call to a
|   | + 183133 [tanner.burso] ...
|   + 183120 [gwtmp01@ma .] It isn't *that* bad but it stands out since the rest of Ruby is
|   + 183172 [dbatml@gm .d] How about allowing
|     183198 [logancapaldo] Hmmmmmm, It's shorter than self.attr, but on the other hand it's
|     183256 [dblack@wo bl] obj .x
|     + 183266 [logancapaldo] I would imagine obj.x since that is the current behavior
|     + 183267 [dbatml@gm .d] I would say it should be obj.x, as I didn't propose to allow .meth as a
|       183372 [aderobertis@] The spacing, though, makes it look like the latter. The spacing really
|       183377 [g_ogata@op u] It's a bit iffy, isn't it?  Wouldn't it also break Matz's golden
+ 183043 [google@er kv] Executing a block in another context isn't very readable. Ara's
| 183067 [interfecus@g] In my opinion, this is unneccesary and still a bit confusing unless the
+ 183483 [noone@no he ] Well I found out either way I go with passing a block to Button.new(), it

Adding a compile rule to mkmf.rb
183033 [gerardo.sant] I want to write an extconf.rb file for a Ruby extension. The problem
+ 183034 [logancapaldo] I don't think you can :(. I just looked at mkmf, and it looks like
+ 183187 [rickhg12hs@g] Don't know how you could extend mkmf.rb as you describe, but you could

TK packing
183035 [fakeemail100] How can I pack this so it looks like this.
183088 [nagai@ai ky ] Please read a Tcl/Tk's document about the rule of 'pack' geometry

Problem with win32ole, sapi5
183042 [djberg96@gm ] Ruby 1.8.4 (both installer and hand built)
196897 [rubyforum@ki] Does anyone have any input on this old post? I'm having the same
+ 196930 [djberg96@gm ] I think it's a bug in win32ole.  I recommend submitting a report on the
+ 197008 [masaki.suket] Sorry, this is a bug of Win32OLE.
  + 197018 [helge.elvik@] Thanks for the reply. Glad it wasn't me messing up something. It had me
  + 197684 [masaki.suket] I have fixed it in Ruby 1.8.4 latest CVS snapshot.
    197686 [djberg96@gm ] Excellent!  I have at least one blind user who will be very happy to

self.included(base) and base.class_eval problems, etc.
183045 [n8agrin@gm i] I spent a whole night trying to figure out why a module I was including
+ 183077 [vanek@ac .n ] Running this command over my gems,
+ 183080 [james@gr yp ] The default included() is what adds the methods, so you need to add a

ridiculous behavoir of Array#push and Array#clear
183049 [hongseok.yoo] See bellow code please.
+ 183055 [hannes.wyss@] 14 puts arr1.inspect
+ 183056 [mtraverso@gm] ...
+ 183058 [pete@no ah t] which should give you a hint as to what's going on.
+ 183065 [interfecus@g] This is because arr1 is storing a _reference_ to arr2. If you want to
  183112 [kjana@dm la ] Or use Array#concat to concatenate two arrays destructively.

newbie question about scope, variables, declarations of variables and option strict (as in perl)
183050 [toktay@gm il] ...
183079 [james@gr yp ] require 'logger'
183091 [dblack@wo bl] That's a different @log from the one you assigned to, though.
183103 [james@gr yp ] log.rb
183113 [dblack@wo bl] Weird.  I guess Logger does something bizarre in its constructor.
+ 183114 [james@gr yp ] I guess I don't understand what you are getting at.  This is the
| 183119 [dblack@wo bl] For some reason I had hallucinated that the original example was
+ 183118 [gwtmp01@ma .] At the top level 'self' references the same object in the file scope
  183123 [dblack@wo bl] See my last message -- for some reason I projected a class definition

from Hex to string
183053 [pere.noel@la] 646c6532 00000000 61657674 0000012e 00000000 00000000 0000011c 00000004
+ 183054 [devlists-rub] String unpack
| 183059 [pere.noel@la] thanks !
+ 183057 [gk@cu co y. ] a = String.new
  183060 [pere.noel@la] ok, thanks
  183061 [simon.kroege] p "66726f6d 70736e20".scan(/\w\w/).inject('') {|s, b| s << b.hex.chr}
  183069 [pere.noel@la] fine, i do have about the same to translate into string.

[newbie] REXML, each_element and XPath
183062 [thibaut.barr] while playing with REXML I try to use each_element with an x-path
183064 [farrel.lifso] It seems that when xpathing with an attribute @doc.each_element
183070 [farrel.lifso] I've done some experimentation and I think the problem is as follows.

unicode in ruby
183071 [richard@by e] i'm using IO.foreach to parse the lines in a file. now i'm trying to get
183074 [hramrach@ce ] To get unicode downcase you probably want icu4r. To handle the casesyou are interested in you could write your own. However, the []operator of ruby strings returns bytes, not characters.
183075 [pere.noel@la] you don't make use of "\n" at uni-berlin.de when wrapping ?
183148 [richard@by e] so, you guys are telling me a language developed since the year 2000
+ 183154 [logancapaldo] Ruby doesn't really support any strings natively. It just happens to
| + 183160 [hramrach@ce ] err, no that is not what people want when they speak about downcase in unicode.Sure, you can write a string encoded in utf-8 in your source, andverify it is byte-identical to another string. That is about all youget this way.I suspect regexps won't work right with multibyte characters, fordowncase or case -insensitive regexps you would even need to know thelanguage.
| | 183449 [richard@by e] exactly. utf-8 doesn't mean one byte per char necessarily.
| | 183451 [pjhyett@gm i] It's a huge f*cking pain in the ass. We've been trying to convert
| + 183167 [jaco@ne tt a] .... that acts a lot like a string /of ASCII chars/, actually. Rather
|   183174 [rtilley@vt e] Speaking of Rite... is there a timeline on its release yet? One year?
|   + 183176 [Nuralanur@ao] ...
|   | 183189 [hramrach@ce ] hmm, I wonder why C with a hook is called Ccaron in keymaps..
|   | 183283 [Nuralanur@ao] ...
|   | 183316 [james@gr yp ] All copies of Mac OS X ship with a Developer's CD.  It installs a
|   | 183371 [Nuralanur@ao] ...
|   + 183177 [dharple@ge e] ...
|     183181 [rtilley@vt e] I'm new to Ruby... I did not know that Rite was tied to YARV. Thanks for
+ 183157 [hramrach@ce ] For me it is a problem as well. But getting unicode right is hard.Look at the size of the icu library and the size of ruby itself.Anyway, unicode regexps are planned for ruby 2.0 iirc.
| + 183158 [Nuralanur@ao] ...
| | 183162 [hramrach@ce ] No. I want an unicode string processing library, not an unicode regexplibrary. Currently I am working  on a program that needs to work withCzech text.Unicode is not supported in current ruby (1.8), and I can work aroundthat by using iso-8859-2. I choose the workaround because I need easeof installation, and the latin2 encoding is still widely used.With ruby 2 onigurama should be part of the interpreter. But it stilldoes not give me downcase in utf-8. At least it should be possible tosplit a string into characters using Onigurama, and process thecharacters myself.
| + 183165 [dharple@ge e] Unicode strings are also planned for Ruby 2 (possibly implemented
|   183447 [richard@by e] guess i'll wait till then. thanks for the info guys.
+ 183460 [halostatue@g] Please note that Ruby itself is ten years old. Unicode has only*recently* (the last three or four years, with the release of WindowsXP) become a major factor, especially in Japan. Unix support for Unicodeis still in the stone ages because of the nonsense that POSIX put onUnix ages ago. (When Unix filesystems can write UTF-16 as their nativefilename format, then we're going to be much better. That will, however,break some assumptions by really stupid programs.)
  + 183509 [hramrach@ce ] Why the hell utf-16? It is no longer compatible with ascii, yet 16bits are far from sufficient to cover current unicode. So you stillget multiword characters. It is not even dword aligned for fastprocessing by current cpus.I would like utf-8 for compatibility, and utf-32 for easy stringprocessing. But I do not see much use for utf-16.
  + 183576 [aderobertis@] Ummm, no. UTF-16 filenames would break *every* correctly-implemented
    183618 [halostatue@g] UTF-16 is actually pretty performant and the implementation of wchar_ton MacOS X and Windows is (you guessed it!) UTF-16. The filesystems forboth of these operating systems (which have *far* superior Unicodesupport than anything else) both use UTF-16 as the native filenameencoding (this is true for HFS+, NTFS4, and NTFS5). The only differencebetween what MacOS X does and Windows does for this is that Apple choseto use decomposed characters instead of composed characters (e.g.,LOWERCASE E + COMBINING ACUTE ACCENT instead of LOWERCASE E ACUTEACCENT).
    + 183702 [hramrach@ce ] I do not care what Windows, OS X, or ICU uses. I care what I want touse. Even if most characters are encoded with single word you have tocope with multiword characters. That means that a character is not asimple type. You cannot have character arrays. And no library cancompletely wrap this inconsistency and isolate you from dealing withit.
    | 183808 [halostatue@g] If you're simply dealing with text, you don't need arrays of characters.Frankly, if you don't care what Windows, OS X, and ICU use, then you'recompletely ignorant of the real world and what is useful and necessaryfor Unicode.
    | 183932 [hramrach@ce ] The native encoding is bound to be different between platforms. I wantto use an encoding that I like on all platforms, and convert thestrings for filenames or whatever to fit the current platform. That iswhy I do not care what a particular platform you name uses.
    | + 183954 [billk@ct .c ] I'm writing a cross-platform app in ruby that will include text editing and
    | + 183959 [halostatue@g] I think you're just confused here, Michal.
    |   184083 [hramrach@ce ] I am saying I want to look at characters, not that I want to look at bytes.And I am saying that looking at entities that happen to be all thesame size makes things much simpler than looking at strings packedinto another string without separators. And multiword characters areword strings, nothing else.
    + 183998 [aderobertis@] Well, I suspect most other people want to maintain backwards
      184025 [halostatue@g] No. UTF-32 does not have surrogates. Unicode is perfectlyrepresentable in either 20 or 21 bits. A single character is *always*representable in a uint32_t sized space with UTF-32.
      + 184027 [billk@ct .c ] but the following post has been echoing in my head as a data point
      | + 184059 [halostatue@g] Yes and no. When you use combining characters, each of the combiningcharacters (such as COMBINING CEDILLA or COMBINING ACCENT ACUTE) is adistinct character. If I understand the Unicode standard correctly --which is perhaps questionable -- you can go either direction. But Ihad forgotten (temporarily) about combining characters. For the mostpart, Apple chooses to use them and Microsoft chooses not to use themin native representations wherever possible. Where it becomesdifficult is when you need to combine characters that do not otherwisehave canonical forms. At *that* point, yes, UTF-32 can have multipleuint32_t elements creating one character. I think that for mostlanguages, though, the use of combining characters is not necessary.
      | + 184062 [inf262@fh wo] I don't get it guys. Supporting (not exclusively using) Unicode
      | | 184090 [halostatue@g] You have it.
      | + 184087 [hramrach@ce ] And there are libraries for normalizing/composing/decomposing unicode strings.
      |   184098 [shawn42@gm i] As long as we're discussing unicode here,
      |   184358 [hramrach@ce ] This is exactly the thing that is not supported right now. But youmight be able to convert the wide character strings to something elseusing iconv.
      + 184075 [aderobertis@] Depends on what you call a character; in the technical way Unicode uses