265889-268441

265664-274970 subjects 266095-273374

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

^ TclTK, images
265890 [Fleck schlei] I need to include bitmaps in my Tk-project.
265900 [gk cutcopy.c] Here under headline Binding Events you can see an example.

^ Changing "self" for cleaner code
265893 [come.news fr] Is it possible to change the value of self just to enter the context
+ 265894 [botp delmont] # I ask that because I'm doing a program to access different unix os and
| 265899 [gk cutcopy.c] class Object
| + 265946 [come.news fr] Yes !
| | 265985 [shortcutter ] File.open("foo", "w") do |x|
| | 266144 [come.news fr] Thanks for your anwser.
| + 266020 [m_goldberg a] With a small modification the OP can get exactly the syntactic form
|   266027 [dblack rubyp] Is that better than just calling the methods without a block? Or if
|   + 266047 [gk cutcopy.c] Your'e right!
|   + 266048 [m_goldberg a] Was just reacting to Gregor Kopp's message without thinking. Boto
+ 265928 [fwmailinglis] charset="us-ascii"

^ Hash#keys, Hash#values order question
265897 [ronald.fisch] Let h be a Hash. Calculating the arrays
+ 265905 [robert.dober] Looks like for 1.8.6, I just had a quick look at the sources and both use
+ 265934 [shortcutter ] If you need them in the same order, then the safest method is to

^ something like eregi() in ruby?
265901 [usenet vista] i can't info on that - is there anything comparable to the
+ 265916 [apeiros gmx.] Look at the methods String and Regexp provide.
+ 265945 [come.news fr] I don't know PHP but I think match is the closer equivalent of ereg
  265951 [usenet vista] thanks a lot, that's exactly what i was looking for!

^ wxruby and trayicon error and where to learn more about wxruby?
265902 [kazaam oleco] I'm working with wxruby since 2 days but next to this Wiki: http://wxruby.rubyforge.org/wiki/wiki.pl and this Doc: http://wxruby.rubyforge.org/doc/ I couldn't find something usefull for it. Also del.icio.us has no intresting links. Do you know any good website or book about wxruby?
+ 265906 [stefano.croc] 'shutdown.svg' is not a Wx::Icon, it's a string. I didnt' look at the
+ 265944 [kazaam oleco] #!/usr/bin/env ruby

^ Calling Ruby classes from .NET/C#
265904 [damphyr free] I have a small C# GUI and a rather extensive ruby application.
265970 [huw darkneon] Our Ruby Connector does that. The Ruby Connector will let your .NET

^ Selecting indices from an array
265907 [ronald.fisch] For an array a, I would like to know all the indices i where a[i]
265911 [stefano.croc] require 'enumerator'
265933 [ronald.fisch] This is an idea I like! Thanks a lot!
+ 266045 [pit.capitain] a.enum_for(:each_with_index).inject([]){|res, (elem, idx)|
| 266081 [koflerjim ma] module Enumerable
+ 266117 [w_a_x_man ya] On Aug 23, 8:08 am, "Ronald Fischer" <ronald.fisc...@venyon.com>
  266125 [matt tidbits] And to generalize further, let's abstract the test (it shouldn't matter
  266134 [w_a_x_man ya] Why so prolix?

^ how let (fire)watir run with the IE Browser Not Visible
265908 [wanguan2000 ] which command can do this?
+ 265909 [wanguan2000 ] Posted via http://www.ruby-forum.com/.
+ 265910 [wanguan2000 ] o! it is ruby *.rb -b not -d!
+ 266036 [wanguan2000 ] but use firewatir ,ruby *.rb -d can't hideb the firefox browser
  266044 [angrez gmail] As of now you can't hide Firefox browser.

^ Renaming Files
265912 [gabe dragffy] Been palying with IRB. My code doesn't work, no doubt because I
+ 265913 [peter semant] The problem here is the ! on the gsub. This is changing the contents of
| 265917 [gabe dragffy] Thank you so much for these replies (Peter & Stefano). That makes
| 265918 [stefano.croc] If you want to rename only files, then you should do
| 265925 [gabe dragffy] Aha yes, perhaps in my situation both equal, but yours is surely
+ 265914 [stefano.croc] You need gsub, not gsub!. gsub! modifies the string it's called on (f), so
  265927 [lists bertra] I suppose the evaluation order of arguments is left to right

^ What is the difference between :, ::, . ?
265926 [gabe dragffy] and methods. Could someone please tell me concisely when each should
+ 265931 [stefano.croc] * The dot (.) is used to access a method of an object (remember that
| 265942 [fxn hashref.] Are there exceptions?
| 265952 [stefano.croc] * in a global variable
| 265959 [fxn hashref.] Oh yes, classes are objects.
+ 265937 [lists bertra] <http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/251018>
  266056 [ronald.fisch] Hmmmm ... I thought I had already understand this issue (use

^ ruby into a .dll?
265947 [aidy.lewis g] Is it possible to 'compile' ruby into a dll?
+ 265948 [usenet s4r.d] It seems so: When I look into the bin-directory of my ruby-distribution
| 265983 [aidy.lewis g] I thought the above were written in C.
+ 265999 [jfmiller28 y] The Ruby interpreter: Yes
  266057 [aidy.lewis g] I was thinking I might be able to use IronRuby and create a .net dll?

^ reformat with Hpricot?
265949 [phlip2005 gm] doc = Document.new('<yo><dude /><yo>')
267430 [gattster gma] Very interesting question. I don't know the answer, but I'll *bump*

^ [SUMMARY] Process Rings (#135)
265950 [james graypr] I can't speak for the other solvers of course, but this kind of system

^ String.match on variable holding a regex?
265969 [splitform gm] I am storing data in mysql as a regex.  At some point I need to match a
265973 [dblack rubyp] If you do /@x/, you're matching the pattern "@x". If you want to use
265976 [splitform gm] Wow, that was dumb...I forgot about using interpolation(sp?) on there.

^ Functional Programming
265971 [benjohn fysh] I'm interested in functional programming.
+ 265978 [znmeb cesmai] The closest thing (and highly recommended) would be the recent Pragmatic
| 265979 [james graypr] No offense intended, but I am working through that book right now and
+ 266017 [lojicdotcom ] If you like Ruby, you may also enjoy Lisp since it influenced Ruby.
| + 266062 [benjohn fysh] Thanks (everyone) for your suggestions.
| | + 266063 [fxn hashref.] I had that same goal, only I already had chosen Haskell.
| | + 266064 [robert.dober] Well I feel that "Programming Erlang" really is what you are looking,
| |   266166 [znmeb cesmai] There is also the problem with Haskell (and OCaml, Prolog, Eiffel, etc.
| + 266080 [phillipsds y] As for me, I'm still sort of trying Lisp. I'm mustn't be old enough
| | + 266099 [lojicdotcom ] Emacs may have some advantages for Lisp, but it's not required. I use
| | + 266165 [znmeb cesmai] Yeah, you're right. Lisp and Forth are great old languages, but they
| |   + 266206 [martindemell] I do want to learn a concatenative at some point - any opinions as to
| |   | 266208 [znmeb cesmai] I guess it depends on what you want to do with it. I only briefly looked
| |   | + 266209 [james graypr] The primary compiler for Macs is gcc.
| |   | | + 266212 [znmeb cesmai] Thanks! I thought they had their own compiler.
| |   | | | 266554 [kyleaschmitt] Way way OT but ;) They kind of still do for ppc.
| |   | | + 266236 [bigboss64 ip] While I can't say for *what* versions, GCC runs on pretty dang near every
| |   | + 266248 [james graypr] I hope you do.  I'm Forth ignorant, so you could bring me to the
| |   |   266249 [znmeb cesmai] Actually, what would be even more interesting would be a Ruby
| |   + 266219 [robert.dober] I know it is OT but do you share my POV that from all that old
| |     + 266225 [vjoel path.b] Lisp is always ahead of its time, because it is always being reinvented.
| |     + 266233 [znmeb cesmai] Well, I think the Lispniks would claim that Smalltalk is a dialect of
| + 266167 [znmeb cesmai] The graveyards are littered with the bones of programmers who thought
| | 266544 [ztz nxvr.org] Judging by the activity of comp.lang.superlang, I would say it doesn't
| + 266543 [ztz nxvr.org] ((()((())()(()()()(((((((((((((()))())))))((((())))))))))))))))))))))((((((((()()()()()))))
+ 266035 [dkarapetyan ] haskell.org has tons of resources on the haskell language. there are printed

^ I'm stuck with 'open-uri'
265980 [valenonish g] I'm trying 'open-uri' on Windows XP and my 'test_uri.rb' runs OK. But

^ Using rb-gsl with Windows
265986 [aarmbruster ] I'm trying to use rb-gsl under Windows, but I'm stuck.
+ 265995 [ara.t.howard] but you may be able to download and simply run
+ 265996 [ara.t.howard] a gem won't help you since the windows ruby is crippled : it has no
  266098 [aarmbruster ] Thanks for your help Ara. I'll have a look into your installer. I should

^ Once more unto the breach: private class methods
265989 [markjreed gm] Found a lot of discussion of this, but it didn't seem to suggest a
+ 265993 [dblack rubyp] Not until you write a 'var' instance method :-)
| 265997 [markjreed gm] Not at all.  I want to define a method C.foo() that other classes
| + 266003 [dblack rubyp] OK -- I didn't get that; there was something to the effect that you
| + 266007 [johnwilger g] Without seeing the code you're actually working with, it seems to me
+ 265994 [robert.dober] Sure, but clumsy, I do not know if it is worth it
| 265998 [markjreed gm] Well, that is an interesting approach.  Thanks!  It might be in the
+ 266000 [ara.t.howard] class C

^ Problems getting Mechanize working...
265992 [sergio villa] i am trying to get mechanize to work, but i am getting the following
266126 [jan.svitok g] I don't know much about mechanize, but this code worked for me. (with
266127 [sergio villa] yes, i did do that..
266128 [jan.svitok g] I meant whether do you require 'mechanize' or 'mechanize/something'...
266129 [sergio villa] yeah.. i do this..

^ Ruby on the rise in Brazil
266001 [enogrob gmai] Developers in Brazil expect their use of the Ruby scripting language
+ 266119 [mksm.sama gm] I've spent the last 12 months developing a relatively large system
+ 266255 [alexey.verkh] Ahem... OK, I asked my teammate in China if this number was anywhere
  266256 [phlip2005 gm] There's lots of people in China, hence lots of them are programmers,

^ [ANN] Hoedown rough cuts finished. Confreaks to record Rubyconf.
266002 [carl.youngbl] Confreaks would like to announce that we uploaded the last of the
266120 [robert.mcgov] Many thanks to all involved in bringing this to us.

^ Re: Probability distributions library in Ruby
266004 [rogerpack200] def poisson(lambda)
266168 [znmeb cesmai] There is also RSRuby, a way of calling the R libraries, including their

^ [ANN] Aquarium v0.1.0 - An AOP Toolkit for Ruby
266011 [deanwampler ] I just released the first version of a new Aspect-Oriented Programming
266037 [m.fellinger ] Had a glance, since i really miss real AOP in ruby, looks promising
266104 [deanwampler ] Thanks for the catch! I'll fix the notes.

^ subarray using [1,-1] returns nil.
266014 [promos burch] a = %w(a b c d e f g) ;
266016 [promos burch] I think I see the issue (the issue = my error).  The "-1" is the last
266019 [nobu ruby-la] Maybe, don't you want to try a[1..-1]?
266059 [cliveharber ] The operation b = a[1,-1] is a slice operation where the first index is the start point and the second is the length of the array that you are retrieving - this is why you are getting nil for 'b' - the way to do this would be to use an inclusive range like this b = a[1..-1] - this will return the results that you expect.

^ Logging
266015 [greg.johnsen] Could anyone tell me how I could syslog to a specific log (e.g. /var/
266178 [florian.assm] Try Log4R.
266180 [phlip2005 gm] Will that work on the Un*x system logs?

^ accessor_writer methods and instance_eval
266021 [thomas.gantn] I stumbled upon a problem with 'instance_eval' (using ruby 1.8.5 on
+ 266026 [ezmobius gma] No unfortunately you are stuck with the behavior you observed.
+ 266029 [nobu ruby-la] Nothing.  It's one of reasons why using instance_eval for such
  266220 [thomas.gantn] Thanks for your quick answer (also to Ezra).

^ Re: subarray using returns nil.
266022 [promos burch] Very good!  Works fantastic.  Thanks!

^ suppress ruby warnings during runtime?
266024 [beingthexemp] I've been looking for a way to supress warnings at runtime, not just in
+ 266028 [drbrain segm] Change calls from .id to .object_id to turn off this warning.
| 266360 [uni hehejo.d] This sounds like rails.1
+ 266031 [nobu ruby-la] Setting $VERBOSE = nil.

^ ldap injection
266030 [jeff.burly g] Any issues / advice guarding against ldap injection when doing a
266051 [garbagecat10] I'm not clear on what you mean by "ldap injection." Are you having concerns
266110 [jeff.burly g] By ldap injection (
266114 [garbagecat10] It's always a good idea to scrub user input anyway. In your example, you're

^ Dynamic methods
266032 [jrb562 drexe] I have seen examples of catching unkown methods called on a class with
266040 [transfire gm] def method_missing(item, *args, &blk)
266068 [lopx gazeta.] Example.class_eval do
266072 [robert.dober] You are right for sure here Marcin, however are you aware that the twoare not exactly the same? In case you get bitten by define_methodmaybe Ara's recent post about instance_eval{ def ... } might behelpful,the following is a "String-eval-free" way to define a method on aclass *without* being exposed to the closure of the currentenvironment.----------------------- 8< ----------------------
266075 [robert.dober] the above really su..., sorry

^ something I just found out, am sharing (:newbish)
266039 [significants] 075:0> a = "hello"
+ 266042 [dzwell gmail] "+=" will actually work on any class that has "+" defined, including
| + 266049 [a99.googlegr] Can anybody tell me, where to find, what this means?
| | 266050 [dzwell gmail] var1 <an operator>= var2
| | + 266052 [botp delmont] # result = true
| | | 266107 [dzwell gmail] Pe,
| | + 266060 [a99.googlegr] Very nice! Thank you!
| + 266053 [sepp00 web.d] That is correct (you missed %=, |=, &=, ^=, <<=, >>=, **= and whatever /I/
+ 266054 [robert.dober] not really :(
  266070 [dblack rubyp] Don't worry -- there's no Academie Anglaise :-)
  266074 [robert.dober] I am not French, only my wife is;), but it is a funny remark.
  266076 [dblack rubyp] a = "Hello"
  266078 [robert.dober] That is indeed an important - probably the most important - point to

^ Combinations of numbers/operators?
266041 [rubyforum gm] This is a really easy one but I'm kind of a kook and new to programming
266043 [dzwell gmail] Here's one way to do it--evaluating it would be a lot more complicated
266071 [rubyforum gm] Awesome! Thanks Dan.
266201 [rubyforum gm] One more thing: how would you get parentheses into the act if you also
266207 [dzwell gmail] Do you know you are only dealing with four numbers? It makes quite a
266216 [rubyforum gm] Yeah, I know; this goes much farther than the original question. It
266217 [james graypr] Maybe the solutions will give you some ideas.

^ Advice on bulding a web service
266046 [biot023 gmai] I need to build a web server (it'll be RESTful & everything), but am not
+ 266090 [jwells serva] maybe you'd enjoy camping http://code.whytheluckystiff.net/camping/
| 266094 [biot023 gmai] Cheers for that -- I don't think (after a quick semi-peruse of the page)
| 266118 [vasudevram g] You have at least a couple of options for the web server (I'm assuming
| 266517 [biot023 gmai] Vasudev -- thankyou for an incredibly informative and complete reply!
+ 266100 [garbagecat10] Sounds like you might be after a messaging server rather an HTTP server

^ Ruby + iptables
266061 [ttmrichter g] I've been poking around on Rubyforge and Sourceforge and getting nowhere
266065 [robert.dober] I have written such a beast, and I use it for production, it has lots of
+ 266066 [ttmrichter g] on
+ 268440 [ari aribrown] Hey!

^ How to append some data at the beginning of a file
266067 [udaykanth_t ] I am newbie to Ruby so please spare me if the question looks silly. My
+ 266069 [ronald.fisch] This is not so much a Ruby question, since nearly no operating system
| 266073 [udaykanth_t ] Thanks Ronald for your comments. I am wondering may be ruby got some way
| + 266077 [ronald.fisch] It could, but I think it just happens too rare that someone
| | 266079 [jan.svitok g] File.open("test1","w") do |newfile|
| | 266083 [ronald.fisch] Good point! (Only that *prepending* data to a file which is so big that
| + 266082 [shortcutter ] Just a few remarks: better return to your old habit and use the block
| + 266152 [botp delmont] # newfile = File.new("test1","w")
|   266379 [w3gat nwlaga] Here is a small example to write something at the beginning of a file
+ 266088 [florian.assm] require 'tempfile'

^ [QUIZ] ID3 Tags (#136)
266085 [james graypr] 1.  Please do not post any solutions or spoiler discussion for this quiz until
+ 266086 [robert.dober] zero based, I guess?
| 266097 [james graypr] It is, yes.
| 266109 [pticedric gm] I think that the fields order is wrong.
| 266112 [james graypr] You are right.  Sorry about that.  I've fixed it on the Ruby Quiz site.
| + 266229 [brad bradedi] ...
| + 266230 [brad bradedi] You fixed one problem, but artist and album are still flipped.
|   266232 [james graypr] It should be fixed now.
+ 266111 [rubify softo] You've misplaced year and comment.
+ 266333 [justin.ethie] My solution is straightforward. It seeks backwards from the end of file to
| 266431 [guitsaru gma] charset=US-ASCII;
+ 266766 [matthew.moss] I've been extremely busy lately, but I wanted to give this one a try.
  266783 [james graypr] This is a very clever solution.  I have one suggestion though
  266821 [matthew.moss] True... I had thought of that this morning, though I also wanted to
  266822 [matthew.moss] And, of course, the whole field/record thingy should be separated out

^ Combining Array Elements
266087 [greg.kujawa ] I have an array that I would like to combine elements. Here's a sample
+ 266089 [jwells serva] new_array = array.collect{|v| [v[0],v[1], a.select{|b| b[0] == v[0] &&
| 266092 [dblack rubyp] You mean array.select, I think.
+ 266091 [sepp00 web.d] arr=[["Value A", "Value B", 3], ["Value A", "Value C", 2],
+ 266093 [ymendel pobo] irb(main):001:0> orig_array = [["Value A", "Value B", 3], ["Value A",
  266096 [shortcutter ] irb(main):001:0> arr=[["Value A", "Value B", 3], ["Value A", "Value
  266105 [greg.kujawa ] On Aug 24, 9:52 am, "Robert Klemme" <shortcut...@googlemail.com>
  266140 [apeiros gmx.] What makes me slightly sad is that all those examples try to squeeze as
  + 266158 [logancapaldo] def foo(a)
  + 266172 [botp delmont] # What makes me slightly sad is that all those examples try to
  + 266307 [shortcutter ] That was not my primary concern.  I tried to avoid pasting lengthy IRB
    268361 [greg.kujawa ] I just picked up this thread again. I can concur about the readability
    + 268366 [shortcutter ] Hey, that sounds like a great success story!  I'm glad, Ruby could make
    + 268441 [phrogz mac.c] It's quite disappointing that this is being used for diamonds. How
threads.html
top