68042-68581

67804-69125 subjects 68249-68888

[Q]  Caveats of rb_global_variable() ?
68042 [vangczung@ya] Fellow Rubygoers,
+ 68044 [decoux@mo lo] Well, it's really difficult to answer without seeing your C source but
| 68045 [decoux@mo lo] Bad, bad
| 68101 [vangczung@ya] Thanks.  Can rb_gc_unregister_adddress() be safely called on an address
| 68113 [batsman.geo@] You were lucky, problem solved :-)
+ 68182 [behrends@cs ] In addition to what has already been suggested, simply assigning Qnil to

Embedding Ruby in Win32 App
68046 [lang.thomas@] ...
68065 [jbritt@ru y-] James

[PATCH] transaction support for dbd_mysql
68047 [B.Candler@po] ...
68063 [paul@sn ke n] Transaction support was added a few weeks ago.  It's not available

arguments to procs
68048 [jbshaldane@h] irb(main):005:0> Proc.new {|a|}.arity
68121 [matz@ru y- a] Block parameters behave like LHS of assignment.

1.8 docs in progress?
68054 [hgs@dm .a .u] Is there any current work in progress on the 1.8 docs?
+ 68098 [aamine@lo er] Try
| 68131 [hgs@dm .a .u] Thank you (and for the info on ruby-doc also).
+ 68109 [cedric.foll@] What are new  things from 1.6 you speak about ?
  68186 [surrender_it] # disclaimer: everything can be wrong ^_^

Comparable, String and ==
68058 [han.holl@pr ] Maybe I'm doing something very stupid, but consider this.
68060 [decoux@mo lo] pigeon% ruby -e 'p String.ancestors'
68067 [bob.news@gm ] "ts" <decoux@moulon.inra.fr> schrieb im Newsbeitrag
68069 [decoux@mo lo] Well I must have some problems with english :-)
68134 [bob.news@gm ] "ts" <decoux@moulon.inra.fr> schrieb im Newsbeitrag

[ANN] Ruby/zlib 0.6.0
68059 [unnie@bl e. ] Ruby/zlib version 0.6.0 is out.
68197 [sdate@ev re ] I tried installing it on Windows XP using ruby 1.6.8 (2002-12-24)

[ANN] Ruby-GNOME2-0.4.0 binaries(Cygwin, Debian)
68061 [mutoh@hi hw ] Ruby-GNOME2-0.4.0 binaries are available.
68260 [mutoh@hi hw ] Enjoy!

Ruby extension mingw32 libraries on mswin32?
68066 [gour@ma l. n] I created Ruby-GTK2 libraries with MinGW-built Ruby. What has to be done
68077 [t-peters@in ] Your previous post indicates that you're almost there. The test app ran

[OT] Re: What kind of book is PickAxe?
68073 [batsman.geo@] I am not. I am just a sofisticated Ruby script that analyzes postings to

Re: i++
68078 [offstuff@ao ] my code in ruby looks like this...
+ 68081 [B.Candler@po] arr_stuff.each_with_index { |a,i|
| 68086 [offstuff@ao ] 20030327220909.GA71406@uk.tiscali.com...
+ 68083 [lyle@us rs s] Did you just not like the answers that you got when you asked this
| 68085 [offstuff@ao ] 3E837D4B.2080306@users.sourceforge.net...
+ 68084 [ahoward@fs .] not preinc or postinc, but
+ 68133 [sabbyxtabby@] Avoiding the question of i++, a common idiom (if a google search for
  68168 [offstuff@ao ] f5a79bf2.0303280429.14bc682e@posting.google.com...
  68169 [offstuff@ao ] 3e84b97e$0$20692$91cee783@newsreader02.highway.telekom.at...

How to call super with different arguments
68080 [han.holl@po ] class Awk < String
68091 [B.Candler@po] Seems unlikely, since 'downcase' returns a different object; <=> is an
68092 [B.Candler@po] Actually that didn't work when case-sensitive was true, because of the loop
68093 [B.Candler@po] Hmm. With all that excitement about singleton classes, I forgot the most
68165 [han.holl@po ] Yes! Indeed, this was all I wanted.

Array question
68082 [walter@mw ew] Any one know why Array.join can't take a code block and join that
+ 68087 [gsinclair@so] No, that appears to be a very sensible solution to me.  It
| 68090 [bruce@co ed ] I think this is an excellent idea and would be a nice addition to Ruby.
+ 68119 [matz@ru y- a] Hmm, I feel like this filtering is not part of "join" operation.
  + 68122 [dcarrera@ma ] Uh, no it doesn't strike me as what 'join' is supposed to do.
  | + 68124 [tim@ba es id] I would agree - otherwise you're combining the functionality of 'join' with
  | | + 68126 [dcarrera@ma ] That'd be cool.
  | | | + 68127 [dcarrera@ma ] Ooops.  Cancel that.  Stupid example.  I just realized that it doesn't use
  | | | + 68128 [tim@ba es id] Wait, how is that different from this?
  | | | | 68129 [dcarrera@ma ] As I said, stupid example, brain slip.
  | | | | 68130 [tim@ba es id] Yeah, I didn't see that one until afterwards.
  | | | + 68160 [drbrain@se m] top of=20
  | | + 68132 [pit@ca it in] I don't have any use for this yet, too, but you could even pass both
  | |   68136 [walter@mw ew] entries
  | |   68154 [austin@ha os] puts list.join(", ").downcase
  | + 68143 [nemo@he lo r] Uh, no it doesn't strike me as what 'join' is supposed to do.
  |   68144 [bob.news@gm ] "Chris Pine" <nemo@hellotree.com> schrieb im Newsbeitrag
  |   68145 [michael_s_ca] out of curiosity, why would a block to #join be awkward?  It's wholly
  |   + 68147 [matz@ru y- a] Somehow, I feel feeping creaturism here.
  |   | + 68153 [michael_s_ca] I'm not totally disagreeing, and I'm not sure that we should just add
  |   | | 68159 [hal9000@hy e] My opinion only.
  |   | | 68161 [michael_s_ca] And how does that make it "awkward"?  That's all I'm asking. EVERY
  |   | | 68167 [hal9000@hy e] I don't think it's awkward to *use*. I think it's
  |   | | 68193 [nemo@he lo r] I like interfaces to be simple and elegant and sensible.
  |   | | 68200 [hal9000@hy e] almost
  |   | + 68158 [hal9000@hy e] What a very silly, very American joke.
  |   |   68187 [matz@ru y- a] Credits should go to Larry Wall.  I learned computer English from
  |   + 68185 [B.Candler@po] To me, it's not obvious that join with a block should do collect-and-join.
  + 68125 [nobu.nokada@] It reminds me "mapconcat" in elisp.
  + 68137 [bob.news@gm ] "Yukihiro Matsumoto" <matz@ruby-lang.org> schrieb im Newsbeitrag

http and basic authentication
68088 [damphyr@fr e] I'm quite new to Ruby and I'm not exactly familiar with the mailing
68228 [daemon@te mo] Not sure if this helps, but I use this sample code for HTTP
68248 [damphyr@fr e] Well, I went a few steps further today.

Windows Platform - changing directory of caller?
68089 [nick.robinso] I am wondering if it is possible to write a Ruby script to change the
68094 [gsinclair@so] Just not possible.  A Ruby program, like any other program, can only
+ 68095 [patrick.benn] ...
| + 68100 [sdate@ev re ] ...
| + 68106 [nick.robinso] Thanks for that Patrick, I will take a look at it.
|   68140 [Patrick.Benn] ...
+ 68105 [nick.robinso] having a DOS tool that did exactly what I want to do when executed wihtin a
  68176 [eric.schwart] You can do that in DOS (and presumably a DOS emulator running on NT4)

Lo mejor para su impresora
68096 [publi@im re ] IMPRESION CON CALIDAD FOTOGRAFICA.

Article on secure code
68099 [dcarrera@ma ] Article title: "Too Cool For Secure Code"
68265 [ jupp@gm .d ] The problem are programs that use limits for the size of data but do
68270 [surrender_it] sure but using n function means a loss in performance .
+ 68276 [B.Candler@po] But very little compared to the use of a scripting language :-)
+ 68284 [Ephaeton@gm ] You mean in the end while looping over bytes also increasing a counter

Newbie question:Does Ruby have the structure of hash's array like Perl does?
68103 [LeiWENG@mo o] h=Hash.new
+ 68107 [dcarrera@ma ] h=Hash.new
+ 68108 [tkynerd@sp m] h = Hash.new
  + 68110 [LeiWENG@mo o] Thx!
  | 68111 [dcarrera@ma ] I'm not sure I understand.  Can you give me an example of Perl code that
  | 68114 [B.Candler@po] If you interpolate an array into a double-quoted string, it's the separator
  | + 68115 [LeiWENG@mo o] #!/usr/bin/perl
  | | 68118 [dcarrera@ma ] Well, Brian just answered this question for us (thanks Brian).
  | + 68117 [B.Candler@po] $ ruby -e 'a=["jim","bob"]; $,="-"; puts "hello #{a}"'
  |   68120 [dcarrera@ma ] Thanks Brian.  One thing I like about Ruby is that I really do learn
  |   68123 [LeiWENG@mo o] Thank u all, Brian & Daniel!
  + 68135 [bob.news@gm ] "Tim Kynerd" <tkynerd@spamcop.net> schrieb im Newsbeitrag
    68141 [brett_willia] vor-lord:i686/debug> irb
    + 68142 [decoux@mo lo] Try this (with 1.8)
    + 68146 [dblack@su er] Yes; the default value for a hash is what you get for non-existent

Compiling Ruby 1.8.0 with MinGW fails
68138 [gour@ma l. n] I cannot compile Ruby 1.8.0 with MinGW compiler.

[Q] How far does a closure reach?
68139 [lyle@us rs s] I was trying to understand how Ruby's finalizers work, or, in this case,
68190 [jweirich@on ] Yes.  the "puts" is actually sent to "self" so obviously the proc needs

[ARTICLE] - Squawks of the Parrot
68148 [djberge@qw s] Here's an interesting article (ok, blog) from Dan Sugalski regarding
68149 [dan@si he or] Nope, not at all. There's more in entry 152, and at some point I'll

proposal!!!
68150 [kola1ade@hk ] ASSISTANCE REQUIRED FOR ACQUISITION OF ESTATES.

new 1.8-snapshot regex warning
68151 [bhilton@vp p] I just installed the latest 1.8 snapshot from 3/27 and found that I now
68188 [matz@ru y- a] It's not accidental.  See ruby-dev summary next week.  But I now think
68223 [mike@os n. r] Seems that it's the "usual" way of handling it, as per ed(1)
68227 [akr@m1 n. rg] It is intended to warn /[a-c-e]/.

1.8-snapshot delegate breakage?
68155 [bhilton@vp p] require 'delegate'
68196 [matz@ru y- a] Oops, thank you for finding a bug for me.  I will fix.

Request for (peer?) review [External Iterators]
68156 [mhm26@dr xe ] I was reading the threads on External Iterators, and I decided to
68202 [pit@ca it in] thanks for your work. Given that there's already some external

scanf failing(?) for floats read from a file
68157 [William.L.Kl] I'm beginning to use scanf (thanks David, Hal, Noland, and Jason!) to
+ 68162 [dblack@su er] Yes.  Rewind to scanf-1.1.0 :-(  I fear I've introduced a glitch
+ 68163 [hal9000@hy e] <sigh> Sorry for the problem, Bil.
  68166 [William.L.Kl] That would be cool.  I'm using Ruby to repair one of our
  68170 [hal9000@hy e] OK, I've put a link to version 1.1.0 on
  68179 [William.L.Kl] And it works great!

Coding Standards
68164 [probertm@NO ] I am attempting to get a fairly major Ruby project off the ground
+ 68172 [jason@jv eg ] Jason Voegele
+ 68192 [jweirich@on ] Two pieces of advice ...

Need #collect! on partial array
68171 [jim@fr ez .o] Recently I needed to modify an array.
+ 68173 [dblack@su er] Citizens for MWI [map_with_index] welcomes you to its ranks :-)  But I
| 68183 [jim@fr ez .o] Well, it's nice to finally find a group that welcomes me. :)
+ 68175 [mike@ra do .] [mike@won mike]$ irb
  68180 [gfb@to es ft] It is cheating, in a way ;-). `i' holds a reference to the original element
  68181 [hal9000@hy e] element

The Phrasebook Design Pattern, SQL and YAML
68174 [djberge@qw s] I've been looking at the Phrasebook Design Pattern recently.
+ 68177 [pate@ey er a] [elided a bunch of good stuff]
| + 68178 [djberge@qw s] Sounds like a good idea.  Just to make sure I understant properly, does
| + 68184 [djberge@qw s] I've added the !okay/sql type to the OkayProject.  Hope I did it right.
+ 68189 [ruby-talk@wh] Yeah, cool.  I've added a basic schema to your wiki page and a few comments.
+ 68194 [austin@ha os] Huh. In my RSS implementation (ruby-rss.sourceforge.net), I've

[ANN] tld.rb 0.11 - Check wether a given TLD is valid or not
68191 [ jupp@gm .d ] tld.rb allows you to check wether a TLD (top level domain) is valid
68195 [drbrain@se m] irb(main):001:0> require 'tld'
68250 [ jupp@gm .d ] * Eric Hodel <drbrain@segment7.net>; 2003-03-29, 21:04 UTC

Announce: RHDL-0.4.2 (Ruby HDL) an agile HDL
68198 [ptkwt@sh ll ] An HDL (Hardware Description Language) built on the Ruby scripting
68288 [craigselton@] This looks interesting.  You've managed to make a standard scripting
+ 68295 [ptkwt@sh ll ] That was what I was aiming for.  Thanks to Matz for designing Ruby with
| 68361 [johnjakson@y] I was able to do something similar with plain old C, using just macros
| + 68364 [ptkwt@sh ll ] Well, I can get at the internal Ruby parse tree with a bit of 'magic'.
| + 68497 [tom1@la nc b] We came to the same conclusions.  The earliest predecessor to Confluence was
+ 68316 [jan@ja de al] At least for MyHDL (my Python HDL attempt that you refer to), this
  + 68356 [ptkwt@sh ll ] That's kind'a how I saw it too...
  + 68363 [craigselton@] First off, I didn't mean to dis MyHDL...
    68365 [ptkwt@sh ll ] And this has really been one of my main goals in designing RHDL - as much
    68390 [jan@ja de al] Absolutely - but then again my design goal (as stated in the manual)

Ruby 1.6.8 vs Ruby 1.8.0 preview 2 - benchmarks
68199 [djberg96@ho ] One of the concerns I'm having about Ruby 1.8 is that it appears to be
+ 68206 [ptkwt@sh ll ] That is somewhat worrisome... I was hoping we were moving the other
+ 68219 [decoux@mo lo] One of the reason is the suppression of some #=== methods : in this case
| 68231 [surrender_it] why this changes had been applied?
| 68232 [decoux@mo lo] Well, if I'm right (don't forget that I'm stupid) and if one reason for
| 68235 [surrender_it] thanks!
+ 68220 [bobx@li ux a] Yikes. Somehow, somewhere that needs to change. I have be reading on Python
| 68221 [gsinclair@so] Any idea what in particular they have focused on?
| 68225 [bobx@li ux a] Python
+ 68576 [B.Candler@po] Just out of interest, I ran your tests on my system (FreeBSD-4.7, P266MMX,
  68581 [B.Candler@po] That was my broken ruby16->18 shim installation, which I've now fixed. But I

Weighted random selection -- how would you do this?
68201 [hal9000@hy e] Here's a little question for you.
+ 68203 [dcarrera@ma ] Say that you have a hash 'events' whose keys are the events you are
| + 68205 [ptkwt@sh ll ] Hmmm.... Wouldn't this be biased by order?
| | + 68207 [dcarrera@ma ] Would it?
| | | + 68210 [batsman.geo@] Should be right w/ val <= 0, as the underlying distribution function is
| | | + 68215 [hal9000@hy e] I think you were right the first time...
| | + 68214 [hal9000@hy e] Elaborate, Phil... do you mean that the actual
| |   68236 [ptkwt@sh ll ] I tried running it a few times and well it seems to work.
| |   68238 [austin@ha os] Couldn't order affect the results if more than one item share the
| |   68243 [ptkwt@sh ll ] Well, you're getting some randome number between 0 and 1.  So let's say
| + 68212 [hal9000@hy e] Does indeed, thank you. The algorithm is
+ 68204 [ptkwt@sh ll ] You're talking about some kind of proportional selection scheme (hey, you
| + 68208 [kero@ch ll .] Wonderful for visualization!
| + 68213 [hal9000@hy e] Not at the moment, but I've certainly had that in the
|   68237 [ptkwt@sh ll ] I just finished up a GA class.  It was one of the most interesting classes
|   68244 [batsman.geo@] Explanation (includes ASCII pictures :-)
+ 68209 [google@to pa] It's not exactly what you want (but there are good reasons for it
| 68216 [hal9000@hy e] Again, interesting. But I keep thinking about Phil's
| + 68222 [nemo@he lo r] Again, interesting. But I keep thinking about Phil's
| + 68224 [bob.news@gm ] "Hal E. Fulton" <hal9000@hypermetrics.com> schrieb im Newsbeitrag
| + 68226 [google@to pa] No, it doesn't matter.
+ 68218 [sabbyxtabby@] def random_weighted(items)
+ 68230 [L.Pitts@uq n] Sir Hal,

OT Re: The Phrasebook Design Pattern, SQL and YAML
68211 [feldt@ce ch ] No, but if you haven't you might wanna check out
68217 [botp@de mo t] maybe cpan can help http://www.cpan.org/modules/by-module/PDF/

[ANN] Ruby User Group Italia
68229 [surrender_it] RubyUserGroup.new ( ITA )

C-API: Setting a Ruby-Object in a wrapped C struct
68233 [kudling@kd .] i have a Ruby class which uses a wrapped C struct for housekeeping it's
68234 [decoux@mo lo] static VALUE
68239 [kudling@kd .] ...
68240 [kudling@kd .] Oops, sorry. This canceled reply made it through. *blush*

[OT] Re: Weighted random selection -- how would you do this?
68241 [batsman.geo@] It doesn't affect iff your uniform RNG is *really* uniform.

Business/Financial Representative
68242 [kani_mobutu@] Dear Sir/Madam

Re: [Ruby] Java-like toString() method?
68246 [Stephan.Kaem] I think to_s is what's called when you print an object.
68247 [Ephaeton@gm ] Actually I think it's inspect, not to_s - that is depending
68263 [surrender_it] I still think to_s is the right thing.
threads.html
top