46773-47326 subjects 47245-50124

ruby-dev summary 17875-17964
47053 [maki@ru yc l] There was a lot of discussions in ruby-dev this week.
+ 47066 [batsman.geo@] Thank you one more time for caring about us non-Japanese-enabled people :-)
+ 47132 [pbrannan@at ] Won't this cause additional allocations?
| 47197 [matz@ru y- a] Yes.  Parhaps the string body can be shared.
+ 48097 [qrczak@kn .o] Couldn't 256 one-character strings be preallocated statically?
  48186 [pbrannan@at ] That actually sounds reasonable.  The returned strings could be frozen,

Problem with REXML
47060 [the_supernov] I think I have an problem understanding REXML.
+ 47065 [tobiasreif@p] $:.unshift 'rexml/1.2.5/'
+ 47103 [kou@cn ti ne] What about this?
  + 47129 [the_supernov] Thank you both.
  + 47138 [kou@cn ti ne] doc.root.each_element("BOOK") do |book|

FXRuby usage: Capturing results from an FXDialogBox
47061 [Stephan.Kaem] I'm working on a script to query some decisions from the user. So
47073 [lyle@us rs s] Yes.
47076 [david.naseby] <snip most code>

Perl calling C calling Ruby (linking problem)
47064 [peter.munro@] Help!
47104 [nobu.nokada@] Do you link it with static library of ruby instead of shared
47110 [peter.munro@] Ah! yes, I built it with the static library. And thank you for the
47111 [decoux@mo lo] Post your configuration, and the commands that you have executed
47133 [peter.munro@] $ make
47140 [decoux@mo lo] Well there is a problem
47154 [peter.munro@] Guy,

Building tables dynamically with CGI class
47074 [junderdown@m] I figured out how to build tables dynamically using methods in the CGI
47099 [tms2@ma l. t] Did you try CGI#th?
47166 [junderdown@m] I am fully aware of CGI#th.  Maybe I didn't explain myself well
47168 [ jimm@io co ] Change
47550 [junderdown@m] #!/usr/bin/ruby

class === class often false?
47080 [billk@ct .c ] I'm just noticing that some classes return true when testing
+ 47081 [hal9000@hy e] (some snips)
| + 47084 [dblack@ca dl] Likewise, and likewise :-)
| | 47098 [hal9000@hy e] Oh, yes.
| | 47102 [dblack@ca dl] Whoops, I knocked the ? off the subject line on my last post.  Well,
| + 47087 [billk@ct .c ] Interesting... further tests in irb seem to support your
+ 47086 [gsinclair@so] ri Module.=== gives <<EOD
  47091 [dblack@ca dl] I don't think that logic works -- it implies that if the RHS were of a

RE: Cellspacing <- This email had a virus attached
47093 [rich@in oe h] ...

ALERT -  GroupShield ticket number OB26_1029205847_LEVIATHAN_1 wa s generated
47094 [NAIITACTICSL] The message was quarantined and replaced with a text informing the recipient

ALERT -  GroupShield ticket number OB27_1029205935_LEVIATHAN_1 wa s generated
47095 [NAIITACTICSL] The message was quarantined and replaced with a text informing the recipient

WARNING. You tried to send a potential virus or unauthorised code
47096 [alert@no if ] The Star Internet anti-virus service, powered by MessageLabs, discovered

Antigen found VIRUS= Exploit.IFrame.FileDownload (Kaspersky) viru s
47097 [ANTIGEN_ELSO] Antigen for Exchange found Unknown infected with VIRUS=

Sorry about that (outlook sucks!)
47100 [rich@in oe h] I apologize to the group for resending that last virus.  My anti-virus

Re: class === class often false
47101 [dblack@ca dl] I feel some culpability, given what a cop-out that concluding sentence

Virus Alert
47106 [security@po ] ...

Sibling rivalry and class variables
47108 [pmak@an me l] So I see...
+ 47109 [kentda@st d.] The fact that you define the classvariable in Parent suggest that _all_
| + 47117 [jweirich@on ] [... several suggestions elided ...]
| | 47120 [dblack@ca dl] No need to redefine show_civ in the children, is there?
| | 47125 [jweirich@on ] Hmmm ... I was sure I tried it without the redefinition and it didn't
| + 47121 [tsiivola@cc ] I refuse to have a battle of wits with an unarmed person.
+ 47122 [tsiivola@cc ] This may or may not be what you are looking for, using class instance
  47126 [dblack@ca dl] It's probably better not to hardcode the class's name into its method,

=== again
47112 [hal9000@hy e] I'm pretty sure I said something stupid

ruby-mode / inferior ruby
47113 [bn@st an ed ] Emacs' ruby-mode doesn't seem to work too well. I would be most happy if
47213 [matz@ru y- a] The author of inf-ruby.el has not been appeared on the list for a
47217 [bn@st an ed ] - Is this a known issue with inf-ruby; ie. it's not yet supported?
+ 47275 [g_ogata@op u] This isn't an answer to your problem, but you may find it useful
| 47298 [bn@st an ed ] Thanks a lot! It worked after substituting add-to-hook with add-hook.
| 47324 [g_ogata@op u] (defmacro add-to-hook (hook &rest forms)
+ 47291 [matz@ru y- a] The answers are "yes" and "don't know yet".  The latter is perhaps

[OT] Programming practice question
47114 [pmak@an me l] Suppose you're programming some system. You have to reach a milestone
+ 47116 [andy@to ls e] I think it depends on the nature of the deadline.  If it would cause
+ 47127 [chris@da kr ] Personally I would get to the deadline writing one more days worth of
+ 47139 [michael_s_ca] (Writing this without looking at any previously offered answers...)
+ 47158 [mikkelfj-ant] Depending on the development infrastructure and the nature of the deadline

Ruby and Eclipse
47118 [jweirich@on ] Some time ago, someone mentioned that they were working on an Ruby
47130 [Peter.Booth@] You can find it at sourceforge http://sourceforge.net/projects/rubyeclipse

诚邀代理业务,利润可达40%!全新jsp asp.net php虚拟主机
47124 [     g@g. om] <!-- saved from url=(0022)http://internet.e-mail -->

Data_Make_Struct Considered Dangerous?
47134 [billtj@y. lu] I don't know whether any of us has encountered this kind of problem before
+ 47136 [decoux@mo lo] ptr-> data2 = Qnil;
| 47143 [billtj@y. lu] Well, I don't like to have "ptr->data2 = NULL" simply because I usually
| 47145 [decoux@mo lo] Please be serious, this just add a test
| 47152 [billtj@y. lu] Sure, for one line it is a joke.  However, if this line is called hundreds
| + 47155 [pbrannan@at ] Perhaps Ruby is not the tool you should be using.
| | 47159 [billtj@z. lu] Actually, at least for now, Ruby is my ideal tool.  So far I have
| + 47162 [michael_s_ca] I've seen you bandy these "events/sec" figures around for a couple of
|   47164 [billtj@z. lu] Oh, I am writing a discrete event simulator that will be used to simulate
|   47165 [michael_s_ca] OOohh!  Ok.  I'm sorry, I thought this "event" was some generic
+ 47137 [cboos@bc -t ] secure already existing data structures reachable from the GC
| 47144 [billtj@y. lu] Based on my experience, I will not use ALLOC unless it is necessary
+ 47177 [nobu.nokada@] It sounds strange.  Data_Make_Struct() fills the allocated
  47227 [billtj@gl e.] I think this can only happen when we have a struct/class inside
  47279 [nobu.nokada@] Yes, I guess so.
  47316 [billtj@z. lu] After examining the code further, our inconsistency happened because I did
  47317 [decoux@mo lo] Data_Make_Struct() is *not* dangerous. The goal of Data_Make_Struct() is
  + 47341 [billtj@z. lu] Surely I understand it now with this whole business of dynamic memory
  + 47349 [pbrannan@at ] This is a problem, though, because setting a struct to all zeroes
    47358 [billtj@z. lu] 1) First, it is not the intention to make a clear-cut judgment whether
    47364 [pbrannan@at ] If you ignore the out-of-memory situation, then there is no need to use
    + 47417 [billtj@z. lu] Thanks for the information.  It becomes clear to me now.  Yes, when I
    + 47449 [billtj@y. lu] OK, one final thought/question.
      + 47452 [vjoel@PA H. ] Suppose your ruby code produces a large amount of garbage, but not
      | 47591 [billtj@y. lu] Now we can start talking about the real numbers.  In my linux 1.6.7 Ruby,
      | 47634 [matz@ru y- a] I think so too.  If you don't have memory interaction with Ruby
      + 47456 [behrends@cs ] This is inaccurate. Ruby only knows about the memory allocated via
        47592 [billtj@y. lu] Please see my response to Joel.  Isn't it that the maximum possible wasted
        47672 [behrends@cs ] A problem occurs if, say, you have an Image class that allocates memory
        47676 [billtj@y. lu] =================================================================
        + 47689 [behrends@cs ] [Loading 1 MB images via malloc.]
        | 47690 [billtj@y. lu] I am sorry that I am having a difficulty in following your reasoning.  For
        + 47693 [batsman.geo@] void *
          47742 [billtj@z. lu] Thanks for your confirmation that "Ruby gc heuristic" is in practice

ANN: JRuby beta 1.6/0.5.1
47135 [ndrsbngtssn@] JRuby (http://jruby.sf.net) is a pure Java implementation of the Ruby

Teaching OO using Ruby
47146 [bpdp@3w i. e] I am very interested in teaching OO and currently doing some research on

ATTN: Vim/Ruby users.  Updates to indent/ruby.vim and ftplugin/ruby.vim.
47147 [gsinclair@so] Just letting you know that I have updated the Vim ftplugin and indent files for

Re: JRuby beta 1.6/0.5.1
47148 [hal9000@hy e] Pardon my ignorance about this project...
47167 [ndrsbngtssn@] Not yet, but we hope to do this sooner or later.

Bug fix for html/fillinform
47150 [pmak@an me l] I found a bug in html/fillinform. This form will not get filled

Glade Shortcut Keys
47153 [transami@tr ] anyone know how to set up shortcut keys with glade?
47216 [mutoh@hi hw ] In C Locale.

FileTest module confusion
47157 [jamesvtoomey] I'm just learning Ruby, so please forgive any naivete revealed here.
+ 47161 [jfreeze@fr e] Try
+ 47180 [gsinclair@so] Some modules are meant for mixing in, some aren't.  FileTest isn't.

[OT] Quarantine Responses
47160 [pabs@pa lo r] Can we get rid of this crap?  I suspect (hope?) most people on this

[ANN] YAML.rb 0.38 -- Objects in plain text
47163 [yaml4r@wh th] Pleased to announce the latest YAML.rb product.
47184 [armin@xs .d ] Thanks a lot for the YAML work.
47187 [chrismo@cl b] I've added it to my to do list - it's interesting to me because I originally
47204 [yaml4r@wh th] At this time, circular object references are supported by the
47222 [chrismo@cl b] Great - thanks.

formated strings
47169 [briqueabraqu] How can I write a formated text to a string (like I would do with printf
+ 47170 [dblack@ca dl] With sprintf.
+ 47171 [alan@di ik t] existing_string += sprintf("%16d", decimal)
| 47172 [briqueabraqu] I'm curious, since I'm new to Ruby: how does sprintf is called, i.e., is
| + 47173 [batsman.geo@] It's a private method of the Kernel module. As Object includes Kernel, the
| + 47175 [alan@di ik t] I believe that sprintf is provided via the Kernel module.
+ 47211 [szegedy@no p] s << "%16" % decimal

JAVA Client and Ruby Server Connect
47174 [r.heinsberg.] I'm looking for an XML-RPC solution for connecting a Java Client with a Ruby

How to build a flowchart app
47176 [sh1232@ya oo] I want to build a simple flowchart application.  Something like Visio,
47189 [chrismo@cl b] Chris
47246 [smalllinux@n] Steven G.

DBI Error when attempting to pass Oracle's SYSDATE to a place hol der
47178 [roberge@qw s] ...
47179 [meier@me st ] ed

Texas codefest: Suggestions welcome
47181 [hal9000@hy e] Well, the little get-together we talked about
47194 [pate@re -b a] make a decision pretty soon.
47205 [sean@ch tt n] [ I think barely caught up enough with life to poke my head out and

HT make gsub not case sensitive...
47185 [keuler@po ta] some_big_string.gsub!(/soMe_sUbString_1/, some_substring_2)
+ 47188 [chrismo@cl b] Chris
+ 47190 [patrick.benn] add an 'i' after the expression.
  47191 [keuler@po ta] Great! Thanks!

FXCalendar class
47192 [david.naseby] The following is some FXRuby stuff I've found useful.. if the Ruby Cookbook
47201 [lyle@kn lo y] Cookbook

Checking for file existance
47195 [briqueabraqu] How do I check if a file (possibly a directory) exists? This is probably
+ 47196 [rich@li hi o] It's kinda hard to find - the FileTest object is what you're looking for
+ 47198 [nobu.nokada@] File.exist?("filename")

Is this array operation correct?
47199 [briqueabraqu] a = Array.new(3,[]) => [[], [], []]
47200 [dblack@ca dl] a[0] and a[1] and a[2] are references to the same object, so if you
+ 47208 [cboos@bc -t ] Array.new(3).map { [] }
| + 47210 [decoux@mo lo] With 1.7 you can give it a block
| + 47276 [g_ogata@op u] (1..3).map{[]}
|   + 47280 [gsinclair@so] Speaking from inexperience, I doubt there's any significant efficiency
|   + 47293 [cboos@bc -t ] # Really basic benchmarking (for 1.6.5 ) ...
+ 47209 [mrchameleon@] You may be wanting this ...

Minimum version of windows for ruby?
47202 [spammapsglen] I have an old Epson ActionNote 4SLC/25 laptop running Windows 3.1. I
47203 [n1k0@ro er .] You might want to consider installing linux without any graphical stuff.
47274 [spammapsglen] My Red Hat Linux 7.2 doc says its probably compatible with any computer built
47380 [wheelerwjx9@] out of the box, the default configuration of Red Hat 7.2 would not load
+ 47385 [james@ja es ] Ibiblio (http://ibiblio.org/pub/Linux/distributions/) lists quite a few
+ 47524 [spammapsglen] Thanks, the Slackware site gives me some hope, and I may give this a try. - Ian

How to use the safe_unlink method?
47206 [kdeuler@pa b] ...
47207 [decoux@mo lo] Well, it work fine
47238 [keuler@po ta] Guy-
47244 [keuler@po ta] Guy-
47255 [batsman.geo@] He's creating a file named ".output*.*" and deleting it with the line
47258 [keuler@po ta] Thanks!

Ruby Weekly News
47212 [Dave@Pr gm t] Ruby Weekly News: 08/14/2002
47237 [james@ja es ] Please don't take this as a knock of the efforts required to produce the
+ 47252 [pate@re -b a] there are a couple of reasons things might not show up in a particular
| 47257 [james@ja es ] Thanks for the response.  One thing I don't recall seeing in a long time, or
| 47259 [hal9000@hy e] or
| 47263 [james@ja es ] Very cool, thank you.
+ 47256 [batsman.geo@] * automatic thread scoring
| + 47262 [hal9000@hy e] I *really* like the way you think and/or dream.  :)
| | + 47264 [cochi@un -p ] Erm. Better not. I'm personally announcing on RAA first and only
| | | 47265 [batsman.geo@] 1.- the script could wait for x days before announcing the thing,
| | + 47297 [dsafari@pa a] Yep my script picked those ones out. It did a case insensitive match on ^ann
| |   47305 [x@ic im nk .] looks like you're using a new key to sign messages? Couldn't find it on the
| + 47296 [dsafari@pa a] I used to automate this by thread activity. I'd score threads based on the
|   47304 [batsman.geo@] include the vote in the message itself!
+ 47295 [dsafari@pa a] My apologies for missing those threads and not sumarizing them. As Pate

Cannot input Thai character in TkEntry
47218 [nonglukb@he ] ...
47272 [matz@ru y- a] Probably because no one on the list knows about Thai character input.

1.7.2 v. the latest and 1.7.2 windows dist
47223 [chrismo@cl b] Is 1.7.2 a static point in time we've passed already, or is it a reference
47224 [andy@to ls e] The current snapshot of the 1.7 development tree (as of last week or so)
47225 [chrismo@cl b] Okay - so assuming things need to be tightened up on the 1.7.2-1 installer,
47228 [andy@to ls e] Exactly.  People are testing out 1.7.2-1 as we speak, so as soon as I get
47299 [holmberg@ia ] Is this really a good idea ?
+ 47310 [andy@to ls e] I vote for this solution :-)
| 48836 [charleshixsn] Perhaps, then, the current version of 1.7 should be renamed 1.8, and 1.9,
+ 47312 [Dave@Pr gm t] This is the problem, rather than the solution.
  + 47314 [hgs@dm .a .u] I'd love this to happen.
  + 47590 [holmberg@ia ] I completely agree (but I didn't dare to suggest such a great change

Problems with Marshal
47229 [djberge@v5 h] Ruby 1.6.7 on Solaris 9.
+ 47231 [decoux@mo lo] Have you verified that the string send by the server is the same than the
+ 47232 [hgs@dm .a .u] How are you sending and receiving the data?
  47233 [djberge@qw s] Ok, I've narrowed it down partially to a newline issue with Marshal.  Here
  + 47234 [decoux@mo lo] use #read and #write rather than #puts #gets
  + 47235 [tom@li ux ri] The problem is that you're using gets and puts, which aren't appropriate
  + 47236 [hgs@dm .a .u] Curious.  I didn't expect marshal to make much use of whitespace...
    47242 [djberge@qw s] Thanks Guy, Hugh & Tom for the replies.

A few newbie questions...
47239 [christopher.] I just downloaded/installed Ruby on Win2K. I really like what I've seen so far.
47240 [Patrick.Benn] You're really going to like Ruby.  :>
+ 47241 [christopher.] Patrick,
| 47243 [Patrick.Benn] Hmm.. it works fine for me ..... but, if
| 47247 [christopher.] I exited/restarted RubyWin and all is well now. Very odd. Oh well, I can't
+ 47249 [lyle@us rs s] Just to clarify (for Christopher): The "PickAxe Book" that people refer
  47267 [aflundi@ma l] Speaking of the "PickAxe Book", how much is missing
  + 47268 [hal9000@hy e] <ruby-talk@helium.ruby-lang.org>
  | + 47277 [gsinclair@so] In defence of Dave/Andy/OnlinePickAxe, I have learned Ruby from the ground
  | | + 47282 [james@ja es ] I'd also recommend the "search ruby-talk via Google groups" web form that
  | | | 47284 [Dave@Pr gm t] Available on the side menu of www.rubygarden.org
  | | + 47413 [Tim.Hunter@s] IMHO, the online version of the PickAxe is most useful as a supplement
  | + 47301 [kentda@st d.] About the figures, did someone mention modifying the JPEGs from the free
  |   47394 [juergen.kati] I inserted links to the pictures into the xml files, and in convert.xsl I
  + 47269 [Dave@Pr gm t] That's a wee production problem: Ruby changed, and some of the sample