52846-54601 subjects 53298-54221

ALERT -  GroupShield ticket number OA51_1034552973_LEVIATHAN_1 wa s generated
53120 [NAIITACTICSL] The attachment was quarantined from the message and replaced with a text

Virus Alert
53121 [security@po ] ...

[ANN]RDE0.9.8.0 released
53123 [QZS01353@ni ] I released RDE0.9.8.0.
53124 [botp@de mo t] ronment%29
53139 [QZS01353@ni ] No, I do not have one for linux.

Problem with rdoc?
53126 [austin@ha os] I've done some translation of some Perl packages to Ruby, and I'm
+ 53129 [Dave@Pr gm t] Could you send me the source file that causes the problem and I'll
+ 53168 [list@NO PA c] Can't say, but for rpkg, wait for the next release -- it's much more
  53205 [austin@ha os] How soon until the next release?

1.8 release?
53141 [gsinclair@so] Sorry if this has been discussed to death, but I found no concrete mention
53142 [bulatz@in eg] give us full list, please :)  i know only list at pragamtic
+ 53144 [gsinclair@so] problems
| 53149 [bulatz@in eg] but all these methods are one-liners. i think that ruby programnmers
+ 53269 [lyle@us rs s] See the doc/NEWS file in the Ruby 1.7.x source code distribution.

admin scripting -script to scan network share and open ports
53151 [botp@de mo t] I would like to scan my network for network shares and open ports. How do I
53249 [B.Candler@po] mynet = ''
53250 [botp@de mo t] Many thanks sir Brian.

Ruby Weekly News
53157 [Dave@Pr gm t] Ruby Weekly News: 10/14/2002

53160 [austineuwa5@] charset="US-ASCII";

Fourth Sydney Ruby Users' Group meeting
53161 [harryo@zi .c] I'll stop counting them soon :-).  At least I remembered to give more than 30

access surrounding class
53165 [matthias_vei] is there a possibility in ruby to access the surrounding runtime
53169 [decoux@mo lo] Well, I've not understood what you want to do but try this
53173 [rking@pa op ] Matthias, can you describe your problem at a higher level?
53200 [matthias_vei] Sorry for my stumbled sentences - I try again.
53220 [list@NO PA c] class A

The old SEGV is back...
53167 [Dave@Pr gm t] I've started getting the SEGV again when running RDoc. The backtrace

RubyConf registration is closed - can we still register?
53170 [michael.piec] Just went to register for RubyConf and found that that the on-line
53172 [dblack@ca dl] There's no on-site registration.  I'll contact you separately about

Size of unnamed pipe?
53171 [hyukjoon@e5 ] Is there any way to calculate the size of unnamed pipe in ruby?
53179 [rking@pa op ] Do you mean the amount of data ready to read?

ruby command expansion
53176 [gpmarra@le i] is there a possibility in ruby to execute a system command by variable?
+ 53177 [decoux@mo lo] Try
+ 53180 [billtj@z. lu] You can use the ` (backquote), and it is similar as replacing the value of
  53181 [gpmarra@le i] Thank you!!

string comparism
53178 [kgergely@ml ] I'm just wondering if is there any method, which can intelligently sort

Message threading code
53182 [tom.hurst@cl] I don't suppose anybody's happened to implement jwz's message threading

final in ruby
53183 [kgergely@ml ] I've seen so far, that a ruby method can be hacked to be
+ 53184 [rking@pa op ] Why would you want that?
| + 53187 [kgergely@ml ] Because I want to protect everyone (including myself) to overwrite some
| | 53206 [decoux@mo lo] Freeze your class
| | 53207 [austin@ha os] a() end end'
| | 53208 [decoux@mo lo] He just need to put the methods that he want protect in a module and then
| | 53256 [kjana@dm la ] module M
| | 53257 [decoux@mo lo] Yes, like all objects are open because you can write
| + 53191 [billtj@z. lu] I guess for the same reasons that Java has provided such facility :)
|   53201 [matthias_vei] In java this is mainly a speed issue: no virtual method lookup mechanism
+ 53186 [decoux@mo lo] Why do you want this, this can be usefull to modify a method. Imagine that
| 53189 [kgergely@ml ] mwrap? What is it?
| 53192 [decoux@mo lo] method wrapper this is based on function wrapper (fwrap) from Allegro
+ 53190 [peter@se an ] Java gives you this and it can do so because it is a statically typed
| 53198 [bulatz@in eg] and this is universal problem to any question, where someone don't
| 53221 [list@NO PA c] Admit it: you're learning 'test/unit' and are waiting a green bar on
| + 53235 [james@ja es ] That almost made me spit my gum out!
| + 53243 [bulatz@in eg] i think that answers "whole nature of ruby would have to be changed"
+ 53197 [gsinclair@so] How would your method get overwritten anyway?  (I know it's possible, so in
  + 53204 [kgergely@ml ] Singleton methods in an object, which is derived from a kind of template
  + 53364 [martindemell] For what it's worth, that was the same revelation that made me stop

Maximum size of unnamed pipe size in ruby
53185 [hyukjoon@e5 ] For the clearfication of previous question.
53195 [gsinclair@so] I'm afraid I don't know.  Can you tell me how you might do it in C, or some

Referring to instance vars in a Struct?
53188 [chrismo@cl b] I have a Struct -- then I extend the class by adding some methods. I
53193 [chrismo@cl b] class TestMe
53196 [billtj@z. lu] I am not pretty sure, but by drawing analogy between C++ struct and class,
53213 [chrismo@cl b] In my real code, I had a struct that represented a database row with several
+ 53214 [billtj@y. lu] I agree with you that it is probably pushing Structs too far.  As I do not
+ 53228 [dblack@ca dl] One way to look at it: having methods that set and retrieve same-named
  53229 [alan@di ik t] A cleaner way to do this is to derive the class from an anonymous struct.

53194 [mbundu00@ya ] DEMOCRATIC REPUBLIC OF CONGO.

& operation and if statment
53199 [tarasis@bt p] I'm puzzled by the behaviour in the following run. I would expect line 2
53202 [dblack@ca dl] Don't forget that 0 is true.
+ 53211 [billtj@y. lu] It is Item 12 in "Things That Newcomers to Ruby Should
+ 53225 [tarasis@bt p] Duh, thank you, I had compelely forgotten that.

ruby<=>php for web scripting
53203 [kgergely@ml ] I've a question. Probably I will be a web programmer. They want me to
53212 [mikkelfj-ant] If it is a large project, Ruby offers increased productivity because it
53218 [ sz@sz sz hu] FWIW, my impression is the same, Ruby may be more of a promise
53219 [kgergely@ml ] That's why I'm a bit afraiding asking it...
53223 [ sz@sz sz hu] if even I get hit by one, then they really get into some serious trouble!... ;-)

passing on a block
53215 [tromp@se pe ] I defined a Statespace class, which happens to encode states as integers
53355 [meier@me st ] I would take the latter because of does not hard codes the arity of
53358 [kentda@st d.] I thought of method arity when I first read your sentence, so just to be

Ruby Weekly News
53216 [Dave@Pr gm t] Ruby Weekly News: 10/14/2002

Recommend "Register Domain with only $14.95"
53217 [recomnd@pa d] register / renew and transfer domain (.com/.net/.org/.info/.biz/.us) with only $14.95

0 is true - how'bout "least surprises" ;-P (Was: Re: & operation and if statment)
53227 [ sz@sz sz hu] Er... Not that I couldn't fix my scripts (my server monitor
+ 53231 [tom.hurst@cl] Better to say "everything is true except nil and false" rather than
+ 53244 [bulatz@in eg] see str.index, for example. this is already used in language design
+ 53251 [B.Candler@po] One of the things I find annoying about Perl is having to write everywhere

Please check my algorithm
53230 [vinfoley@iq ] I have written an entry in Ruby, and I'd like to know if there are
+ 53236 [gsinclair@so] Without comments it's difficult to understand what you're trying to do, but I
+ 53238 [dblack@ca dl] That is quite a cool one.
  53365 [martindemell] ISBN_RE.match(self) &&
  53403 [michael_s_ca] Was the intent here to shorten the code to beyond obfuscation threshholds?
  + 53406 [billtj@z. lu] Well, I personally do not object obfuscation as long as it is
  + 53447 [martindemell] Nope, just to use two injects rather than an accumulator (which was
  | 53459 [michael_s_ca] Yeah, I apologize for my tone there; I didn't mean to come across as
  | + 53463 [dblack@ca dl] OK, then I apologize for the somewhat icy post that just crossed in
  | + 53517 [martindemell] 'Sok, though I must admit I was taken aback.
  |   53536 [michael_s_ca] Point well taken.  It might be a good idea sometimes however for
  + 53461 [dblack@ca dl] I don't there exists some particular code-length threshhold, to drop

Test unit stuff...
53233 [austin@ha os] I am preparing a couple of packages for release on RAA (they are
53237 [jweirich@on ] Yes it is.  The packages have been combined and RubyUnit is no longer
53262 [chrismo@cl b] IIRC,
53266 [Mark.Volkman] ...

[ANN] MIME::Types for Ruby (1.003)
53240 [austin@ha os] I have just reimplemented MIME::Types for Perl (1.003) in Ruby. I

SNIPPET: Sliderule simulation.
53242 [phlipcpp@ya ] Here's the latest in my series of irrelevant irreverent TkCanvas sample

53245 [smardl@ya oo] My name is Luc, and I want to share with you a MONEY

How to undefine a method on the fly?
53255 [mfraser@se s] class Hello
+ 53259 [decoux@mo lo] class << x
+ 53270 [bilotta78@ho] Could a workaround be to re-define/overload the method so that it

extensions in C++ (iostream)
53258 [0bz63fz3m1qt] Has anyone experience with or knows how to get iostream
+ 53261 [kentda@st d.] Agh! Use std::cout, std::endl etc or a "using namespace std".
| 53264 [0bz63fz3m1qt] ruby/ext> g++ -shared -Wl,-soname,Test.so -L/usr/local/lib -o Test.so test.o -L. -lruby -lc
+ 53263 [decoux@mo lo] Change the call to `cc' by a call to `c++' i.e.
  53265 [0bz63fz3m1qt] it does the trick, thanks alot.  Im a happy man ;-)

OT: MacOS seminar for *nix geeks
53267 [canyonrat@ma] A friend of a friend is putting on a free online seminar for those

53268 [binishbabu@s] off

Re: mingw install
53271 [probertm@no ] This is quite strange.  I am using MSYS package 1.0.8 which includes
+ 53434 [tpeters@in a] I have no windows near to check, but I remember to have read in one of the
+ 53469 [probertm@no ] Earnie says: "It offers only a user land environment for MinGW development."

Last minute RubyConf Registration
53272 [pabs@pa lo r] I just noticed the registration for the RubyConf 2002 has closed.  Is

[ANN] FXRuby-1.0.14 Now Available
53274 [lyle@kn lo y] I am pleased to announce the latest release of FXRuby, the Ruby language
+ 53283 [hal9000@hy e] <foxgui-announce@lists.sourceforge.net>;
| 53294 [lyle@kn lo y] I believe this bug was fixed in the latest exerb release (version 2.2.0),
| 53302 [hal9000@hy e] Oh, pardon me. I thought this was a limitation
+ 53286 [ian@ca ib n.] FXRuby.cpp:258: cannot convert `VALUE' to `void *' for argument `1' to `rb_gc_mark (void *)'

async system call on Windows?
53275 [chrismo@cl b] I need a way to thread a system call to Windows without having the entire
53369 [chrismo@cl b] Following up...
53401 [sdate@kc rr ] I am interested in learning from your Ruby code ... if it is available for
53505 [chrismo@cl b] Sure - here you go. Thx to Phil Tomson for posting a version of his
53627 [sdate@kc rr ] Thanks a lot !

Ruby on OSX
53276 [bobx@li ux a] If you have OSX can you tell me what version of Ruby is installed? Also have
+ 53279 [paul@No pA .] [pjs@chaos pjs]$ ruby -v
+ 53280 [canyonrat@ma] I.6.7 I haven't personally tried 1.7.3 since the OS was updated from

Module.extend_object aFixnum
53277 [ahoward@fs .] rubyists (we need something like 'perl mongers') -
53281 [dblack@ca dl] How about... "rubyists"? :-)
53288 [ahoward@fs .] my understanding (explained to me on this group) is that anytime an object is

ruby-dev summary 18458-18504
53278 [maki@ru yc l] Sorry to post so late. This is a summary of ruby-dev ML
+ 53306 [decoux@mo lo] Well, because I've a modified version which test this, here the result for
| + 53307 [nobu.nokada@] At least, yes for lib/optparse.rb.
| | 53308 [decoux@mo lo] lib/fileutils.rb also I think
| + 53329 [pbrannan@at ] i = 0
|   + 53330 [decoux@mo lo] Read [ruby-talk:53308] you don't find something strange ?
|   | + 53336 [angus@qu va ] st = r = w = nil
|   | | 53400 [aamine@lo er] It is there just because for peephole optimization.
|   | | 53404 [billtj@z. lu] This looks to me like some performance fine tuning which is achieved
|   | + 53339 [pbrannan@at ] Yes, it does look strange.  Why bother assigning nil to r and w if the
|   |   53343 [gsinclair@so] again, their collected experience in Ruby would cause them to write them in a
|   + 53332 [batsman.geo@] Speed :-P
+ 53320 [batsman.geo@] If this is now considered "bad style", why was it allowed at
  + 53323 [decoux@mo lo] Well, the latest that I know is [ruby-talk:52440] where there is
  + 53324 [matz@ru y- a] Because I was stupid.  This is bad manner.

53282 [grzegorz@cs ] I have a problem.  I am using apache with mod_ruby and eruby.
53310 [hwyss@yw se ] Greg,

Porting a CRC function to ruby
53284 [namille2@vt ] I'm a bit new to Ruby and I'm having trouble porting a CRC function from C++
+ 53304 [billtj@z. lu] The problem is not signed vs unsigned.  The problem is, given an int, the
| 53386 [namille2@vt ] Thanks for the insight. I tried my suggestion of masking off all but the
| 53392 [billtj@z. lu] I think in Ruby it is for efficiency purpose.  Ruby internal C
+ 53667 [bulatz@in eg] instead, use "return 65535-aCrc"

53285 [whitton@at a] There's an interesting article on IBM developerWorks about a new program
+ 53287 [ptkwt@sh ll ] It's an interesting idea, but first we need a bytecode interpreter.  As it
| + 53325 [nat.pryce@b1] Why would it not be possible to compile the AST to native code?  That's
| | 53351 [justinj@mo i] The real problem is that Ruby is so dynamic.  This is great for programmers
| | + 53353 [ndrsbngtssn@] It may be faster to JIT-compile bytecode into native code than doing it
| | | 53363 [mikkelfj-ant] That's
| | + 53357 [billtj@y. lu] Totally agree.
| | + 53361 [nat.pryce@b1] Sorry, I wasn't clear.  I meant why would it not be possible to
| | + 53362 [mikkelfj-ant] better
| |   53366 [Dave@Pr gm t] Not really....
| |   + 53370 [pbrannan@at ] Why allow the user to change the definition of Fixnum#+ to begin with?
| |   | 53374 [Dave@Pr gm t] I don't know about '+', but I quite often change definitions of
| |   | 53375 [pbrannan@at ] 1) I don't think that modifying any class that you didn't write is EVER
| |   | 53391 [hal9000@hy e] I don't agree, but I'm not passionate about it either way.
| |   | 53393 [billtj@z. lu] As I am more into "performance" than "purity" (such as everything should
| |   + 53387 [mikkelfj-ant] True.
| + 53348 [mikkelfj-ant] I'd rather see a proper native code compiler. JIT's are not that great,
+ 53321 [batsman.geo@] It's already been talked about in this list, in

OSX file extension
53289 [bobx@li ux a] I was just perusing some OSX sites and reading a REALbasic review when lo
53299 [canyonrat@ma] It does cause some problems if you have REALbasic on the Mac. A lot of
53314 [peter@se an ] Real Basic is the product of http://www.realsoftware.com/ which has no
+ 53337 [canyonrat@ma] I have the Office v 10 upgrade CD with the REALbasic promo right in my
| 53340 [peter@se an ] So your saying that RealBasic doesn't come with the macintosh at all but
| 53371 [canyonrat@ma] Exactly.
| 53465 [bilotta78@ho] Get OpenOffice.org
+ 53356 [canyonrat@ma] I have the Office v 10 upgrade CD with the REALbasic promo right in my
+ 53372 [canyonrat@ma] I have the Office v 10 upgrade CD with the REALbasic promo right in my

Re: [Fxruby-announce] Re: [ANN] FXRuby-1.0.14 Now Available
53290 [lyle@kn lo y] The corrected prototype for rb_gc_mark() [from the latest CVS sources
53313 [ian@ca ib n.] Thanks. That did the trick.

instance_eval & attribute accessors
53291 [austin@ha os] There appears to be some bizarre behaviour with instance_eval with a
+ 53293 [austin@ha os] After writing this, I realized what the problem was. It'd still be
+ 53295 [lyle@kn lo y] This is not a limitation of instance_eval(), it's just how Ruby works. Both

quick question
53292 [nemo@he lo r] Why does this not work in mod_ruby?
53311 [kentda@st d.] It might be the wrapping of the mod_ruby code in an anonymous namespace
53326 [nemo@he lo r] That is rather odd, and seems to go counter to my point above.
53344 [kentda@st d.] Been a while since I touched mod_ruby, but I seem to recall that require

Max. size of unnamed pipe size.
53296 [hyukjoon@e5 ] Does anybody know how to calculate the max buffer size of unnamed pipe?
53341 [angus@qu va ] In Linux it is a constant PIPE_SIZE == 4096.

Interfaces in Ruby
53297 [web2ed@ya oo] Is there a way to write/inforce interfaces in Ruby like one can using
+ 53300 [canyonrat@ma] I don't think C++ abstract classes are that similar to Java interfaces.
| 53334 [pbrannan@at ] Not having used Java interfaces extensively, I can't speak about their
| + 53342 [gsinclair@so] The confusion arises because if you mix in a module, it effectively becomes
| + 53350 [canyonrat@ma] It's just that the contract is used as a weak form of multiple
|   53379 [pbrannan@at ] I think that MI can be used to implmement the contract, but that does
|   + 53396 [staypufd@au ] Doesn't the fact that a class mixes in the mixin satisfy goal number 2?  I
|   | 53407 [jweirich@on ] The reason you can't have Java interfaces provide implementation has
|   | 53411 [staypufd@au ] Weak typing allows the code to work on any object though.  In Eiffel, the
|   | 53416 [jweirich@on ] Its not type conflicts that you worry about, but name conflicts.  And
|   + 53397 [canyonrat@ma] I was just  expressing the conventional wisdom. See for example, Sun's
|     + 53410 [jweirich@on ] An abstract class in C++, with all pure virtual methods and no data, is
|     | 53415 [canyonrat@ma] Yes it is. In that case, they are functionally equivalent.
|     + 53468 [pbrannan@at ] I think I was mistaken to call this "generic programming," which is
|     | 53479 [canyonrat@ma] Aha
|     | 53485 [pbrannan@at ] module Foo1
|     | 53506 [canyonrat@ma] ...
|     | 53521 [pbrannan@at ] I think your diagram here is slightly off.  Ruby has only single
|     | 53530 [canyonrat@ma] I consider mixins to be a *form* of MI. I would go so far as to say
|     | 53549 [pbrannan@at ] 1) No two modules mixed into the same class provide two methods with
|     + 60464 [bob.news@gm ] "Chris Gehlker" <canyonrat@mac.com> schrieb im Newsbeitrag
+ 53301 [ptkwt@sh ll ] class AbstractException < Exception
+ 53335 [pbrannan@at ] but as I use Ruby more and more, I see less and less use for this.
  53409 [web2ed@ya oo] This is what I was getting at.  Nice code.  Why do you feel that this
  + 53412 [staypufd@au ] On 10/16/2002 11:08 PM, in article
  + 53470 [pbrannan@at ] [ruby-talk:51906]
    + 53475 [austin@ha os] Wouldn't DbC take care of this?
    + 53514 [list@NO PA c] [Not strictly related to your post, Paul, just blatantly taking some
      + 53522 [pbrannan@at ] The intent of an interface is not to cerfity a particular behavior.  It
      | + 53523 [list@NO PA c] Fair enough.  Still it bothers me that classes are `branded' with a
      | + 53524 [jason@jv eg ] This is true of Java interfaces, but Design By Contract does make
      | | 53607 [gsinclair@so] "Reify" is a word I had encountered once.  In a dictionary.  Becuase someone
      | + 53529 [nat.pryce@b1] Isn't that the point of comments and/or documentation.  I'd argue that
      | | 53550 [pbrannan@at ] There are some days that I agree.
      | | 53551 [nat.pryce@b1] That's true, but interfaces don't help you, and DbC only gets you part
      | | 53600 [jweirich@on ] I'm not sure I understand the above comment.
      | | 53682 [nat.pryce@b1] Often, when designing classes you define a protocol by which calls can
      | | + 53690 [jason@jv eg ] [snip code example]
      | | + 53820 [jweirich@on ] [... socket example elided ...]
      | | | 53852 [staypufd@au ] On 10/22/2002 7:27 AM, in article 1035289773.8156.27.camel@traken, "Jim
      | | + 60465 [bob.news@gm ] "Nat Pryce" <nat.pryce@b13media.com> schrieb im Newsbeitrag
      | + 53534 [alwagner@tc ] There is no way to certify that an author's intent is reflected in his code.
      + 53533 [alwagner@tc ] Thank you.  Finally, this discussion is getting down to it's philosophical