62134-62900

61901-68478 subjects 62321-63584

[WIN] killing a process
62134 [sdate@kc rr ] Using ruby1.7.3 (2002-11-17) [i386-mswin32]
+ 62135 [phasis@no nu] Use taskmgr.exe
| 62165 [sdate@kc rr ] Can taskmgr.exe be called from a ruby program without invoking its GUI ?
+ 62137 [nobu.nokada@] In 1.7 or later, Process.kill uses TerminateProcess() when
  62166 [sdate@kc rr ] Yes, that worked ! Thanks a lot ...
  62167 [usa@os .a t.] INT    (2)

disable a TkListbox
62147 [lausianne@gm] I couldn't figure out how to disable a TkListbox.
+ 62154 [nagai@ai ky ] Like this ?
+ 62157 [lausianne@gm] Thanks a lot! This is more than I was hoping for. Wonderful.
+ 62158 [lausianne@gm] Thanks a lot! This is more than I was hoping for. Wonderful.
  62163 [nagai@ai ky ] You can use the option, if your Tcl/Tk library,

OT: using DBI, SQL driving me crazy
62150 [transami@tr ] SELECT i.record,
62153 [transami@tr ] SELECT i.record,

VIM module
62159 [briqueabraqu] Is anyone using the VIM module to write scripts inside vim? I can't
+ 62162 [emmanuel.tou] i'm using it, it works pretty well.
| + 62164 [gsinclair@so] I'm sure a few of us would like to know what you've accomplished with
| | 62266 [emmanuel.tou] firstable as of now i'm pretty lame in ruby, i'm just starting.
| + 62180 [briqueabraqu] look?
|   62183 [gsinclair@so] support everything natively.  IIRC, it was a lot of work for the
|   62267 [emmanuel.tou] exactly. or write vimL functions and call them from ruby with VIM::evaluate.
+ 62273 [brailsmt@ya ] I use ruby to script vim whenever I get the chance.  I have two such

Suggestion for digest: Table Of Contents?
62160 [christopher.] How feasible is it to have the digests distributed with a brief TOC at the

"bad file descriptor" from tcp sockets
62161 [loats205@ao ] ok, im binding a listening socket with TCPServer, looping for inbound

Threading problem ...
62168 [lars-m@gm .n] Why does this script not work the way I intended it to work? Thanks in
+ 62169 [dblack@ca dl] You're being punished for using camelCase in Ruby method names :-)
| 62171 [lars-m@gm .n] Right. So what's the solution? How can I pass a block of code as an
| 62174 [dblack@ca dl] def run_me(block)
| 62175 [lars-m@gm .n] Thanks so much!
| + 62178 [dblack@ca dl] If your Proc just wraps a method call, you can just call the
| + 62245 [loats205@ao ] this works the same way and you aren't creating any new proc objects. You are
| + 62531 [bulatz@in eg] better will be
| + 62533 [bulatz@in eg] def countdown
+ 62170 [peter@se an ] % psychic -on
  62172 [lars-m@gm .n] I want countdown to be run twice, simultanously.
  62173 [peter@se an ] Thread.join springs to mind but I do not have a manual to hand. Wiser

Ruby idiom (0...(expr)).map
62177 [martindemell] I've found myself writing (0...(expr)).map (as an alternative to
62179 [gsinclair@so] I vaguely remember this idiom.  Can you expand on its use?  I think it
+ 62188 [martindemell] In general, making an array out of an integer sequence (in its most
| 62241 [gsinclair@so] Well, you always have "occasion" to define the "expr" in (0...expr).
| 62316 [martindemell] Yeah, but that has an unnecessary feel to it.
+ 62193 [ahoward@fs .] o.k.  i smell yet another 'inject' post.  are you aware of any docs on the 1.8
  62530 [bulatz@in eg] may be
  62566 [ahoward@fs .] i didn't actually write that post, but i've been thinking of simply having

[Threads + Sockets] Strange behavior
62184 [lars-m@gm .n] ...
62186 [peter@se an ] I modified your code to include a rescue clause and of course got a
+ 62187 [drbrain@se m] =20
+ 62190 [lars-m@gm .n] Excellent! Thanks so much! I would have never guessed that it is too fast to

Ruby & Vi-like editing environments [was Re: BlackAdder - Visual Development with Python and Ruby]
62191 [ian@da q. et] what are the options for ruby and vim?  i see in freebsd there is a
+ 62194 [drbrain@se m] ome.net>...
+ 62238 [gsinclair@so] Check out VimRubySupport and VimExtensions on the Wiki.

Mixins
62195 [gfb@to es ft] ...
+ 62198 [vjoel@PA H. ] Test.ancestors #==> [Test, Mixin, Object, Kernel]
| 62201 [gfb@to es ft] Thanks to everybody for explanation. My mistake was to expect something
+ 62200 [lyle@us rs s] Yes, this is how it's supposed to work. When you mix a module into a

And now 2 optparse nits
62202 [han.holl@po ] As I said earlier, I like optparse, but two features are a bit
62221 [nobu.nokada@] They are allowed by GNU tools whose design I'd followed, and
62285 [han.holl@pr ] I stand corrected. You're absolutely right.

accessors for module instance vars
62203 [ptkwt@sh ll ] I've got a module that that has several classes defined within it.  These
+ 62204 [vjoel@PA H. ] irb(main):001:0> module M
| 62249 [ptkwt@sh ll ] Great!  I wasn't sure if that would work.
+ 62205 [ahoward@fs .] i'm unsure of the semantics of instance variables in a module (something you
  62250 [ptkwt@sh ll ] Actually they seem to be allowed (perhaps 'module instance variable' isn't
  62258 [ahoward@fs .] a singleton is really nothing more than an encapsulation of some data and some
  + 62271 [ptkwt@sh ll ] module M
  | 62281 [batsman.geo@] See my other post.
  + 62282 [batsman.geo@] Doesn't refer to the same thing!
    62286 [ahoward@fs .] that was my point.
    62292 [batsman.geo@] This is why we like class instance variables :)
    + 62294 [batsman.geo@] OH no! I didn't mean to contract this here!
    + 62295 [decoux@mo lo] What do you want to say with this ?
      62299 [batsman.geo@] I meant that
      + 62302 [decoux@mo lo] yes,
      + 62380 [gsinclair@so] => nil
        62409 [batsman.geo@] class A; def a; "A#A"; end; end

Regular expressions
62206 [dcarrera@ma ] => "<img src='a.jpg' />"
+ 62207 [paul@sn ke n] But you have \., which matches a literal period.
| 62208 [dcarrera@ma ] Okay, now I feel stupid.  Thanks.
+ 62209 [drbrain@se m] In addition to the \. as mentioned early, .* is greedy, so if
+ 62210 [dblack@ca dl] You've escaped your . so it's a literal . , which then

Ruby Weekly News
62211 [Dave@Pr gm t] Ruby Weekly News: 01/20/2003

From Russia with lust...
62212 [Russian_Vixe] Thanks for waiting so long - Finally, my first U.S. ADULTs-ONLY SITE is ready!

Newbie Q: do i need PStore for this or something else ?
62213 [delirious_no] _Background info:_
+ 62215 [dim@co eb tc] sounds like a similar position to me...
+ 62218 [bruce@co ed ] Simon,
| 62219 [dim@co eb tc] Man 1: What's Yaml?
| + 62224 [matt@li ke .] You could.  I assume YAML would just store it as a "string" and encode
| + 62236 [ruby-talk@wh] base64: !binary |
| + 62243 [bruce@co ed ] Dimitri,
|   62244 [dim@co eb tc] excuse my stupidity....  I was about to write an email saying how this
+ 62220 [drbrain@se m] =20
+ 62232 [ahoward@fs .] since your application is a cgi, requires a database, requires session
  + 62247 [paul@sn ke n] I see code, but no documentation.  Is there any?
  | 62257 [ahoward@fs .] there is an example on the RAA and on the slides i referenced.  the reason i
  + 62270 [delirious_no] This is something I would really like to discuss even though I might go
    + 62274 [transami@tr ] Simon, there is a better way.
    + 62290 [ahoward@fs .] i think it's on topic.  the session management isn't that complete in it's
      62304 [delirious_no] Thx a lot for your many lengthy answers. I will look deeper into some

ruby-sendfile
62216 [pate@ey er a] Alas, it doesn't look to be active any longer, and I'm having some

Re: Tc/GTC/Fox - so many?
62217 [rrytov@en op] I found that page

Overloading operators
62222 [pmak@aa ni e] Is there a shortcut for writing all this?
+ 62223 [dim@co eb tc] I was also wondering if there is a way to implement +=
| + 62225 [dcarrera@ma ] => nil
| + 62227 [vjoel@PA H. ] No need, since "x += y" is just syntax for "x = x + y". Once you define
|   62229 [dim@co eb tc] Thanks Joel et al for all the responses....
+ 62231 [martindemell] Remembering that code within a class definitionbut outside a method

OSCON favor
62228 [pate@ey er a] Nat asked me to pass along a request.  If you're going to OSCON this
62233 [paul@sn ke n] On the subject of Ruby and conferences, I'm going to be speaking on
62234 [pate@re -b a] Will you be at OSCON too?  ORA needs Ruby related sessions.  Either way,
+ 62235 [paul@sn ke n] No, not that I know of...
+ 62237 [matz@ru y- a] Ah, do I have to attend (to have Ruby track next year)?
+ 62284 [simon@si on ] I'm *probably* going, and will certainly put in some Ruby sessions; I'm

TCPServer only binding to INET6 interfaces?
62230 [geniusj@bl e] require 'socket'
+ 62289 [drbrain@se m] =20
+ 62405 [drbrain@se m] =20
  62889 [geniusj@bl e] That'd do it..  So there's no INADDR_ANY for IPv4 unless you compile
  62900 [drbrain@se m] The correct solution is to listen on multiple socket types

is anyone here going to be at linuxworld tomorrow (1/22)?
62242 [dblack@ca dl] Rather late in the day, literally, to be asking, but I was just

[FAQ] When should a method have parentheses?
62252 [gsinclair@so] An unanswered question appears on the FAQ page.  Actually, a few do,
62253 [dim@co eb tc] From http://www.rubycentral.com/book/tut_methods.html
62255 [gsinclair@so] Thanks for the quick response, Dmitri.  Unfortunately there is an
62256 [dim@co eb tc] as I do"?  hehe...

Lisp in Ruby?
62262 [nemo@he lo r] Yeah, it's kind of a funny question, but I was just wondering...
+ 62263 [hal9000@hy e] 1) I doubt it and 2) I really doubt it. What is Joy, anyway?
| 62287 [nemo@he lo r] What is Joy, anyway?
| + 62288 [hal9000@hy e] I'll check that out. If I had invented a backwards Lisp, I'd have
| | 62291 [joey@jo yg b] That gave me a chuckle this morning, and for that I thank you. I'm actually
| + 62453 [YuriLeikind@] Good Lisp Tutorial -   http://www.psg.com/~dlamkins/sl/contents.html
+ 62264 [akr@m1 n. rg] def eval(exp, env)
+ 62265 [matz@ru y- a] No Joy available, I guess.  But you can have a joy of implementing it
+ 62272 [bard@pr sm l] `rouge' by Masahiro Sakai.
+ 62283 [transami@tr ] wow, Joy is really neat. i don't know how useful it could really be in general

extend (Re: a single class that supports multiple facets/interfaces)
62268 [davegaramond] thanks. so as i see it, 'extend' is like 'include' but operates at the
62279 [decoux@mo lo] Well, it's perhaps best if you see that #extend work at singleton level
62293 [gsinclair@so] Is
62296 [batsman.geo@] You do probably already know it, but for the record, we have
62298 [gsinclair@so] => nil
+ 62300 [gsinclair@so] module M
| 62303 [gsinclair@so] ... and finally (I just noticed this in fileutils.rb)
| 62305 [decoux@mo lo] Well, if you have
+ 62301 [batsman.geo@] Me too :)

A really good idea for RAA
62269 [gsinclair@so] I just noticed Matz's post pointing to
62418 [nahi@ke na t] Good.  It's on our ToDo list that creating each project page

Question regarding threads and perhaps YAML
62275 [info@ir in h] ...
62277 [info@ir in h] ...
62307 [ruby-talk@wh] Could you send me your YAML doc?  The parser must be choking on it or

POLS (with one case: "class variable")
62278 [davegaramond] the pickaxe defines Principle of Least Surprise as "things work the way
+ 62280 [decoux@mo lo] Well, for ruby POLS is better defined by
+ 62315 [just6979@ya ] i'm guessing from those names, that your surprise is that class
  62342 [davegaramond] i'm mostly concerned with terminology. when people wants "class
  + 62406 [just6979@ya ] which do you want, instance variables or class variables? they're both
  | 62427 [davegaramond] as mauricio pointed out, i was talking about "class instance variable"
  | 62429 [tim@ba es id] tim@marvin:~$ cat b.rb
  + 62411 [batsman.geo@] class instance variable?
    62428 [davegaramond] sorry, i was just using matz' terminology [ruby-talk:16538] :-)
    62535 [batsman.geo@] Me too :-) [19535]

emacs colouring problem
62297 [probertm@ac ] I have begun the big adventure called 'emacs' ... ;-)
62420 [nobu.nokada@] This patch works?
62440 [probertm@NO ] Nobu did say ...
62445 [nobu.nokada@] What's its (emacs-version)?  Now I tried the patch with "GNU Emacs
62451 [probertm@NO ] Nobu did say ...
62457 [nobu.nokada@] Okay, I could see the problem.  Thank you.
62477 [probertm@NO ] nobu.nokada@softhome.net did say ...

Single vs double quotes and performance?
62306 [emiel@il fo ] When defining literal strings I tend to use single quotes instead of
+ 62309 [dcarrera@ma ] $ cat single_quotes
| + 62431 [gsinclair@so] I hope you din't mind me nitpicking.  In each of those programs, you
| + 62434 [nobu.nokada@] Performance difference between single and double quotes does
+ 62311 [nobu.nokada@] There are some special characters even in single quoted
+ 62529 [bulatz@in eg] why not test this himself? :)
+ 62571 [whitton@at a] require 'benchmark'
  62586 [gsinclair@so] 'single' doesn't look like a single-quoted string to me.
  62604 [davegaramond] it is when it's eval'ed.
  62635 [gsinclair@so] Gavin

Re: Test Issue with win32_popen was [ANN] win32_popen 0.1
62308 [mmscili@em i] Sorry for the late reply.  I am catching up on missed emails.
62435 [gsinclair@so] Surely YYYY-MM-DD is the only intelligent date format.  No confusion
62443 [robertm@sp l] Agreed, I always use YYYY-MM-DD now and will always write the year out
62444 [djberge@qw s] I think it should be YYYYY.  That way we're y10k compliant.  No point
62446 [nobu.nokada@] You ran into Y100k, Y1M and Y10**30 problems now, refer

Applying an operator to a list
62310 [whitton@at a] Is it possible to create a Lisp style apply function with Ruby, and
+ 62327 [martindemell] But all apply does in lisp is call a function and pass it the rest of
+ 62329 [rubytalk@bo ] you mean something like this?
| 62438 [whitton@at a] Yes, that was exactly what I was looking for. I guess that I was a bit off
+ 62392 [timsuth@ih g] def f(a, b)

pragmaticprogrammers installer works on win98 ??
62312 [jonnypichler] i want to install ruby on a win98-system, using the pragmaticprogrammers
+ 62313 [dcarrera@ma ] AFAIK it should work.  I think I did exactly that once.
+ 62317 [daniel@ze ed] I installed it on a Win95 (who uses *that* anymore?) and a Win98 machine
  62320 [dcarrera@ma ] Some people do actually.  My mom does.  She has a computer that's too old
  62528 [bulatz@in eg] spread sheet, mine sweeper, solitaire and ruby :)

exit status, stderr and stdout
62318 [lists@de on ] How would I go about retreiving the following information for a
62319 [djberge@qw s] require "open3"
+ 62324 [martindemell] Though see http://www.ruby-lang.org/raa/list.rhtml?name=win32_popen
+ 62454 [lists@de on ] How do I get the exit status for this? I'm only getting stdout and
  + 62460 [djberge@qw s] Remember, err is a filehandle, not a string.
  + 62462 [nobu.nokada@] $?
    62470 [lists@de on ] This is what I was looking for but I can't seem to be getting the
    62475 [nobu.nokada@] AFAIK, masking $? with 127 is to get the terminating signal.
    + 62485 [lists@de on ] I had tried rightshifting also, but I get 255 for exit 0 and exit 1.
    + 62486 [lists@de on ] So here's what's happening
      62488 [nobu.nokada@] Did you "Process.wait" here?
      + 62489 [lists@de on ] Thanks for clarifying these things for me.
      + 62491 [lists@de on ] In perl, I was able to do this,
        62501 [nobu.nokada@] ...
        62569 [lists@de on ] Hm, do you know if anyone intends to fix this or if it has been fixed in
        62633 [nobu.nokada@] Previously attached one sometimes had left a zombie.
threads.html
top