4903-5272 subjects 5310-5785
5091 [aleksi.nieme] echo "require 'ext_b'" > a.rb
5092 [aleksi.nieme] Here's a patch for my earlier hanging. I can't say for sure this works, as
5108 [matz@ze ab t] Hmm, I think hangling problem is already fixed in 1.6.1 (CVS). And
5093 [green@Fr eB ] I notice that (using 1.6.0 and 1.6.1 snapshot; finding some other kinda
+ 5094 [decoux@mo lo] 1.4 do the same
| 5095 [decoux@mo lo] it's best to read 'it search getopts in the class of self' :-(
+ 5099 [matz@ze ab t] I think it's caused by method cache inconsistency. Try the following
5103 [green@Fr eB ] It makes things weirder than before :-( It fixes the case I presented, but
5105 [decoux@mo lo] @@ -5042,4 +5038,4 @@
5106 [green@Fr eB ] It works now! Thank you both :)
+ 5107 [decoux@mo lo] Well I've just said that it exist a problem on this patch, not that you
+ 5110 [matz@ze ab t] Sorry for the buggy patch. I'll update CVS.
regexp and performance
5101 [bombadil@wa ] I have probed example occur.rb with a big file and Ruby 1.6.
+ 5102 [decoux@mo lo] Probably this is not the regexp engine
+ 5109 [matz@ze ab t] That's because regexp internal stack is now allocated in the heap to
5104 [fukusima@go ] SWIG1.3a5 has been released. SWIG is a software development tool
Best New Trade Show Display by Opera Portables, Inc. adv
5111 [operak@ea th] Opera Portables, Inc. is offering "by invitation" visits to our web site. Packed full of exciting projects and news, Opera is leading the industry with displays that are as much eye-popping as they are eye catching.
Ruby Book, Eng. tl, kei/kata and shurui -> 'type'?
5112 [jon@ka ji co] Jon, the editor, here...
5132 [matz@ze ab t] 'オブジェクトの型 (object no kata)' reminds me the dynamic type of an
Types and ===
5114 [hal9000@hy e] <sigh> I imagine Yoda behind me, shaking his little green head
+ 5116 [green@Fr eB ] You're right. This is definitely one such case.
+ 5117 [yashi@ya hi ] ahm... I might be missing something. You said '*Normally* when x ==
5118 [hal9000@hy e] Ahhhh. I now perceive the Ruby Way.
+ 5120 [yashi@ya hi ] '===' does not imply '==' at all. '===' is defined in each class the
| 5122 [hal9000@hy e] Yes... I guess one root of my difficulty is that I have chosen to understand
| + 5123 [green@Fr eB ] Right! That's because Ruby is purely OO =)
| + 5126 [yashi@ya hi ] you *can* do this, sort of, using case. but, IMHO, i don't know i'd
| 5128 [green@Fr eB ] Since this won't work, and neither does my previous suggestion work
| + 5140 [matju@ca .o ] def newmethod.previous; @previous; end
| + 5141 [hal9000@hy e] Yes, this works.
| 5142 [schneik@us i] # First of all, I think I disagree with the assertion that the case
| 5143 [aleksi.nieme] I was thinking much harder cases, but this one is really easy.
| 5144 [hal9000@hy e] Well, Aleksi,
| 5146 [schneik@us i] # Well, Aleksi,
| 5160 [hal9000@hy e] since
| 5161 [schneik@us i] # >
| + 5163 [hal9000@hy e] OK, I see what you are saying...
| | + 5169 [matz@ze ab t] I felt the case behavior should be determined by objects listed after
| | | + 5170 [decoux@mo lo] Personnally, I think this is the right way to do it. Unfortunately in this
| | | + 5176 [dfan@ha mo i] That is the reason that I assumed when I first found that the
| | + 5172 [kjana@os xa ] Because we want to test some variable is in some container, in range,
| + 5166 [matju@ca .o ] the method name (:===) is a parameter.
| 5167 [aleksi.nieme] Your persistence is no suprise for me, I know there's people like that. On
+ 5127 [matju@ca .o ] def foo(arg)
crashes in ruby-lex.rb
5129 [green@Fr eB ] I've gotten a few crashes when doing some weird things in irb (repeatable in
5130 [matz@ze ab t] This is not caused by irb, but because that Module#dup did not copy
Ruby for Macintosh?
5133 [Jon.Kleiser@] I've seen a couple of web pages (e.g.
+ 5135 [number6@al g] Jon,
+ 5136 [matz@ze ab t] Ruby 1.1c9 was ported to Mac. But Mac port was not maintained since
5145 [shugo@ru y- ] Sorry, this is a test message for ML server.
ANNOUNCE: Ruby 1.6.1
5147 [matz@pi ac u] md5sum is
Config 1.6.1 on Solaris 2.5.1
5148 [hgs@dm .a .u] checking count field in FILE structures... _cnt
+ 5149 [fit0298@fi e] Now, I build ruby from ruby-1.6.1.tar.gz via gcc-2.8.1.
+ 5150 [matz@ze ab t] Hmm, could you check if the following patch will do?
5151 [hgs@dm .a .u] It doesn't seem to make any difference, but since I'm working from
5152 [decoux@mo lo] moulon% diff -u configure~ configure
5155 [hgs@dm .a .u] This has fixed the problem at the configure stage. Thank you.
Compile Problem with 1.6.1
5157 [aerogems@ne ] gcc -O3 -mathlon -march=athlon -mcpu=athlon -I. -I.
5158 [matz@ze ab t] Would you mind if I suspect AthlonGCC bug?
5168 [aerogemsX@ne] Well, an AthlonGCC bug might be the cause, but I've had no problems
5171 [matz@ze ab t] Ruby is a rather complicated software.
+ 5174 [aerogemsX@ne] Well, just to see what would happen, I changed the Athlon optimisations
| 5181 [matz@ze ab t] float 9 .. Hmm, could you show me the result of
| 5212 [aerogemsX@ne] [root@localhost scott]# ruby -e 'p ((13.4 % 1 - 0.4).abs)'
| 5217 [matz@ze ab t] ???? How about this?
| 5243 [aerogemsX@ne] [root@localhost /downloads]# ruby -e 'p((13.4 % 1 - 0.4).abs <
| 5249 [matz@ze ab t] Interesting. On your machine, (13.4 % 1 - 0.4).abs gives
| 5267 [aerogemsX@ne] [root@localhost qt-gui]# ruby -e 'p(3.330669074e-16 < 0.001)'
| 5274 [matz@ze ab t] Not the worst, but I still have no idea about what make this false.
| 5277 [aerogemsX@ne] The result of the C program you gave (BTW, you forgot the ; after the
| 5280 [matz@ze ab t] Hmm, your compiler works fine as I expected.
+ 5698 [nick_hynes@m] #include <signal.h>
Ruby sighting at www.perl.com.
5165 [schneik@us i] FYI/FWIW, there is a link to
Re: methods w/ ! giving nil
5173 [marchign@di ] Changing swap does not work since swap can be invoked also for equal
5179 [matz@ze ab t] Let me compare this with [ruby-talk:4564]. And could give me a patch
Compiling 1.6.1 problem
5175 [Callus@Sy pa] gcc -g -O2 -I. -I. -I/usr/local/include -c eval.c
5180 [matz@ze ab t] This indicates you have rlimit but don't have sys/resource.h on your
5190 [Callus@Sy pa] That's the direction that I needed to be pointed in, thanks. For some reason,
+ 5191 [yashi@ya hi ] hmm... linux 2.4.0-test* has RLIM_INFINITY defined in
| 5196 [Callus@sy pa] Thus spake Yasushi Shoji (email@example.com)
| + 5200 [yashi@ya hi ] sorry i wasn't clear enough. the reason you get compile error is
| | 5201 [Callus@Sy pa] This looks the same as yours except that I have an extra directory in
| + 5203 [matz@ze ab t] Hmm, my <sys/resource.h> does not include <asm/resources.h> directly
| 5204 [Callus@Sy pa] My <sys/resource.h> includes <bits/resource.h> which in turn includes
| 5206 [matz@ze ab t] I just don't know. Only thing I can tell your is that my glibc 2.1.3
+ 5192 [matz@ze ab t] Could you show us the contents of config.log? Probably clue to know
equivalent to Python's os.path?
5178 [dfan@ha mo i] Does Ruby have a module equivalent to Python's os.path? It is useful
+ 5189 [kjana@os xa ] elements with File.join.
+ 5195 [matz@ze ab t] Most of os.path functionality is already provided.
5202 [dfan@ha mo i] Very much so, thanks!
ruby-list etc. English translation
5182 [matz@ze ab t] We are still preparing our own translation system.
5183 [schneik@us i] # Hi,
5193 [matz@ze ab t] Oops, I'll fix it.
5198 [Tim.Duncan@s] Unfortunately, it still has a long way to go before it becomes usable. On
5199 [jon@ka ji co] Too busy now, but I've been keeping a vocabulary list for "First
book for beginners.
5184 [skol@sb x. u] i am searching for a book for an absolute beginner (concerning ruby). i
5185 [schneik@us i] # i am searching for a book for an absolute beginner (concerning ruby).
5186 [schneik@us i] # # i am searching for a book for an absolute beginner (concerning
bug in example occur2.rb?
5187 [bombadil@wa ] When I execute example occur2.rb with Ruby 1.6.1 (with 1.6.0 is the
5188 [decoux@mo lo] No, this is because NameError is now a sub-class of ScriptError, which is
5194 [matz@ze ab t] Yeah, it's a bug in occur2.rb. Sorry. I'm gonna fix it as Guy
ANNOUNCE: rubyweb -- literate programming for ruby?
5197 [hgs@dm .a .u] I have developed a system for re-sequencing embedded documentation
5207 [frido@q- of ] for e-mail reply remove all after .com
5208 [green@Fr eB ] ALLOCA_N() isn't good because stacks are not meant to be huge and often have
5233 [matz@ze ab t] The stack consumption is mainly done in interpreter itself, so that
Programming Ruby - small error in posted preface
5209 [Dave@th ma e] I was reading through the Excite-translated ruby-list archives (thank
5210 [Dave@th ma e] If anyone is interested, the slides of the presentation on Ruby that
+ 5211 [trinexus@on ] I can see why your talk went well. A great set of slides that really give
+ 5214 [hal9000@hy e] Very impressive work, Dave...
5216 [Dave@th ma e] Well, there's still some heated discussion about Andy and the nude
+ 5241 [andy@to ls e] Somehow a nude iterator just isn't the same...
| 5242 [aleksi.nieme] I'd say Andy is just modest and wants to keep up the exciting athmosphere
+ 5282 [mulperi@ik .] So, does it have ISBN yet? I want to pre order this thingy.
5283 [gnhurst@hu s] Programming Ruby: The Pragmatic Programmer's Guide
RUBY NEWSGROUP FAQ -- Welcome to comp.lang.ruby! (Revised 2000-09-17)
5213 [schneiker@ju] RUBY NEWSGROUP FAQ -- Welcome to comp.lang.ruby! (Revised 2000-09-17)
Ruby Book Eng tl, ch1 question
5218 [jon@ka ji co] In the Ruby Book, ch1, in a list of 7 features that characterize Ruby
5219 [yashi@ya hi ] I tried to write one nice sentence but faild, so i'll leave that to
5222 [jon@ka ji co] Thanks.
5223 [yashi@ya hi ] nice. :-) i like it.
5224 [jon@ka ji co] Ah, thanks, I think I get it, a slightly different nuance then.
5225 [yashi@ya hi ] one more thing (sorry to be picky)
5226 [jon@ka ji co] 'Because all of Ruby has been...' -> 'Because Ruby has been...'?
+ 5227 [yashi@ya hi ] that's what I thought. but the word 'Ruby' should cover that.
| 5230 [manamist@wh ] The traffic of rich & powerful features and/or functionals of Ruby
| 5232 [Callus@Sy pa] "Ruby's object oriented philosophy and design makes its powerful features
| 5238 [matz@ze ab t] I like these.
+ 5246 [hal9000@hy e] Hmm... I speak only English (and a little German,
5275 [matju@ca .o ] I speak only English (and French, which in this case is useless as a
5276 [schneik@us i] # > Hmm... I speak only English (and a little German,
5278 [jon@ka ji co] I find your input very interesting and helpful and look forward to
+ 5279 [jon@ka ji co] 分類する (bunrei suru)
+ 5281 [matz@ze ab t] And it will fall in my hands soon. ;-)
Ruby Book, Eng. tl, ch1 -- code snippet correct?
5220 [jon@ka ji co] Dave has kindly let me know that this code generates a warning with
5234 [matz@ze ab t] No, just ignore it. I'm feeling this warning in too loud. The
better way to say 'recursive join'
5221 [yashi@ya hi ] join error. I, today, happend to had this message and I felt it should
+ 5231 [Dave@th ma e] -e:1:in `join': thread tried to join itself (ThreadError)
| 5237 [matz@ze ab t] Thank you. Done.
+ 5345 [matju@ca .o ] I'd suggest "circular join", just like "circular reference", "circular
Ruby/Glade doesn't work with Ruby 1.6.1
5228 [bombadil@wa ] parser = Glade.new
ops: Ruby/Glade works, sorry 0:)
5229 [bombadil@wa ] Excuse my last message.
5235 [shigeo@ti yf] To keep compatibility with Ruby 1.6, bigfloat-1.1.4 has been
Project files for MS VC 6.0
5236 [shigeo@ti yf] For Microsoft VC/VC++(6.0) users, I prepared the
Running two iterators in parallel
5239 [dfan@ha mo i] I have two iterators. I would like to run them in parallel, creating
5245 [matz@ze ab t] Use threads.
5252 [matz@ze ab t] Oops. There is a termination condition bug.
Ruby for Win32/DOS
5240 [dennisn@pe n] Not all of us are blessed with the opportunity to be able to develop on
5244 [matz@ze ab t] I should have linked from www.ruby-lang.org.
5258 [hgs@dm .a .u] This is a useful resource, but it is a list of files with little
5260 [Dave@th ma e] Agreed.
5261 [hgs@dm .a .u] Thank you.
Ruby Book, ch6 -- kukkei no sekai ?
5248 [jon@ka ji co] First, thanks for all the good suggestions for my last
5251 [matz@ze ab t] Well, ... that was typo. We (acutually he) meant 矩形 (kukei - means
Ruby 1.6.1 config+widget problems.
5253 [schneik@us i] checking whether OS depend dynamic link works... yes
5314 [schneik@au t] Conrad Schneiker
5315 [matz@ze ab t] The former (configure problem) was fixed in the snapshot.
5322 [schneik@us i] # |Hi; any news about these problems?
5325 [decoux@mo lo] pigeon% widget
5326 [decoux@mo lo] 1.6.1 has a new flag SCOPE_DONT_RECYCLE, and you have probably this error
5327 [decoux@mo lo] Try this patch. It call scope_dup (which transform a SCOPE_ALLOCA in a
+ 5352 [schneik@us i] # Try this patch. It call scope_dup (which transform a SCOPE_ALLOCA in
+ 5360 [matz@ze ab t] This one is confirmed by [ruby-talk:5352], I'll merge it to 1.6.2.
5366 [decoux@mo lo] I really think that you must also patch tk.rb or tkencoding.rb because
5368 [schneik@us i] # s> In any case, I did the patch manually and it worked. In addition to
5369 [schneik@us i] # Matz, is this something that can/will soon be fixed in the nightly
problem: undefined method `size' for File
5254 [Eric.Santona] I'm new with ruby and I'm just still learning with this language
+ 5255 [decoux@mo lo] #size is a singleton method of File
+ 5256 [hipster@xs a] size is a class method of File, so you cannot apply it to an instance
+ 5257 [matz@ze ab t] Use
5259 [bombadil@wa ] In this case I don't understand well why it should be a class method
5263 [matz@ze ab t] I don't know why you don't understand. ;-)
+ 5264 [aleksi.nieme] matz critizes good solution argumenting with features lacking from some
| + 5265 [decoux@mo lo] pigeon% cat b.rb
| | 5266 [aleksi.nieme] % type file_size_2.rb
| + 5269 [matz@ze ab t] which implements Ruby interpreter. ;-)
| 5270 [ms@ia ta e. ] Maybe I'm crazy, but doesn't this reliably get the length of an open
| 5296 [matju@ca .o ] Linux 8 minutes ago. It works, but I hesitate. Matz proposes
+ 5273 [vardhan@ca e] i thought lseek(fd,SEEK_END,0) is a portable way.
+ 5295 [matju@ca .o ] Standard Ruby could, maybe.
Tkx all for your answers
5262 [Eric.Santona] Tkx, now it's clear.
Proper ConditionVariable usage?
5268 [aleksi.nieme] Abstract
5284 [hipster@xs a] The concurrent programming that does not bend the brain
5285 [kjana@os xa ] That's because ConditionVariable is NOT for general synchronization,
5286 [shugo@ru y- ] Here is a simple example.
5287 [shugo@ru y- ] Sorry, Mutex is not re-entrant. (So this program cause dead-lock.)
5308 [kjana@os xa ] ``inheritance anomaly'' --- embedded synchronization codes prevent
5309 [hipster@xs a] Agreed. Not only do you inherit an interface, you also inherit (a)
5342 [shugo@ru y- ] I don't insist that Queue should be implemented by ConditionVariable.
5288 [louie@Tr ns ] So, I was regexp'ing away just now, and noted a MatchData method missing which
5290 [knu@id em ns] foo = match.to_a.slice(1,2).join(':')
5291 [louie@Tr ns ] Uh, duh. Thanks for pointing out the obvious to me. I keep thinking
[PATCH] version test using require
5289 [hipster@xs a] The following patch allows testing for a minimal Ruby version using the
+ 5297 [decoux@mo lo] pigeon% ruby -e 'p "1.10.1" < "1.6.1"'
| 5299 [yashi@ya hi ] matz told me on -dev a while ago that he ensure minor and patch level
| 5300 [hipster@xs a] Okay, but I want to fix this anyway. It's a terrible mistake.
+ 5307 [hipster@xs a] This fixes the problem noted by Guy. I took the logic from Debian
+ 5313 [yashi@ya hi ] how about just
5321 [hgs@dm .a .u] Is the class at the given URL any use at all in this debate?
5292 [knu@id em ns] Let me show you a new method candidate for Enumerable module, which I
5293 [aleksi.nieme] I like the functionality very much. But I have to say I didn't understand
5294 [aleksi.nieme] Hastily posting something isn't good thing to do. I started to wonder if I
+ 5298 [decoux@mo lo] Well, I've looked very superficially to your patch
| + 5301 [knu@id em ns] ~ free
| + 5304 [decoux@mo lo] You don't need a mark_function for enum_obj ?
| 5305 [knu@id em ns] Ick, I missed that. I'll be fixing it soon.
+ 5302 [knu@id em ns] I wonder why noone had answered Dave's question.
5303 [knu@id em ns] Bah, I misread iteratorMethod as iterator.each. And it comes to
5306 [Dave@th ma e] This is an old thread. I was looking for a simple way to generate an