633-867 subjects 1030-1293

^ Thread concurrency issue
0799 [ekarak image] I've been occasionally stumbled upon a strange problem with Ruby's

^ class of $1, $2 in 1.8.0
0801 [dblack candl] * re.c (rb_reg_match_pre, rb_reg_match_post, match_to_a,
+ 0802 [nobu.nokada ] Formerly, they were not thourough.
| 0803 [dblack candl] I'm not sure what you mean here.
| 0804 [matz ruby-la] Could you describe your error with concrete code?
| 0805 [dblack candl] Sure.  I'll give a simplified (but working) example, so as to avoid
| 0806 [jlst gettysg] This regexp change is actually very cool.  I've got some ugly code that
| 0807 [matt lickey.] At the risk of a "me too" post, I have the same thoughts.  Code should
| 0808 [dblack candl] (Replying to two posts here.)
| 0809 [rpav nwlink.] *  There shouldn't be a reason to define "well-known"... as a
| 0810 [dblack candl] We're getting tied in unnecessary and irrelevant knots here.
| + 0811 [rpav nwlink.] Perhaps not, but IMHO it's more useful to have the new behavior.
| | 0813 [dblack candl] That means that if in 2.0 we go back to having Regexp#match provide
| + 0812 [jlst gettysg] I'm sure someone else on this list could provide you with a better
| | 0814 [dblack candl] Even if the new class is specialized, substrings of it may not be
| | + 0817 [rpav nwlink.] Waitaminute there.  It doesn't make sense for another reason.  A Name
| | + 0861 [matju sympat] To me, it doesn't seem logical for the Name class to exist; a Name may be
| |   0863 [dblack candl] Keep in mind that my point has nothing to do with advocacy of
| |   + 0864 [jlst gettysg] There was a recent update to the current 1.8 which might be of use
| |   + 0865 [matz ruby-la] I'm going to punish nobody about this issue. ;-)
| |   | 0866 [jlst gettysg] That would be great.  Array#to_ary works the same way?
| |   | 0868 [matz ruby-la] Yes.  I should have mentioned.  And Hash#to_hash as well.
| |   + 0869 [matju sympat] Although I think my point was worth making, I think it's also true that
| + 0815 [nobu.nokada ] $ ruby-1.6 -e 'class S<String;end; p S.new("abc")[1..2].class'
| | 0816 [dblack candl] => A
| | 0818 [nobu.nokada ] Enumerable#map always returns Array regardless its receiver.
| | 0819 [dblack candl] Right -- I'm just wondering why the "regardless-of-receiver" principle
| | 0820 [nobu.nokada ] In this case, the returned object isn't concerned with the
| | 0821 [dblack candl] OK, but why is a subcomponent always (logically) the same class as the
| + 0822 [matz ruby-la] The behavior has been altered due to the request that subrange
+ 0870 [matz ruby-la] First of all, I examined scanf-1.0.0, and had a conclusion that the
  0871 [dblack candl] Thanks.  You are now an honorary member of the Austin Ruby

^ Little Bug in cgi.rb
0823 [flori nixe.p] If I want to inherit from class CGI the at_exit hook complains about
0824 [nobu.nokada ] I guess this expression never come true.  It should be
0825 [flori nixe.p] You're right. I also used this constant when I patched this in my lib

^ Methods to get at Source References
0843 [brent mbari.] I'm trying to add the ability to view and edit source

^ Alternate GC ?
0851 [matju sympat] I think I recall that Ruby 1.8 was supposed to get a new garbage
+ 0852 [ekarttun cs.] There exists a patch which implements a non-copying generational GC
| 0873 [matju sympat] Now that I think of this some more...
| 0880 [matz ruby-la] It is hard to say, but in general, it dramatically improves memory
+ 0857 [matz ruby-la] I have a generational GC patched Ruby 1.7.0 dated 2000-12-29.  I think
  0874 [matju sympat] The patch on masato's page is dated 2001-06-19.

^ RCR:  Add __file__ and __line__ methods to Method and Proc classes
0872 [brent mbari.] This is a multi-part message in MIME format.
0881 [matz ruby-la] First of all, I said I would fix, but I haven't.  Sorry for this.
0882 [nahi keynaut] It seems reasonable for me at the point that
0883 [brent mbari.] I think that, in general, a definition may start
0884 [matz ruby-la] * make eval("[__FILE__,__LINE]", proc) work, which I already did in
0888 [matz ruby-la] Fine, thank you.

^ OpenSSL for Ruby 0.2.0-pre0
0875 [michal rokos] After a long while, I managed to prepare preview of OpenSSL for
0876 [knu iDaemons] I tried to compile it on my FreeBSD 5.0-CURRENT box and got the
+ 0877 [decoux moulo] Well, if I'm right SUSv2 define
+ 0878 [akr m17n.org] Call Time.utc, using rb_funcall.  Because mktime(&tm) - timezone may
  0879 [michal rokos] thank you all for the feedback.

^ Internal node MEMO (fwd)
0885 [feldt ce.cha] Sorry for multiple posts but this should probably be in here instead of in
+ 0891 [rich infoeth] Robert,

^ Re: Digest Articles 883-884 (1/1) (ruby-core ML)
0887 [brent mbari.] If you are not concerned about the unlikely possibility of

^ Bob Jenkins' hashing implementation in Ruby
0889 [batsman.geo ] Just hacked it.
+ 0892 [decoux moulo] Apparently, you have not modified string.c (rb_str_hash()) it's normal ?
| 0893 [batsman.geo ] I only changed the hash in st.c (and propagated side effects in num_bins
| 0894 [decoux moulo] Yes, I think this is the replacement of '%' by '&' which make it faster
| 0895 [batsman.geo ] You mean you have already changed string.c and now it's slower?
| 0896 [decoux moulo] one-at-a-time
| 0897 [batsman.geo ] Yes, much slower. Jenkins is obviously even worse :(
| + 0898 [nobu.nokada ] Instead, use -funroll-loops option for gcc.
| | 0899 [batsman.geo ] Duh!
| | + 0900 [nobu.nokada ] Just it has not been considered necessary yet, I guess.
| | | 0901 [batsman.geo ] If it's faster and simple enough, it's good, isn't it?
| | | 0908 [matz ruby-la] No one every tried and proved.  If somebody come up with the benchmark
| | + 0902 [decoux moulo] Well, if I'm right this is the OZ's sdbm hash and it was unrolled (in gawk)
| + 0904 [matju sympat] All this manual unrolling may have some effect, but wouldn't it be much
+ 0903 [matju sympat] The point of modulo-big-prime is that you minimize the chance that a bad
  0905 [batsman.geo ] I was assuming we would use a good hash function...

^ [Patch] String and (repost) MemLeak
0890 [michal rokos] 1 memleak hasn't been fixed - I (still) think that there could be a
+ 0906 [nobu.nokada ] Yes, it occurs very rarely, but does occur.
+ 0907 [matz ruby-la] Thank you for fixing memleak.  But I don't think string length
  0909 [michal rokos] You're welcome!
  0910 [matz ruby-la] I consider (or designed) str_new(0, len) as allocation of string
  0911 [michal rokos] You're probably right - if programmer wants garbage he gets it... But I
  0912 [matz ruby-la] Cost is nothing, I agree.  But if a programmer gets a zero length
  0913 [michal rokos] I think it's correct - lenght is zero, but capa is correct. The
  0914 [matju sympat] the point of str_new(0,n) is to be able to create a string of a known
  0915 [michal rokos] Actually I think you (and Matz) are right. Setting len to 0
  0916 [matz ruby-la] I think rb_str_buf() requires ptr not to be NULL, so that check isn't
  0917 [michal rokos] Hmm,

^ [1.8.0-preview2] make install
0918 [decoux moulo] Sorry to say this, but 1.8.0 seems to have a problem see

^ Embedded Object Oriented Database for Ruby
0919 [knizhnik gar] I would like to announce embedded object oriented database for

^ [1.8] delegate.rb, tk.rb, ...
0920 [decoux moulo] Apparently some modules are not updated for the exception
0921 [matz ruby-la] Thank you for pointing out the problem.

^ Win32 popen3
0922 [rich infoeth] I was wondering what the current status of getting popen3 working under
0925 [nobu.nokada ] Instead, I'm considering that popen (and system, maybe) should
0926 [rich infoeth] Thank you for your reply...

^ Possible inconsistency in IO
0923 [dave thomase] This is pretty trivial, but IO.new warns if it is passed a block, but
0924 [matz ruby-la] Possible inconsistency in IO

^ UnboundMethod#to_proc
0927 [dave thomase] I'm wondering what I can do with a Proc generated by
0928 [matz ruby-la] % ruby -e 'Kernel.instance_method(:printf).to_proc.call("foo")'
+ 0929 [nemo hellotr] so, bind UnboundMethod first, then call to_proc.
| + 0930 [matz ruby-la] Orthogonality, I may say.  There's no strong reason behind it, just a
| | 0932 [nemo hellotr] Orthogonality, I may say.  There's no strong reason behind it, just a
| | 0933 [matz ruby-la] I shouldn't have used the word "check".  This must be much clearer than
| + 0934 [matju sympat] If they have diverging interfaces such that the contracts conflict with
|   + 0935 [dave thomase] I was just about to post the same thing: gaving UnboundMethod inherit
|   + 0940 [chr_news gmx] That would violate Matz ``less-class-ism''  and it is not very difficult
|     0941 [dave thomase] Not necessarily: I don't believe that Unbound should inherit from
|     0942 [matz ruby-la] Not necessarily indeed.  It's just because implementation
|     + 0943 [dave thomase] Could 'arity' be a mixin?
|     | 0947 [matz ruby-la] Making a new Mix-in is kinda against "less class (module this case)
|     + 0944 [ged FaerieMU] It's also convenient when you are testing for a method object and you
|       0946 [dave thomase] Except the two are really very different classes of things: are there
|       0950 [ged FaerieMU] I thought I'd used Methods and UnboundMethods before in a section of
+ 0931 [dave thomase] But then to_proc is being called on a Method, not an UnboundMethod. If

^ docs on implementation of ruby and/or ruby-gc ?
0936 [Ruben.Vandeg] I already sent this to ruby-talk, but maybe ruby-core is a more
0937 [matz ruby-la] Perhaps, but it will be same person to answer anyway.
0938 [batsman.geo ] I am confused... Is 1.9 (1) the development branch that will lead to Rite
0939 [matz ruby-la] 1.9 will be based on the current implementation, and will be the

^ Is this an intended change in string interpolation
0945 [dave thomase] irb(main):002:0> /c(a)t/ =~ "cat"
+ 0948 [jim freeze.o] Hmm, I thought a variable name could only start
+ 0949 [matz ruby-la] From CVS history, I allowed variables like "$1ve" on 2000-04-10.  The

^ Creating thread safe classes for Ruby
0951 [knizhnik gar] I want make my class correctly executed in multithreaded environment.
0952 [matz ruby-la] Unfortunately mutex does not support nested lock, so that if your

^ Unbound methods (again)
0953 [dave thomase] You're going to hate this, but there's one more wrinkle with

^ Patch for UnboundMethod in define_method
0954 [dave thomase] Attached is a trivial patch to allow UnboundMethods as a parameters to
0955 [matz ruby-la] Point taken.  I will merge your patch.

^ String.allocate etc...
0956 [dave thomase] Just wondering... why are the .allocate methods public? Using them, I
0957 [rpav nwlink.] THIS IS GOOD.  (Actually.)  ;-)  It allows one to allocate an object,

^ [patch] fileutils.rb - bug in 'rm_r'
0958 [holmberg iar] I believe there is a bug in the "FileUtils.rm_r" method.
0962 [matz ruby-la] Thank you.  I will merge your fix.
0963 [aamine lover] I have merged his patch now.

^ Flex reentrant?
0959 [michal rokos] * As you may see, flex scanners have become reentrant, the c++ versions
0960 [matz ruby-la] No, Ruby does not use flex at all.
0961 [michal rokos] Ah, of course! My bad... Sorry.

^ Range in logical context
0964 [dave thomase] If I run
0965 [batsman.geo ] I guess so.
0966 [dave thomase] I assumed that was referring to stuff with an implicit $_ or $., such as
0967 [nobu.nokada ] Exactly.  And some new nodes are not warned.
0968 [matz ruby-la] Oops, could you commit this fix?
0969 [nobu.nokada ] More thoughts about builtin literals, i.e., true/false/nil.
0970 [matz ruby-la] Agreed.

^ Regexp quoting (again)
0971 [dave thomase] I know this has been discussed at length, but could I put in a vote not
0972 [austin halos] I agree. vim recognises a bare ] properly, and I do a lot of my

^ problem with rb_rescue2() ?
0973 [matju sympat] is there any way i can trap exceptions in Ruby without going through
0974 [matz ruby-la] Unfortunately, no.
0975 [matju sympat] Good.
0976 [matz ruby-la] Hmm,
0977 [matju sympat] well, indirectly from... at the very least I'm not using neither

^ Cleaning up...
0978 [dave thomase] There an interesting situation developing. As people contribute
+ 0979 [mwilson13 co] I agree. Neatness counts.
+ 0992 [ian caliban.] At the very least, the docs should deprecate one and advocate the other.
+ 0993 [matz ruby-la] I admit I haven't paid attention to the libraries as much as I should
  0994 [dave thomase] I don't know about discussion leader, but I've put a few wiki pages up
  0997 [matz ruby-la] I wanted to say "will somebody take the role of discussion leader?"

^ Possible big in ipaddr.rb
0980 [dave thomase] def include?(other)
0981 [matz ruby-la] Seems right.  You just commit your fix to the CVS.  You may want to
0989 [knu iDaemons] I'm sure he is.  I've just pointed him to this list's archive, so we

^ IPAddr patch
0982 [dave thomase] It looks like I can't commit patches to /src/ruby, so I'm posting them
0983 [nobu.nokada ] These printf's are for debug?
0984 [dave thomase] These printf's are because I'm a fool! :)   Sorry - during the confusion

^ 0 prefix in floats ?
0985 [matju sympat] .5
0986 [chris darkro] I suspect it's to remove ambiguity so the .5 can't be confused by

^ IPaddr design
0987 [Stephane.DAl] I've seen there is some work done on ipaddr, for the ruby version 1.8,
0988 [matz ruby-la] Contact their author first.  If you don't get their reply, let us
0990 [ume mahoroba] Since I was not on the list, knu-san notified me of your mail.  So,
0991 [sdalu sdalu.] thank you.

^ Mathn crashes the interpreter on PPC
0995 [dave thomase] ruby -r mathn -e 'p((-1/2)**3)'
0996 [dave thomase] ruby -I. -rrational -rcomplex -e 'p 2**2'
+ 0998 [matju sympat] ruby -r mathn -e 'p((-1/2)**3)'
+ 0999 [batsman.geo ] Maybe it's related to this: [ruby-talk:68937].

^ CGI::Session generating blank IDs?
1000 [rpav nwlink.] Hmm, for some reason the latest CVS's CGI::Session seems to be

^ CGI issue (was: CGI::Session generating blank IDs?)
1001 [rpav nwlink.] Of course, not long after posting I figure this out.  Figures.

^ CGI::Session generating blank IDs => Another CGI problem
1002 [rpav nwlink.] Replying to myself yet again.  However, it appears there have been
1003 [matz ruby-la] I'm sorry, I forgot to update cgi/session.rb

^ irb doesn't work, because tempfile doesn't work
1004 [dave thomase] Try
1005 [matz ruby-la] delegate.rb should have been fixed after 'instance_methods' change.
1006 [dave thomase] FWIW, I always thought that Object#methods should have accepted a
+ 1007 [matz ruby-la] Interesting!  As I told you in the personal message, I thought
| 1008 [dave pragpro] We can look at it the other way around: what is the cost of making the
| 1010 [matz ruby-la] Sounds nice.  I was too quick.
+ 1009 [jim freeze.o] So, instead of recurse, why not depth.

^ [patch] "_FILE_OFFSET_BITS redefined" warning on Solaris
1011 [holmberg iar] When I compiled Ruby on Solaris 2.8 today I noticed some strange
1012 [matz ruby-la] Thank you.  I will merge this.

^ mutex_m and thread
1013 [dave pragpro] Currently we have two parallel implementations of mutex, one in
+ 1014 [stillflame F] Does Sync from sync.rb count as another one?
| 1015 [dave pragpro] Not really - the mutexes in thread and mutex_m have identical
+ 1016 [matz ruby-la] Mutex_m does much work than plain Mutex, so that I think it's

^ ext/syck problems
1017 [usa osb.att.] ext/syck was imported to the repository, however, we can see
+ 1018 [ruby-core wh] Yes, let's go through these and get them extinguished.
| + 1019 [usa osb.att.] I'm noticed that some ext/digest/* modules already use ANSI function
| + 1020 [matz ruby-la] We can assume yacc (or bison).  I have no knowledge about re2c.  Is
+ 1031 [akr m17n.org] I found other problems.
  1033 [ruby-core wh] Checked into CVS.

^ fsync() on win32
1021 [ndrsbngtssn ] I'm wondering about the status of the win32 port. It seems much faster
1022 [usa osb.att.] Hmm, I will implement it on 1.8.
1023 [ndrsbngtssn ] Thank you!

^ Syck in ext/Setup*
1024 [ruby-core wh] Yes I will, thanks.  Can I verify with someone that the extension is

^ Syck  warnings
1025 [dave pragpro] handler.c:42: warning: passing arg 3 of `st_lookup' from incompatible

1026 [matju sympat] I think that the whole of Ruby should move to ANSI. I don't know of any
1035 [lyle knology] The lack of ANSI C prototypes in the public header files has also presented

^ re2c
1027 [austin halos] The home, tildeslash.org/re2c/, appears to be down. It looks like an
1028 [dave pragpro] I'm mildly concerned about havinng something in the standard library
1029 [ruby-core wh] Implicit.re will be a snap to rewrite with the ruby_yylex()'s case
1032 [dave pragpro] I wasn't necessarily saying that you should go to all this work: I just