17655-25795 subjects 18092-18667

Deriving from Class
17890 [aleksei.guze] Why deriving from "Class" class is denied?
17905 [matz@ru y- a] not work properly due to the limitation of implementation".  So, that
17906 [aleksei.guze] Would You like to revise this issue? It seems to be inconsistent.
17909 [matz@ru y- a] Ah, if I can time to check them.  Or you can remove the following from
+ 17910 [aleksei.guze] #
+ 17920 [Dave@Pr gm t] Perhaps the problem is that the subclass won't behave like a true
  17921 [decoux@mo lo] No, it will have the type T_CLASS. This is a class :-)
  17927 [decoux@mo lo] He'll have surprise :-)
  17936 [matz@ru y- a] Probably that's the reason (I still don't remember what I though 3
  17937 [aleksei.guze] Maybe I wished some class factory.

Re:regular expressions and string#sub!
17897 [erne@po er a] This particular code yields some strange results.
+ 17899 [wayne.blair@] x.sub! mutates x, whereas x.sub returns the result without mutating x.
+ 17900 [dblack@ca dl] Interesting.  I can't quite puzzle it out, but it seems to
  17902 [matz@ru y- a] See page 376 of the Pickaxe book.  I'm grad we have a wonderful book
  + 17912 [dblack@ca dl] So *that's* where it was hiding :-)  I only went as far as an empirical
  + 17913 [erne@po er a] Thanks matz.  However, I'm still stuck with the question.  How does one use
    17915 [decoux@mo lo] pigeon% cat b.rb
    17917 [erne@po er a] Thanks to everyone that commented.  Page 52 of the Pickaxe book has an

Re: Sets, Hashes
17898 [matju@sy pa ] Let the user hang himself by providing him with over half of the semantics
18014 [mikkelj-anti] But really... Ordered sets are very important. In market research software,

Rubygarden Poll
17901 [Dave@Pr gm t] Well, the results are in (with a record turnout), but they aren't
17914 [dblack@ca dl] Congratulations to the 73 victors.  But I'm surprised that facet won.
+ 17916 [tobiasreif@p] 3.9 facet
| 17919 [aleksei.guze] Why the polls do not have "other" choise? I'm sure there is a lot of
+ 17923 [ruby@ja es r] This makes me wonder if using the word 'facet' to mean a code
+ 17924 [lucid@us rs ] I've only just joined the list, so didn't vote in the poll.  But as
| + 17930 [ljohnson@re ] Walter, of course.
| | + 17931 [ljohnson@re ] Hating to show my ignorance, I must ask: What is "hybris"?
| | | + 17960 [hal9000@hy e] More often spelled _hubris_ to reflect English pronunciation,
| | | + 18002 [ljohnson@re ] Most of my software development (including the construction of Ruby GUIs)
| | | | 18016 [schneiker@ju] FWIW, I strongly agree with all the above points.
| | | + 18017 [matju@sy pa ] The "Hybris" referred to in the RubyGarden poll is a Model/View GUI
| | |   18021 [hfulton@po -] Ruby GUIs with:"
| | + 17946 [toddg@li ux ] You are Binky the Clown and I claim my fish.
| + 17938 [billk@ct .c ] Hmm, maybe we can classify the non-gems as shards.  ;-)
| + 17968 [Stephan.Kaem] Hmmm, I think there shouldn't be too many new words for 'old things' that
| + 18050 [charleshixsn] Snippet seems to be the term that automatically gets used.  So
+ 17952 [alwagner@tc ] I agree "facet" already carries a load of meaning contrary to an arbitrary

(pas d'objet)
17907 [MTERRIEN@wa ] ...

17908 [jlambert@we ] ...

code optimization (DTD: parameter entity expander)
17918 [tobiasreif@p] I'm writing a class that expands parameter entities in DTDs, for better

Time vs ParseDate
17922 [kero@d4 50 u] Why doesn't Time accept the output from ParseDate.parsedate directly?
17926 [matz@ru y- a] Time vs ParseDate
17928 [kero@d4 50 u] Not bad, but now I happen to have date which is given as a string by a
+ 17935 [matz@ru y- a] Try
+ 17947 [neumann@s- i] Try Date3 library from RAA.

Movement in scripting language communities to integrate XML-RPC
17925 [gsemones@tr ] Greetings,
17932 [matz@ru y- a] Movement in scripting language communities to integrate XML-RPC
+ 17933 [neumann@s- i] Well, XML-RPC or SOAP depend on some other libraries, such as NQXML or
| + 17934 [tobiasreif@p] "out of the box" by including
| | 17955 [nahi@ke na t] Hmm...  I should disagree this.  Requiring 100% compliance
| | + 17965 [maki@in c. o] Why should we wait m17n-ruby? ruby-1.6.x has already supported
| | | 17966 [nahi@ke na t] See SOAP4R implementation if you are interested.  UTF-8 has
| | | 17976 [maki@in c. o] NQXML doesn't allow non-ASCII character as element's name.
| | | 17978 [nahi@ke na t] Then, don't you think we should wait?  I don't know anything
| | | 18007 [maki@op n- e] As I said in [ruby-talk:18005], elements name (and attributes)
| | + 17994 [neumann@s- i] 100% XML-RPC specification compliant.
| |   17996 [nahi@ke na t] Very good!  I envy you...
| |   18004 [neumann@s- i] You don't have to ;-) or is Apache SOAP 100% compliant? No it isn't!
| + 17957 [lucid@us rs ] IMO, it would be best if these add-on packs were
| + 17958 [nahi@ke na t] Thank you for your explanation.
+ 17951 [ruby@ja es r] One of my gazillion side projects is to assemble a reasonable
  17995 [neumann@s- i] You probably gain not much in performance, but it will be more flexible.
  17999 [ruby@ja es r] Thanks!  I'll do that.

RUBY C++ Extension
17939 [jglueck@vo .] Does anybody have the source to a WORKING C++ Class exported to RUBY
+ 17940 [elanthis@us ] I dunno how other people do it, but I wrap the C++ calls in C functions.
+ 17943 [chris@at es ] That's probably the best way to do it.  I'm finding that writing ruby
+ 17944 [ljohnson@re ] The source code for FXRuby, obviously, has a bunch of these. You can
  17986 [jglueck@vo .] Thanks for all your suggestions i will try that.. One last question
  17987 [decoux@mo lo] => I used rb_load_file to load a script file and ruby_run to execute it,

Include path to libraries
17941 [ptivelo@ho m] I have a problem when I want to use some extern libs.
+ 17942 [sean-ruby-ta] The code's solid and works for me...
+ 17945 [kero@d4 50 u] No, you shouldn't.

FastCGI for Ruby?
17948 [eli.green@co] Hey there. A few weeks back, when I was searching for Ruby-related stuff, I
+ 17949 [avi@be a4 co] I've been working on exactly this. IOWA maps pretty closely to
| + 17962 [eli.green@co] Excellent! I took a slightly more detailed look at IOWA, and it looks pretty
| | 17964 [avi@be a4 co] Indeed... although one of the major goals of IOWA was to remove the need
| + 17970 [neumann@s- i] I've patched the latest IOWA to work with FastCGI.
|   + 17972 [avi@be a4 co] Please do!
|   + 17990 [neumann@s- i] ***************
|     18026 [web2ed@ya oo] How are you connecting with Ruby to databases such as Oracle.
|     + 18057 [paulp@Ac iv ] For those that know neither Python nor Edward Wilson, I feel some
|     + 18070 [neumann@s- i] * DBI (database independet interface)
+ 17971 [neumann@s- i] Yes, I'd like to see/use it.

Changing the version of Ruby used in Rubywin [was - Ruby newbie seeks help with Rubywin starting IRB]
17950 [lucid@us rs ] Is there an easy way to carry out this substitution, now that I
17961 [feoh@fo rf z] Just uninstall the broken 1.6.4 environment you currently have in place.

Re: [OT] Ideal learning environment [was - RUBY C++ Extension]
17954 [lucid@us rs ] I think I've just found the ideal environment in which to learn

Re: Old chestnut: invariants, pre/post conditions
17959 [andy@to ls e] But of course :-)

{} -vs- do/end blocks
17963 [matt@li ke .] @foo.each { |i|
17974 [neumann@s- i] @foo.each aMethod { |i|

Re: RubyUnit: A bit more general test runner
17967 [aleksi.nieme] Thanks Aaron,

Iterator/block in 'C'
17973 [waisun.chia@] I'm trying to code an interator/block in 'C'.
17980 [decoux@mo lo] Look at rb_iterate() if you want to call a C function as a block
18000 [waisun.chia@] Sorry to be so dense, but I still can't figure out how rb_iterate() work
18001 [decoux@mo lo] pigeon% cat tt.c

Regexp - stripping comments
17977 [s.unsworth@v] ...
+ 17981 [decoux@mo lo] Sometimes regexp are not really adapted, try something like
+ 17983 [kero@d4 50 u] Your familiar with the concept of "string" =~ /regexp/ ?

17979 [angelo.betta] I have a problem: I' d like to create a simple file.CGI which extracts,
17989 [neumann@s- i] Install and use Ruby's DBI. See RAA section Library/Database -> DBI or

waiting for `backquotes` to finish
17984 [stephen.hill] I'm sure this isn't really a ruby specific question, but since I scipt
+ 17985 [decoux@mo lo] ruby wait the end of the command, try
+ 17997 [Dave@Pr gm t] This shouldn't be a problem, because the command in backquotes will
+ 18259 [erik@ba fo s] Don't write to a file.  Write to the program instead.  Something like
  18260 [green@Fr eB ] Better yet, do all of the processing in pure Ruby and get much lower
  18262 [Dave@Pr gm t] A neat shortcut is

Re: Changing the version of Ruby used in
17988 [andy@to ls e] I've been off at the beach, contributing mightily to an
+ 17992 [feoh@fo rf z] Mmm.  Skin cancer :)
+ 17993 [neumann@s- i] Ah, you English people are the ones running with red skin at italian beachs, isn't it ;-)
+ 17998 [ljohnson@re ] It's not clear to me how to upgrade my GTK distribution. I've downloaded the
| 18003 [Stephan.Kaem] I whish I had but I don't.
+ 18006 [pit@ca it in] Here's some more information regarding the RubyWin problems. To
  + 18008 [andy@to ls e] I'm not convinced either, that's why I still do it :-)
  + 18010 [feoh@fo rf z] [ First issue snipped.  We've all seen it before :) ]

Re: Movement in scripting language communities
17991 [ jimm@io co ] I have a moral obligation to completely ignore the rest of the world :-).
18005 [maki@op n- e] Oh, I have no intentin of blaming you.

RUBY C++ Extension again
18009 [jglueck@vo .] I managed to integrate Ruby into my game engine now, but i have got
+ 18011 [maverick@cs ] Hmm, I am not sure what you mean by "call" here, but if this is a Ruby
+ 18012 [chris@at es ] Just a few comments...
+ 18013 [pbrannan@at ] You can use RUBY_DATA_FUNC and RUBY_METHOD_FUNC instead.  These are
  18042 [jglueck@vo .] Hm thanks for all your help. I knew that my function cast was wrong
  18044 [decoux@mo lo] => (VALUE)(*)(...)) is different from (VALUE)(*)()) which all rb_define
  18053 [jglueck@vo .] Hm another one, i corrected the errors in above example and it still
  + 18054 [aleksei.guze] Take a look at rb_cObject in one of Your moduels' function. Then cmopare
  + 18055 [aleksei.guze] Can You  mailto:aleksei.guzev@bigfoot.com Your dsw and dsp files?
    18056 [aleksei.guze] And try defining RUBY_IMPORT instead of IMPORT.

Open Source Convention attendance
18015 [ale@cr ms n.] I wonder if people are going to attend O'Reilly Open Source Convention
18783 [matju@sy pa ] Unfortunately, it seems that he only likes to mention it. I too like
18784 [acme@as ra .] It was great fun and terribly interesting, although I mostly saw the

Broadcasting data
18018 [harryo@zi wo] Does someone have an example of broadcasting data around a network using
+ 18019 [harryo@zi wo] Sorry, I should have mentioned that, in case you didn't guess, these
| + 18020 [jjenning@st ] hate to discourage you from writing Ruby, but have you tried VNC's
| + 18022 [harryo@zi wo] Not in the slightest!  There's no way you could ever discourage me from
|   18045 [mike@le to .] there
+ 18025 [matz@ru y- a] Broadcasting data
  18034 [sean-ruby-ta] Speaking of which, does anyone know if there are any efforts to
  + 18035 [sean-ruby-ta] [slaps hand on forehead]
  | 18037 [decoux@mo lo] Where is the ruby interface ?
  | + 18038 [avi@be a4 co] ...
  | + 18110 [feoh@fo rf z] -Chris
  + 18036 [avi@be a4 co] A ruby interface appears to come with the distribution.

[ANN] libxslt Rubified!
18023 [waisun.chia@] ...
18024 [maki@in c. o] OK.  Done.

rb_define_class_under appears to be broke on WIN32
18027 [bryan@te ra ] Hey guys,
+ 18028 [decoux@mo lo] Like you, I can't reproduce the problem on linux.
| 18029 [bryan@te ra ] I'm not sure what information would suite you best, so I made a couple screen grabs
| + 18030 [decoux@mo lo] This is after this call, that it crash ?
| + 18031 [maverick@cs ] I don't have swig, so I can build test4 only.
|   18048 [bryan@te ra ] Hey guys,
+ 18032 [aleksei.guze] I use Ruby on Windows.
+ 18033 [aleksei.guze] ...... OH!

Re: waiting for `backquotes` to finish - a solution
18039 [stephen.hill] Thanks for this - I have to admit that I cut down the real code quite

Access control question
18040 [pit@ca it in] I'm writing a class C that needs support of a helper class H.
18097 [matz@ru y- a] Don't tell anybody about these method.  Putting the comment that says

How to define instance variables from 'C'?
18041 [waisun.chia@] Just a quick one, as in the subject line.
18043 [decoux@mo lo] yes,
18049 [waisun.chia@] Thanks Guy for the usual quick response. :-)
+ 18051 [decoux@mo lo] rb_iv_set() is just defined as
+ 18052 [aleksei.guze] # -----Original Message-----

Wny two exception handling methods?
18046 [ned@bi e- om] I just started looking at Ruby (reading Dave Thomas' book), and I'm puzzled
+ 18047 [neumann@s- i] Yes, they are used for different purposes.
+ 18062 [ned@bi e- om] Thanks for the clarification.
  18069 [neumann@s- i] You can define a tracing method (set_trace_func), that gets called after each

<=> and nil values
18058 [mdavis@se ai] I would like to request a change to the <=> method to support the
18065 [neumann@s- i] To change
18071 [mdavis@se ai] print "nil <=> nil:     #{nil <=> nil}\n"	# works great
18079 [harryo@zi wo] Actually, that's what the other Michael said :-) ...

Defining modules from C
18059 [senderista@h] I'm trying to create modules (and classes, methods, constants, etc.)
18106 [decoux@mo lo] I've not understood can you give a small example ?

Best way to prevent infinite loops...
18060 [sean-ruby-ta] Howdy.  What's the best way to prevent infinite loops in Ruby? =20
18066 [Dave@Pr gm t] Don't write one.  :)
18077 [sean-ruby-ta] I wish I could...  I'm using a recursive regexp to remove all
18107 [neumann@s- i] def loop_max(max_iter)

nntp extension for Ruby
18061 [bombadil@wa ] Is there any Ruby extension of type nntplib for Python?
18063 [joe@vp p. et] regards,
18067 [Dave@Pr gm t] Thats what I used for the mail-news gateway

Handy tip for GUI development
18064 [spwhite@ch r] If you're using Tk, then try this in irb...

archdir vs. includedir
18068 [onge@mc .a l] I'm trying to cook up a configure script for an application that embeds
18096 [matz@ru y- a] No and yes.

IOWA newbie question
18072 [SAT@MU TI EC] ...
18078 [avi@be a4 co] You have to map a url pattern ending in /iowa/ to iowa.cgi.  Off the top
18124 [SAT@MU TI EC] When I put in the changes into httpd.conf as you suggested, I get this error
18135 [SAT@MU TI EC] Sorry to reply to my own reply except that I got it working. It turns out,

99 bottles of beer
18073 [thucdat@ho m] ...
+ 18074 [jjenning@st ] # How to shorten the following experimental codes?
+ 18075 [dblack@ca dl] i,w=99," on the wall"
+ 18076 [tom@li ux ri] 99.downto(1) { |i|
+ 18082 [Dave@Pr gm t] The use of NIL to save a variable here is a bit tacky...
  + 18084 [Dave@Pr gm t] 100((1..98).collect { |i| [100-i, "s"]} + [ [1,""], ["There'll be no", "s"]]).
  + 18085 [dblack@ca dl] The only thing is, it sings a slightly revisionist version of the
    + 18086 [dblack@ca dl] I lose.  Tom Gilbert's is shorter.  And he even used <<BEER when he
    + 18088 [jjenning@st ] that's 224 characters and some l33t stuff that i wouldn't have thought of. so in the same spirit as my earlier revision of someone else's work, here it is in 217 :)

[ANN]: RubyGems (was Re: Rubygarden Poll)
18080 [mrcode@ad lp] Speaking of the word gem, I suppose I should make a "pre-announcement" of a
18081 [sean-ruby-ta] What you're describing sounds awefully similar to the ports
18083 [lucid@us rs ] I'm a Ruby-newbie, not a coder since the days of CP/M &

Debugging extensions with gdb
18087 [waisun.chia@] My extension is crapping out but I haven't figured a way to set
+ 18089 [aleksei.guze] Are You using mswin and MSVC?
| 18090 [waisun.chia@] Nope. Redhat Linux, gcc/gdb.
| 18091 [aleksei.guze] I use Windows...
+ 18093 [matz@ru y- a] I'm sorry I don't know.  But when I need to use gdb, I link the
+ 18105 [decoux@mo lo] * put a breakpoint in dln_load