633-867 subjects 1030-1293
Thread concurrency issue
0799 [ekarak@im ge] I've been occasionally stumbled upon a strange problem with Ruby's
class of $1, $2 in 1.8.0
0801 [dblack@ca dl] * re.c (rb_reg_match_pre, rb_reg_match_post, match_to_a,
+ 0802 [nobu.nokada@] Formerly, they were not thourough.
| 0803 [dblack@ca dl] I'm not sure what you mean here.
| 0804 [matz@ru y- a] Could you describe your error with concrete code?
| 0805 [dblack@ca dl] Sure. I'll give a simplified (but working) example, so as to avoid
| 0806 [jlst@ge ty g] This regexp change is actually very cool. I've got some ugly code that
| 0807 [matt@li ke .] At the risk of a "me too" post, I have the same thoughts. Code should
| 0808 [dblack@ca dl] (Replying to two posts here.)
| 0809 [rpav@nw in .] * There shouldn't be a reason to define "well-known"... as a
| 0810 [dblack@ca dl] We're getting tied in unnecessary and irrelevant knots here.
| + 0811 [rpav@nw in .] Perhaps not, but IMHO it's more useful to have the new behavior.
| | 0813 [dblack@ca dl] That means that if in 2.0 we go back to having Regexp#match provide
| + 0812 [jlst@ge ty g] I'm sure someone else on this list could provide you with a better
| | 0814 [dblack@ca dl] Even if the new class is specialized, substrings of it may not be
| | + 0817 [rpav@nw in .] Waitaminute there. It doesn't make sense for another reason. A Name
| | + 0861 [matju@sy pa ] To me, it doesn't seem logical for the Name class to exist; a Name may be
| | 0863 [dblack@ca dl] Keep in mind that my point has nothing to do with advocacy of
| | + 0864 [jlst@ge ty g] There was a recent update to the current 1.8 which might be of use
| | + 0865 [matz@ru y- a] I'm going to punish nobody about this issue. ;-)
| | | 0866 [jlst@ge ty g] That would be great. Array#to_ary works the same way?
| | | 0868 [matz@ru y- a] Yes. I should have mentioned. And Hash#to_hash as well.
| | + 0869 [matju@sy pa ] 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@ca dl] => A
| | 0818 [nobu.nokada@] Enumerable#map always returns Array regardless its receiver.
| | 0819 [dblack@ca dl] 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@ca dl] OK, but why is a subcomponent always (logically) the same class as the
| + 0822 [matz@ru y- a] The behavior has been altered due to the request that subrange
+ 0870 [matz@ru y- a] First of all, I examined scanf-1.0.0, and had a conclusion that the
0871 [dblack@ca dl] Thanks. You are now an honorary member of the Austin Ruby
Little Bug in cgi.rb
0823 [flori@ni e. ] ...
0824 [nobu.nokada@] I guess this expression never come true. It should be
0825 [flori@ni e. ] You're right. I also used this constant when I patched this in my lib
Methods to get at Source References
0843 [brent@mb ri ] I'm trying to add the ability to view and edit source
Alternate GC ?
0851 [matju@sy pa ] 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@sy pa ] Now that I think of this some more...
| 0880 [matz@ru y- a] It is hard to say, but in general, it dramatically improves memory
+ 0857 [matz@ru y- a] I have a generational GC patched Ruby 1.7.0 dated 2000-12-29. I think
0874 [matju@sy pa ] The patch on masato's page is dated 2001-06-19.
RCR: Add __file__ and __line__ methods to Method and Proc classes
0872 [brent@mb ri ] ...
0881 [matz@ru y- a] First of all, I said I would fix, but I haven't. Sorry for this.
0882 [nahi@ke na t] It seems reasonable for me at the point that
0883 [brent@mb ri ] I think that, in general, a definition may start
0884 [matz@ru y- a] * make eval("[__FILE__,__LINE]", proc) work, which I already did in
0888 [matz@ru y- a] Fine, thank you.
OpenSSL for Ruby 0.2.0-pre0
0875 [michal@ro os] After a long while, I managed to prepare preview of OpenSSL for
0876 [knu@iD em ns] I tried to compile it on my FreeBSD 5.0-CURRENT box and got the
+ 0877 [decoux@mo lo] Well, if I'm right SUSv2 define
+ 0878 [akr@m1 n. rg] Call Time.utc, using rb_funcall. Because mktime(&tm) - timezone may
0879 [michal@ro os] thank you all for the feedback.
Internal node MEMO (fwd)
0885 [feldt@ce ch ] Sorry for multiple posts but this should probably be in here instead of in
+ 0886 [matz@ru y- a] METHOD, FBODY, CFUNC, ALLOCA, DMETHOD, BMETHOD, MEMO, IFUNC.
+ 0891 [rich@in oe h] Robert,
Re: Digest Articles 883-884 (1/1) (ruby-core ML)
0887 [brent@mb ri ] If you are not concerned about the unlikely possibility of
Bob Jenkins' hashing implementation in Ruby
0889 [batsman.geo@] Just hacked it.
+ 0892 [decoux@mo lo] 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@mo lo] 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@mo lo] 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@ru y- a] No one every tried and proved. If somebody come up with the benchmark
| | + 0902 [decoux@mo lo] Well, if I'm right this is the OZ's sdbm hash and it was unrolled (in gawk)
| + 0904 [matju@sy pa ] All this manual unrolling may have some effect, but wouldn't it be much
+ 0903 [matju@sy pa ] 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@ro os] 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@ru y- a] Thank you for fixing memleak. But I don't think string length
0909 [michal@ro os] You're welcome!
0910 [matz@ru y- a] I consider (or designed) str_new(0, len) as allocation of string
0911 [michal@ro os] You're probably right - if programmer wants garbage he gets it... But I
0912 [matz@ru y- a] Cost is nothing, I agree. But if a programmer gets a zero length
0913 [michal@ro os] I think it's correct - lenght is zero, but capa is correct. The
0914 [matju@sy pa ] the point of str_new(0,n) is to be able to create a string of a known
0915 [michal@ro os] Actually I think you (and Matz) are right. Setting len to 0
0916 [matz@ru y- a] I think rb_str_buf() requires ptr not to be NULL, so that check isn't
0917 [michal@ro os] Hmm,
[1.8.0-preview2] make install
0918 [decoux@mo lo] Sorry to say this, but 1.8.0 seems to have a problem see
Embedded Object Oriented Database for Ruby
0919 [knizhnik@ga ] I would like to announce embedded object oriented database for
[1.8] delegate.rb, tk.rb, ...
0920 [decoux@mo lo] Apparently some modules are not updated for the exception
0921 [matz@ru y- a] Thank you for pointing out the problem.
0922 [rich@in oe h] 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@in oe h] Thank you for your reply...
Possible inconsistency in IO
0923 [dave@th ma e] This is pretty trivial, but IO.new warns if it is passed a block, but
0924 [matz@ru y- a] Possible inconsistency in IO
0927 [dave@th ma e] I'm wondering what I can do with a Proc generated by
0928 [matz@ru y- a] % ruby -e 'Kernel.instance_method(:printf).to_proc.call("foo")'
+ 0929 [nemo@he lo r] so, bind UnboundMethod first, then call to_proc.
| + 0930 [matz@ru y- a] Orthogonality, I may say. There's no strong reason behind it, just a
| | 0932 [nemo@he lo r] Orthogonality, I may say. There's no strong reason behind it, just a
| | 0933 [matz@ru y- a] I shouldn't have used the word "check". This must be much clearer than
| + 0934 [matju@sy pa ] If they have diverging interfaces such that the contracts conflict with
| + 0935 [dave@th ma e] I was just about to post the same thing: gaving UnboundMethod inherit
| + 0940 [chr_news@gm ] That would violate Matz ``less-class-ism'' and it is not very difficult
| 0941 [dave@th ma e] Not necessarily: I don't believe that Unbound should inherit from
| 0942 [matz@ru y- a] Not necessarily indeed. It's just because implementation
| + 0943 [dave@th ma e] Could 'arity' be a mixin?
| | 0947 [matz@ru y- a] Making a new Mix-in is kinda against "less class (module this case)
| + 0944 [ged@Fa ri MU] It's also convenient when you are testing for a method object and you
| 0946 [dave@th ma e] Except the two are really very different classes of things: are there
| 0950 [ged@Fa ri MU] I thought I'd used Methods and UnboundMethods before in a section of
+ 0931 [dave@th ma e] 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@ru y- a] 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@ru y- a] 1.9 will be based on the current implementation, and will be the
Is this an intended change in string interpolation
0945 [dave@th ma e] irb(main):002:0> /c(a)t/ =~ "cat"
+ 0948 [jim@fr ez .o] Hmm, I thought a variable name could only start
+ 0949 [matz@ru y- a] From CVS history, I allowed variables like "$1ve" on 2000-04-10. The
Creating thread safe classes for Ruby
0951 [knizhnik@ga ] I want make my class correctly executed in multithreaded environment.
0952 [matz@ru y- a] Unfortunately mutex does not support nested lock, so that if your
Unbound methods (again)
0953 [dave@th ma e] You're going to hate this, but there's one more wrinkle with
Patch for UnboundMethod in define_method
0954 [dave@th ma e] Attached is a trivial patch to allow UnboundMethods as a parameters to
0955 [matz@ru y- a] Point taken. I will merge your patch.
0956 [dave@th ma e] Just wondering... why are the .allocate methods public? Using them, I
0957 [rpav@nw in .] THIS IS GOOD. (Actually.) ;-) It allows one to allocate an object,
[patch] fileutils.rb - bug in 'rm_r'
0958 [holmberg@ia ] I believe there is a bug in the "FileUtils.rm_r" method.
0962 [matz@ru y- a] Thank you. I will merge your fix.
0963 [aamine@lo er] I have merged his patch now.
0959 [michal@ro os] * As you may see, flex scanners have become reentrant, the c++ versions
0960 [matz@ru y- a] No, Ruby does not use flex at all.
0961 [michal@ro os] Ah, of course! My bad... Sorry.
Range in logical context
0964 [dave@th ma e] If I run
0965 [batsman.geo@] I guess so.
0966 [dave@th ma e] 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@ru y- a] Oops, could you commit this fix?
0969 [nobu.nokada@] More thoughts about builtin literals, i.e., true/false/nil.
0970 [matz@ru y- a] Agreed.
Regexp quoting (again)
0971 [dave@th ma e] I know this has been discussed at length, but could I put in a vote not
0972 [austin@ha os] I agree. vim recognises a bare ] properly, and I do a lot of my
problem with rb_rescue2() ?
0973 [matju@sy pa ] is there any way i can trap exceptions in Ruby without going through
0974 [matz@ru y- a] Unfortunately, no.
0975 [matju@sy pa ] Good.
0976 [matz@ru y- a] Hmm,
0977 [matju@sy pa ] well, indirectly from... at the very least I'm not using neither
0978 [dave@th ma e] There an interesting situation developing. As people contribute
+ 0979 [mwilson13@co] I agree. Neatness counts.
+ 0992 [ian@ca ib n.] At the very least, the docs should deprecate one and advocate the other.
+ 0993 [matz@ru y- a] I admit I haven't paid attention to the libraries as much as I should
0994 [dave@th ma e] I don't know about discussion leader, but I've put a few wiki pages up
0997 [matz@ru y- a] I wanted to say "will somebody take the role of discussion leader?"
Possible big in ipaddr.rb
0980 [dave@th ma e] def include?(other)
0981 [matz@ru y- a] Seems right. You just commit your fix to the CVS. You may want to
0989 [knu@iD em ns] I'm sure he is. I've just pointed him to this list's archive, so we
0982 [dave@th ma e] 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@th ma e] These printf's are because I'm a fool! :) Sorry - during the confusion
0 prefix in floats ?
0985 [matju@sy pa ] .5
0986 [chris@da kr ] I suspect it's to remove ambiguity so the .5 can't be confused by
0987 [Stephane.DAl] I've seen there is some work done on ipaddr, for the ruby version 1.8,
0988 [matz@ru y- a] Contact their author first. If you don't get their reply, let us
0990 [ume@ma or ba] Since I was not on the list, knu-san notified me of your mail. So,
0991 [sdalu@sd lu ] thank you.
Mathn crashes the interpreter on PPC
0995 [dave@th ma e] ruby -r mathn -e 'p((-1/2)**3)'
0996 [dave@th ma e] ruby -I. -rrational -rcomplex -e 'p 2**2'
+ 0998 [matju@sy pa ] 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@nw in .] Hmm, for some reason the latest CVS's CGI::Session seems to be
CGI issue (was: CGI::Session generating blank IDs?)
1001 [rpav@nw in .] Of course, not long after posting I figure this out. Figures.
CGI::Session generating blank IDs => Another CGI problem
1002 [rpav@nw in .] Replying to myself yet again. However, it appears there have been
1003 [matz@ru y- a] I'm sorry, I forgot to update cgi/session.rb
irb doesn't work, because tempfile doesn't work
1004 [dave@th ma e] Try
1005 [matz@ru y- a] delegate.rb should have been fixed after 'instance_methods' change.
1006 [dave@th ma e] FWIW, I always thought that Object#methods should have accepted a
+ 1007 [matz@ru y- a] Interesting! As I told you in the personal message, I thought
| 1008 [dave@pr gp o] We can look at it the other way around: what is the cost of making the
| 1010 [matz@ru y- a] Sounds nice. I was too quick.
+ 1009 [jim@fr ez .o] So, instead of recurse, why not depth.
[patch] "_FILE_OFFSET_BITS redefined" warning on Solaris
1011 [holmberg@ia ] When I compiled Ruby on Solaris 2.8 today I noticed some strange
1012 [matz@ru y- a] Thank you. I will merge this.
mutex_m and thread
1013 [dave@pr gp o] Currently we have two parallel implementations of mutex, one in
+ 1014 [stillflame@F] Does Sync from sync.rb count as another one?
| 1015 [dave@pr gp o] Not really - the mutexes in thread and mutex_m have identical
+ 1016 [matz@ru y- a] Mutex_m does much work than plain Mutex, so that I think it's
1017 [usa@os .a t.] 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@os .a t.] I'm noticed that some ext/digest/* modules already use ANSI function
| + 1020 [matz@ru y- a] We can assume yacc (or bison). I have no knowledge about re2c. Is
+ 1031 [akr@m1 n. rg] 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@os .a t.] 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
1025 [dave@pr gp o] handler.c:42: warning: passing arg 3 of `st_lookup' from incompatible
1026 [matju@sy pa ] I think that the whole of Ruby should move to ANSI. I don't know of any
1035 [lyle@kn lo y] The lack of ANSI C prototypes in the public header files has also presented
1027 [austin@ha os] The home, tildeslash.org/re2c/, appears to be down. It looks like an
1028 [dave@pr gp o] 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@pr gp o] I wasn't necessarily saying that you should go to all this work: I just