51118-53848

50878-51711 subjects 51194-52197

^ Problem with x.downto(y) {}
51118 [tokikenshi a] There's a problem I've been fighting since last week. Check this piece
+ 51137 [gsinclair so] I can't see anything wrong with your code, and I doubt anybody else will
+ 51143 [kjana dm4lab] arr = [1, 2, 3, 4, 5]
+ 51208 [tokikenshi a] I've tried to provide as much relevant details as possible, and that's

^ ruby refactoring
51128 [joe vpop.net] I'd like to split a message up into unquoted parts and quoted parts
51136 [dblack candl] Posting the version we've been talking about on #ruby-lang.  For those
51161 [pit capitain] Interesting logic :-) You could make the code a little bit clearer, at
51180 [dblack candl] My little "un" trick was somewhat whimsical :-) I do admittedly tend

^ Bignum from 2s Complement
51130 [jason jvoege] For a Ruby program I'm writing, I'm receiving binary data over a
51134 [billk cts.co] How about unpacking the string as: nn = str.unpack("lL"),
51135 [jason jvoege] Beautiful!  Worked like a charm.  Thanks, Bill!

^ (none)
51131 [Graeme.Matth] subscribe Graeme

^ CGI Upload Problem
51132 [Graeme.Matth] Im trying to convert my perl knowledge to ruby but have a problem trying to
51167 [kentda stud.] IIRC, this shouldn't be necessary, as the underlying system in Windows

^ MORTGAGE RATES HAVE BEEN CUT IN HALF22137
51142 [DiscountRate] <html>

^ ̤
51148 [yy-net adsl.] ȼԡԡ

^ (none)
51153 [oohirano yah] I installed Ruby on EPOC recently.

^ adding overload to ruby
51156 [bulatz integ] there is permanent discussion about adding overload facility to ruby
51285 [justinj mobi] IMHO, I think that having dispatch like this would be cool.  But...
+ 51292 [bulatz integ] not class, but any expression - we can use === to test
| + 51300 [justinj mobi] Of course. Cool.
| | 51364 [bulatz integ] blin! i suggest use '===' for all cases
| | 51371 [justinj mobi] Could you explain this a little more please?
| | 51372 [bulatz integ] def a(String x)
| | 51375 [decoux moulo] And this translated to ?
| | 51376 [bulatz integ] in this case dispatcher can run any of this functions. in each case we
| | 51378 [decoux moulo] pigeon% ruby -e 'def a(Array a, Object o) end; def a(Object o, String s) end'
| | 51382 [bulatz integ] why you don't want to add overload to mainstream ruby?
| | + 51384 [dblack candl] For me, it's because, as you pointed out, it doesn't correspond to the
| | | 51388 [bulatz integ] 1) ability to declare several functions with different arguments
| | | + 51391 [dblack candl] That's circular reasoning -- it's good because doing it allows us to
| | | | + 51395 [bulatz integ] well, i mean "declaration of argument types has 3 advantages, and
| | | | | 51399 [billtj z.glu] I sense that this discussion is related to a previous question, "Has a
| | | | | + 51401 [Dave Pragmat] I guess I'm not one of the 'we' you mention. I used to be, but I'm not
| | | | | | 51409 [billtj z.glu] I think you know that "large scale software development" usually implies a
| | | | | | + 51416 [Dave Pragmat] No, but then again I don't think I could assemble a team of 100 java
| | | | | | | + 51440 [billtj z.glu] Exactly.  Just show us many big successful projects written by big teams
| | | | | | | | 51446 [Dave Pragmat] Actually, I was suggesting something slightly different. Before you
| | | | | | | | 51451 [billtj z.glu] Oh, no, no, I didn't intend to say it can't be done at all.  It is not
| | | | | | | + 51448 [billtj z.glu] Composition of C and Ruby is an issue, but SRuby should not be an issue at
| | | | | | | + 51537 [hal9000 hype] The problem with that is that a 20 KLOC Ruby program
| | | | | | |   51538 [Dave Pragmat] And that's a problem because....  :))
| | | | | | |   51540 [hal9000 hype] problems (that I could solve) that would require
| | | | | | |   51663 [batsman.geo ] "No application with more than 100KLOC has ever been written in Ruby,
| | | | | | + 51420 [rich infoeth] Well, I'm not Dave (although sometimes I tell people I am at parties ;-)
| | | | | | | 51447 [billtj z.glu] Great!  We need many many more examples like this and probably we should
| | | | | | | 51554 [gsinclair so] See RealWorldRuby on the wiki.
| | | | | | + 51427 [frido q-soft] Yes, I can not see any reason why Ruby should worse than Smalltalk,
| | | | | | | 51442 [billtj z.glu] If I should pick just one or two words, it is: garbage collector.
| | | | | | | + 51453 [mikkelfj-ant] Actually, Netscape used to coredump a lot and leaked memory like nothing
| | | | | | | + 51463 [Dave Pragmat] parser, written in Ruby.
| | | | | | | | + 51471 [vjoel PATH.B] Netscape, in its current state, requires quite a bit of daring to *use*.
| | | | | | | | + 51476 [billtj z.glu] I think you are almost there, Dave.  This really encourages people to
| | | | | | | + 51559 [frido q-soft] What should that costs be? And what should be the problem with GC? I
| | | | | | |   51610 [billtj z.glu] Again, if I should pick just several words, it is: real time programming.
| | | | | | |   51643 [frido q-soft] This is not true, check google for Real-Time GC and you'll find quite
| | | | | | |   + 51680 [billtj z.glu] You are probably correct, but not with the current Ruby gc.  Event Dave
| | | | | | |   | 51762 [batsman.geo ] If it were real-time, the cost would be amortized during the whole
| | | | | | |   + 51682 [batsman.geo ] But right now Ruby's GC isn't incremental and will (probably) never
| | | | | | + 51430 [mikkelfj-ant] Pointer errors in C++ can easily delay the release of a large product
| | | | | |   51441 [billtj z.glu] If private variables aren't really going to solve anything, why was then
| | | | | |   51452 [mikkelfj-ant] I'm not arguing for or a against private variables. They may be a good tool
| | | | | |   51455 [billtj z.glu] I think this case might be realistic.  I have a class (such as a TCP
| | | | | |   51468 [mikkelfj-ant] This is a general Ruby problem / feature. But making a variable private
| | | | | |   51474 [billtj z.glu] This is just my own opinion; I don't know much about strict software
| | | | | + 51404 [bulatz integ] that's because of dynamic typing. even when you write "2+2" you don't
| | | | | | + 51411 [Dave Pragmat] Not in Ruby...
| | | | | | | 51541 [bulatz integ] of course. you skipped point that i say about OPTIMIZING compiler. and
| | | | | | + 51424 [alan digikat] But that could happen just as easily in C++ in a strongly typed environment.
| | | | | |   51546 [bulatz integ] c++ use non-virtual calls in many simple cases (2+2 for example can't
| | | | | + 51415 [dblack candl] Isn't this like saying, "We know that violins have strings, and those
| | | | | | 51543 [bulatz integ] this sounds great only when you have real alternative to strings. now
| | | | | | 51594 [dblack candl] No, I say, "Clarinets have a right to exist, and to be used on their
| | | | | + 51425 [frido q-soft] I don't buy that any longer. A counter example, how much of ruby is
| | | | + 51413 [justinj mobi] This topic seems to have become side-railed.
| | | |   + 51418 [chr_news gmx] Sigh, the overload discussing always follows
| | | |   | 51419 [billtj z.glu] I agree, but we have to be careful about the consequence of
| | | |   | + 51422 [justinj mobi] What sort of ambiguities?
| | | |   | | + 51423 [billtj z.glu] Well, you know, when the passed objects do not match the expected classes
| | | |   | | | + 51429 [justinj mobi] Well, I think we established that "===" wouldn't work.
| | | |   | | | | 51438 [chr_news gmx] Yes that is Achilles tendon of the whole mulit-method thing.
| | | |   | | | + 51545 [bulatz integ] no, it is up to implementation. language guarantee only what on of
| | | |   | | + 51426 [decoux moulo] What do you do in this case
| | | |   | | | 51439 [chr_news gmx] It would be helpful  (I have an idea but ...) if you could
| | | |   | | | 51579 [decoux moulo] Same than Dylan, except that I don't give the possibility to change the
| | | |   | | | 51652 [chr_news gmx] Thanks!
| | | |   | | | 51657 [decoux moulo] yes, do you remember what do ruby with an included class ?
| | | |   | | | 51672 [chr_news gmx] In a variation of a famous line of one of my favorite
| | | |   | | | 51745 [decoux moulo] Well, apparently you have not seen where is the problem. The problem is
| | | |   | | | + 51864 [chr_news gmx] Your ``stupidity''  is no match for mine (and it is definitely
| | | |   | | | | 51942 [decoux moulo] If I'm right (don't trust me on this), cecil give a warning at compile
| | | |   | | | + 51915 [bulatz integ] i can't understand. you can change the interpreter to support new
| | | |   | | |   51944 [decoux moulo] Yes, I'm like you, see [ruby-talk:51378] :-)
| | | |   | | + 51431 [mikkelfj-ant] How different need a type to be to be different. Is signed / unsigned
| | | |   | | | 51553 [gsinclair so] So you set some rules.  Signed and unsigned integers are clearly not
| | | |   | | + 51432 [mikkelfj-ant] (on C++ overload)
| | | |   | | + 51434 [chr_news gmx] Here is an example for an ambiguous situation
| | | |   | |   51435 [chr_news gmx] Ups - following the logic of my silly overload
| | | |   | + 51428 [chr_news gmx] As far as I know there are essentially four possible ways to do
| | | |   | | 51437 [decoux moulo] The ambiguity can be seen when ruby define the method, except for the
| | | |   | | 51479 [chr_news gmx] That is a good point -  It might be a good idea to precompute
| | | |   | | 51580 [decoux moulo] It always easy to pre-compute a table when you know *all* possible
| | | |   | | 51656 [chr_news gmx] It just like the paper since it describes the differences and communality
| | | |   | + 53848 [qrczak knm.o] What is the difference between d) and b)?
| | | |   + 51542 [bulatz integ] i never suggest that
| | | + 51470 [comp.lang.ru] - - I don't view this a Pro.
| | |   51550 [bulatz integ] bclrS20tse> - - I don't view this a Pro.
| | |   51562 [matz ruby-la] If you really believe that compile time type checking is that
| | |   51567 [bulatz integ] 1) i say about dynamic type checking, as does overload.rb. see start of
| | |   51571 [matz ruby-la] * multiple method (as in CLOS, Dylan) does not fit in Ruby at all.
| | |   51573 [bulatz integ] can you please give me an example? i know many languages but
| | |   51583 [matz ruby-la] (defmethod (plus (integer x) (integer y))
| | |   51609 [batsman.geo ] If this example is to be any different from overloading, the dispatch
| | |   51732 [matz ruby-la] By functionality, yes.
| | + 51461 [comp.lang.ru] - - This is not Ruby. If you really want typed arguements, then you
| |   + 51462 [billtj z.glu] Why not designing a new language with a mix of typed variable and untyped
| |   | 51464 [rich infoeth] Well, I would like the idea of optional typing in one instance...to
| |   | + 51475 [mikkelfj-ant] You could also view the WSDL as a way to apply types to Ruby. A marshaller
| |   | + 51483 [billtj z.glu] 1) First, we all love Ruby, right?  So there must always be untyped
| |   |   + 51489 [dblack candl] What this comes down to is, primarily, the question of whether one
| |   |   + 51492 [batsman.geo ] I'd prefer something really horrible so newcomers don't start coding as
| |   |   | 51493 [dblack candl] -e:1: undefined local variable or method `a' for #<Object:0x401c8ce0> (NameError)
| |   |   | 51498 [batsman.geo ] That would be far more effective :)
| |   |   + 51535 [rich infoeth] Actually, you inverted my thought.  I am not interested in types on
| |   |   | 51564 [bulatz integ] it's the same - name and age will be local variables, want you or not
| |   |   | 51568 [rich infoeth] Actually its not the same.  I don't want the type information
| |   |   + 51555 [gsinclair so] dblack elegantly dealt with this a few weeks ago.  instance_of? and kind_of?
| |   |     51565 [bulatz integ] overload.rb on yaraa. and someone even added proposed SYNTAX to
| |   + 51473 [vjoel PATH.B] As has been said recently, multiple dispatch is not type checking. If
| |   | + 51507 [comp.lang.ru] - - I guess we'll just have to agree to disagree. Just because
| |   | | + 51516 [vjoel PATH.B] My bad, not clearly explained.
| |   | | + 51523 [chr_news gmx] What is the difference of sending an ``add'' request
| |   | |   + 51525 [chr_news gmx] Ehm make that 4;-)
| |   | |   + 51558 [bulatz integ] definitely YES!
| |   | |     51566 [matz ruby-la] Is it?  I don't think so.  I wasn't (and still isn't) brave enough to
| |   | + 51856 [qrczak knm.o] Suppose finding the method of an object is implemented in a different
| |   + 51548 [bulatz integ] bclrS20tse> - - This is not Ruby. If you really want typed arguements, then you
| |     + 51596 [dblack candl] Ruby is a system.  Parts of that system manifestly resemble parts of
| |     + 51641 [comp.lang.ru] - - Exactly, it happens to include the ideas that I think are
| + 51306 [decoux moulo] You have a very strange overload (C++ or j*v* like ???)
|   51365 [bulatz integ] prolog-style :)  pattern-based prototype matching. it's used in almost
|   51374 [decoux moulo] Yes, and in the case
|   + 51377 [bulatz integ] of course, it is overloading, not OOO :)
|   | 51379 [decoux moulo] Like I've said you use something strange :-)
|   + 51380 [justinj mobi] This means that the dispatcher must find the _closest_ match rather than
|     + 51383 [dblack candl] See the recent thread, starting at [ruby-talk:49988], on "not grasping
|     + 51467 [comp.lang.ru] - - It violates the spirit of Ruby. IMHO, anything that does
|       + 51488 [batsman.geo ] def do_foo(String b)			def do_foo_str(b)
|       | + 51505 [matz ruby-la] I like the *concept* of this idea.
|       | | + 51515 [comp.lang.ru] - - You should probably look at the extensions NeXT made to
|       | | | + 51529 [matz ruby-la] I agree with you wholeheartedly.
|       | | | | 51563 [bulatz integ] what is the protocol, in your mind? i think that this is a bundle of
|       | | | | 51570 [matz ruby-la] If you have method overloading, you can use modules as if they are
|       | | | | 51572 [bulatz integ] difference between our viewpoints is what i think that method body
|       | | | | 51577 [matz ruby-la] I agree with it, so it is not our difference.
|       | | | | 51588 [bulatz integ] and agree that protocols can be emulated via mixed modules?
|       | | | | 51733 [matz ruby-la] Agreed.  But "it can be" does not mean "it should be".
|       | | | + 51557 [bulatz integ] bclrS20tse> - - You should probably look at the extensions NeXT made to
|       | | | + 51560 [frido q-soft] Ah well, I missed that. I would think this is really a very good idea
|       | | | + 51653 [chr_news gmx] <bbense+comp.lang.ruby.Sep.26.02@telemark.stanford.edu>
|       | | + 51536 [rich infoeth] def do_foo(b<sort,bar>)
|       | |   51539 [nahi keynaut] In practice, Ruby's type cannot be mapped 1-1 to other
|       | + 51581 [nobu.nokada ] What about this? ;)
|       |   + 51608 [batsman.geo ] A lighter way to express that is needed, and that's why I think this
|       |   + 51619 [gsinclair so] <sarcasm>
|       + 51517 [gsinclair so] I don't know Objective C, but I presume the _interfaces_ are a similar idea as
|       | 51659 [comp.lang.ru] - - I misrememebered the name, it is actually "protocol" that was
|       + 51549 [bulatz integ] bclrS20tse> - - It violates the spirit of Ruby. IMHO, anything that does
|         51842 [list NOSPAMc] The average Ruby programmer arguably uses something more than Strings
|         + 51857 [gsinclair so] Nooo... it was very interesting.  "Someone" should throw it in the Wiki!
|         + 51889 [pit capitain] You will for sure. I very much enjoyed your post.
|         + 51936 [bulatz integ] most of current overloading done for string/integer/self.type base
|           51985 [list NOSPAMc] According to...?
|           52075 [bulatz integ] ruby distribution (see *.rb and docs about classes implemented in C)
|           52596 [list NOSPAMc] So in order to change what most end programmers will never even look
+ 51332 [chr_news gmx] This is not necessarily true - You could make the
  51366 [bulatz integ] no, using at least one type (pattern) specifier will be sign that

^ Using tcltk with cygwin Ruby
51169 [yvj57b5001 s] This is a multi-part message in MIME format.
51197 [eban os.rim.] 1. Install Tcl/Tk for Windows.
51310 [yvj57b5001 s] Thank you for pointing me in the right direction on how to get cygwin ruby

^ My script showing Python speed vs. Ruby (long, includes code)
51175 [bobx linuxma] OS = Windows XP
+ 51186 [szegedy nosp] It seems that String#include is not implemented efficiently
| 51244 [bruce codedb] Situations like those are why I *always* check my programs through profile.rb
| 51248 [bobx linuxma] profile.rb
| 51282 [szegedy nosp] which is sometimes more helpful (but not on big programs).
| 51373 [bruce codedb] I've just gotten into the habit of using -rprofile
+ 51260 [bulatz integ] hmmm. try to run scripts in reverse order
  51283 [szegedy nosp] There may be cache effects, but I could reproduce a 2x

^ Why "and and or" Have Different Association from "&& and ||"?
51183 [billtj y.glu] I searched through the previous discussions on this subject, but I could
51195 [matz ruby-la] Because english words "and" and "or" does not have precedence order.
51201 [nat.pryce b1] On the other hand, the english word "or" actually means "^" (exclusive
51204 [billtj y.glu] I tend to agree with Nat, that probably the "English influence" should be

^ Object-Oriented struct Model in C
51185 [billtj y.glu] In the Ruby-C world, we can make an association between a Ruby class and a
+ 51198 [pbrannan atd] This will work just fine.  There's a little bit of extra run-time
| 51209 [billtj y.glu] Thanks for giving the excellent idea on doing the object-orientation on
| 51210 [pbrannan atd] *   Klass_func
| 51214 [billtj y.glu] Thanks for the explicit example.  I see, so we use some naming convention
| 51216 [pbrannan atd] I wouldn't exactly call this easy; with the code I've written, you still
| 51217 [billtj y.glu] Well, putting the inner objects on the stack may require a large stack (we
| 51220 [pbrannan atd] Don't put the object itself on the stack, put the VALUE that refers to
| 51228 [billtj y.glu] Oh, yes, yes, that was exactly what I meant when I reffered to putting the
| 51231 [pbrannan atd] In that case, if you really have a single outer object holding thousands
| 51233 [billtj z.glu] I think this is really a fundamental/philosophical question.  When we
| 51235 [pbrannan atd] I beg to differ.
| 51296 [billtj y.glu] Thanks a lot for the comprehensive information.  My responses are below.
| 51301 [pbrannan atd] You don't really need references to all the inner the objects on the
| 51309 [billtj y.glu] But at any level, if that object that holds references to the inner
| 51313 [pbrannan atd] I think so.
| 51318 [billtj y.glu] Thanks for the clarification.  I guess then the actual problem may be even
| 51323 [pbrannan atd] My mistake; I meant RData.  But whether you have an RObject or an RData
+ 51223 [vjoel PATH.B] My turn to sound like a broken record...
  51229 [billtj y.glu] Thanks for contributing.  Actually I just scanned your cgenerator in RAA
threads.html
top