18867-19460 subjects 19272-20082

^ Install Ruby on Unix
19093 [thucdat hotm] <html><div style='background-color:'><DIV>
19095 [james jamesb] This is a multi-part message in MIME format.
19103 [thucdat hotm] <html><div style='background-color:'><DIV>
19107 [james jamesb] This is a multi-part message in MIME format.
19112 [sofdec world] Did you install by source code?
19141 [thucdat hotm] <html><div style='background-color:'><DIV>

^ Unbuffered output
19097 [harryo zip.c] I'm trying to write a small interactive program that reads commands and
+ 19099 [ned bike-nom] Have you tried STDOUT.sync ?
+ 19101 [harryo zip.c] I hadn't, but I just did and that didn't help :-(.
| + 19122 [ugly-daemon ] Are you sure you are getting the input after printing the prompt?? May I see
| + 19132 [harryo zip.c] Sure. This is the main loop (the current version) ...
|   19172 [ugly-daemon ] Ok it has something to do with $stdin.eof. I think what is happening is it is
+ 19116 [decoux moulo] Try something like this
+ 19133 [harryo zip.c] That doesn't work, either.
  19136 [decoux moulo] Well, this code work for me with 1.6.4 and 1.7.1

^ Endianness and integer indexing
19098 [eric badtux.] I have the following code to detirmine even-ness for an integer by
+ 19102 [harryo zip.c] Sorry, I can't answer your question, but thanks for the code.  I was
| 19106 [eric badtux.] Oh, okay. I've noticed an interesting thing about [] though -- it is
| + 19108 [ned bike-nom] Wouldn't it be faster to just do '| 1'  if all you're doing is testing
| + 19110 [eric badtux.] You mean "& 1", right? As in, " if (a & 1)==0 then
| | 19111 [ned bike-nom] Sorry, yes, of course that's what I meant. Fingers too fast tonight (or brain
| + 19114 [harryo zip.c] Fortunately, I'll only ever be playing with relatively small numbers, so
| | 19143 [eric badtux.] I spent more time thinking on the subject last night, and I think that
| + 19145 [matju sympat] I don't know why you are doing #clone at all. It doesn't slow down so much
+ 19146 [matju sympat] Integer#[] is not dependent on endianness.
  19147 [eric badtux.] Thanks.

^ using range of regex in IO.foreach ???
19105 [someone home] Ranges as Conditions
+ 19109 [Dave Pragmat] Try
+ 19142 [someone home] Thanks.  Did the trick.

19113 [sudhivs yaho] unsubscribe Sudhi Sathya

^ telnet.rb ECONNRESET
19115 [dominik babb] I am trying to write a script that checks if a pop password is correct or not.
+ 19117 [decoux moulo] You have a library 'net/pop' in the standard distribution of ruby
+ 19150 [sofdec world] You should be able to catch this by an exception.

^ Something nicer than @?
19121 [mikkelj-anti] One of the things I like least about Ruby is they way @ spoils otherwise
+ 19120 [mikkelj-anti] Sorry, I don't know why I suddenly thought parameters didn't need comma
+ 19123 [dblack candl] I know what you mean, though in the case of class variables
  19126 [mikkelj-anti] Yes, postfix ' doesn't work (as in x') because functions do not require
  19128 [dblack candl] Except that's really the symbol syntax, not specific to arguments
  19130 [mikkelj-anti] Right.

^ My 1st look @ ruby: No prototypes and problem with String#gsub
19125 [stesch no-sp] ruby 1.6.4 (2001-06-04) [i586-linux]
+ 19127 [decoux moulo] No.
+ 19129 [dblack candl] This seems like a lot of code to write, and variables to use, to get
| 19251 [bobgus mcs.c] You might take the urge to check 'types' of arguments as a subliminal
+ 19155 [Dave Pragmat] I have to tread carefully here, because there are those on this list
+ 19159 [mikkelj-anti] I agree about not making any explicit typechecking. But I believe there is
| 19161 [Dave Pragmat] Except there's no type involved. At best it's a convention.
| + 19162 [nat.pryce b1] I agree.  Another problem with adding precondition checks to a routine is
| + 19174 [matju sympat] No, you'll make explicit the names of the operations, which is quite
| | + 19175 [Dave Pragmat] True, but in a dynamic language with open base classes I'm not sure I
| | | 19556 [matju sympat] A "_viable_ alternative" (?) may be to stop writing spaghetti frameworks
| | + 19176 [mikkelj-anti] A database operation where Rollback is not supported. Rollback is only
| |   + 19178 [Dave Pragmat] OK - interesting example.
| |   + 19182 [mikkelj-anti] For some applications this is true. But you might feel comfortable with the
| + 19222 [marick visib] Error messages, sometimes.
+ 19160 [stesch no-sp] Ah, thanks!
  19166 [Dave Pragmat] The interpreter will find the bug for you, so I wouldn't bother.

^ Re: My 1st look @ ruby: No prototypes and problem
19131 [mikkelj-anti] That is another good reason for adding it to Array. Shuffling is supposedly
19137 [thegrandbrie] Both of these are pretty cool...

^ Re: Array.shuffle
19135 [kero d4050.u] It is slightly off.
+ 19140 [Stephan.Kaem] self[i-1], self[r] = self[r], self[i-1]
| 19144 [kero d4050.u] I'm just not completely adapted to Ruby, yet :)
+ 19148 [dblack candl] class Array

^ shared mem
19158 [markus.lado ] what are people thinking about "shared memory for ruby"?
19577 [matju sympat] Good idea. I'd recommend starting with a byte-buffer. If you have good
19596 [ale crimson.] Just to note there's this thing already in RAA
19621 [mikkelj-anti] I haven't got around to looking at these links, but I dont think that you

^ challenge (playing games: the learning machine)
19163 [tobiasreif p] Can your approach break new ground in artificial intelligence?

19164 [tobiasreif p] What do you think?
19165 [decoux moulo] You could also express the task in another language :-)
+ 19180 [tobiasreif p] check
+ 19187 [waisun.chia ] Exactly..not everybody's native language is English (including our
  19193 [tobiasreif p] Yep; at first I had "human language". But that sounded too complicated

^ struct and $SAFE
19167 [decoux moulo] This is normal ?
19168 [matz ruby-la] No.  Could you commit your patch?  It seems good.
19169 [decoux moulo] I've an error
19171 [matz ruby-la] Hmm, might be ACL error.  knu, the CVS maintainer would help.
19189 [knu iDaemons] Sorry for being late.  My Internet connection had been down for three

^ redirecting stdout, stderr from Kernel#system on W2K
19170 [mikkelj-anti] I'm trying to use a ruby script as a simple make tool where I essentially
19232 [VardhanVarma] Are you invoking the script as

^ ANN: PLEAC - Programming Language Examples Alike Cookbook
19173 [gc mandrakes] I'd like to announce a (rather) new programming languages project I'm

^ Strange problem with FILE#eof
19177 [harryo zip.c] I posted a question here yesterday regarding what I thought was buffered
+ 19179 [Dave Pragmat] A cat sits in a closed box in front of a keyboard. Next to it is a
+ 19181 [harryo zip.c] Thanks Dave.  That makes sense. It's just not how I remember I/O working

^ Bug in mkmf.rb/1.7.1-cvs
19188 [waisun.chia ] I just tracked down a bug which killed any other applications from

^ s///eg in ruby
19190 [taw users.so] $str =~ s/a(b)c(d)e/func($1,$2)/eg;
19191 [matz ruby-la] $str.gsub!(/a(b)c(d)e/){func($1,$2)}

^ Some remarks from a nembie in Ruby
19192 [renaud.heber] After having read the book "Programming Ruby: The Pragmatic Programmer's
+ 19195 [WYS helbling] <<SNIP>>
+ 19196 [decoux moulo] Euh, it has *2* types of blocks delimiters
| 19198 [ljz asfast.c] But to replace the letter 'a' with two backslashes, you still have ...
| + 19200 [renaud.heber] In fact, it is not the length or the '\\\\\\\\' strings needed and I
| | 19201 [eli.green co] That seems harsh. =)
| | + 19250 [kero d4050.u] I think I am the one that encouraged him; I also think it is not silly;
| | + 19317 [ljz asfast.c] Well ... it's also possible to have a consistent, totally O-O parser
| |   19325 [eli.green co] Actually, I went looking at the %Q(...) syntax before I sent that e-mail,
| + 19301 [erik bagfors] What about gsub(/a/) {%Q(\\)} ??
|   19363 [in6x059 publ] %Q are the same as doublequotes. You have to use
+ 19202 [r2d2 acc.umu] Thanks for a very nice post. I think a discussion like this is really
| + 19205 [jweirich one] This can't always be detected at compile time.  E.g.
| + 19207 [nat.pryce b1] I'd prefer it as a method on the Range class.  E.g. this looks more natural
| | + 19208 [renaud.heber] replace "yield start + i" by "yield first + i" and it works :-)
| | | 19216 [matz ruby-la] Submit RCR at www.rubygarden.org
| | | 19223 [renaud.heber] I just did so, we'll see if the discussion will lead to other possible
| | | 19224 [decoux moulo] You break how many scripts with these changes ?
| | | 19226 [renaud.heber] I don't break any scripts: it depends of the way the change are managed
| | | + 19227 [decoux moulo] And if this is a script running as a daemon, it fill the error log with
| | | | + 19229 [renaud.heber] []
| | | | | + 19230 [decoux moulo] You break some scripts
| | | | | | 19233 [renaud.heber] Not until you change the meaning of 010, just adding the 0o notation
| | | | | + 19295 [green FreeBS] They're not quirks.  They're simply how the language is defined.  It also
| | | | + 19249 [in6x059 publ] Oldtimers become blind for some deficits.
| | | | + 19271 [irving_1 com] Please note: But it's not all the beginners!
| | | + 19228 [Dave Pragmat] I'd much, much rather see a IO#autochomp= method.
| | |   + 19231 [renaud.heber] I don't like the idea of some kind "global state variable" which would
| | |   | + 19238 [Dave Pragmat] It's an instance method, so it would be local to a particular file
| | |   | + 19281 [pdcawley ite] Global would be bad. Per IO object is surely the way to go.
| | |   + 19280 [pdcawley ite] Which appears to be direction in which Perl is headed with the work
| | + 19212 [ugly-daemon ] That's the absolute perfect way to do it!! :)
| + 19279 [pdcawley ite] Not if you're doing the right thing and using strict you don't. You
+ 19211 [ugly-daemon ] I don't like having { .. } either, I think I would prefer to see just do ..end.
  + 19252 [kero d4050.u] emacs ruby-mode adds EOL at EOF to ruby-scripts if it is not there :)
  + 19302 [erik bagfors] I like each better though. Also remember that with blocks/iterators you

19194 [r2d2 acc.umu] I've found that when you 'make' ruby from source under cygwin, tcltklib

^ Net::HTTP class: proxy user and proxy password args?
19197 [YuriLeikind ] I have read embedded documentation for Net::HTTP class

^ [1.7] lstrip!
19209 [decoux moulo] It seems that it exist a problem in lstrip!

^ Regexp#to_s not very useful
19210 [EricCrampton] a = Regexp.new("foo")
19245 [nat.pryce b1] Agree!  In fact, swapping the two methods would make it much easier to

^ [ANN] NQXML v1.1.0
19213 [ jimm io.com] NQXML is a pure-Ruby XML parser. As always, NQXML can be found at

^ symbols for global constants
19219 [stephen.hill] I'm getting a bit confused about global constants and class names
+ 19218 [ jimm io.com] irb > factory(eval("String"), "hello")
+ 19220 [decoux moulo] Well, you have #eval to do this but it can be dangerous if you don't trust

^ Lisp macros (was:  Re: Ruby as opposed to Python?)
19236 [marick visib] I'm not sure the question was answered in a way clear to someone who

^ http: "hi, my name is"-message
19237 [tobiasreif p] When I download stuff from a webserver with Ruby, what does Ruby tell
+ 19240 [ned bike-nom] This is sent in the User-Agent HTTP header.
+ 19242 [Dave Pragmat] It's the 'User-Agent' header. If you're using Net::HTTP, you can set it
| 19243 [toddg linux1] GET /somefile HTTP/1.1
+ 19244 [neumann s-di] Download TCPSocketPipe by NaHi from RAA and start the contained monitor.rb

^ MIME type
19239 [tobiasreif p] how can I find out the MIME type of an online file?
19241 [ned bike-nom] By looking at the Content-type HTTP header that the server sends back.

^ re
19246 [markus.lado ] i'm just not understanding it...
+ 19247 [Dave Pragmat] You've asked it to match the longest possible string of 'z', 'u', or
+ 19258 [john.carter ] Perhaps you mean...
  19260 [john.carter ] Sorry, I stated that badly. Your regex matches exactly the same as mine,
  19274 [stesch no-sp] Me, too.
  19288 [Dave Pragmat] The regexp matches "z u ", so it starts at position 0.
  19289 [WYS helbling] "z u i u" =~ /(z|u|\s)+?/

^ Ruby/Tk: how to discard excess messages
19248 [alwagner uar] An auto-repeat key is sending additional messages while method is
+ 19254 [kero d4050.u] def do_it(widget)
| 19265 [alwagner tca] You're right, Kero.  I tried that:  it doesn't work.
+ 19255 [nat.pryce b1] Once you have received a KeyPressed event for a particular key, ignore
  + 19266 [alwagner tca] Thanks, Nat.  That's useful to know.  I didn't realise that no releases were
  | 19278 [nat.pryce b1] Ignore any other presses and scroll the window with a timer callback.
  + 19268 [alwagner tca] Just checked on my linux box and I get a keypressed/keyrelease combo sent

^ Trying to get to grips with Ruby threads
19253 [peterhi shak] like) the following code. What happens is each thread processes in turn with
+ 19256 [wjl mindless] Sleeping does not release the mutex... so thread #1 is always going to
+ 19338 [peterhi shak] I thought that as well. However the cv.signal is before the sleep and so the
  + 19370 [kjana os.xax] ConditionVariable#signal only signals some condition is met --- Mutex
  + 19393 [peterhi shak] Thank you very much. Your code example does just what I was expecting mine

^ ANNOUNCE: socket options library v0.1
19259 [nat.pryce b1] I would like to announce the release of Sockopt 0.1.  Sockopt is a package
19329 [feoh fourfuz] I can't speak to this extension's rightness or wrongness WRT the Ruby core,
19369 [nat.pryce b1] think

^ rdf parser in ruby?
19261 [joe vpop.net] Has anyone written an RDF parser in ruby?  Something that would parse
19263 [toddg linux1] Could you explain to us why XMLParser won't work?
19264 [chadfowler y] I think he's suggesting something that does more of

^ Dereference operator
19262 [larsch cs.au] I was just wondering about the possibility for overloading of what in C++
19487 [matz ruby-la] This hook might useful sometimes.  But I'm afraid it slows down

^ SOAP4R with NQXML/1.1.0
19267 [nakahiro sar] This is a patch for SOAP4R/1.3.6 to live with NQXML/1.1.0.

^ Re: Perl/Python/Ruby common backend (Parrot, can Ruby play too?)
19269 [ptkwt shell1] It seems to me that if there is any kind of 'official' collaboration
+ 19270 [ned bike-nom] There is a new mailing list that was designed for just this discussion.
+ 19273 [markus.lado ] I may be a good solution to use common backends. One would have to know
| 19316 [tobiasreif p] in - de - what?
+ 19276 [aleaxit yaho] def one(self): print 'one'
| + 19277 [tom alkali.s] <code>
| | + 19294 [maki open-ne] a = "foo"
| | | 19296 [BPettersen N] I think the only need I've seen so far in Ruby that isn't neccessary in
| | + 19298 [aleaxit yaho] ability
| |   19330 [eli.green co] There's no distinction in ruby between classes that are builtin or not, as far
| + 19331 [ptkwt shell1] Sorry, I don't know Python that well.  But I was also referring to the
|   + 19332 [dalke acm.or] I admit to being quite worried about that feature.  If that is
|   | + 19339 [aleaxit yaho] If you want existing instances to NOT be changed, in Python,
|   | + 19342 [erno-news er] ....         print 'yum'
|   | | 19343 [dalke acm.or] I do want to emphasize that this isn't a need of mine.  I brought
|   | | + 19346 [ned bike-nom] Adding methods to existing classes is a very useful idiom. It's used in
|   | | + 19347 [thegrandbrie] import math
|   | + 19705 [tim.hochberg] This looks kind of similar and appears to work (at the expense of slowing
|   + 19333 [aleaxit yaho] base classes, plural (which I had shortened to 'bases') -- you can change
|   + 19486 [matz ruby-la] Not in general.  Exception is IO#reopen.
+ 19349 [matju sympat] Like has been said, adding stuff to an existing class is not
| + 19351 [ned bike-nom] I don't understand what you mean. In Perl, the method lookup is first in the
| | + 19357 [pdcawley ite] Don't get me started on this. See the debate on the subject I had with
| | | + 19383 [ned bike-nom] In Class::Prototyped we ended up having to use closures to get "proper" super
| | | + 19391 [pulsar qks.c] super
| | |   + 19392 [pulsar qks.c] they're
| | |   | 19396 [ned bike-nom] David, I've been reading your posts on your recent work and have been very
| | |   + 19585 [pdcawley ite] Cool. The problem with the current perl implementation is that it
| | + 19362 [matju sympat] although method lookup is depth-first, when you call SUPER it does it in
| + 19353 [feoh fourfuz] The language has no counterpart to Ruby's modules.
| | 19364 [matju sympat] (2-in-1 reply)
| | 19368 [pdcawley ite] Maybe I'm completely misunderstanding what ruby's mixins are. From my
| | + 19371 [decoux moulo] An example of mixin in ruby. The class String is defined
| | + 19570 [matju sympat] mixins are way closer to multiple inheritance than that.
| + 19358 [pdcawley ite] You can 'sort of' do mixins with perl
| + 19456 [harryo zip.c] My apologies if I missed an explanation earlier in this thread, but ...
|   + 19461 [ned bike-nom] Ruby allows a limited form of this already, since I can specify a
|   | + 19465 [harryo zip.c] Ah. I see what you're getting at now.  I'm sure this is incredibly naive,
|   | | 19466 [ned bike-nom] But then you make each one of these objects slower, because each method call
|   | + 19477 [decoux moulo] No, this create a new class where are stored the new methods, why do you
|   | | 19489 [ned bike-nom] I think that's what I meant but didn't say. The new class has the original
|   | | 19490 [decoux moulo] Yes, but you can't compare singleton classes with perl bless.
|   | | 19492 [ned bike-nom] Of course. What I was saying is that "changing the class" effectively happens
|   | | 19494 [decoux moulo] I don't think, but you must see that it exist a *BIG* difference between
|   | + 19575 [matju sympat] Patch below.
|   |   19594 [fgp phlo.org] [snipped patch]
|   |   19598 [decoux moulo] What do you think of this ?
|   + 19584 [pdcawley ite] Consider a set of 'State' classes. State objects all have the same
+ 19385 [ptkwt shell1] There was no intent for this thread to devolve into a 'Python vs. Ruby'
  19387 [feoh fourfuz] FYI I'm rather embarrassed at this post, it was a botch, I thought this
  19388 [cbroult sapi] This message is in MIME format. Since your mail reader does not understand
  + 19389 [bryan terral] Sure, that's a potential problem, but that is one that is easily settled
  | 19390 [cbroult sapi] This message is in MIME format. Since your mail reader does not understand
  + 19395 [ptkwt shell1] The scenario you present (selling the common backend as a means for