264424-265027 subjects 264898-265856

^ IPSocket::getaddress problem
264647 [h4z3 the-c0r] Hey guys, I want to test if IPSocket::getaddress('address') is valid
+ 264655 [h4z3 the-c0r] *BUMP*
+ 264660 [dangerwillro] Try creating a test first.
+ 264670 [rogerpack200] success = false

^ String parse
264650 [anitawa gmai] I want to be able to parse a string and put them into variables.
+ 264652 [james graypr] => "Menu: steak_and_egg | date: 0814 | who: Anita"
| 264675 [vjoel path.b] Might be more general than is needed. If you know in advance that the
| 264778 [anitawa gmai] Thanks, just what i was looking for
+ 264761 [o.renaud lap] Le mercredi 15 ao 2007 01:00, anitawa a rit

^ [ANN] Swiftiply 0.6.1 Released
264657 [khaines enig] Swiftiply is a fast backend agnostic clustering proxy for web applications

^ How can I define UNION in ruby?
264661 [wzfg singtel] I'd like to know how can I define UNION in ruby?
264663 [logancapaldo] Ruby has no union construct. Depending on what you are trying to achieve,

^ LoadError - Mechanize, Hpricot (gems)
264671 [killy971 gma] I've been trying to install and use Mechanize ( http://rubyforge.org/projects/mechanize/
264691 [alex blackke] Is Hpricot installed?
264698 [killy971 gma] Yes it is.
264786 [stefan mahli] Shouldn't you use ruby (3) for a cygwin install?
+ 264797 [killy971 gma] I didn't know, until know it seemed to work when I was using mswin32
| 264985 [stefan mahli] I'm not 100% sure about the facts or the wording, so take this with a
+ 264798 [killy971 gma] Thank you very much !

^ Documenting Ruby (Was: TCPSocket Flushing)
264679 [drbrain segm] See ruby-doc.org and the mailing list at ruby-doc@ruby-lang.org.

^ date array parse
264681 [globyy3000 h] if i had a huge array of dates in the format of ##/##/## how would i use

^ [QUIZ][SOLUTION] Cellular Automata (#134)
264683 [jamesbkoppel] Here's my simple solution. Note that, rather than parsing options, it merely expects rule, steps, state in that order.

^ Random case chars?
264692 [h4z3 the-c0r] Does anyone have any good ways of transferring a string to random chars?
+ 264693 [stefano.croc] def rand_case str
+ 264695 [fxn hashref.] "foobar".gsub(/./) do |c|
| 264801 [botp delmont] #    "foobar".gsub(/./) do |c|
+ 264696 [lists bertra] "--hello--".gsub /[a-z]/i do |x| rand(2)>0 ? x.downcase : x.upcase end
  264697 [h4z3 the-c0r] Sweet that helped a lot, thank you all

^ How to forbid auto-redirections in open-uri?
264694 [iouniuniu gm] Is there a way to forbid the redirections in open-uri?

^ dot matrix printer !
264701 [gugui_sarubi] anyone knows a class to print in a dot matrix printer on Linux ?
264718 [znmeb cesmai] As long as there are "printer drivers" for the dot matrix printer in

^ ruby-debug: 1) @-sign,  2) v i <object>
264702 [a99.googlegr] when using ruby-debug ( _not_ the standard debugger coming with Ruby),
+ 264706 [martin.kraus] "v i <object>" list instance variables of the <object>
| 264710 [a99.googlegr] Ahh, nice, this works! Thank you!
+ 264708 [jan.svitok g] On Slovak keyboard, @ is typed by AltGr (the right Alt) with V. Try
  264711 [a99.googlegr] unfortunately, this doesn't work with ruby-debug, at least on my side.

^ How do you choose a random word from an array?
264705 [small.busine] I'm trying to choose a random word from a given array. A little
264707 [stefano.croc] christmas_bin[rand(christmas_bin.size)]
+ 264709 [small.busine] You're the best, Stefano! Thank you so much!
+ 264754 [coder68 yaho] irb(main):001:0> class Array
  264809 [logancapaldo] class Array
  264894 [coder68 yaho] That's much more cohesive! Thanks for the tip..

^ Lone Star Rubyconf - Last Call for Early Registration
264712 [jim freeze.o] Announcing a Ruby conference as big as Texas!

^ RubyConf registration?
264713 [lists source] Guys,
264714 [dblack rubyp] We want to finish the talk proposal process (please everyone, submit
264715 [celtic sairy] That's http://proposals.rubycentral.org :)
264717 [dblack rubyp] Thanks!

^ UTF-8 encoding with BOM under Ruby 1.8.x (Windows)
264721 [ed.odanow wo] Moin, moin!
+ 264734 [rking panopt] ((%w(moin)*2).join ', ').capitalize+'!' # DRY principle.
| 264751 [ed.odanow wo] There is no problem with workarounds - my question is related to the
+ 264771 [nobu ruby-la] IIRC, no such change has been made in 1.9.
  264857 [ed.odanow wo] ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]
  264862 [nobu ruby-la] Sorry, I've forgotton that I added it 2 years ago, setting

^ ANN: Sequel Released
264722 [ciconia gmai] Sequel version has just been released. This release includes a

^ wsdl2ruby help
264723 [Kelsen23 gma] I've been trying to figure out if and what I need to modify to get
264732 [felipe.contr] You might have better luck in http://groups.google.com/group/soap4r

^ [ANN/ADV] Intro to Rails, Alexandria, VA, October 9-12
264729 [dblack rubyp] I'm happy to announce that I'll be teaching a four-day introductory

^ Re: Cellular Automata (#134)
264731 [ymendel pobo] #!/usr/bin/env ruby

^ [ANN] Gosu 0.7.4
264735 [julian rasch] I am happy to announce the release of Gosu 0.7.4, which is already
+ 264736 [martindemell] Did the crashing under linux ever get fixed? I really liked the
+ 264769 [vjoel path.b] The link to the fmod DLL on

^ Singleton or full static class
264737 [lolz.llolz g] In other languages I'm using the singleton pattern when I need a
+ 264740 [dblack rubyp] There's no one answer to that (except I tend to frown on class
+ 264741 [andynu gmail] While I can't speak for the whole community. I think that the singleton
+ 264743 [ruby anthrop] The Singleton pattern is usually a design mistake anyway. See
  264766 [shortcutter ] I find that article is not a good source on the usefulness (or

^ Re: Is there a thread safe implementation of a priority queu
264739 [lolz.llolz g] I already searched myself and I came upon the "rbtree" queue, too but I

^ Re: Gosu 0.7.4
264745 [julianraschk] I don't think the bug was fully tracked down back then, but I think it
+ 264758 [thomas.mackl] Great news.  Andrea Wright gave an excellent talk on Gosu (and other
+ 264764 [dangerwillro] Is the Boost library required for using Gosu in Ruby?
| 264773 [julianraschk] If you are using Linux, Boost (along with the other libraries listed
| 264774 [dangerwillro] Good to know.
| + 264781 [julianraschk] Gosu uses each system's (sort-of) native API: Cocoa, Win32 or X11,
| + 264782 [julianraschk] sorry, just double-checked: with the wrapper .app, there still won't
+ 264765 [martindemell] Will test it on Gentoo and report back when I get a free moment.
  + 264772 [julianraschk] thanks for pointing this out! The FMOD team sure had a bad timing for
  + 265356 [julianraschk] I plan to release 0.7.5 soon to fix minor bugs and annoyances (esp.

^ HTTP headers and source
264749 [h4z3 the-c0r] Ok guys, lets say i wanted to grab the source for google.com or
+ 264750 [fwmailinglis] charset="US-ASCII"
+ 264767 [rking panopt] Firefox + LiveHTTPHeaders - http://livehttpheaders.mozdev.org/installation.html

^ [ANN] smugmug 0.0.1
264753 [boumenot gma] I am happy to announce the first release of smugmug.  A ruby library for

^ Where can I find eval rules for ruby?
264755 [dmehrtash gm] Can anyone point me to a specification on Ruby's evaluation rules?
264759 [phlip2005 gm] DSL is a state of mind, not a language inside a string inside a language.

^ Ruport::DataSet unitialized constant?
264770 [globyy3000 h] even runnin the simplest program such as this -
264790 [stefan mahli] Well - Ruport::DataSet does not exist - take a look at

^ Unit tests and destructive methods
264779 [bulliver bad] As my flac library approaches 1000 lines of code I decided it would be prudent
+ 264780 [tim.pease gm] Cheers!
+ 264810 [drbrain segm] require 'fileutils'
+ 264851 [alex blackke] In addition to the other suggestions, you could write to a StringIO
+ 264960 [bulliver bad] Thanks everybody. I will play with these suggestions and see what I can come

^ mp3 file  magic number identification
264783 [dangerwillro] Does anybody know how to identify (validate) mp3 files (other audio
+ 264791 [stefan mahli] does this help: http://raa.ruby-lang.org/project/filemagic/
| 264814 [dangerwillro] Thanks Stefan, but I should have said, I was hoping for the pure Ruby
+ 264800 [adam.shelly ] = wave files start with the characters 'RIFF' followed by 4 bytes
| 264815 [dangerwillro] Thanks Adam, that's the kind of thing I'm looking for exactly.
| + 264825 [ben bleythin] If you're on a *nix system, you should have a "magic" file someplace
| | 264846 [dangerwillro] Thanks Adam, Ben, and others...
| | 264850 [ben bleythin] Do "man magic" (or possibly man 5 magic, or man -s 5 magic), and it
| | 264852 [dangerwillro] Yeah, I read that already. Seemed simple. Many file descriptions are
| | 264907 [ben bleythin] That's not a C thing, that's just general math.
| + 264965 [bulliver bad] The first 4 bytes of a Flac file must be 0x66, 0x4C, 0x61, and 0x43,
+ 264871 [felipe.contr] So first byte should be 0xFF, second byte & 0xFE should equal 0xFA.
  264909 [ben bleythin] Actually, ID3v1 tags go at the end of the file, ID3v2 tags go at the
  264933 [dangerwillro] That's one point I was definitely concerned about. Some sites
  264937 [ben bleythin] Yeah.  MP3s are complex :)

^ newby: class getter proper use help
264787 [weathercoach] I'm an aspiring ruby hobbyist.   I've finally got my head around
264789 [dblack rubyp] attr_writer :user

^ Re: class_eval do {nothing}?
264788 [dblack rubyp] class C

^ Re: Creating and passing a block in a C extension
264792 [TimHunter nc] I think rb_iterate() will do what you want.
264841 [gerardo.sant] Thank you Tim, that function is what I was looking for.
+ 264889 [rmagick gmai] On Aug 16, 1:00 am, "Gerardo Santana Gez Garrido"
+ 264892 [thomas.mackl] On Aug 16, 1:00 am, "Gerardo Santana Gez Garrido"

^ watir with javascript?
264793 [schmode93 ya] I have been using the watir gem for a few days, and i have come across a
264816 [pmr16366 gma] you shoud post this to the watir group - http://groups.google.com/group/watir-general?lnk=srg
264829 [schmode93 ya] Sorry for not being specific enough :(. Ok i'll start off with what
264897 [kyleaschmitt] You can pass click events with Watir pretty easily.  As far as
265051 [schmode93 ya] Ok... right now.. i think I'm going insane or something????????????
265099 [kyleaschmitt] The $ infront of ie means it's global.
265197 [schmode93 ya] Well, i fixed it i was being a complete tard, and typed in ie.link, not

^ [ANN] stompserver 0.9.8 Released
264795 [lionel-subsc] stompserver version 0.9.8 has been released!

^ Trouble with RubyConf Proposal site confirmation email?
264802 [dblack rubyp] At least a couple of people have had trouble getting confirmation

^ Problem with custom_require
264812 [its_conebred] So, for anyone who remembers, I had a post a while ago about not being

^ grep a csv?
264817 [globyy3000 h] If i had a huge CSV file, and i wanted to pull out say all the lines
+ 264818 [grzm seespot] <snip />
| 264819 [globyy3000 h] im planning to use ruport to graph the data, but if u can integrate the
| 264822 [cdcarter gma] Ruport uses FasterCSV for its CVS parsing.
+ 264820 [cdcarter gma] File.readlines('filename.csv').grep(/Blah1/)
+ 264821 [znmeb cesmai] OK ... first of all, define "huge" and what are your restrictions? Let
  + 264824 [w_a_x_man ya] Windoze has a command-line.
  + 264826 [globyy3000 h] lol, alright lets say the senario will be in the range of 20k - 70k
    + 264828 [alexg kuicr.] Array#<< appends the object onto your Array, you want to combine the
    | 264832 [globyy3000 h] can i push that into a file to temporarily use to pull all the Blah1
    | 264840 [alexg kuicr.] Sure, use tempfile, but I think botp has shown why you don't really
    | 264843 [globyy3000 h] the reason im going to use a tempfile is because thers going to be a
    | 264860 [Christopher.] Not sure if this is what you are looking for, but if you are trying
    | 264864 [botp delmont] #   require 'rio'
    | + 264867 [Christopher.] Never. Examples that assume I have a file small enough to load into
    | | 265031 [botp delmont] # > simply amazing. btw, how does rio handle big files, does it
    | + 264984 [globyy3000 h] it seems things have been amped a few levels of complication since my
    |   265035 [Christopher.] You are right, that was a poorly thought out regular expression.
    + 264833 [botp delmont] # inside ruby of course, no command line program > output.csv   :)
    + 264853 [alex blackke] There's a problem with using File.readlines that I don't think anyone's
      + 264916 [kaldrenon gm] I guess the following is slightly OT, since the OP is talking about
      | 264922 [alex blackke] If you ignore that the quote character can also appear inside column
      | + 264931 [kaldrenon gm] That's very cool, granting that there are still a number of conditions
      | | 264947 [phrogz mac.c] /,+/     # matches one or more comma characters
      | + 264953 [w_a_x_man ya] I think that this will work correctly with any complete csv record.
      + 264950 [w_a_x_man ya] to extract a record from the csv file, continue reading lines
        264954 [w_a_x_man ya] The "chomp" is a mistake.

^ excessively verbose request for help with regex and arrays
264827 [significants] cover/back, and figure out the innards of the aimlog
+ 264830 [drbrain segm] Well, you haven't explained what you really want to do with your data
| 264837 [significants] thanks, but since the time is only going to be used for arithmetic
| 264842 [alexg kuicr.] Does this help?
| 264844 [significants] yes, this helps a lot! I should have assumed that parsing the time
+ 264835 [alexg kuicr.] I'm not sure I fully understand what you want to do, perhaps you

^ removing quotes in a string
264831 [grace whosto] (") in a string please?
+ 264834 [has.sox gmai] One way would be to use two gsubs
| + 264845 [grace whosto] Thanks for all that everyone. I'm a bit lost after a whole afternoon of
| | 264854 [phil.meier g] csv_rows.each do | row |
| + 264855 [botp delmont] # string.gsub( /\A"/m, "" ).gsub( /"\Z/m, "" )
+ 264836 [botp delmont] # Hi, does anyone know of a good way to remove leading and
+ 264839 [vjoel path.b] s = "\"foo bar\nbaz\""
+ 264847 [skye.shaw gm] Good as in terse, good as in fast, good as in creative...?

^ Ruport GraphReport
264848 [globyy3000 h] this is rather a followup from my other post...in the attempt to try and
264856 [alexg kuicr.] No offence, but there are a lot of problems with the script you
265018 [globyy3000 h] lol alright that worked out pretty nicely, but how would i align the 24

^ trouble with tk84.dll
264858 [pushist_ik t] Please help to young beginning ruby programmer from Belarus.
265062 [pushist_ik t] I still need your help!!!

^ [ANN] igraph 0.3 Released
264865 [alexg kuicr.] igraph version 0.3 has been released!

^ Calling JRuby from Ruby.
264868 [evilgeenius ] Whats the best way of running a JRuby script from Ruby?
264869 [robert.dober] Hmm are Ruby and JRuby drb compatible? Maybe that would do the trick for you?
264979 [robert.dober] I just downloaded JRuby 1.0, JRuby as Server or client, Ruby as client
265962 [evilgeenius ] DRb is the answer and it does work like a charm!!
265963 [evilgeenius ] So now i can have a jruby drb server purely dedicated to just creating

^ how can I update a span in the HTML(page)?
264874 [wzfg singtel] I'd lo=ike to knwo if I can update a span in the html, in C#, I can do
264896 [phlip2005 gm] Install Ruby on Rails, and use <%= button_to_remote %> there. Same

^ Re: # helf: Symbol as array index
264875 [nick314 gmai] I am Nick314

^ Relationship operator for classes
264876 [ronald.fisch] I wanted to distinguish between cases, where a variable
+ 264878 [celtic sairy] This is just by my own experimenting, but it seems === is for testing
+ 264879 [stefano.croc] You need
| 264881 [ronald.fisch] Thanks a lot, that was it!!
+ 264880 [celtic sairy] So on second thoughts, try just removing the ".class" from that code and

^ threads and puts
264877 [esandin gmai] Thread.new do
264932 [pubsub rubyi] It's a bit surprising that it outputs anything at all! If the above is
264968 [esandin gmai] Thank you all, this makes it all much more understandable!

^ Threads and loops
264882 [esandin gmai] loop{
+ 264883 [lionel-subsc] You don't wait for the Thread to stop to exit your program.
+ 264884 [lparravi gma] When your program exits, the thread dies. Take a look at Thread.join

^ Won't WIN32OLE_EVENT.new leak?
264885 [nikolai.weib] Won't WIN32OLE_EVENT.new leak?  A WIN32OLE object will sooner or later
265101 [masaki.suket] WIN32OLE_EVENT object is freed when ruby process terminated.
265469 [nikolai.weib] Can't the WIN32OLE_EVENT object be linked to the WIN32OLE object so
265486 [masaki.suket] Thank you. It seems to me that your suggestion is good solution.
265507 [nikolai.weib] OK.  I'll see if I can come up with a patch as well.  I solved the
266084 [masaki.suket] I noticed that backword compatibility would be lost if

^ reading byte stream from network
264887 [akifusenet g] I hope this is an OK place to ask a beginner question. Right now I am
+ 264888 [apeiros gmx.] Take a look at unpack (ri String#unpack)
| 264895 [akifusenet g] Thank you. Just what am I looking for.
+ 264905 [thomas.mackl] Yeah, look at String#reverse in conjuction w/ unpack.  One of the
| 265768 [akifusenet g] I didnt think it would work in the first run. But hell it worked!
+ 264939 [vjoel path.b] The suggestions to use pack and unpack are right on target, and learning