69446-70011

69249-69933 subjects 69703-70768

Does File or FTools support rm -rf?
69446 [jim@fr ez .o] system("rm -rf <dir>")
69496 [holmberg@ia ] Try

ruby-dev summary #19958-20019
69447 [maki@ru yc l] This is a summary for last week on the ruby-dev mailing list.

ruby mode for JED?
69454 [probertm@NO ] Does anyone have a working ruby-mode for Jed?

regular expressions
69470 [nemo@he lo r] When I first learned regular expressions, they were no problem.  It was in a
+ 69471 [batsman.geo@] # string to match
+ 69474 [dcarrera@ma ] Well... there sort of are other styles, but not really...
| + 69484 [botp@de mo t] [snip cool samples :-]
| + 69499 [steink@pi g.] It's little more difficult. First you shouldn't mix wildcards and regexp,
+ 69501 [bob.news@gm ] "Chris Pine" <nemo@hellotree.com> schrieb im Newsbeitrag
+ 69503 [Arthur Chanc] To a great extent the Perl way with regexps is the Unix way - a terse
| 69511 [hal9000@hy e] [snip interesting SNOBOL stuff]
| 69526 [Arthur Chanc] [Me wittering about Snobol]
| 69537 [hafu@ma ni g] Ha... don't take it personally. I'm constantly reminded that
+ 69509 [nemo@he lo r] Hmmm...  I really like what he has to say on his webpage, but that is just
  + 69510 [nemo@he lo r] Oops!
  + 69513 [hal9000@hy e] Very interesting. Refer to the post I just made
    + 69514 [wtanksleyjr@] I know what you mean -- they just aren't nice.
    + 69516 [nemo@he lo r] myreg = RegexLang.new(<<EOF)
    | 69517 [hal9000@hy e] Glad we're thinking alike... maybe this idea
    | 69519 [dblack@su er] I have a few questions -- sort of just "academic" interest, as I am
    | 69535 [hal9000@hy e] I'll give you my opinion, speaking for no one
    | + 69545 [nemo@he lo r] I'd like to write a complex regex in a more readable
    | | + 69547 [nemo@he lo r] Oops.
    | | | 69553 [vangczung@ya] I'm not sure how regexes handle these things internally (and, yes, it
    | | + 69551 [nemo@he lo r] Not to get too ridiculous replying to myself here, but...
    | |   69556 [michael_s_ca] Right.  Backreferencing (IIRC) makes RE's not entirely "regular".
    | + 69546 [dblack@su er] Hmmm....  I guess readability is in the eye of the beholder.  Give me
    | + 69549 [djberge@qw s] phoneregex = /
    |   69550 [djberge@qw s] phoneregex = /
    + 69521 [akr@m1 n. rg] It can be used as
      69532 [hal9000@hy e] That is very interesting. I have never
      69567 [akr@m1 n. rg] They have bit different syntax but represents same set.

[OFF-TOPIC] bogofilter (was: Re: Urgent Assistance)
69473 [spectra@de i] That's true.
69478 [dcarrera@ma ] 1)  How do I know if the system here is using procmail?  I know it's
69489 [batsman.geo@] It will unless your site's MTA doesn't honor it (happened to me) :)

1.8 cgi lib
69476 [ahoward@fs .] i've seen a few differences talked about in the 1.8 cgi lib, i'm developing

sorry (was: Re: [OFF-TOPIC] bogofilter )
69479 [dcarrera@ma ] I'd like to apologize.  I thought that the first [OFF-TOPIC]* email had
69490 [batsman.geo@] I fell into the trap too, so

NETRuby?  (Ruby for .NET)
69480 [revision17@p] I've been looking around for information about NETRuby (Ruby for

profile.rb overhead
69485 [tim@ba es id] I have a script.
+ 69492 [feldt@ce ch ] thats typical since it installs a trace proc which is invoked for each
+ 69502 [bob.news@gm ] "Tim Bates" <tim@bates.id.au> schrieb im Newsbeitrag

ANNOUNCE: RHDL-0.4.3
69487 [ptkwt@sh ll ] RHDL-0.4.3 is released.

Libxml SAX parser?
69494 [han.holl@pr ] I need to read XML documents from an open network socket.
69563 [sean@ch tt n] I haven't completed the SAX handlers, there's just some infrastructure
69584 [han.holl@pr ] No, I won't nag you about it. If you don't need it, you don't need it.
69648 [sean@ch tt n] Agreed.
69695 [han.holl@pr ] I don't doubt for a moment that you know libxml2 better than I, but the only

How long until 1.8?
69495 [google@to pa] Is 1.8 going to be released soon? What's left to be done?

Ruby Meetup space
69500 [jgreer@mi so] Greetings.

Help with state in CGI with Ruby
69505 [brett_willia] A few weeks back I helped write a small web application for some reporting
69520 [ahoward@fs .] it allows one to store arbitrary objects using cgi sessions.  sessions are

Roundoff problem with Float and Marshal
69518 [cilibrar@ug ] [1.5, 4.0/3.0].each { |a|
69522 [nobu.nokada@] What about just adding an extra digit than DBL_DIG?
69580 [cilibrar@ug ] [ patch follows ]
69609 [matz@ru y- a] This is caused by bad implementation of strtod that Ruby 1.8 uses (in
69615 [nobu.nokada@] Hmmm, it seems so.
69619 [matz@ru y- a] Wow, you're so fast.  Please commit this fix.
69623 [nobu.nokada@] Since it was wrong a little, I fixed and committed it.
69651 [cilibrar@ug ] Hmmm interesting numerical developments.  I continue to test it by
+ 69662 [jim@fr ez .o] I hope your tests are being added to some set of unit tests
| 69663 [0bz63fz3m1qt] [snip testcode]
+ 69670 [matz@ru y- a] It's the limitation of base 10 representation of float values that
  69673 [nobu.nokada@] I'd tried C99 style hexadecimal float.  I expect this is
  + 69674 [phasis@bc in] How about pack unpack method? Not Portable?
  | 69675 [nobu.nokada@] Packing float is not portable at all.
  + 69677 [matz@ru y- a] frexp(), ldexp() dependence is OK, since Ruby uses them in math.c
  + 69687 [cilibrar@ug ] I have implemented the idea I gave earlier.  I had to use 2 bytes to
    69691 [matz@ru y- a] Interesting.  Is this endian safe, i.e. does this work properly on
    + 69696 [nobu.nokada@] No, unfortunately, and assuming binary format is less portable.
    | 69702 [cilibrar@of ] My patch is "convervative";
    | 69784 [nobu.nokada@] It works only with IEEE754.  It is the reason I called it "less
    | 69796 [cilibrar@of ] Firstly, I hope you are looking at the version of the patch that is most
    | + 69801 [nobu.nokada@] Yes, thank you.  I was wrong, and apparently missed
    | | 69808 [cilibrar@of ] Nobu writes,
    | | 69878 [cilibrar@of ] So, I checked out the latest version from CVS and it does seem to work.
    | | 69910 [nobu.nokada@] I agree with your friend, and posted patches at [ruby-dev:20071].
    | + 69804 [decoux@mo lo] I was trying to show that when you work with float you'll never test for
    + 69752 [cilibrar@of ] This is a tricky problem.  I have rewritten my patch in a way that I hope
      69753 [decoux@mo lo] The test was
      69754 [cilibrar@of ] I followed up with Guy on this, and it seems that my original test

[OT] Spam Filter (was Re: Urgent Assistance)
69523 [pabs@pa lo r] I use spamprobe (http://spamprobe.sf.net/) from my home directory on a

testunit, $DEBUG issue
69524 [djberge@qw s] Ruby 1.6.8

rhtml.vim
69525 [lists@de on ] Does anyone have a .vim for embedded ruby type things?
+ 69552 [google@to pa] You can use filetype=mason, which works but isn't perfect.
+ 69562 [invalid@in a] I have not done an awful lot with eruby, but it seemed to work pretty

Debugger not working in 1.8.0 snapshot
69527 [putsch@mx m.] ...
69528 [putsch@mx m.] It also seems a change introduced between at rev 1.37 of debug.rb makes
69530 [putsch@mx m.] (rdb:1) b PgSQL.rb:updateDisks

Drag and drop sample in Fxruby
69529 [ oct@zo .o g] ...
69533 [lyle@us rs s] By an astonishing coincidence, I've added a new tutorial about

example
69531 [student_vien] I'm goint to write a ruby extension for an extern hardware tool.
69534 [B.Candler@po] I don't know about good links... but if I were doing this, I would run the
+ 69559 [sdate@ev re ] messages,
+ 69579 [offstuff@ao ] I known this all (I'm using a thread now). I'm only searching for an
  69596 [B.Candler@po] - you can simply past a Proc object. It keeps all the bindings to the

[Q] Reg. Expressios with "\n"
69536 [dcarrera@ma ] I'm trying to match a regular expression on a string that contains
+ 69538 [hal9000@hy e] IIRC you can use the multiline modifier "m" on
| + 69539 [dcarrera@ma ] Thanks! that worked.
| | 69541 [michael_s_ca] Incidentally, if it's readability you crave, ("you" in the general
| | 69542 [dcarrera@ma ] Thanks.  I didn't know about the %r{} notation.  It really is nicer.
| + 69543 [emschwar@po ] But when parsing HTML, you probably shouldn't be using REs at all.
|   + 69544 [dcarrera@ma ] I'm just parsing the emails that I get from my hotmail-using friends.
|   | 69555 [emschwar@po ] The point isn't so much that (although it is a valid one), it's that
|   | 69557 [dcarrera@ma ] Definitelly.  I also believe in using the right tool for the job.
|   | + 69558 [emschwar@po ] The htmltest.rb file included with html-parser2 on RAA
|   | + 69576 [B.Candler@po] Using lynx to convert HTML to formatted ASCII is a good solution for the job
|   |   69630 [ jupp@gm .d ] Saluton!
|   + 69714 [pabs@pa lo r] I agree with the sentiment (that using REs to parse HTML, XML, etc)
+ 69540 [batsman.geo@] Multiline mode: /./m

[Q] Rubydoc
69561 [dcarrera@ma ] Could someone tell me how to read rubydoc documentation?
+ 69572 [surrender_it] try
+ 69589 [dave@pr gp o] If it's in rd format, there's a chapter on it in the PickAxe book. The

Newbie proc question
69564 [jamesvtoomey] Can anyone help reduce my confusion? I think I understand the "how" of
+ 69569 [nemo@he lo r] Can anyone help reduce my confusion?
+ 69575 [ptkwt@sh ll ] No, that wouldn't be much benefit.
| 69632 [gfb@to es ft] I would not call it unique -- as far as I understand, it came from Smaltalk,
+ 69577 [bob.news@gm ] "James Toomey" <jamesvtoomey@yahoo.com> schrieb im Newsbeitrag

Using Ruby to script a Swing app for functional testing?
69566 [pbooth@no oi] I have seen how easy it is to automate Windows apps with Ruby.
69573 [surrender_it] have youy thiught about jruby ?

How to test for text file
69568 [pNOeterSPAM4] In perl, -T <file> returns true if <file> is a text file and
69574 [matz@ru y- a] You have to define what is text file first.  Traditional Perl test
69706 [pNOeterSPAM4] Ah! Not having worked with Unicode before, I had not considered this.
69745 [austin@ha os] You could use MIME::Types [RAA:mime-types], which does a decent job

extension - redirect a block
69585 [student_vien] implement a callback function.
+ 69587 [decoux@mo lo] Well I've not understood : do you want to do something like this ?
+ 69590 [student_vien] Not really...
| 69592 [decoux@mo lo] Well there are 2 possibilities
+ 69604 [student_vien] hm....
| 69606 [decoux@mo lo] documented in eval.c
+ 69617 [student_vien] hm...
| + 69618 [0bz63fz3m1qt] If you want to use Hash for keeping track of your global
| + 69620 [decoux@mo lo] Well, you can look in bdb (common.c) and plruby but they are really badly
+ 69621 [student_vien] I already know how to use a hash and such things
+ 69627 [student_vien] uh, this works!

ANN: ri 1.8b
69595 [dave@pr gp o] - changes to various to_i and to_s methods to reflect the fact that the
69631 [Stephan.Kaem] Great!
+ 69634 [dave@pr gp o] Are you by any change using something like wget or curl? If so, you
| 69693 [Stephan.Kaem] May I ask what you use to uncompress tgz files on W2K?
| + 69698 [dave@pr gp o] tar :) (from cygwin)
| + 69699 [hal9000@hy e] WinZip works fine. It understands .gz and
| | 69715 [Stephan.Kaem] After trying about a dozen share- and freeware tools I realized that
| + 69709 [gfb@to es ft] You can try Stuffit Expander for Windows (http://www.stuffit.com/expander/).
| + 69717 [emiel@il fo ] Just like to throw in AlZip. Supports lots of formats; even more
+ 69635 [B.Candler@po] Follow the link manually. If you see a link which points at

Cryptic -w warning: ambiguous first argument; make sure ...
69611 [holmberg@ia ] str = "banana"
69616 [matz@ru y- a] * regexp as the first argument
+ 69622 [ahoward@fs .] the trend seems to be the poetry mode is evil, and being phased out.  is that
| 69629 [nemo@he lo r] the trend seems to be the poetry mode is evil, and being phased out.  is
+ 69860 [holmberg@ia ] Thanks for the explanation.
  69877 [billk@ct .c ] Just to chime in, I'd also agree that in idiomatic English, the

case statements and classes
69624 [nemo@he lo r] In general, I love the way case statement matching works.  I'm having
+ 69625 [dave@pr gp o] It's because the more common use is to compare objects with their
+ 69626 [dave@pr gp o] It's because the more common use is to compare objects with their
  69628 [nemo@he lo r] It's because the more common use is to compare objects with their

FreeRIDE 0.5.0 - problem opening files
69639 [info@mj is d] just donwloaded RC2 and it looks fine but I can not open Ruby files.
69641 [gour@ma l. n] You need to enable FXScintilla support in FXRuby. It is explained in Appendix B.
69690 [info@mj is d] thanks a lot. it works

why value?
69640 [    no@no no] on some extension project for win32 the funcions looks
69650 [vangczung@ya] In straight C,  VALUE foofunc()  essentially means to take (but,

Problems downloading RDoc - WAS: Re: ANN: ri 1.8b
69643 [Stephan.Kaem] No. I tried to download it with browsers (see below). And I'm pretty
69646 [lyle@us rs s] Another thing to check is the downloaded file size; the size for
69647 [Stephan.Kaem] Exactly the size of the files I got...
69649 [dave@pr gp o] If you have no luck, perhaps you could privately  e-mail the file you

Found New Storage Device
69644 [osicjrzn@nr ] Storage Device 1GB / 2GB Flash USB Drive

[swig] avoiding the module name
69645 [0bz63fz3m1qt] Here is my SWIG file (redirect.i) ...
+ 69652 [lyle@us rs s] Is there some reason you can't just 'include' the module, i.e. instead
| 69656 [0bz63fz3m1qt] Yes "include" can do it, but... read on
| 69666 [lyle@us rs s] This sounds a little suspicious ;)
| 69667 [0bz63fz3m1qt] it all becomes messy and non-intuitive.
| 69668 [0bz63fz3m1qt] I present 2 solutions for the "user"..
+ 69966 [0bz63fz3m1qt] Except for Lyle .. there does'nt seem to be anyone
  + 69967 [dcarrera@ma ] I don't mind if you avoid the first part.
  + 69985 [B.Candler@po] Missed the first part, but doesn't
  + 70007 [lyle@us rs s] Well, it's not a matter of opinion, it's just a matter of fact ;)
    70011 [0bz63fz3m1qt] true

What is base64.rb for? (from /usr/lib/ruby/1.6/base64.rb)
69654 [sroberts@un ] I note that it has a vestigial rfc2047 decoder for japanese (only!)
69665 [matz@ru y- a] It's there only because historical and compatibility reason.

Fw: Possible bug?
69672 [chadfowler@c] I'm having some trouble sending to ruby-core, so I'll send this here.  Sorry

Re: Possible bug?
69676 [usa@os .a t.] It's a bug (or spec) of some implementations of vsnprintf(),
69678 [nobu.nokada@] vsnprintf() and snprintf() are used many times.  And they are
69681 [usa@os .a t.] Is this problem only on win32 platforms?
69684 [nobu.nokada@] Other platforms which don't have them use missing/vsnprintf.c
69686 [usa@os .a t.] (1) Some platforms have the correct (set null at the end of buffer)
+ 69689 [nobu.nokada@] You're right.  But snprintf() is used so many times, isn't it
| 69694 [chadfowler@c] I forgot in my last mail to say "Thanks!"  Every so often, I'm re-amazed at
+ 69692 [chadfowler@c] I would suggest commiting the fix in the win32 port and then adding a
+ 69697 [abuse@du ch ] Can't one easily check in a configure script for that?

Warning: redefine instance
69680 [jbshaldane@h] Does anyone know why I am getting this warning?
69786 [jbshaldane@h] Just to clarify my question a little, the warning comes from this line
69797 [matz@ru y- a] Nice idea, thank you.
69903 [jbshaldane@h] I noticed you changed singleton.rb, but you only changed the code on
69904 [matz@ru y- a] Thank you.

newbie question
69682 [emmanuel.tou] Sorry, it's probably a very basic question, but I can't find the answer on
69683 [kentda@st d.] Check out line 1 in poptv.rb.
69685 [emmanuel.tou] oh, yes, thank you...

Biased weighted random?
69700 [hal9000@hy e] Just thinking again about randomness.
+ 69705 [nemo@he lo r] Very interesting!
| 69708 [batsman.geo@] I believe too the right model is a Markov process (chain), given the
| 69713 [nemo@he lo r] There may be more than 1 transition matrix which works.  For a distribution
| + 69718 [nemo@he lo r] Looking at this again, it seems that the latter matrix is flawed.  Not only
| | 69727 [dcarrera@ma ] My bigger concern is that those columns don't add up to 1.
| | + 69729 [batsman.geo@] The rows do. I guess the transposed is OK, then :-)
| | | 69760 [dcarrera@ma ] Oh, I see.  Yeah, I was thinking "Pu".
| | | 69774 [batsman.geo@] A distribution on the states such that the distribution at time n+1 is
| | + 69731 [nemo@he lo r] The idea I proposed was based on the objective of keeping the ratios the
| |   69759 [dcarrera@ma ] If you keep the ratios constant, the probabilities *must* change.  Take
| |   69764 [nemo@he lo r] If you keep the ratios constant, the probabilities *must* change.  Take
| |   69766 [dcarrera@ma ] Oops.  I was thinking of the example he wronte (which fit in one line).
| |   69767 [dcarrera@ma ] BTW, that was an embarassing mistake there.
| + 69721 [batsman.geo@] I have one idea too but I'd need something to solve linear equations
|   + 69724 [nemo@he lo r] That's *exactly* what I was doing!
|   + 69725 [nemo@he lo r] Here's my Ruby so far.  I'm still working on the second part.
|   + 69726 [nemo@he lo r] All right...
|     + 69728 [hal9000@hy e] the
|     | + 69730 [batsman.geo@] [ruby-talk:69721]
|     | | 69732 [hal9000@hy e] Well, I've noticed this much: If you plot the
|     | | + 69734 [nemo@he lo r] I've also noticed that for sufficiently strange
|     | | + 69778 [batsman.geo@] could you pass me those strange weights to see if it blows up the same
|     | + 69733 [nemo@he lo r] 1. Are you sure you want to call Daniel's method
|     |   69735 [hal9000@hy e] Ha, don't take it seriously. I'm just kidding,
|     + 69775 [batsman.geo@] I have been thinking about this for a while and even though I understand
|       69782 [nemo@he lo r] I have been thinking about this for a while and even though I understand
|       69785 [batsman.geo@] I would feel psychologically satisfied if the entropy rate was maximum.
|       69787 [nemo@he lo r] <snip very cool code>
|       69789 [batsman.geo@] The transition matrix above corresponds to these weights, got it
|       69809 [pit@ca it in] matrices used for Hal's problem of "biases weighted random"
|       69813 [batsman.geo@] I see that
|       69816 [nemo@he lo r] I see that
|       69837 [pit@ca it in] Ah, I see. This is indeed a harder problem. Thanks for the
|       69839 [hal9000@hy e] wanted an
|       69841 [nemo@he lo r] Well, I guess the problems are related. I see
|       69846 [hal9000@hy e] I see. In that case, I was not talking about
|       69850 [nemo@he lo r] Now, is there a good name for this function?
+ 69710 [dcarrera@ma ] Let 'entries' be a hash whose keys are the items and whose values
| 69711 [nemo@he lo r] Now they should never repeat.
| 69719 [hal9000@hy e] OK, it fails... but not miserably so.
+ 69716 [aredridel@nb] Track the last result, and lower the probablility of that particular one
+ 69737 [nemo@he lo r] You know, in talking with my wife about this, I think we have
  69742 [nemo@he lo r] So, I think I'm close.
  69783 [nemo@he lo r] So it's really close... any ideas?  And why the $@#! am I squaring the
threads.html
top