8778-9307 subjects 9249-9907

Re: Ruby AOP (was Re: Modules and mixins)
9023 [avi@be a4 co] Dave - do you have an implementation in mind for this?  I've toyed with
9026 [Dave@Pr gm t] In my quick hack that's exactly what I did (as well as wrapping any

Any way to delete object obviously?
9025 [is.r@co .i -] I want to delete object obviously like in Python

Regexp for matching Ruby reg exps?
9031 [feldt@ce ch ] Anyone got a Ruby regexp matching valid Ruby regexps?
9035 [ben_tilly@ho] Unless Ruby's Regexp engine has some extensions I have
+ 9036 [feldt@ce ch ] I had some doubts in the back of my mind but ruby-talk
| 9038 [dblack@ca dl] Well... let's not give up yet :-)
+ 9073 [gotoken@ma h] # Note: this message isn't practical but may be a pazzle :-)
  9078 [ben_tilly@ho] Not so.
  + 9082 [ben_tilly@ho] Forgot to make a comment about one point.
  + 9083 [Dave@Pr gm t] Not with one, perhaps, but it can with two, or three if you allow
  + 9084 [gotoken@ma h] Oh, I misread the book :-<
    9085 [duncan@ny ap] Which means that if you build a parser to handle nesting of parens up
    9086 [schneik@us i] # Ruby's regexp is extended rather than the theoretical one.  So, this
    9093 [ben_tilly@ho] If you are willing to use basic parsing techniques rather
    9097 [ben_tilly@ho] Perl's documentation would fill enormous volumes.  Literally.
    9098 [ben_tilly@ho] Depends on what you mean with 2.
    9100 [Dave@Pr gm t] Latex2html does it by expanding nested braces, starting with the
    9102 [ben_tilly@ho] Performance may be fine for your application, but that is
    9104 [Dave@Pr gm t] I'd be interested in a practical example where the nesting depth is
    9117 [schneik@us i] # >
    9128 [ben_tilly@ho] For the pre-built Perl solutions look at the suggestions
    9130 [ben_tilly@ho] (Reads more carefully.)

Mailing list
9048 [mitch@ve ux ] Ok, I'm going to go ahead and ask on-list... Does the ruby-talk-ctl@
9054 [matz@ze ab t] I don't know what was your problem.  Perhaps, you were using wrong

pid of executed program
9057 [ljlane@de ia] How can I get the PID of a program run in a ruby script. I've
+ 9063 [decoux@mo lo] #fork and #exec, no ?
| 9076 [ptkwt@us r2 ] Unfortuneatly, no.  I've been trying to do the same thing.  The pid you
| 9080 [gotoken@ma h] See [ruby-talk:8631], i.e.,
| + 9088 [ptkwt@us r2 ] Wow, I see that this reference is to a response to one of my posts to this
| | 9094 [duncan@ny ap] Actually, see
| + 9125 [decoux@mo lo] No, if you begin your script with
|   9127 [hgs@dm .a .u] Is another way to do this to use setpgrp to set the process group
|   9139 [decoux@mo lo] Yes, but kill("SIGNAL", 0) can be used to send a signal to a program
+ 9071 [matz@ze ab t] IO#pid for open, popen.  No way provided for system and `` (yet).
  9105 [ljlane@de ia] Thanks, matz and all. That works lovely.

Problems with HTTP.open, TCPServer.open, etc.
9081 [lite_cheng@m] I'm just starting out with Ruby, and trying
9140 [lite_cheng@m] Never mind - works now... recompiled 1.6.2
9149 [cpine@fi ax ] Did you compile in VC++ (using a .dsp), or were you following the
+ 9150 [erne@po er a] You're probably running into problems because your ENV variable for
+ 9157 [lite_cheng@m] I've
  9161 [cpine@fi ax ] Already had it.

Embedded Ruby in VC++ 6.0 on Windows 2000
9087 [cpine@fi ax ] ...
9099 [andy@to ls e] WHERE=/usr/local/lib/ruby/1.5/i686-linux
9138 [cpine@fi ax ] I compiled with 'ruby\win32\mswin32-ruby16.lib', and it compiled
9266 [jbuffing@my ] which is

@_ in Perl / ? in Ruby
9091 [jens@ir -n t] In Perl there is the @_ array that contains all the
9096 [c.hintze@gm ] Normally there is no such thing in Ruby, AFAIK. You get all parameters

Grabbing a char from the keyboard...
9106 [hal9000@hy e] How does one accept a character from the keyboard
+ 9108 [gotoken@ma h] stty_save = `stty -g`.chomp
+ 9109 [matz@ze ab t] I often uses stty trick.
  9113 [hideto-i@rr ] system("stty -raw echo")
  9171 [hal9000@hy e] Thank you, Goto, Matz, and Hideto...
  9174 [phasis@ha an] How about this in ruby distribution /ext/Win32API/getch.rb ?
  9177 [hal9000@hy e] Thanks, Hee-Sob... that is very interesting. I will give it

Break IO.select ?
9107 [is.r@co .i -] One thread blocked by io.select(),
9136 [Dave@Pr gm t] class WakeUp < RuntimeError; end

Licensing issues
9114 [feldt@ce ch ] I'm about to release some new stuff to RAA and started thinking about
9129 [ben_tilly@ho] IANAL but I have a couple friends who are.
9187 [sent@qu li y] If at all possible, *please* find an existing
+ 9189 [feldt@ce ch ] I'll look into it but haven't found anything like it yet...
| + 9191 [feldt@ce ch ] I generally don't reply to my own mails but I forgot one thing... ;-(
| | 9233 [elderburn@mi] Actually, the reason might be that companies are generally not run by
| | 9235 [ben_tilly@ho] This is true.  But it severely limits the practical business
| | 9254 [sent@qu li y] This has been an interesting discussion. Rather
| + 9193 [hgs@dm .a .u] There exist "International money orders" for sending money abroad. The USA
| | 9194 [ben_tilly@ho] If you say that GPL applies in *ANY* situation then anyone
| | 9219 [tuinstra@cl ] QT, the library underlying KDE, is available under a number of
| | 9222 [ben_tilly@ho] Important point.
| | 9232 [elderburn@mi] Clarification. GPL does not prohibit the sale of software developed with
| + 9196 [Dave@Pr gm t] OK, you've shamed me out of hiding.
|   9202 [feldt@ce ch ] This bothers me. Sincerly. I've realized that this is my "crash
|   9203 [ben_tilly@ho] I didn't suggest it.  And attempts to do similar things in
|   + 9205 [ben_tilly@ho] One point that is missing.  What is an is not accomplishable
|   + 9297 [matju@ca .o ] HA HA HA!
|     9316 [ben_tilly@ho] I think you have confused me with some straw man.
|     + 9327 [elderburn@mi] Making it a perfect "glue". There is a lot of good previously existing code out
|     + 9570 [matju@ca .o ] Ok, I now can see that you understand.
+ 9190 [steve@de f. ] The following may be of interest. I was interested in a license that

desperately need help with cgi.rb
9118 [aseltine@ro ] I really need help with cgi.rb. I have a long long html form that I

ruby 1.6.2 and Debian 2.2
9120 [Bostjan.Jerk] I am trying to install (compile) ruby 1.6.2 on my Debian 2.2 machine but I get
9121 [bombadil@wa ] What about building packages from woody sources?. Version of ruby in woody
+ 9122 [dsafari@pa a] Use apt-get install ruby
+ 9123 [dsafari@pa a] Ahhh - that would explain why I have it no problems. Some time ago I did a
+ 9403 [jeremy@co ga] I installed ruby 1.6.2 and 1.7.0 on Debian 2.2 (Potato) just today without a

thanks (was: Ruby and OO programming)
9124 [kristoff.bon] Greetings,

Identifying hidden form fields using CGI
9131 [barry_shultz] I have looked in Blade and other places but could not find the answer to
+ 9164 [gnhurst@hu s] I looked into this one, and it seems like you won't be able to determine
| 9166 [Dave@Pr gm t] down the bottom there's code that generates methods for each of the
+ 9230 [harryo@zi wo] I don't believe there is any way for cgi.rb to know the type of those

Need help with win32ole control of ms dom
9133 [ChrisM@SN LL] I'm trying to script a simple wrapper of the MS DOM for xslt processing.
9134 [ChrisM@SN LL] Oh yeah -- I'm using 1.6.2

Request for a Ruby / DB2 Binding
9144 [RichardASchu] Are there other Ruby users besides myself who would like to

how to replace `end' with `endif' etc. ?
9146 [kopfermann@t] As a new user of ruby which is really wonderful i still find these
+ 9162 [julian.romer] you can use the emacs module (under emacs, of course) that incorporate
| 9209 [kopfermann@t] ah, good to know.
+ 9218 [behrends@cs ] If you're using vim, you may want to try the following (warning: it
+ 9231 [harryo@zi wo] Personally, I'd prefer if it just used "{" and "}" all the time, but

Problem compiling Ruby extens=?us-ascii?B?afNu?=
9148 [bombadil@wa ] I have a extrange problem compiling python/ruby extension. The question is

Re: Problems with HTTP.open,  TCPServer.open, etc. (now compiling on Windows 2000)
9151 [cpine@fi ax ] Well, I tried that and nothing changed.  Still have 18 unresolved externals.

Does Eruby Work on Windows NT?
9152 [RichardASchu] I'm running ruby 1.6.2 (2000-12-18) [i386-cygwin] on Windows

what about this begin?
9153 [ase@cs au .d] you sometimes need the begin and other times not. Check the following
+ 9154 [avi@be a4 co] 'begin' is not needed with 'do', 'while', 'if', etc.  It is only used when
| + 9156 [dblack@ca dl] begin
| + 9201 [fgeiger@da e] So why isn't it called 'try'?
|   9215 [gotoken@ma h] Maybe `try' sounds challenging.  In usual case, an exception is just
|   9223 [behrends@cs ] I actually prefer begin ... end to try ... except ... finally or
+ 9155 [Dave@Pr gm t] 1. Statements that contain multiple statements within them. These are

Redefining singleton methods
9158 [duchene@ma n] while looking for a technique for redefining the singleton function
+ 9195 [decoux@mo lo] alias is a private method, you can write
+ 9217 [behrends@cs ] After giving it a closer look, I believe that singleton methods (those
  9229 [crippel@pr m] This not true --

truncation of error strings
9163 [raja@cs in i] Is there any where to prevent the truncation of messages produced during
+ 9168 [yashi@ya hi ] begin
| 9169 [dblack@ca dl] I think the truncation behavior may be a question of Ruby version.
+ 9170 [matz@ze ab t] How about upgrading to 1.6.2, which does not truncate.
  9206 [raja@cs in i] Thanks for the responses.

How to make after cvs update
9172 [jim@fr ez .o] I just followed the instructions on how to get the latest ruby src via
+ 9173 [Dave@Pr gm t] You can get autoconf from any GNU mirror. At prep.ai.mit.edu, its at
+ 9176 [news@st om e] Here is what I do to prep my FreeBSD machines for compiling other peoples
  9306 [knu@iD em ns] Well, you don't necessarily need automake and gmake to build ruby, but

RDBC? (was: Request for a Ruby / DB2 Binding)
9175 [news@st om e] I would myself.. no use at the moment, but I can see it's inevitable usage
9225 [schneik@us i] #

9178 [hal9000@hy e] What is IO#binmode for exactly? (Yes, I know it puts a
+ 9188 [matz@ze ab t] IO#binmode put IO in binary mode only if there's such thing on the
| 9236 [hal9000@hy e] OK... I guess I expected an embedded ^Z to mean end-of-file.
| 9252 [sent@qu li y] Actually, TYPE *thinks* ^Z is an EOF marker, even
+ 9197 [erne@po er a] Some web servers IIS in particular when running in windows give a character

"|" on front of aPortName
9179 [hal9000@hy e] The Discovery Channel has Shark Week, and
9182 [matju@ca .o ] The "|-" is mostly like popen(). One reason to use it is to be able to use
9237 [hal9000@hy e] Hmm... I thought it could only be used for reading??? I don't see
9296 [matju@ca .o ] Please ignore my garbage. Whatever is left of the Perl open() notation,

Re: found the bug in cgi.rb
9180 [aseltine@su ] Actually, making the change to EOL only helps when I run the script from
9198 [erne@po er a] Looks like you're running into the problem that requires IO#binmode.  Try

a fix for cgi.rb, sort of...
9181 [aseltine@su ] I figured that the only difference between offline and online cgi.rb had
9186 [phasis@ha an] cgi.params['Survey'] is an Array.

*now* I have found the bug in cgi.rb, really :)
9183 [aseltine@su ] It is somewhere in the code that does the "PRETTY" html... turn it off,

Re: Any way to delete object obviously?
9184 [sent@qu li y] I was waiting for someone else to respond, but I

Re: Simple binary install for Ruby/GTK underMS Windows?
9185 [sent@qu li y] Perfect. Exactly what I needed. Thanks!

Class from name of class
9199 [jimm@er s. o] I have a class name in a string, and I want to create an instance of that
+ 9200 [erne@po er a] You could try using Ruby's case method i.e
+ 9204 [Dave@Pr gm t] I have to say that this concept strikes me as being really very
| + 9207 [decoux@mo lo] I hope I'm wrong but I've also the impression that the data extract from
| + 9208 [jimm@er s. o] Why is this risky? I'm trying to build a generic .rthml file that will
| | 9210 [Dave@Pr gm t] If you're checking that the class that's resolved from the string is a
| + 9295 [matju@ca .o ] The following looks for a full pathname from the Object class. It is when
| + 9480 [tonys@my pl ] i think this may have been what i was originally trying to ask :)
+ 9211 [kom@ma l1 ac] If you already know what class you may instantiate, you can use
  9221 [jimm@fn rd i] Thank you. That's perfect. I wanted to avoid hard-coding class names

redirecting stdout  --- dup2
9212 [raja@cs in i] I can't seem to find Ruby's version of dup2 and friends.
+ 9213 [decoux@mo lo] Something like this ? ( but there is problem with flush)
+ 9214 [behrends@cs ] def File.with_output_to_file(*args)
+ 9340 [raja@cs in i] of course, i was missing something. :-)

9220 [gotoken@ma h] Thank you for kind explanation, Ben.
9234 [kjana@os xa ] ....Then history repeats itself :-)
9301 [matju@ca .o ] keep [0] === [0] true. Array#=== could stand for inclusion. By inclusion I

Re: Redefining singleton methods & C - function pointers
9226 [crippel@pr m] On a  related note. How would you change the behavior
9248 [Dave@Pr gm t] That would make object instantiation somewhat difficult....
+ 9250 [decoux@mo lo] You write a delegator, *warning* this is just an example not fully tested
| + 9346 [crippel@pr m] Nice - I definitely keep this one in my archive! I have couple
| + 9363 [decoux@mo lo] It was just stolen from lib/delegate.rb
+ 9310 [crippel@pr m] Sorry I am probably (even) slow(er then usual) today. Could
  9312 [Dave@Pr gm t] Simply that to be consistent, .new is a singleton method, so the
  9347 [crippel@pr m] I guess your point is that #append_features is a (private) instance
  9349 [Dave@Pr gm t] module Example
  + 9350 [crippel@pr m] Thanks!
  + 9351 [gotoken@ma h] Really?
    9353 [Dave@Pr gm t] Doh! - sorry

install of mysql-ruby-2.3.1 on mandrake 7.2
9228 [daniel.nicau] Sorry for my bad english :(
9275 [decoux@mo lo] If mysql was built from the source verify that -lz was specified and you
9277 [davidfung99@] I had the same problem as Daniel (except that i am using Mandrake 7.1) and
9282 [daniel.nicau] It's all good now! What you do on Mandrake 7.1 works fine too on Mandrake

Dir.pwd on Win
9238 [hal9000@hy e] I'm interested in what people think of this behavior...
+ 9240 [crippel@pr m] The DLL governs this behavior - if don't want to
+ 9305 [joey@jo yg b] @hypermetrics.com says...
  9311 [crippel@pr m] You can also build or download a mingw build.

Ruby as an extension language for ksh93
9241 [schneiker@ju] ksh93 has an interesting feature that allows you to add commands to it by
+ 9247 [yashi@ya hi ] ah, then the famous favored-ksh-instead-of-ruby project can implicitly
+ 9364 [ranx2@ya oo ] There a a bunch of perl based shells which once appeared in an issue of TPJ

9242 [maurice@eu o] are there plans to include into ruby method selection
9244 [matz@ze ab t] Not really.
+ 9245 [ben_tilly@ho] Don't do it and tell people it is very easy to write
+ 9251 [mak@im kh o.] <method overloading>
| 9253 [crouton@we t] AFIK, polymorphism means that when a method is sent to various kind of
| + 9255 [maurice@eu o] you read in my mind
| + 9274 [mak@im kh o.] Indeed. Look at your statement carefully, you do not mention whether this
+ 9257 [jstern@fo ha] Which pitfall?
  + 9258 [chadfowler@y] But, Josh, there isn't much "type" to overload based
  | + 9259 [jstern@fo ha] Of course there are types in Ruby.  Variables don't
  | + 9286 [matz@ze ab t] Dylan?
  + 9261 [patrickdloga] In my experience overloading based on type of arguments is not
  | 9265 [jstern@fo ha] One could say the same thing about every feature of
  | 9267 [chadfowler@y] That's why I said there wasn't "much" type.  Variables
  | 9268 [jstern@fo ha] But the context of the discussion was about
  + 9273 [matju@ca .o ] But it is. Polymorphism is about dispatching (dynamically or statically).
  | 9288 [matz@ze ab t] In general, yes.  But for several reasons, I give it narrower term
  + 9283 [matz@ze ab t] "overloading based on the number of arguments".
    9321 [c.hintze@gm ] IMHO, yes! I never had any problems with operator/function overloading

Need info on mod_ruby and eruby
9243 [jim@fr ez .o] When I read that ruby could be used to replace PHP I got really

Problems with obj.detect{} running in irb
9246 [jweirich@on ] Consider the following file "tree.rb" ...
9284 [matz@ze ab t] I officially call it a bug.  I found where it sits.  The problem is,
9760 [matz@ze ab t] I think I could fix it.  Try the latest HEAD CVS if you're interested.