subjects 199-435

^ Welcome to the ruby-core mailing list
0001 [matz ruby-la] Welcome to the ruby-core mailing list.  This is a develpers

^ Welcome to the ruby-core mailing list
0001 [matz ruby-la] Welcome to the ruby-core mailing list.  This is a develpers
0002 [knu iDaemons] Yay, at last!  I've always wanted to have a list that's oriented for

^ [Cleanup] GC
0003 [m.rokos sh.c] for the beginning I'll start with the very easy cleanup, just to
0004 [matz ruby-la] Merged.  Thank you.

^ [Patch] Licence tags & tiny mini cleanup
0005 [m.rokos sh.c] because it's Sunday and I should have a rest, I'm sending just

^ [patch] Warnings on Solaris
0006 [larsch cs.au] I reorganized a couple of #include statements to avoid this warning on
0008 [m.rokos sh.c] I just noticed that your cleanups were imported to CVS thanks

^ Useless patch...
0007 [m.rokos sh.c] yesterday I read through array.c and made some comments for my
0009 [matz ruby-la] * I'm not sure whether we don't need size adjustment in
+ 0010 [m.rokos sh.c] Thanks for them!
| 0012 [matz ruby-la] Approved.
+ 0011 [matz ruby-la] Type.  "it will *not* be a problem".
  0013 [vjoel PATH.B] Are you talking about the code that shrinks an array if the length is

^ [BUG]
0014 [m.rokos sh.c] irb(main):001:0> RUBY_VERSION
+ 0015 [nobu.nokada ] It's intended.  String#oct recognizes prefixes "0", "0x" and
| 0016 [m.rokos sh.c] Could you state some reasons for it?
| 0017 [nobu.nokada ] there was no other way to do it automatically.
+ 0018 [matz ruby-la] String#oct understands base prefix (i.e. 0x, 0b, 0).  It's intended
  0028 [m.rokos sh.c] Thanks nobu, matz for explanation.

^ Re: [BUG] thread failure after trap
0019 [nobu.nokada ] # Moving to ruby-core.
0020 [decoux moulo] If I've well understood, a signal is always run in the main thread.
+ 0021 [nobu.nokada ] Yes.
| 0022 [decoux moulo] Not understood : ruby must test if some other signal are pending.
| 0025 [nobu.nokada ] I meant no need to *restore*.  Regardless of current thread,
+ 0023 [nobu.nokada ] I read it and noticed rb_thread_schedule() is unnecessary to
  + 0024 [decoux moulo] This is better for me, perhaps add
  | 0026 [nobu.nokada ] It's better after rb_thread_schedule(), no?  While thread switched,
  | 0027 [decoux moulo] yes
  + 0029 [decoux moulo] $SAFE must be restored or not ?
    0030 [nobu.nokada ] I'm not sure, but guessed handler's context should differ from

^ Ruby obsolete
0031 [m.rokos sh.c] how about disable obsolete/deprecated things in Ruby. It could
0034 [matz ruby-la] I don't take it.  a) They are part of the library even though they
0037 [m.rokos sh.c] There is #if !defined(RUBY_NO_OBSOLETE) - so it's enabled by
0038 [matz ruby-la] getc is obsolete because
0039 [m.rokos sh.c] Hmm - thanks for info. (I should study more :-)

^ Long fmt?
0032 [m.rokos sh.c] shouldn't be in rb_raise and other places stated %ld instaed of
0035 [matz ruby-la] Agreed.  Can you commit them as your first try?

^ [Cleanup] Array #2
0033 [m.rokos sh.c] sorry - I've been out for a while. (Thanks for commiting cleanup
0036 [matz ruby-la] In fact, I don't care.  No one would notice the difference.  So if you

^ ToDo details?
0040 [m.rokos sh.c] do you think that 'ToDo' document could be more detailed so
0041 [matz ruby-la] I'm usually on-demand-mode.  Feel free to ask me. ;-)

^ Re: possible bug: stack dump with <<-String, #{...} and large loops
0042 [decoux moulo] [[ moved to ruby-core ]]
0043 [nobu.nokada ] Oops.  Throw awy the second added line.
+ 0044 [decoux moulo] pigeon% cat b.rb
| 0090 [nobu.nokada ] Recent version fails.
+ 0045 [decoux moulo] Well, expect have a special rb_compile_dstr() (to set a flag in this
  0046 [nobu.nokada ] Like this?
  0047 [decoux moulo] Yes, but I really hate the following line (I hope that nobody on this list
  0048 [decoux moulo] bad, very bad patch
  0049 [nobu.nokada ] I'm not sure how bad, how about this?
  0050 [decoux moulo] If ruby fail and the user has protected the call via (begin ... rescue)
  0051 [nobu.nokada ] # may misunderstand what you mean...
  0052 [decoux moulo] begin "#{a = 1:}"; rescue SyntaxError; end
  0053 [nobu.nokada ] Oops, RVarmap's in compilation time should be swept away at a
  0054 [decoux moulo] eval "x = 12"
  0055 [nobu.nokada ] Another approach.
  0056 [decoux moulo] Seems better,
  0057 [nobu.nokada ] Since it was too ugly, additional patch, and testcases.  The
  + 0058 [matz ruby-la] Commit them please.
  + 0065 [decoux moulo] Except that it exist a very special case if I'm right
    0084 [nobu.nokada ] Exactly, sigh...
    + 0092 [decoux moulo] ruby is in a case of undefined behaviour (i.e. it try to access a memory
    | 0093 [nobu.nokada ] But it means to push a dummy dvar *after* the expression.
    | 0094 [decoux moulo] No it is in top_local_init(), i.e. this will be the first node executed by
    | 0095 [nobu.nokada ] I see.
    | + 0096 [decoux moulo] No, you make the confusion between an effect at compile time and runtime.
    | | 0099 [nobu.nokada ] NODE_DASGN always makes ruby_dyna_vars non-null.  Ok, I
    | | 0100 [decoux moulo] pigeon% cat b.rb
    | | 0101 [chr_news gmx] Probably this isn't very helpful - but without
    | | 0103 [decoux moulo] The output is normal, for me.
    | | 0104 [decoux moulo] Is it not possible to find an unique name based on the name of the file
    | | 0105 [nobu.nokada ] Rather, it may be better on address of NODE_EVSTR and count of
    | | + 0106 [decoux moulo] Well, the other possibility is that PUSH_VARS() always push a place holder
    | | | + 0107 [nobu.nokada ] I'm thinking it must be, no other way to solve [ruby-core:00100].
    | | | | 0108 [decoux moulo] It exist just a small problem with #defined? which will return
    | | | | 0109 [nobu.nokada ] In ruby level, there is no diferrence between local variable
    | | | | 0110 [decoux moulo] Yes, but it was more for the user perhaps someone can be surprised with
    | | | | 0111 [nobu.nokada ] Well, the probability may not be 0 but very close to, I gueses.
    | | | + 0112 [nobu.nokada ] Current patch and test case.
    | | |   + 0113 [decoux moulo] Seems good, for me
    | | |   + 0121 [nobu.nokada ] It seems to be merged to CVS HEAD, so may I commit to 1.6 too?
    | | |     0123 [decoux moulo] Personally I must never say "Seems good, for me" because generally I find
    | | + 0125 [decoux moulo] Why not the address of the node ?
    | |   0126 [nobu.nokada ] I should write `the address of the node and the ordinal number
    | |   0127 [decoux moulo] Well, I've said one more stupidity, sorry :-(
    | |   0130 [nobu.nokada ] rb_svar() searches a dynamic variable whose id is in local_tbl,
    | |   0132 [nobu.nokada ] I might misunderstand, did you mean the issue like
    | |   0134 [decoux moulo] No, there is worst
    | |   + 0135 [decoux moulo] and with this ?
    | |   | 0137 [decoux moulo] and the same for FLIP3 :-(
    | |   | 0139 [nobu.nokada ] Making flip variables static causes a problem with threads.
    | |   | 0141 [decoux moulo] Yes, and they can only be managed with a special table (like local_tbl)
    | |   + 0138 [matz ruby-la] ...aagghh,  let us re-compile code chunks each time, and abandon
    | |     + 0140 [decoux moulo] Not really sure, but I think that it's not used in lib/*
    | |     + 0142 [nobu.nokada ] Tried separating flips into 2 kinds, ...but ugly...
    | |       + 0143 [decoux moulo] Not yet completely look at it (I prefer wait), but if I'm right you
    | |       | 0147 [nobu.nokada ] If there were too many, 10,000 local variables, the index may
    | |       | 0148 [decoux moulo] Well, I really want to see the def with 10 000 local variables :-)
    | |       + 0155 [nobu.nokada ] Modified a bit.
    | + 0097 [decoux moulo] OK, I've seen the problem (I think)
    |   0098 [nobu.nokada ] [ruby-core:00090] means CVS head, not 00053.  It is merged both
    + 0181 [nobu.nokada ] Tried.

^ yyparse() and friends >> rubyparse() or rbparse()...
0059 [sean ruby-la] Would it be possible to add '-p ruby' to the bison command line args
0060 [matz ruby-la] I think plain yacc does not accept '-p'.  Many users compiled Ruby
+ 0061 [sean ruby-la] All -p does is add a few #defines for build time at the top of the
| 0063 [matz ruby-la] We already have those #defines in intern.h, so do you mean you want to
| 0064 [sean ruby-la] Hmm... let me look at the code.  Looks like this is even easier to
| 0066 [sean ruby-la] Err... the previous patch didn't break ruby, but didn't fix my
| 0068 [matz ruby-la] Merged (for 1.7).  Thank you.  Wait little bit to be committed.
+ 0062 [nobu.nokada ] BSD origin and SUSv2 yacc's also accept, but older SystemV-like

^ The warns-a-thon continues...
0067 [sean ruby-la] I'm feeling left out in this race to clobber warnings!!!  Attached are
+ 0069 [matz ruby-la] I've merged some of them.  But *I hate ((a = f())), so that I didn't
| + 0081 [sean ruby-la] Alright.  I like running with -Wall.
| | 0083 [nobu.nokada ] Certainly.
| | 0087 [sean ruby-la] Yes.  ctype.h still needs to be included.  I'm a very BSD UNIX centric
| + 0088 [eban os.rim.] How about #if ... #endif?
|   0089 [matz ruby-la] It should have.  Can you commit the fix?  Thank you.
|   0091 [eban os.rim.] Sure. Done.
+ 0070 [eban os.rim.] Don't change all mechanically.
  + 0071 [sean ruby-la] I looked over these for a few minutes and couldn't see any harm in,
  | + 0072 [sean ruby-la] Pushed send too quickly (translation: time for me to goto bed!).  :)  -sc
  | | + 0075 [nobu.nokada ] These "cleanup"s may not work for all compilers.  If you really
  | | | 0082 [sean ruby-la] Either (()) or ((a) != 0) are pretty superficial and only matter in
  | | + 0079 [m.rokos sh.c] Sean, others,
  | + 0073 [decoux moulo] pigeon% cat a.c
  + 0074 [nobu.nokada ] `%lc' means wide char, shouldn't it use cast?
    0076 [eban os.rim.] You're right.
    + 0080 [nobu.nokada ] It seems better than u2.argc.
    + 0085 [matz ruby-la] or change argc's type to int.

^ [Fix] Long Fmt #2
0077 [m.rokos sh.c] I just commited LongFmt#1 patch
0078 [m.rokos sh.c] I just spotted that there is already 1 patch about it.

^ rb_hash_has_key() and friends non-static...
0086 [sean ruby-la] I'm doing a lot of work with Ruby in C and am using some of Ruby's
0117 [sean ruby-la] At the moment I'm writing an appendix Beginning Ruby Programming
+ 0118 [vjoel PATH.B] and rb_mod_lt and the like, please, please, pretty please?
+ 0119 [nobu.nokada ] The name "ruby_hash.h" doesn't seem so good, for me.
  0120 [sean ruby-la] How about just "hash.h" ?  It does seem like overkill to have "ruby_"
  + 0122 [nobu.nokada ] How about other data structures, all headers like "array.h",
  | 0128 [sean ruby-la] Documentation primarily and ease of use of the API.  intern.h would
  | 0133 [nobu.nokada ] Basically I guess it's good.
  + 0124 [chris darkro] How about file system name conflicts? -> with ruby_ you atleast can

^ lib/complex.rb runtime warning...
0102 [sean ruby-la] While using ruby-gnuplot I noticed that lib/complex.rb tosses up a

^ exception while ruby_connect() (Re: Possible Bug in Ruby?)
0114 [nobu.nokada ] # moved to core.
0115 [nobu.nokada ] Sorry, I made some mistakes and found a typo in getnameinfo.h.
0116 [matz ruby-la] This patch seems OK.  Commit it, please.

^ [Trivial] Gcc3.1 warning
0129 [m.rokos sh.c] Gcc 3.1 warns badly when compiling with -Wall.
0131 [matz ruby-la] Thank you.  Go ahead and commit.
0136 [m.rokos sh.c] Not at all!

^ Another implementation of Bignum
0144 [dmitry.antip] I'm working on a new implementation of Bignum, which is based on
+ 0145 [decoux moulo] I've not understood : the core of ruby is modified ?
+ 0146 [matz ruby-la] I am.  I even consider about merging it into 1.7 if it is drop-in

^ valgrind and ruby (long)
0149 [pate eylerfa] development work on Ruby.  Take everything I say with a grain of salt.
0150 [decoux moulo] Be carefull with this, if you really want to see if ruby has memory leak

^ Re: Another implementation of Bignum [tarball attached]
0151 [dmitry.antip] This is a multi-part message in MIME format.
0152 [matz ruby-la] This is round-up difference.  Ruby (and Python) use floor.  GMP
0160 [matz ruby-la] One more note: this kind of enhancement will never be merged to the
0162 [chr_news gmx] Thanks!
0163 [dmitry.antip] Yes (for now, shifts by n a naive multiplication/division by 2^n :-()

^ Hardcoded magic numbers
0153 [dmitry.antip] IMHO this is not clean to have magic limits inside the interpreter.
0154 [decoux moulo] It's best if you look at the source of 1.7
0156 [dmitry.antip] I do (RUBY_VERSION "1.7.2", RUBY_RELEASE_DATE "2002-06-04"
0157 [decoux moulo] Well, here what I've

^ ruby-mode.el - zmacs regions friendly
0158 [edsin swes.s] A tiny patch to make ruby-mode.el aware of zmacs regions.
0159 [matz ruby-la] This breaks ruby-mode on plain Emacs.  What does these "_" mean?
0164 [edsin swes.s] If the string begins with `_', then this command will not cause the region

^ Re: Another implementation of Bignum [I'm working with 1.7.2]
0161 [dmitry.antip] development version (the lastest CVS trunk).

^ Re: Another implementation of Bignum [patch agains CVS trunk]
0165 [dmitry.antip] This is a multi-part message in MIME format.

^ Bignum bug
0166 [chr_news gmx] the changes 1.43-1.44 and back in
0167 [matz ruby-la] You get the same result from Python too.
0168 [chr_news gmx] Which version are you using? With Python 2.2 (cygwin
0170 [matz ruby-la] I was using Python 2.1.3.
0173 [chr_news gmx] ``Googleing around'' I found

^ [Request] to make 'warn_print' public
0169 [m.rokos sh.c] do you think that could be possibe to make 'warn_print' function
0171 [decoux moulo] Why you don't use rb_warn(), rb_warning(), ... ?
0172 [m.rokos sh.c] I need to make my own implementation of ..._warn and _warning...

^ Improving Ruby's garbage collector for interactive apps
0174 [mattbee soup] I'd like to try to take this problem in hand and alter Ruby's garbage
0177 [matz ruby-la] Yes and yes.  Generational mark and sweep algorithm was done before,
0178 [mattbee soup] Which algorithm in particular, and how was the barrier implemented?  Did you
0179 [matz ruby-la] It's based on linked generations, and the barrier was implemented by
+ 0180 [vjoel PATH.B] My experience with Boehm GC was that it was (apparently) incompatible
+ 0182 [ekarttun cs.] Gwydion Dylan (www.gwydiondylan.org) uses the Boehm GC, but I don't
+ 0183 [mattbee soup] Sure; though there's no reason two different GC routines couldn't be used on
  0185 [mattbee soup] PS If anyone in the UK wants to see this problem in action, go into your

^ lib/pstore.rb patch...
0175 [sean ruby-la] This patch fixes the possibility of reading from a freshly
0176 [matz ruby-la] I'd change in a different manner, but point taken anyway.

^ getaddrinfo
0184 [decoux moulo] I've had some free times to look at this.
0226 [matz ruby-la] Merged.  Thank you, and sorry for being late.

^ Steps to get multiple interpreters per process...
0186 [sean ruby-la] Can someone chart out what would need to happen to get multiple ruby
0187 [matz ruby-la] We have to list all global variables and pack everything into a
+ 0188 [sean ruby-la] Makes sense.  What I don't fully understand (I've been staring at this
| 0191 [chris darkro] The YACC parser can be made re-entrant by using Bison and the directive
| 0192 [decoux moulo] How do you do it ?
| 0193 [chris darkro] I store all things that are related to a execution instance in a
| 0194 [decoux moulo] OK, this mean modify all extensions written in C, right ?
| 0195 [chris darkro] Sure, it can be done with a define. You just stumble upon the issue
+ 0189 [matt lickey.] I imagine there might also be issues with Ruby stuff that touches the
  0190 [matz ruby-la] process-wise states are often ignored by multiple interpreter

^ [Fix] nil#to_f missing
0196 [m.rokos sh.c] nil#to_f is not stated in define_method.
+ 0197 [matz ruby-la] Yes.  But I ask you to leave "default" in rb_Integer() switch.
+ 0198 [nobu.nokada ] Why return the Float itself without calling to_int?