11965-12811

11739-12280 subjects 12157-13260

^ newbie eval question
11965 [colin ska.we] I want a piece of eval'd code to create a local variable in the
11973 [matz zetabit] Ruby's local variables are treated statically (i.e. compile time), so

^ Ruby/MySql garbage collection problem
11969 [ristad mnemo] I've written a Ruby program that uses Tomita Masahiro's excellent
11975 [matz zetabit] Well, it might be a bug in Ruby/MySQL.  Let me contact with him.

^ SV:  Not Ruby, for me, for the moment at least
11970 [dennisdecker] Thank you!

^ Is mod ruby read to replace PHP?
11978 [jim freeze.o] Ok Ok, don't flame me for this...

^ DBI for Ruby?
11979 [mjais web.de] currently I am playing with Ruby and Mysql and it really is cool
12087 [maki inac.co] There is RDBC module, like JDBC of Java. It has Postgres and

^ File exist method
11981 [ppladijs cag] Is there a method or a simple way to check
+ 11982 [dgjs acm.org] 'FileTest' module, 'File::Stat' class ...
+ 11983 [Dave Pragmat] File.exist?("myFileName")
+ 11984 [mike stok.co] If you grab the ri utility from www.pragmaticprogrammer.com then you can
  11985 [ppladijs cag] Thanks to all of you for helping me out!

^ possible memory leak in GDBM/gdbm
11986 [ristad mnemo] The following program suggests there is a small memory leak in
11988 [matz zetabit] I hope it is fixed in the latest stable snapshot.  At least, memory
11995 [ristad mnemo] I hope it is fixed in the latest stable snapshot.  At least, memory
11996 [matz zetabit] "The latest stable snapshot" is the one that can be obtained from

^ zip file manipulation
11987 [cas exis.com] I have looked around for over an hour for any kind of library providing zip

^ Is eRuby... (was: Is mod ruby read to replace PHP?)
11989 [wys helbling] Jim,

^ higher-resolution Time for Win32
11990 [tjt nosuch.c] I want to use Ruby for realtime MIDI and audio on Windows.
11991 [matz zetabit] Thank you for the information.  The place to be modified (i.e. where
12006 [ameuret bloc] The prefered way for high-resolution timming on Win32 is to use

^ Re: ANN: RubyCHannel interpreter goes $SAFE-level 2!
11994 [schneik us.i] # If the "real ruby-gurus" (Matz, Guy(ts),

^ PLS-violation in proc as block method invocation!?
11999 [feldt ce.cha] I guess the following behavior is due to block/proc conversions
12001 [matz zetabit] OK, I will fix this by modifying Proc#==, although output like

^ FXRuby examples
12002 [dsafari para] I've installed fox 0.99.147 and have compiled the FXRuby to produce fox.so.
12026 [ljohnson res] Holden,

^ Re: How do I reach members from a Proc?
12003 [schneik us.i] #
+ 12004 [feldt ce.cha] Maybe we should add an acronym glossary to the FAQ... ;-)
| 12015 [maili31s cli] Glossary's separately there...
| 12017 [feldt ce.cha] POLS or PLS seems to be used by some and the concept of "Principle of
| 12018 [maili31s cli] I think it's good candidate, too.
+ 12005 [matz zetabit] Thinking of what it does (switch the value of self, then evaluate
  12010 [spwhite char] For me, "eval" already includes the concept of calling, so I feel that
  12012 [dblack candl] To me, though, block_eval doesn't signal the switching of self.  Not

^ ActiveScriptRuby in ASP
12007 [Makoto.Nakag] I am trying to use arton's ActiveScriptRuby from within ASP with IIS on

^ ANN: Memoize 0.1.2
12014 [feldt ce.cha] This is to announce Memoize: "for speeding up methods/functions by caching
12024 [wys helbling] "caching"...a typical AOP aspect.
12027 [feldt ce.cha] Yes, there is and I'm actually one of its authors! ;-)
12028 [avi beta4.co] As in, letting an aspect control whether or not the original method even
12029 [feldt ce.cha] Yes, thats right. And returning something other than what the original
12032 [avi beta4.co] It could be written in Ruby, in the same style as the current incarnation
12033 [feldt ce.cha] Ok. But this also gives us a hint that something might be "missing" from
+ 12036 [decoux moulo] How do you do with such a function ?
| 12040 [avi beta4.co] require 'advice'
| 12041 [decoux moulo] pigeon% ruby
| 12044 [avi beta4.co] Foo.new.bar
| 12076 [feldt ce.cha] Yes, its kind of strange that it is messed up.
| 12082 [avi beta4.co] I think the problem is that I always use rb_iterate to make the call;
+ 12037 [avi beta4.co] What might be nice is if, whenever send is redefined for a class, all

^ hooking/wrapping all of a classes methods
12019 [dblack candl] Let's say I write an IO-layer class with a bunch of methods that do
+ 12020 [decoux moulo] yield 12 if block_given?
+ 12021 [avi beta4.co] David -
+ 12025 [wys helbling] "synchronization"...sound like yet another typical AOP aspect ;-)
| 12030 [wys helbling] Sorry, I didn't know "we" have AOP already. Got something to look at
+ 12142 [green FreeBS] For what it's worth, this will only "seem to" work.  It won't give you an
  12152 [dblack candl] Right y'are.  And it's all backwards anyway.  And Thing's superclass

^ French RUG ?
12023 [jeromg hotma] This is a multi-part message in MIME format.
12046 [roberto REMO] [courtesy cc of this posting sent to cited author via email]
12101 [hdstich comm] and what about a German RUG? ;-)
12107 [wys helbling] MfG
12108 [hdstich comm] ah, yes, i found it on www.ruby-lang.org under 'Mailing

^ NQXML: Pure Ruby XML parser (almost)
12034 [jimm fnord.i] NQXML is a pure-Ruby XML parser that I'm writing from scratch. The "NQ"
+ 12091 [sent quality] Excellent. This sounds very similar to what I was
+ 12165 [maki open-ne] * install.rb: fix bug(? but I cannot install without this fix).

^ why won't "(a) = 1" parse?
12039 [dblack candl] (a) = 1
12489 [matz zetabit] It's by the magical mystery of yacc rules.  I wish I knew workaround.

^ using rescue/ensure in methods
12043 [tammo.freese] class Test
+ 12067 [chadfowler y] class Test
+ 12078 [matz zetabit] a bug.  thank you for finding it.

^ RCR Summary 03/05/01
12045 [wmwilson01 h] RCR's which need to be or are being discussed

^ Windows Installer questions
12048 [andy toolshe] I've been busily putting together a new version of the Windows
+ 12050 [hgs dmu.ac.u] Thanks again for your work on this....
| 12057 [hoanga alum.] I guess I'm part of the crowd.  From my experience of working with Windows
+ 12090 [cas exis.com] I think if the two versions can peacefully coexist on the same machine, then

^ Problems with rubywin.exe (ruby162-3 release)
12054 [jobson lineo] I've just installed the ruby162-3.exe for Windows on a Windows 98 SE syatem,
12056 [andy toolshe] Install in directory that does *not* contain spaces

^ SV:  hooking/wrapping all of a classes methods
12058 [dennisdecker] A pitfall in the argument handling. How about this? (not tested)
12065 [dblack candl] That was actually a test, to see if it would raise the exception.

^ Ruby & AOP
12061 [dennisdecker] I've followed the threads about aspects in ruby. It made me re-check the
+ 12074 [avi beta4.co] A lot of the discussion has been hovering around basically this question -
| 12081 [Dave Pragmat] Perhaps we've already got an interface, it just isn't used...
| 12084 [avi beta4.co] Yes, that was my initial thought... the concern I had with that is that
+ 12077 [matz zetabit] extend_object is not a callback, but a redefinable method.
  12080 [avi beta4.co] Matz,
  + 12086 [feldt ce.cha] I agree (I guess problem is to find a bit to indicate
  | 12089 [feldt ce.cha] The above wasn't very clear so I'll try again (and in the process adds a
  | 12092 [matz zetabit] I've got what you meant.
  + 12088 [matz zetabit] Well, let me add this to the ToDo list.  It's kinda big work, that I

^ SV:  Re: Windows Installer questions
12062 [dennisdecker] I've used all of the previous installer versions and never experienced any

^ Re: RCR: shortcut for instance variable
12064 [gsemones pri] FWIW, I think I like this suggestion best so far.

^ ANNOUNCE: FXRuby-0.99.161 now available
12068 [ljohnson res] I am pleased to announce the second "alpha" release of FXRuby, the Ruby

^ Opposite of Integer.chr
12069 [jjthrash pob] Howdy,
+ 12071 [feldt ce.cha] One way is: "a"[0] etc
+ 12072 [gnhurst hurs] irb(main):001:0> 65.chr
+ 12073 [ymsd m-net.n] irb(main):007:0> str = "abc"

^ Quines anyone?
12079 [ben_tilly ho] On PerlMonks I just ran across a reference to the
+ 12083 [Dave Pragmat] Hal's got some at http://www.hypermetrics.com/ruby.html.
| 12256 [matju sympat] proc{|f|f+".call %q{#{f}}"}.call %q{proc{|f|f+".call %q{#{f}}"}}
+ 12191 [raja cs.indi] DATA.rewind
  12225 [ben_tilly ho] Now *that*'s short!  No characters! :-)

^ Another hook
12093 [Dave Pragmat] analogous to to_s, called whenever an object is used in a context
+ 12094 [matz zetabit] And performance would be the excuse again.
| 12095 [Dave Pragmat] Would it be that bad in reality? You'd only have to do the call if
| 12096 [matz zetabit] If there's none, it must be OK.  But for example, if there's only one
| 12102 [schneik us.i] #
+ 12197 [matju sympat] Oh, btw, I also proposed that in [ruby-talk:5056].

^ RCR: replacing 'caller'
12097 [feldt ce.cha] IMHO, 'caller' would be much more useful if you could know/access the
+ 12098 [matz zetabit] Hmm, do you think call_stack is the best name?
| 12104 [feldt ce.cha] Not sure. 'callers' might work or 'invocation_stack' or 'execution_stack'
| 12106 [matz zetabit] I checked in the fix right now.
+ 12105 [avi beta4.co] Robert,
  + 12109 [feldt ce.cha] Avi,
  + 12111 [feldt ce.cha] Problem is that last_func is 0 when block called. New diff (from original
    12171 [wconrad yagn] How about making it an array of structs?
    + 12173 [Dave Pragmat] Yes!
    + 12202 [feldt ce.cha] Agreed as long as performance doesn't suffer. (call_stack might be used to

^ (My) Thread bug - sync != lock/unlock
12099 [hal9000 hype] I recently made an "improvement" to a little piece of code...

^ disassembling and reassembling a hash
12103 [raja cs.indi] Given a  hash, h1, will the following always hold?
+ 12123 [raja cs.indi] I should probably describe the context in which this situation arises.
+ 12128 [decoux moulo] h1 = {}
  + 12143 [raja cs.indi] Not quite.  v[i][j] is normalized based on -all- the values in v not just
  | + 12149 [spwhite char] I'm new to OO so please forgive me if this is a stupid question...
  | | 12184 [raja cs.indi] class MyHash < Hash
  | | 12232 [spwhite char] class Hash
  | | 12245 [raja cs.indi] In some instances using class methods as constructors is fine.  I felt for
  | + 12168 [crippel prim] vectors
  |   12170 [dblack candl] See [ruby-talk:10912] and subsequent discussion -- also the RCR in
  + 12151 [decoux moulo] It's best to wait  a response from matz, but actually #keys and #values

^ blocks from blocks
12110 [avi beta4.co] class Foo

^ NaN, Infinity (Bug?)
12112 [tammo.freese] After the Pickaxe Book, first print, p. 320
+ 12114 [decoux moulo] Well it work for me
+ 12115 [gotoken math] $ ruby -ve 'p [(x = Math::log(-1.0)), x.nan?]'
+ 12132 [Dave Pragmat] a = -1.0  		# => -1.0
  + 12138 [gotoken math] #include <math.h>
  + 12164 [erne powerna] It works OK on windows 2000
  | 12217 [tammo.freese] Perhaps this bug is only based on a misconfiguration of my system?
  | + 12220 [gotoken math] This problem is caused by Cygwin's C library libc (newlib).
  | + 12224 [  ddj kmd.dk] Windows NT Version 4.0
  + 12359 [see_signatur] ruby 1.6.2 (2000-12-25) [sparc-solaris2.6]
  | 12469 [tammo.freese] (ChangeLog)
  + 12481 [decoux moulo] Probably because the patch is

^ RubyOnlineInterpreter as a SOAP-service?
12113 [wys helbling] ...would that make any sense?

^ String.gsub()
12116 [mbowler Garg] The method String.gsub() isn't working the way I expected (or the way
+ 12117 [decoux moulo] puts inputString.gsub(/'(.+)'/, '"\1"')
+ 12118 [erik bagfors] I fell for that too.
| 12120 [mbowler Garg] This is a cryptographically signed message in MIME format.
| 12121 [feldt ce.cha] When using "" the \ character is used as an escape character so that for
+ 12119 [chadfowler y] puts inputString.gsub(/'(.+)'/, '"\1"')

^ Re: String.gsub(), & RCR
12122 [hgs dmu.ac.u] That is not the reason.  Double quotes allow backslashes to quote things.

^ Is Ruby japanese-centered?
12124 [hvrosen worl] [matz writes]
+ 12154 [nickb fnord.] internationalization = i + 18 letters + n = i18n.
| 12162 [gnhurst hurs] ;-)
| 12203 [maki inac.co] Oh, It's more fluent in English than me :-)
+ 12161 [matz zetabit] Since I have no knowledge about other languages than Japanese, I
  12180 [petemcbreen ] <983898497.465333.21876.nullmailer@ev.netlab.zetabits.com>...

^ ChibiXML (Re: RCR: Input XML support in the base Ruby)
12126 [maki inac.co] MoonWolf-san started to develop 'ChibiXML' parser/DOM module.
12146 [gsemones pri] Thanks, I'll take a look at it.  I'm also looking over the NQXML

^ hash.invert loses data if equal values exist - is this the right behaviour?
12127 [tammo.freese] By inverting a hash that has same values, I expected to see an Exception.
12135 [Dave Pragmat] Any reason why there should be an exception?

^ Proc.arity() broken on Windows?
12129 [mbowler Garg] When I run the following code on windows and on linux, I get different
+ 12133 [decoux moulo] What is your version of ruby on linux ?
| 12137 [mbowler Garg] This is a cryptographically signed message in MIME format.
| 12140 [gotoken math] lambda{|a|}.call   expects zero or more arguments.
| 12247 [raja cs.indi] Most likely this has been discussed in the past.  But why is the parameter
+ 12134 [gc mandrakes] Actually, a block with exactly no parameter, and exactly one paramter,

^ Weird Array behavior
12130 [jjthrash pob] <code>
+ 12131 [jjthrash pob] I just figured it out.  The above fills all the entries of the
+ 12136 [gotoken math] Array.new fills always with an *identical* object, specified as the

^ Re: (long) Re: hash.invert loses data if equal values exist - is this the right behaviour?
12139 [tammo.freese] Yes, it isn't. But the problem here is that it is not easy to predict
+ 12145 [Dave Pragmat] No, because hashes are unordered.
| + 12147 [gotoken math] I see.  But I don't know the purpose of Hash#invert.  IMHO, invert is
| | 12158 [Dave Pragmat] I've used it a couple of times, but I agree it's rare.
| | 12177 [gotoken math] Yes, it could be useful sometime.  Thank you.
| | 12179 [Dave Pragmat] hsh.invert -> aHash
| | 12210 [gotoken math] I hope so.  Could you add some explicit notices like the below?
| | 12710 [charleshixsn] What you want to return is a bag, not a set.  So the general inverse of a
| | 12715 [crippel prim] Just,
| | 12810 [charleshixsn] FWIW-- I don't think of myself as exactly a CS-type, but I've been a
| + 12219 [tammo.freese] Is there any case where inverting a hash that is not one-to-one
|   12221 [Dave Pragmat] # Here's a hash mapping image files to the names
|   12222 [tammo.freese] OK, exception throwing would be a bad thing here.
+ 12153 [crippel prim] FYI - hash.invert is a ``left inverse'' under

^ New submissions to the Ruby Application Archive?
12144 [ljohnson res] OK, I promise I looked around for this answer before posting here ;)
12148 [feldt ce.cha] Its a bit difficult to spot but there's a "add new entry" link below
+ 12150 [decoux moulo] You have a link "add new entry" (on the right side), just under "Whats
+ 12169 [ljohnson res] Robert & Guy,
  12172 [hgs dmu.ac.u] Same here.  I'd suggest putting it on the left in Bold, but please, no

^ RCR: Block form of Dir.chdir
12155 [feldt ce.cha] I frequently do something like
12394 [matju sympat] Sounds good to me. If File.open can, why not this one.
12400 [kjana os.xax] ``Because chdir changes context of a program'' ....I heard such.  That
+ 12406 [decoux moulo] What do you do with thread ?
+ 12433 [matz zetabit] That's what I said for 2 previous almost identical requests.  In this

^ Licensing, Intellectual Property, and Ruby code (longish)
12156 [colin webg2.] I am struggling with issues of licensing, intellectual property, and
+ 12167 [ben_tilly ho] Excellent question.  One problem with CPAN is that the
| + 12178 [colin webg2.] What if instead of a license of any sort, the site's Terms of Service
| | 12183 [jtobler Wire] Agreed.  I favor the least restrictive license.  Unfortunately, the GPL
| | + 12192 [schneik us.i] # news:LAW2-F244U4DYo60bRp00004d93@hotmail.com...
| | + 12199 [elderburn mi] While I agree in principle re least restrictive licnesing, I still question
| |   12201 [schneik us.i] # While I agree in principle re least restrictive licnesing, I still
| |   12228 [ben_tilly ho] Clarification.  I do not want to be misinterpreted as
| + 12195 [elderburn mi] There is a bumper sticker I see from time to time that reads "beatify America
| + 12236 [john_van_v y] I had a long interchange about licensing w/ Ben and the perl6 lic group.  I was
| | 12242 [ben_tilly ho] Cutting material is one thing, but please, please leave
| | + 12275 [news-9840628] It is unfortunate that your wording was misunderstood, and that
| | + 12295 [ rms gnu.org] This is particularly important when you are adding
| |   12301 [ben_tilly ho] As is usual, several questions.  The three main points
| |   12517 [ rms gnu.org] It is very important to specify a clear license policy for the library
| |   12571 [john_van_v y] I think a "spirit of" paragraph would be very helpful if it touched on the main
| |   12595 [ben_tilly op] In some ways having a clear policy is more important than the
| |   12605 [cas exis.com] I have to agree. I'm not trying to start another license debate, and I stand
| |   12662 [ben_tilly op] Sorry, this appears to be a misunderstanding on your part of
| |   12666 [cas exis.com] Sorry, my slant is colored by always having worked in the shrinkwrap world.
| + 12811 [charleshixsn] Well, GPL would do everything that I need, but it's far from the only choice.
+ 12193 [elderburn mi] Well, common sense would seem to indicate that if I post my code in a public
+ 12198 [matz zetabit] No, it shouldn't be mandatory.  But in case the question was
threads.html
top