12157-13260

11965-12811 subjects 12287-12879

Override "."
12157 [jonas.bulow@] I'm new to ruby and....
12159 [gotoken@ma h] Maybe that makes ruby slow.
12160 [decoux@mo lo] 2 method calls rather than one.

SV:  Re: Is Ruby japanese-centered?
12163 [hvrosen@wo l] Thanks! :-))))))))))))))))) Why didn't I count?
+ 12166 [hvrosen@wo l] SV:  Re: Is Ruby japanese-centered?
+ 12175 [nickb@fn rd ] It's always been the case that when programming in english, one doesn't
  12187 [schneik@us i] # There would also have to be a way to tell what encoding

Nonblocking Read
12174 [lists@th or ] I was just wondering if there is a way to do a non-blocking read on a
12176 [gotoken@ma h] IO#sysread is what you are looking for.
12181 [atm297s@sm u] This is what I had initially seen - but in my tests, it still *seems* to
12185 [rise@kn ve y] It seems unlikely, but you might be running into Ruby's internal buffering

Re: Nonblocking Read]
12182 [lists@th or ] This is what I had initially seen - but in my tests, it still *seems* to
12186 [dgjs@ac .o g] The UNIX call for doing it would be something like
12189 [atm297s@sm u] Doing some examining of the Ruby source, and it appears that O_NONBLOCK is
12190 [dgjs@ac .o g] The pickaxe book documents two paramaters for IO::fcntl

misc questions [was Re: disassembling and reassembling a hash]
12188 [raja@cs in i] Thanks.  I'll also await the official answer.
12209 [decoux@mo lo] class method can be aliased. Hah::new was an example.
+ 12248 [raja@cs in i] Let me say up front that I'm trying to clarify my understanding of how things
| 12254 [crippel@pr m] you might find the following script useful ...
+ 12263 [decoux@mo lo] alias Hash.new Array.new
  12268 [raja@cs in i] Yes, i see the problem.
  12293 [crippel@pr m] This is not quite correct ... there are such animals as

Ruby API function to check for "true"-ness?
12194 [ljohnson@re ] This is not a big deal; but is there a function already there in Ruby's C
+ 12196 [Dave@Pr gm t] There's the RTEST macro.
| 12234 [ljohnson@re ] Yes, but as Shugo points out in another response to my question, RTEST
+ 12208 [shugo@ru y- ] rb_is_true(UINT2NUM(0)) should not return 0, because 0 does not

FEATURE REQUEST: 'my' local variables
12204 [see_signatur] Ruby is, indeed, a very well designed language.
+ 12205 [sent@qu li y] If I know that x should be local, I would
+ 12206 [gnhurst@hu s] This same request was brought up by Ben Tilly not too long ago.
+ 12207 [cjon@sa ph r] This seems to me like it would be very useful.
| 12211 [decoux@mo lo] Please, no. Why make the same error of perl with this very strange name ?
+ 12212 [shugo@ru y- ] CLU ((<URL:http://www.pmg.lcs.mit.edu/CLU.html>)) has explicit
| 12213 [schneik@us i] #
| + 12214 [brk@je ko .c] If you want to use this sort of idiom, try this example which doesn't
| + 12252 [lists.ruby-t] sounds kinda like `upvar' in tcl.
+ 12215 [gotoken@ma h] "my" seems too complex for user.
| + 12216 [decoux@mo lo] This was my 2nd objection :-)
| + 12250 [see_signatur] I do not understand why "my" is too complex to a user. It has been in Perl for
| | + 12251 [petemcbreen@] Why is it bad Leo?
| | + 12284 [gotoken@ma h] I have other opinion.  Ruby has scope-indicating variable name,
| |   12289 [matz@ze ab t] OK, OK.  Let me finalize this thread.
| |   + 12299 [see_signatur] Matz, do you mean 'loop' or do you mean 'let' ?
| |   | 12307 [matz@ze ab t] I meant the block in general.  You can define let like the following.
| |   | 12320 [ameuret@bl c] 'i' in
| |   | + 12333 [ben_tilly@ho] I doubt it.
| |   | + 12358 [see_signatur] Arnaud,
| |   |   12369 [sent@qu li y] Hmmmm. At a glance, that looks pretty confusing.
| |   |   12371 [matz@ze ab t] So, which symbols are better for them?
| |   |   + 12385 [sent@qu li y] I was afraid you would ask. I'm hoping to avoid
| |   |   | + 12389 [ms@ia ta e. ] Matz's suggestion is quite acceptable (there's not much that one can't
| |   |   | + 12392 [gnhurst@hu s] I agree with this sentiment.
| |   |   | + 12407 [decoux@mo lo] I think, but probably I'm wrong, that it's too complex to implement.
| |   |   + 12393 [Dave@Pr gm t] Perhaps there's another way to look at this. Rather than making scope
| |   |   | 12490 [lists.ruby-t] Interesting idea.  Not so keen on the syntax.
| |   |   + 12416 [decoux@mo lo] What do you call block exit ?
| |   |   | 12420 [Dave@Pr gm t] Sorry, sloppy wording. I meant close of scope.
| |   |   + 12544 [decoux@mo lo] What do you expect with
| |   |     + 12546 [schneik@us i] # I'm wondering: was the idea of having a different block type for
| |   |     + 12548 [Dave@Pr gm t] [1,2,2,2], the same as if you passed 'a' in to a method
| |   |       + 12551 [Dave@Pr gm t] Guy just pointed out that the question might be: "how many times to I
| |   |       + 12552 [decoux@mo lo] and with retry, it make a re-initialization or not ?
| |   |         12554 [Dave@Pr gm t] Not
| |   + 12452 [gotoken@ma h] May I show yet another syntax?
| |     + 12457 [matz@ze ab t] Could you tell me the semantics?
| |     | + 12468 [gotoken@ma h] Parameters on the left side of the semicolon declare shadowed
| |     | | 12470 [tammo.freese] But b is on the RIGHT side of the semicolon???
| |     | | + 12485 [lists.ruby-t] which indicates the concern I'd have for such a syntax.  It would be
| |     | | | 12536 [elderburn@mi] And real hell to debug! :-)
| |     | | + 12500 [gotoken@ma h] Oops!
| |     | + 12476 [decoux@mo lo] Perhaps you can write  loop{(a;b) .... } where a and b are new local
| |     |   + 12491 [Dave@Pr gm t] Doesn't that break existing code, though?
| |     |   | + 12537 [elderburn@mi] Yes and no :-)
| |     |   | + 12550 [matz@ze ab t] I don't think it's too stupid.  But I don't prefer this one.  It seems
| |     |   |   12553 [Dave@Pr gm t] OK, I don't want to beat a dead horse, but from a user's perspective,
| |     |   |   + 12555 [matz@ze ab t] Well, some might feel that the latter is simpler.  But in reallity,
| |     |   |   | + 12556 [schneik@us i] # I have two ideas, still not knowing which is better to solve this
| |     |   |   | | 12607 [crippel@pr m] I very much like   ``:='' since it is very explicit  (and Ruby
| |     |   |   | + 12563 [gnhurst@hu s] For some reason, I keep spending a lot of time on this issue.
| |     |   |   | | 12567 [  ddj@km .d ] [A good summa summarum of discussed features]
| |     |   |   | | 12574 [gnhurst@hu s] Actually, I meant the time saved from having to figure out
| |     |   |   | | + 12589 [ben_tilly@op] With the various variations on eval (instance eval, etc) it is
| |     |   |   | | + 12624 [  ddj@km .d ] Yes. I had forgotten some of the things you mentioned.
| |     |   |   | + 12570 [Dave@Pr gm t] 1. If you were designing Ruby over again, what would do with the
| |     |   |   | | 12599 [matz@ze ab t] I wouldn't enable block local variable, at least by default.  It's for
| |     |   |   | + 12594 [spwhite@ch r] One problem I can see with this is that it will make code harder to
| |     |   |   | | + 12597 [crippel@pr m] I agree ...
| |     |   |   | | + 12598 [johann@ph si] Understood.  Start of relatively newbie comments.  :-)
| |     |   |   | | | 12604 [spwhite@ch r] The syntax change I proposed would fix that problem. Here's how it would
| |     |   |   | | | 12638 [johann@ph si] Yes, I understand that.  I just meant that I would be fine with simply
| |     |   |   | | + 12610 [crippel@pr m] in your world every time your interpreter scans an object in source an #exec
| |     |   |   | |   12612 [spwhite@ch r] I don't understand how that causes a problem?
| |     |   |   | |   12654 [crippel@pr m] and I am OOP wanebe ...
| |     |   |   | |   + 12655 [ben_tilly@op] Why would you this this a typo?
| |     |   |   | |   | 12683 [kjana@os xa ] Then the snippet below show what value?
| |     |   |   | |   | 12685 [matz@ze ab t] I think it would give 1 and 3.
| |     |   |   | |   | + 12718 [dae_alt3@ju ] I an new to Ruby, but there seems to be something
| |     |   |   | |   | | + 12720 [hal9000@hy e] Comments below....
| |     |   |   | |   | | | 12722 [matz@ze ab t] I don't need that much.
| |     |   |   | |   | | | 12725 [sent@qu li y] Along those lines, I'm increasingly of the belief
| |     |   |   | |   | | + 12721 [matz@ze ab t] I think the problem is you were assigning vegetables to the variable
| |     |   |   | |   | |   12740 [raja@cs in i] Yes, but that is C.  This is Ruby --- life is supposed to be better in this
| |     |   |   | |   | |   12790 [ppladijs@ca ] - using longer (and meaningfull) names for none-iterator
| |     |   |   | |   | + 13181 [dmuller@et a] <delurking on c.l.r for the first time...>
| |     |   |   | |   |   13260 [matz@ze ab t] Interesting.  Let me put this in my brain archive of Ruby
| |     |   |   | |   + 12659 [crippel@pr m] I assume you know this  - just in case observe the differences between
| |     |   |   | + 12613 [see_signatur] How to read the following?
| |     |   |   |   12628 [matz@ze ab t] The first declarative assignment make `f` local to the block, so that
| |     |   |   + 12611 [see_signatur] I respectfully disagree with the concept of "pure local" block {{..}}.
| |     |   |     12614 [spwhite@ch r] a = 1
| |     |   |     12621 [decoux@mo lo] pigeon% cat b.rb
| |     |   + 12493 [decoux@mo lo] Yes, you're right. Forget it
| |     |     12494 [Dave@Pr gm t] 3.times local {
| |     + 12460 [cjon@sa ph r] The semicolon is a bit subtle.
| |     + 12473 [elderburn@mi] And I have not really been following this thread in detail, except to test
| |     | 12505 [spwhite@ch r] I think this is the best suggestion I've seen so far, though it needs
| |     | + 12516 [ms@ia ta e. ] Well put.  You're quite right about the trend, and I hope we can avoid
| |     | + 12533 [cjon@sa ph r] x = 5; loop { |y| x = 3; x * y }; puts x ->3
| |     | + 12538 [elderburn@mi] x = 5
| |     |   12539 [Dave@Pr gm t] But to do that, you'd have to cut and paste the code into your
| |     + 12475 [decoux@mo lo] You break all old scripts with this
| |       12535 [elderburn@mi] Not exactly.
| |       12640 [ale@cr ms n.] While I understand your point of view, and agree with the basic idea I
| + 12267 [decoux@mo lo] OK, explain me this result
|   12274 [ben_tilly@ho] Ah, my favorite bug!
|   12297 [see_signatur] Thank you for emphasizing my point once again. Indeed, encapsulation properties
+ 12223 [  ddj@km .d ] local variable
+ 12258 [ffiloseta@ca] I am sure you see this as useful, but I honestly can?t grasp why on earth
  12296 [see_signatur] I am not sure that the respondents got my point right. Probably I was not precise
  12306 [furifilo901@] Leo, thanks for clarifying. I indeed see your point, collaborative

Ruby as CGI under Windows
12218 [joerg@kr us ] trying ruby under iis (w2k), it doesn't work
12240 [fgeiger@da e] "C:\Programs\Ruby\ruby.exe" %s %s

Unsubscribe
12227 [stu@vi tu lp] How do I unsuscribe again....?

random chars
12229 [the-master-o] I've writte a little program that makes a copy of itself but
12230 [tammo.freese] s[i] = ""
+ 12231 [tammo.freese] s[i]=""
+ 12233 [the-master-o] Yes, this was it! Thanks for the fast help

SUMMARY: Licensing, Intellectual Property, and Ruby code
12235 [colin@we g2 ] Just to summarize back to the list the results of the discussion about
12239 [jtobler@Wi e] I am glad you were able to arrive at a decision that feels appropriate for

[ANN] NQXML v2.0 adds DOM, DOCTYPE, and ENTITY
12237 [jimm@er s. o] NQXML is a pure Ruby implementation of an XML tokenizer, a SAX parser, and
12249 [chadfowler@y] Jim, excellent work on this!  I've had time to play
12255 [jimm@fn rd i] [this answer cc'd to email]
+ 12259 [sent@qu li y] I sort of interpreted this question the other way
+ 12262 [aaron@cy er ] Jim, I am glad to hear that you are taking the approach that you are taking.
+ 12311 [maki@in c. o] Do you know Paul Prescod's PullDOM/EasyDOM ? It's written in Python.

File with length 0
12238 [the-master-o] 1. If I run the program, I want to get only those Files that are valid
12270 [tammo.freese] 1) Ruby processes fast enough so that sometimes you write two files
12360 [the-master-o] Sorry for my late answer, but I've been busy.
12361 [the-master-o] Sorry for this harsh words. Realised it to late

Possibility of displaying/searching descriptions in RAA?
12241 [gsemones@pr ] Greetings,
12243 [ale@cr ms n.] I noticed the same also. So I made

[ANN] NQXML v0.2.2
12244 [jimm@er s. o] In the spirit of "release early, release often", version 0.2.2 of NQXML can
12277 [matt@se ge n] Jim,
12279 [jimm@er s. o] I interpret a SAX parser as one that does not build an object tree, but
12303 [jweirich@on ] I always figured a SAX parser was one that followed the SAX API spec.
12309 [jimm@fn rd i] Maybe I should stop calling it a SAX parser.
+ 12315 [sent@qu li y] That's easy:  NQSAX parser
| 12316 [schneik@us i] #
+ 12324 [matt@se ge n] In the XML world we call your kind of parsing "Pull parsing". It's pretty
  12326 [jimm@er s. o] I've decide to call it `StreamingParser'. It outputs a stream of entities,

Re: Possibility of displaying/searching descriptions
12246 [gsemones@pr ] Fantastic!  It's a . . . bookmark!

Order of hash.keys  ...
12253 [crippel@pr m] I run a little experiment on the ambiguity of

Feature requests will be the death of Ruby
12260 [ristad@mn mo] Recent postings have raised the issue of local variables in Ruby and
+ 12271 [luigi.ballab] 1) you can write "a, b = b, a" instead of "temp = a; a = b; b = temp".
+ 12411 [jdf@po ox co] While your point about my() and feature requests might be well-taken,

COM bindings
12261 [ffiloseta@ca] This is something I didn't care for yesterday, but just today someone
+ 12265 [rise@kn ve y] You might investigate the WIN32OLE, WIN32OLE_EVENT and WIN32API classes in
+ 12278 [furifilo901@] Thanks to Wyss Clemens and Jonathan Conway for their suggestions !
  12282 [ben_tilly@ho] Different problem. :-)
  12562 [MarkH@Ac iv ] That would be me :)

Q re looping structures
12264 [matju@sy pa ] Question regarding looping structures: what should a loop-aware Array#==
12266 [decoux@mo lo] pigeon% ruby
+ 12269 [decoux@mo lo] we
+ 12328 [matju@sy pa ] No, I mean, if we were to say that such structures should be comparable,
  12331 [decoux@mo lo] You have the response. In this case you can't give a result, this is why
  12336 [matju@sy pa ] Ok, I thought it would be possible to answer "true" meaningfully.
  + 12340 [ben_tilly@op] It is possible, and I posted code that does it before.
  | + 12341 [decoux@mo lo] pigeon% cat b.rb
  | | 12347 [decoux@mo lo] This version of tangle implement this
  | + 12363 [crippel@pr m] Actually,
  |   12364 [crippel@pr m] Actually,
  |   12365 [ben_tilly@op] Why would you expect u to be != to s?
  |   12366 [crippel@pr m] Because I am moron (you should realize by
  |   12370 [ben_tilly@op] That has to be a bug..yup.   In Array's eq? method I
  |   12379 [crippel@pr m] You can always write a specialised directory tree
  |   12380 [ben_tilly@op] Your basic linked list is another example.  It may be
  |   + 12383 [ben_tilly@op] =====
  |   | 12384 [decoux@mo lo] Difficult to say which is faster. Actually it has this algorithm, you can
  |   + 12398 [crippel@pr m] Okay you can cook up the notion of absolute equality for
  + 12353 [crippel@pr m] Well,
    12355 [crippel@pr m] (- I should have used past tense)

profile.rb needs updating
12272 [feldt@ce ch ] /usr/local/lib/ruby/1.7/profile.rb:11: warning: obsolete method

[ANN] NQXML v0.3.0 fixes DOCTYPE bug
12273 [jimm@er s. o] Version 0.3.0 fixes a DOCTYPE tag bug (PUBLIC and SYSTEM id arguments
+ 12276 [brucedickey@] I write software which is used internally at my company. My internal
+ 12291 [elderburn@mi] "Early and often" is the recommended procedure :-)
+ 12292 [ale@cr ms n.] I really think announcements should be kept around but not here. Before we
+ 12294 [gsemones@pr ] useful

Which method(s) to override for equality test?
12281 [ljohnson@re ] I am writing a new class that's implemented by a C extension module and I
12283 [decoux@mo lo] There are not really synonymous. You have in ruby-man

SAX for Ruby (Re: [ANN] NQXML v0.2.2)
12285 [maki@op n- e] There is a implement of SAX API in Ruby's XMLParser library,

<no subject>
12286 [sky@ma h. qa] # chaddr sky@math.uqam.ca luc.belanger@acm.org
threads.html
top