15833-16235 subjects 16287-16641

[ANN] RuBoids
16040 [jimm@er s. o] RuBoids is a Boids simulation written in Ruby and using OpenGL and Qt.

oracle & threads - need speed
16050 [djberg96@ho ] I'm trying to get a series of sql select statements, read in from a text
+ 16051 [wayne.blair@] It looks like you are using the same connection (dbh) in each thread.  This
| 16062 [djberg96@ho ] This
| 16064 [wayne.blair@] Probably best to log timings between each activity and find out where the
+ 16084 [neumann@s- i] You have to use Oracle's non-blocking mode in Ruby.

require and include confusion
16068 [alwagner@tc ] I have totally confused myself about the relationship between require and
+ 16071 [hal9000@hy e] include
| + 16074 [matju@sy pa ] actually, all Objects created, ever, irrevocably become Wombats. In theory
| | 16322 [matz@ze ab t] Sorry for being late.  I missed this one somehow.
| + 16077 [luigi.ballab] or in case the include is at the top level of the script, it becomes
+ 16109 [alwagner@tc ] These replies were all great, guys.  Thanks a million.  I really think I've

KeyboardState w/ Win32Api
16069 [makoto@uc in] I'm trying to use the Win32API library in ruby to force num-lock.  I found

Need coding advice
16085 [jim@fr ez .o] I am writing an app and could use a little advice from
16086 [hipster@xs a] . structure the geometrical objects with a composite pattern, use a

linked list redux
16087 [hotfusionman] I tried looking for a linked list implementation on RAA and searched for
+ 16091 [Johan.Dahl@l] Why not just use an Array. It has almost all of the functions you
| + 16092 [gnhurst@hu s] And I would use
| + 16097 [gc@ma dr ke ] Linked lists usefullness is *fast* adding or removal of single items
|   + 16099 [ben_tilly@op] Most of the time when people want to use linked lists, they
|   + 16100 [gc@ma dr ke ] Ok, sorry for being so dumb, I can insert anything at given position by
|   | + 16101 [hotfusionman] Thanks, all,
|   | + 16102 [hotfusionman] Thanks, all,
|   |   16108 [wjl@mi dl ss] Actually, maybe it's just because I'm using the CVS version, but the
|   |   16112 [gnhurst@hu s] I am expecting that the new #insert would
|   |   16142 [hotfusionman] This is premature, but since you posted something, so will I. <g>  I'm just
|   |   16143 [ben_tilly@op] be
|   + 16110 [matju@sy pa ] For that you simply switch algorithms. Using MetaRuby you can implement
+ 16093 [wjl@mi dl ss] Unless you are just trying to make a linked list for the academic fun
  16094 [avi@be a4 co] If you were doing a lot of insertions and removals on large lists, a

RCR: coexistent ruby versions installed by default
16107 [gnhurst@hu s] As for me, I accept the apology. I did spend considerable time
+ 16121 [matz@ze ab t] I'm sorry.  I confess I've ever fallen into this particular quirk
| 16124 [gnhurst@hu s] Well, yes, that is one part of it.
+ 16122 [decoux@mo lo] It's normal ?
| 16125 [matz@ze ab t] No!  Sorry.
+ 16126 [ballabio@ma ] To be fair, you might also consider putting into the sum the time you saved
  16127 [gnhurst@hu s] * hurst looks around to see if Luigi is still here
  + 16130 [ballabio@ma ] Still here and smiling...
  + 16160 [hfulton@au t] Yes, that was my intent. Though I see your point too, Guy.

Strange idea... exporting from a scope
16113 [hal9000@hy e] This is just an idea I've toyed with for
+ 16114 [wayne.blair@] Maybe I'm missing something (like I have no idea what the block problem is),
| 16118 [hal9000@hy e] is),
| 16123 [wayne.blair@] Yes.
+ 16115 [ms@ia ta e. ] vellllly intelesting. "If it were earlier" I might think of a good use
+ 16116 [decoux@mo lo] Well, something like this
+ 16117 [matz@ze ab t] I'm too lazy to type in "exprt" and variable name. so I'm thinking
| 16134 [gc@ma dr ke ] Argh!?
| 16138 [matz@ze ab t] I meant propagation from local variable scope made by block, not out
| + 16144 [hfulton@po -] thinking
| | + 16147 [hfulton@po -] [snip my oen msg]
| | + 16154 [matz@ze ab t] Yes.  And that's why it has not been merged yet.
| |   16156 [spwhite@ch r] My previous proposal was turned down on the basis that it broke existing
| |   16157 [gc@ma dr ke ] Impossibility to use anything from the outer scope??
| |   16161 [spwhite@ch r] This isn't what's in place now. It's just what I was proposing.
| |   16166 [matz@ze ab t] I think it's too much restriction for {}.   I want their difference to
| + 16209 [gc@ma dr ke ] for i in 0..10
|   16224 [matz@ze ab t] yes.
|   + 16264 [gc@ma dr ke ] It's a bit hard to explain, that's why I said "in my opinion". I think it
|   | 16269 [matz@ze ab t] hmm, Ruby's {} and begin/end are not really a scoping construct.
|   + 16270 [Dave@Pr gm t] This is really quite a deep issue. I'm sure I haven't thought through
|     + 16272 [ben_tilly@op] I am sorry.  I don't understand what you mean here.
|     | 16277 [Dave@Pr gm t] Whoa :)
|     + 16273 [gnhurst@hu s] I think there is more good than harm.  So many people seem to already
|     | + 16274 [mirian@co mi] Concerning Ruby coding style...
|     | | 16275 [gnhurst@hu s] Aleksi had this same question some time ago, and the most satisfactory
|     | + 16278 [Dave@Pr gm t] I guess I'd rather see a language that made it easy to write well, but
|     |   + 16279 [wayne.blair@] I think this is also an issue of critical mass for ruby.  If the change
|     |   + 16280 [ms@ia ta e. ] Also there's not only final coding style to consider, but the process
|     + 16281 [matju@sy pa ] The chief cause of problems is solutions.  Especially solutions to
|     | + 16282 [Dave@Pr gm t] (btw: I'd appreciate not being copied on these mails. Thanks)
|     | | 16288 [matju@sy pa ] Because the overhead of writing classes in Perl is as large as the
|     | + 16286 [gc@ma dr ke ] i = 3
|     | | 16295 [matz@ze ab t] It is.  It was natural to me when I designed this feature.
|     | | 16345 [hal9000@hy e] to
|     | + 16294 [matz@ze ab t] "nil" of course.  I'm not 100% confident about this auto-export stuff yet.
|     | + 16296 [hipster@xs a] For the record: these two paragraphs convey exactly how I feel about
|     |   + 16308 [ben_tilly@op] Well there is a difference in how I think in different
|     |   + 16346 [hal9000@hy e] If I understand correctly, I agree.
|     + 16293 [matz@ze ab t] I think Ruby already discourages the huge monolithic-style, by
+ 16119 [gnhurst@hu s] (pardon the delayed reply - I tried to setup the
+ 16148 [ser@ge ma e-] The other reason for passing existing "variables" to the |...| list is the
  16152 [matz@ze ab t] I'm REALLY glad that I can share my feeling with you.  Yes, it's far

ruby 1.6.4 to be relased
16128 [matz@ze ab t] I'm planning to release 1.6.4 on 2001-06-04 (JST).
+ 16146 [ser@ge ma e-] Hey, do you have a change log somewhere for this release yet?
| 16151 [matz@ze ab t] It's in the preview package.  If you care about changes before
+ 16150 [mgiacoma@ds ] Oh,  I  thought  the  one  I downloaded some days ago were already the

Ruby FTP site
16129 [matz@ze ab t] As some had noticed, Ruby's official FTP site is now under the process

ANNOUNCE: blade ruby-talk archives proxied
16131 [gnhurst@hu s] I finally got the ruby-talk archives from blade
16136 [wayne.blair@] Thanks, Guy.  I've been experiencing problems getting the newsgroup (think

(?i:) in regexp
16140 [decoux@mo lo] Normal ?
+ 16149 [matz@ze ab t] Of course not!  But I just found out it's hard to fix.  sigh.
+ 16164 [decoux@mo lo] Well actually ruby do this
  16170 [matz@ze ab t] Thank you.  casefold_on etc. were flushed too early.
  + 16184 [ser@ma s. er] Sorry; this may be a really stupid question, but...
  | + 16192 [matz@ze ab t] Last time I checked, Perl regex engine was tied closely to the
  | | 16202 [ser@ma s. er] I don't know.  I only touched Perl when I had to, and now that I have
  | + 16198 [decoux@mo lo] I don't think, but I'm not really sure.
  |   16201 [ben_tilly@op] I doubt that has changed.
  + 16185 [decoux@mo lo] It's preferable to wait. Actually the regexp engine of perl is re-written to

Tk in Ruby
16162 [mgiacoma@ds ] I have a question for you!

The Block Problem -A suggestion
16172 [ugly-daemon@] interest you. Why not use square brackets for surrounding argument lists?? ie,
+ 16173 [henryso@ea t] The biggest problem that I have with this is that the syntax is surprising.  One of the principles that drew me to ruby is that much of it appears to be designed based on the principle of least surprise.  I realize that there are some problems in the language (like the one you are addressing here), but using square brackets for method arguments and -> for array/hash extraction is something that (IMHO) most programmers would see and think, "huh?"  Also, that change would surely break any existing scripts out there since methods and array/hash extraction are two extremely commonly used features.
+ 16174 [gnhurst@hu s] Yikes! I hate "->"  much more than "<...>"
  + 16175 [jim@fr ez .o] Yikes is right. :) I still have nightmares about perl's array
  | + 16176 [ugly-daemon@] Well I guess no one likes -> :). No one commented on the use of square brackets
  | + 16178 [gnhurst@hu s] No worse than doing  "x = 5" when x already exists.
  |   + 16183 [alwagner@tc ] To me it seems the problem here is that there should be a difference between
  |   + 16188 [ser@ma s. er] I'm trying to reduce my comments on this topic; I think I've made
  |   + 16195 [matz@ze ab t] Yes, it's hard.  There're three reasons why it's not done yet.
  + 16210 [gc@ma dr ke ] Yes. "->" as an alternative to "." has very low advantages.
    16217 [ben_tilly@op] What do you mean by "use"?
    16218 [gc@ma dr ke ] What operator is used by languages to 'call' a method on a given receiver.
    16223 [ben_tilly@op] I would be more generous.  (In fact I was.)

Redirecting stdout
16177 [bpwilfley@ya] I've read a few posts that talk about redirecting
16179 [decoux@mo lo] If you want to use $defout, you can use something like this

serverside eRuby and Ruby; setup and hosting
16180 [tobiasreif@p] I'm a newbie and I would appreciate tips that get me startet.
16197 [decoux@mo lo] Try to give the full pathname, or add the directory in $LOAD_PATH

documentation for WIN32API, WIN32OLE, Ruby/TK
16181 [tobiasreif@p] Where can I find documentation, manuals, reference, tutorials, tables or
16200 [masaki.suket] The reference about Win32OLE is win32ole.doc coming with
16203 [wayne.blair@] I did some stuff with WIN32OLE and used Microsoft's MSDN as documentation.
16214 [tobiasreif@p] URLs?
16216 [wayne.blair@] documentation.

[ANN] XML-RPC 1.6.2, httpserv 1.2, GD::Graph 0.1
16182 [neumann@s- i] Today I made three new release (I know it's Sunday :-).

RCR: treatment of ranges within array definitions
16189 [ptkwt@ar cn ] [I sent this yesterday via the newsgroup comp.lang.ruby, but I don't think
+ 16190 [matju@sy pa ] There is no "range" in Perl so it is not "expanded" into an "array".
+ 16191 [neumann@s- i] array = [*1..3]           # => [1, 2, 3]
  16194 [matz@ze ab t] I accept this as a RCR, although I'm not sure yet if this is good

antlr grammar
16196 [wayne.blair@] Hey,
16230 [hipster@xs a] I wanted to post it last weekend, but that obviously didn't happen. My

Ruby 1.6.4 is released
16199 [matz@ze ab t] Ruby 1.6.4 was released finally.  Fetch it from

Newbie:  Copying files
16204 [Rthornton@de] Greetings all,
16205 [ms@ia ta e. ] Welcome!
16206 [decoux@mo lo] Write it like this

dynamically importing a class to a specific namespace
16207 [mirian@co mi] Suppose I have a file myclass.rb which contains the definition for

Parsing Question
16208 [SAT@MU TI EC] I am trying to write a command line parser that would take a string as input
16211 [wayne.blair@] input
16213 [wayne.blair@] Hey,
16215 [SAT@MU TI EC] Thanks much,
16226 [wayne.blair@] No problem, Steve, though I hacked that pretty bad so I went through the
16240 [wayne.blair@] With Guy's help, I figured out hopefully the cleanest way.  (I know this is

Windows to front
16212 [mgiacoma@ds ] I need to have a Toplevel window always visible ('to front' in MSWin

Reading version information from a win32 file
16219 [Rthornton@de] Greetings all,

Three bugs
16220 [matju@sy pa ] Those are the three bugs I found in the last few days.
16225 [matz@ze ab t] The first two are already fixed in the latest CVS (stable branch).

General question on Optimisation
16221 [armin@ap ro ] Dear All,

ruby-1.6.4 on cygwin
16222 [gerrit.haase] i'm a real newbie to ruby.
16228 [decoux@mo lo] and look at [ruby-talk:15590]
16231 [gnhurst@hu s] Or you can now type  http://ruby-talk.com/15590

String#scan strange behavior
16227 [wayne.blair@] ...
16229 [decoux@mo lo] Well, String#scan is defined like this in ruby-man
16232 [wayne.blair@] The array of arrays it returns does not contain all subpatterns, it only
16234 [decoux@mo lo] You have only *one* subpattern in the regexp, this is this subpattern
16236 [wayne.blair@] only
16237 [spwhite@ch r] Already seems to be that way if you don't use sub-expressions.
16238 [wayne.blair@] Right, but if you have to use a subexpression, you are out of luck, for
+ 16239 [gnhurst@hu s] At least you can still use the (?: form, which
| 16242 [wayne.blair@] Thanks Guy.  That's exactly what I was looking for.
+ 16241 [spwhite@ch r] Guy's solution is much better, but you can do it with sub-expressions
  16244 [wayne.blair@] a = "one \"\\\"quoted\\\"\" three"

A weird regex bug?
16233 [wjl@mi dl ss] I tried to narrow this case down to see exactly where it fails, but it
16243 [decoux@mo lo] pigeon% ruby -e 'puts "OK" if /(.|a)bd/ =~ "cxbd"'
16255 [matz@ze ab t] Sorry, it was too much optimization.  I'll remove this soon.

line numbers in multiline regular expressions.
16245 [jonas.bulow@] Here is my 5 minute attempt to create a program that extracts all
+ 16246 [wayne.blair@] The scan can match across multiple lines, though, right?  Can you give an
| 16248 [jonas.bulow@] /* comment 1 */
| 16249 [cbroult@sa i] ...
+ 16247 [wayne.blair@] # first load file with line numbers
+ 16251 [bobgus@mc .c] It looks like you are only looking at lines which have both /* and */. This
| 16257 [jonas.bulow@] No. '.' matches newlines when the m-flag is used with the regular
| 16260 [buter@CW S. ] You could try something like this --- maybe a bit non-Rubyesque, but it'll
+ 16267 [ser@ge ma e-] I suppose it depends on how you want the line numbers presented.  Here's

16250 [Johan.Dahl@l] compile it in a special way. But are there any plans for a wider
16258 [matz@ze ab t] Yes, there's a plan, even prototype already.  You can fetch it from

16252 [mike@le to .] The Time class does not have any method to retreive the week number. The only way I found is to use strftime and convert the result to integer. Is there a better way?
16256 [matz@ze ab t] Date has cweek method which is equivalent to strftime("%W").to_i.

MIB software needed immediately ~ !
16253 [pmilea@oo ne] To unsubscribe, reply to this email with the word "remove" in the

16254 [yssypesek@ya] I have visited www.ruby-talk.org and i have a few suggestion.
16266 [armin@ap ro ] It is quite easy to write a tiny Ruby script that downloads all the mails,

Timezone in Time::{local,gm}
16259 [Stoned.Elipo] Am I wrong when I see that member tm_tz of struct tm is not
+ 16261 [decoux@mo lo] No, you are right, but what is your system to have tm_tz in struct tm ?
| 16262 [Stoned.Elipo] My typo :) Read tm_zone.
| 16263 [decoux@mo lo] at least Solaris 2.7 don't have tm_zone, this is BSD now ?
+ 16268 [matz@ze ab t] (a) not every system has tm_zone, so it's not portable to use it.
  + 16292 [   xm@w3 .r ] The following code does not work with new ruby (ruby 1.7.1 (2001-06-06)
  | 16297 [matz@ze ab t] Choose proper subject line, please.
  | 16302 [   xm@w3 .r ] Okay, thanks
  + 16298 [Stoned.Elipo] You (and others) are definitively right. Sorry for the noise!

odd obj.send behaviour
16265 [ps@ra ia .m ] excuse me for the sourcelistings in this mail - i found it hard to explain
16271 [decoux@mo lo] Well, it don't really hang, because it wait for input from the
+ 16285 [ps@ra ia .m ] that was what i meant yes.
+ 16301 [decoux@mo lo] You have undefined #gets in RbObjGwHandle, but you call @gw.send(:gets)
  + 16304 [ps@ra ia .m ] ok. i get it.
  + 16305 [decoux@mo lo] Hey, 'eval("@gw."+methId.to_s)' is executed by the *client*. How do you

type checking
16276 [ted_meng@ya ] The following expressions always return false

ruby and fox
16283 [alwagner@tc ] Just curious if anyone else in ruby-talk is attempting to use the fox GUI.  I
+ 16284 [joe@vp p. et] Have you seen fxruby? : http://fxruby.sourceforge.net/
| 16289 [alwagner@tc ] Yes, that's what I am using.  But the examples are very limited in scope.
| 16291 [barry_shultz] Albert,
+ 16299 [dsafari@pa a] I'm useing/playing with Fox (FXRuby) in a personal project. I like it
+ 16326 [mgiacoma@ds ] I could be interested in! :)
+ 16369 [alwagner@tc ] Thanks to all who replied.  I'll feel OK now about posting Re: FXRuby