326571-340425

326369-327220 subjects 326771-331114

^ Re: ANN: Rev 0.2.4, a libev-based event framework, now with
326571 [rogerpack200] As a note, AFAIK this compiles out of the box with ruby mingw + devkit

^ SciTE
326572 [karvboy hotm] Once I have entered code, how do I compile it? The compile option (in
+ 326578 [jgabrielygal] Ruby code doesn't need to be compiled. It's an interpreted language,
+ 326579 [foamdino gma] You don't need to compile ruby; it is an interpreted language.  Scite

^ err messages during make install-doc
326580 [mjmiller18 g] Mac.
326589 [perfectly.no] This is output from the documentation generator.

^ Extensions and 'require'
326581 [albertschlef] I'm creating a 'gem' package for a ruby extension written in C.
326582 [albertschlef] Ah, another solution, I think, is to have "autorequires =
326586 [albertschlef] I found two gems, "rubynode" and "bcrypt" that solve this problem by
326608 [rmagick gmai] In mambo.rb require 'mambo.so'.
326727 [albertschlef] But '.so' is specific to unix. Windows, for example, has '.dll'.
326728 [TimHunter nc] And OS X has .dylib. Ruby translates .so to whatever is appropriate for
326732 [albertschlef] Ah. That's nice. Thanks.

^ Problem with ruby classes
326584 [pujari.manis] Can Anyone please tell me how can we create an object of a class that is
326585 [stefano.croc] Add
326588 [pujari.manis] Thanks Stefano !!!
326684 [julian coret] Make sure you don't include the extension

^ Kernel.xxx interferes with method_missing
326596 [axyd80 gmail] I'm using method_missing to create DSL, the problem is that Kernel.xxx
+ 326599 [axyd80 gmail] Small error in code, 'select' not 'select1' :).
+ 326611 [gregory.t.br] On Ruby 1.9, use BasicObject.  On Ruby 1.8, use Jim Weirich's
  326613 [gregory.t.br] Whoops...
  326699 [axyd80 gmail] Possible solution, a hack with redefining all global methods.

^ How to know the index value on the each method
326597 [elioncho gma] I was wondering if there is a way to access the current index value when
+ 326600 [stefano.croc] You can use Array#each_with_index, instead of Array#each. Or you can use=20
+ 326603 [jan.h.xie gm] @pancakes.each_with_index do |pancake, i|
  326606 [elioncho gma] Thanks for the help. It was exactly what I needed. Thanks again,

^ FInding out the name of the method from which I was called?
326601 [rps salas.co] def calling_method_1
+ 326604 [jan.h.xie gm] def reporting_method
+ 326822 [njus larshau] Kernel#caller

^ Question on reading text files in Windows
326605 [jknowlton525] I am running Ruby 1.86 on Windows, and having trouble reading in some
326622 [perfectly.no] 8 / 2
326630 [perfectly.no] 8 / 2
+ 326652 [jknowlton525] Thanks...so if I upgraded to Ruby 1.9, would it convert it
| 326660 [perfectly.no] You'd have to tell it that you want to work with UTF-8
+ 326657 [jknowlton525] Thanks for the pointer!  I actually ended up using the iconv module,

^ How to tell if one is running 32 or 64 bit Ruby on Mac OS X?
326607 [weyus att.ne] All,
+ 326610 [radek.bulat ] Maybe
| 326614 [weyus att.ne] ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]
| 326647 [tnewsSPAMMEN] Not really - a universal binary is one that works both on the older
| 326659 [sandor.szuec] Just to add a universal binary is a container binary, in which you
+ 326612 [ben bleythin] I can't say with 100% conviction, but i386 is a 32-bit platform, so my
+ 326615 [jh_ruby-lang] $ irb
| 326616 [weyus att.ne] Thanks Jonathan!
+ 326617 [fred lacave.] ruby -rrbconfig -rpp -e 'pp Config::CONFIG'
+ 326716 [roberto REMO] 1011 [0:41] roberto@rron:yarv/build> file =trn
+ 333587 [rogerpack200] As a note for linode users, you should probably install the 32 bit

^ membership settings for ruby talk
326609 [sumangurung ] I have been trying to set my membership for this group such that i
326619 [shortcutter ] Where exactly did you do that setting?  ruby-talk is at least a three
326624 [sumangurung ] Well, the page where i edit my membership, there is a question "how do

^ Clarrification about "trap"
326623 [amilaaina ya] I know in ruby we use "trap" command to handle OS signals while passing
326627 [dominikho gm] I'm short on an explanation right now though, better let's wait for an

^ Noob question: while or for loop within a list
326625 [darin.ginthe] list = "url1, irl2, url3, url4, url5"
326628 [dominikho gm] [snipp]
326631 [darin.ginthe] How do I access the individual element of the split?
326632 [dominikho gm] My code does exactly what you want.
326634 [darin.ginthe] list = "A,B,C,D"
+ 326635 [s.korteling ] Your first example began with
+ 326636 [jcmoore pres] The easy way...
+ 326637 [shortcutter ] urls = %w{http://foo.bar http://www.google.gov}
+ 326641 [darin.ginthe] Thank you guys.
  326643 [coder68 yaho] Darin,

^ eruby and caching
326629 [kaspernj gma] First of all, I am new in Ruby.

^ [ANN] logging 0.9.6
326644 [tim.pease gm] logging version 0.9.6

^ Hash counting
326646 [stuart.clark] I am trying to load some data into a hash and then count how many times
+ 326648 [b.candler po] STDERR.puts is your friend.
+ 326649 [coder68 yaho] Stuart,
+ 326655 [shortcutter ] You probably rather want
  326665 [stuart.clark] Thanks Robert.
  + 326669 [stuart.clark] I have worked out the problem but I am a little unsure how to solve it.
  | 326717 [shortcutter ] What does that mean? What's in the Hash?
  | 326756 [stuart.clark] Thanks for replying and sorry for the confusion.
  | 326758 [shortcutter ] Obviously not as the output below demonstrates that there is just a
  | 326762 [stuart.clark] Ok I will get straight to the code causing the problem, so first off you
  | 326764 [jgabrielygal] Sorry Stuart, can you show the exact code that produces that output
  | 326772 [stuart.clark] Thanks for getting back to me.
  | + 326796 [jgabrielygal] Sorry, but can you post a complete executable piece of code we can use
  | | 326815 [stuart.clark] Thanks for your response. It makes a lot more sense and you are on the
  | | + 326817 [dblack rubyp] I haven't really been following this thread but this caught my eye and
  | | + 326819 [jgabrielygal] This is unneeded, since you later assign another array to this
  | |   326846 [shortcutter ] Also, when reinitializing these variables on each method call then
  | + 326866 [martindemell] Here is your problem. Hash.new(0) means "when I query the hash, and
  |   + 326875 [jgabrielygal] This is true, but counts[d] += 1 is actually counts[d] = counts[d] + 1
  |   | 326876 [martindemell] Oops - yes, missed that.
  |   + 326942 [julian coret] Or square bracket method
  + 326670 [stuart.clark] I have worked out the problem but I am a little unsure how to solve it.

^ Socket: Getting EADDRNOTAVAIL in bind method
326658 [anukul.singh] I am new to Socket programming in ruby and want to connect to a device.
+ 326671 [sean.ohalpin] I don't think it's you - the docs on socket programming are a little
+ 326673 [gwtmp01 mac.] Usually you don't pick the local address to bind to but instead
  326682 [anukul.singh] Gary, thanks for your reply. 114.23.42.42 is the address of my device
  326759 [anukul.singh] Gary,

^ Continuations
326661 [pwf comhem.s] Please help. I'm totally confused by following behaviour with regard to
+ 326679 [sangamon net] [Disclaimer: I'm certainly not a pro on continuations, but I'll just
| 326768 [pwf comhem.s] Appreciate the reply! it actually helped me understand this! Thanks
+ 326724 [b.candler po] The way I think of it: firstly

^ Is this possible in Ruby
326666 [d_rems yahoo] Just an idea which may come in handy. Can this be done and how in Ruby.
+ 326668 [sean.ohalpin] class Binding
| 326672 [list.rb gmai] On Feb 2, 2009, at 6:33 PM, "Sean O'Halpin" <sean.ohalpin@gmail.com>
| 326674 [sean.ohalpin] a = 1
+ 326718 [shortcutter ] As has been demonstrated you need the binding of the context in which

^ [ANN] Initial release of Elemental
326675 [mwlang gmail] Posted By: Michael Lang
326681 [ryand-ruby z] in other words, why would I want to add 250 lines of dependency code
326700 [gregory.t.br] Don't be so harsh Ryan.  You'd need at least two lines of code there :)

^ Is there an 'offical' Ruby binary for Windows?
326680 [phasis gmail] I know that there are at least three Ruby Windows distributions.
+ 326695 [rogerpack200] I think the closest thing to official is the VC 6 one click installer.
+ 326744 [luislavena g] ge.org/wiki/wiki.pl
| 326751 [sb 6thsense.] I have been building Ruby for MinGW, succesfully. I was unable to find a
| 326790 [luislavena g] gem install luislavena-mysql-gem --source http://gems.github.com -- --
| 326860 [sb 6thsense.] Cheers for the info, you might be hearing from me soon! :)
+ 326747 [luislavena g] ge.org/wiki/wiki.pl
+ 326753 [nobu ruby-la] No 'official' binary on any platforms.
  + 326792 [luislavena g] I believe the 'official' stamp refers to the advertisement of the
  | 326852 [nobu ruby-la] I agree that OCI would be the most popular, and de-facto package.
  | 326857 [luislavena g] I believe there is a project in redmine for website content?
  + 326830 [phasis gmail] You are right.

^ Re: Initial release of Elemental
326686 [mwlang gmail] As always, depends on where you want to go with it.  For me, I wanted
326714 [ryand-ruby z] immediately? how? you can't (afaik) do better than a runtime error of
326835 [mwlang gmail] This is some interesting stuff and you have just shown me a technique/

^ SJIS conversion question
326687 [agemoagemo y] I'm working on a project in which I need to convert some text with X0208

^ Extending Ruby
326690 [alex.katebi ] I am using the mkmf module to create a Makefile that will generate a shared

^ new to group - is there a FAQ?
326694 [the weasel.l] group?
+ 326697 [justincollin] -Justin
+ 326774 [defaultuserb] The message you replied to was an effort to disrupt comp.lang.c. It was
  326776 [phlip2005 gm] Sorry - noticed that after post. I will add the technique to my mental filters!

^ choose parameter to solve for
326696 [jason.lillyw] I'm looking for a clean way to write a function that allows me to choose
+ 326698 [micathom gma] This could be rewritten as
| 326725 [micathom gma] I totally misread the code. Sorry. Brian seems to be on the right
+ 326701 [julian coret] What do you mean?
+ 326723 [b.candler po] Hmm, is this some sort of currying?
+ 326731 [b.candler po] Also, if this is really the pattern you want (an object holding default
  326737 [jason.lillyw] adder = lambda { |x,y,z| x+y+z }
  326740 [b.candler po] If the logic is to be hard-coded then maybe

^ A Tk window
326703 [albertschlef] I have a program that run in the terminal. But once in a while I need it
+ 326733 [phlip2005 gm] def maybeMainloop(reveal = false)
| 326865 [albertschlef] Superb! That solved my problem. Thanks.
| + 326878 [phlip2005 gm] Read and obey the post by Hidetoshi NAGAI. He maintains RubyTk, AFAIK!
| + 326943 [nagai ai.kyu] Hmm... I think that it not so difficult.
|   326977 [albertschlef] What does this entail? Will I have to compile Tcl/Tk/Ruby myself?
|   326978 [albertschlef] (Why do I get the impression that "The Tk Way" equals "Nothing works out
|   + 326985 [Maurice.Diam] It's not true for Tk but I agree the **Ruby/Tk** is difficult to make
|   | 327009 [phlip2005 gm] I can't remember the last time I built a ruby.*tar.gz tarball and did not get a
|   + 326991 [albertschlef] I gave up, it's too complicated for me. I'll just wait for the next
|     + 327026 [nagai ai.kyu] Did you see '<ruby-src-tree>/ext/tk/README.tcltklib' ?
|     | + 327291 [albertschlef] Thanks! I made it. It was actually simple. My Tk apps look decent now
|     | | 327408 [nagai ai.kyu] Except useful Tcl/Tk extensions.
|     | + 327354 [vjoel path.b] I haven't gotten ruby/tk to work with 8.5. It's been ok with 8.4 but
|     |   327409 [nagai ai.kyu] Probably, your Tcl/Tk libraries are compiled with threads support option.
|     |   327473 [vjoel path.b] $ ldd libtk8.5.so | grep thread
|     + 327142 [mark markros] As the author of the www.tkdocs.com site, I'd very much welcome any
|     + 327248 [Maurice.Diam] I agree that a "gem upgrade tk" would be nice, but
+ 326734 [Aldric Giaco] Cheat, override the 'close' button and make it hide the window instead?
  326739 [phlip2005 gm] Then the Tk.mainloop keeps ticking, meaning you have to then slice up your outer
  + 326837 [nagai ai.kyu] Tk.root.protocol('WM_DELETE_WINDOW'){Tk.root.withdraw}
  + 326840 [list.rb gmai] +1 for larger indentations ;-)

^ analyzer.rb cannot run.
326719 [jclaw1 gmail] line = File.readlines("text.txt")
326720 [b.candler po] The error message does tell you exactly the problem: it's on line 2 of
326743 [jclaw1 gmail] Ha ha, okay, I realized now. I copied the codes wrong too. Anyhow, I got
326746 [caduceass gm] In this group, it usually means "hope that helps", or "hope that helped".

^ Event-based stdout content capturing
326721 [daniel.varta] Some legacy code produces output to STDOUT during execution. I need to
326827 [sean.ohalpin] You can reassign to the global $stdout object any object which
326839 [daniel.varta] Thank you very much, great idea! I missed in my mind, that puts just

^ Re: How to tell if one is running 32 or 64 bit Ruby on Mac O
326726 [has.temp3 vi] The stock Ruby 1.8.6 installation on 10.5 consists of a 4-way fat (ppc +
+ 326735 [Rob AgileCon] This came up at least once before so a search of the archive may yield
+ 340425 [lists gregwi] So, /usr/bin/ruby invokes the 32-bit version, how do we invoke the

^ Multiple c extensions with the same function names
326749 [ian clancamp] A bit of a noob questions here, so please bear with me. I've been
326755 [nobu ruby-la] Ruby uses RTLD_GLOBAL flag to dlopen() on Linux, but it can
326849 [ian clancamp] Many thanks for your explanation; the use of dlopen() with RTLD_GLOBAL

^ Input text and take text from different places?
326757 [tmcdowell gm] Is it possible to be 'puts'ing text to one place on the terminal while
326775 [bbxx789_05ss] Check out Curses.
326793 [tmcdowell gm] I'm trying to stay away from Curses/Ncurses.

^ 1.9.1?
326761 [alex.m.mcphe] I'm about 2 weeks into my learning attempt at Ruby (1.8.6 is what I've
+ 326766 [radek.bulat ] - new virtual machine (previously just AST interpreter)
| 326777 [devrubygem g] So since these changes have been made, will us noobs be hurting ourselves
| + 326778 [dblack rubyp] If you can wait about 1.5 months or so you can read "The Well-Grounded
| + 326779 [jonbrenner g] Not all books. Take a look at Programming 1.9 by Pragmatic Programmers
| | 326784 [devrubygem g] Thanks Guys. So in a short list, what should be the features to stay away
| | 326851 [Diego.Viraso] I'd definitly put the whole string encoding: that's changed pretty
| | 326893 [devrubygem g] Thanks Guys!!
| + 326782 [james graypr] No, you will be fine.  It's not a super tough transition when you are
| | 326787 [devrubygem g] WHEW!! :) okay cool
| + 326786 [stephen.celi] In addition to those already mentioned in this thread, Flanagan's _The
| + 326791 [gregory.t.br] I think things are looking up for Ruby 1.9 books, actually.  Here's
+ 326780 [devrubygem g] Hey Alex,
| 326788 [james graypr] The problems a bunch of people solved are generally the easiest.  For
| 326789 [devrubygem g] Thanks James I will try some of the easier ones :)
+ 326825 [julian coret] Keep going with 1.8. There's more in 1.9 and strings are unicode.
+ 326945 [kbloom gmail] AFAIK, Rails isn't available for 1.9 yet, and much of the good stuff in
| 326970 [radek.bulat ] I don't think so. I can name only one thing (Symbol#to_proc) which was
| + 326982 [dblack rubyp] This message is in MIME format.  The first part should be readable text,
| | + 326987 [rick.denatal] 2009/2/5 David A. Black <dblack@rubypal.com>
| | + 326996 [james graypr] I believe Enumerable#group_by also migrated from Rails.
| |   327001 [radek.bulat ] s.
| |   327004 [gregory.t.br] Facets *collects* many more things than it invents.
| + 327010 [phlip2005 gm] HashWithIndifferentAccess?
|   327015 [gregory.t.br] What does this have to do with Ruby 1.9 inclusions?
+ 326992 [zousaa gmail] unsescribe me.

^ Collecting user stories for the Prawn PDF generator
326763 [gregory.t.br] Prawn will move from alpha development status to beta in a couple
326826 [julian coret] Julian
326829 [gregory.t.br] YES!

^ File.delete one-liner
326767 [dthomas53 ho] I'm looking for a single line that essentially deletes the lockfile
326769 [vjoel path.b] Use exceptions?
+ 326795 [dthomas53 ho] Thanks Joel. Forgive me, I'm just learning Ruby/scripting/programming. I
| 326802 [vjoel path.b] With exceptions, you are saying "try to delete lf; if that fails
+ 326833 [julian coret] File.delete(File.exists?(lockfile) ? lockfile : @lockfile)
  326972 [shortcutter ] [lockfile, @lockfile].any? {|f| File.delete(f) rescue false}
  327008 [vjoel path.b] If #delete fails on lockfile for some reason other than ENOENT, this
  327027 [shortcutter ] This is correct.  I thought that was intended.  Didn't you suggest
  327044 [vjoel path.b] The only difference in my suggestion was to "Rescue Errno::ENOENT",
threads.html
top