18092-18667

17890-18784 subjects 18289-19573

^ 99 bottles of beer
18092 [mdavis sevai] a = ' bottle%s of beer'
18094 [waisun.chia ] OMG! ;-)
18095 [aleksei.guze] # OMG! ;-)
18101 [grady xcf.be] (I believe in Perl circles this is called Golf.  This is the first
+ 18111 [dblack candl] I wonder what gem cutters call it when they achieve their goal using
+ 18113 [tammo.freese] down, pass
+ 18114 [Dave Pragmat] Fore!
+ 18134 [pete vilya.p] {'s'if n!=1}
| 18193 [thucdat hotm] <html><div style='background-color:'><DIV>
| + 18204 [glen enabled] 99.downto(0){|x|w=" on the wall";u="#{x!=0?eval(x.to_s):'no more'}
| | + 18205 [matt lickey.] By one...change x!=0 to x>0
| | | + 18206 [glen enabled] Unfortunately, that would give grammatically incorrect English on the
| | | + 18207 [siigron sii.] #{u+w} instead of #{u}#{w} should work, no?
| | + 18208 [avi beta4.co] I don't think this one quite works - you don't decrement the bottle count
| | | + 18210 [dblack candl] (Hmmm... not sure why it's wrapping weirdly.  Anyway...)
| | | | 18212 [avi beta4.co] ":s " is 3 bytes, as is "'s'", but that's a good one to remember.  And it
| | | | 18217 [dblack candl] Well, at least I was right about the space after puts :-)  It's all
| | | + 18211 [avi beta4.co] def b
| | | + 18213 [kero d4050.u] [165, by my count?]
| | | + 18227 [dblack candl] OK, let's see if I can squeeze some bytes without breaking it this
| | |   18228 [dblack candl] P.S. I know there have been shorter, but I'm being a purist about
| | + 18209 [dblack candl] One could debate the acceptability of the "\n"'s.  But it's not
| | | 18214 [glen enabled] Doh! That's what I get for preferring bourbon to beer... I forgot how
| | | 18215 [will.sobel B] def b
| | | + 18216 [will.sobel B] Here's another variant without the warnings weighing in at 160 bytes.
| | | + 18218 [avi beta4.co] def b
| | |   18219 [avi beta4.co] def b
| | |   18224 [dblack candl] If the space after       ^   can go, then so can ^.  But should either?
| | |   18225 [avi beta4.co] def b
| | |   18226 [avi beta4.co] def b
| | |   18229 [avi beta4.co] Ok.  151 bytes.  No warnings.
| | |   18230 [avi beta4.co] Make that 149 by removing the parens around n=99.
| | |   18231 [dblack candl] What happened to ' more' ?
| | |   18232 [avi beta4.co] According to Kero, it wasn't in the original post.  But it shouldn't be
| | |   + 18233 [avi beta4.co] 145.  Are we sick of this yet?
| | |   | 18234 [dblack candl] Bytes are dropping like flies -- what's not to like? :-)
| | |   + 18237 [jjenning ste] hehe, Kero's right. I stuck it in within the first few posts on the thread :)
| | + 18258 [erik bagfors] Yes, You don't need the eval and you say both "bottle" and "bottles".
| + 18267 [mikkelj-anti] Why does the following not produce any beer?
|   18268 [dblack candl] See yesterday's posts about this version and its derivatives.  It
|   18271 [mikkelj-anti] Actually it doesn't save anything compared to downto, but more
|   18278 [Binky Havann] Hehe
+ 18488 [pete vilya.p] {'s'if n!=1}
  18667 [westner logi] Has anybody submitted one already?

^ Exceptions
18098 [aleksei.guze] What about "retry"ing from the line where exception occurred and/or just
18099 [matz ruby-la] It's not what "retry" is for.  There's vague possiblity for
18102 [aleksei.guze] #
+ 18103 [matz ruby-la] No.  It requires deep core rewrite.  Not an easy task at all.
| 18104 [aleksei.guze] #
| 18123 [matt lickey.] The argument I've heard against resumable exceptions is that they
+ 18121 [pulsar qks.c] If I understand it correctly, Ruby provides real/complete block closures?

^ Looking for Ruby programming exercises
18100 [wvucenic net] I've been learning Ruby, mostly with the Pickaxe book, and it's going
+ 18109 [feoh fourfuz] I must admit I feel/felt the same way.
| + 18115 [ruby jamesbr] What features of Ruby, though, do you think are the ones most likely to be
| | 18122 [feoh fourfuz] Iterators and blocks I'd have to say was the Ruby concept I had the hardest
| | 18156 [wvucenic net] Thanks for the reply!
| | 18158 [Dave Pragmat] Design a discrete event simulation system in Ruby. Make full use of
| | + 18164 [ruby jamesbr] Do you mean like a cellular automata, except
| | | 18168 [Dave Pragmat] Have a look at
| | | 18181 [hipster xs4a] John Wiley & Sons Ltd. 1988. It crosses the bridge between analytic
| | | 18183 [mikkelj-anti] game, but it allowed multiple users to connect simultanously via telnet. It
| | + 18166 [ugly-daemon ] Ok could you be a bit more specific? Like what do you mean by discrete event and
| + 18163 [ jimm io.com] Here are three already implemented in the base Ruby distribution or easily
+ 18141 [sean-ruby-ta] Why not track a real project?  When I was first learning C I
  18155 [wvucenic net] Thanks for the reply/invitation!

^ Ruby embedding questions.
18108 [olivier vibe] As far I looked into Ruby's source code, it doesn't seem possible to

^ exercise in minimalism: diamonds
18112 [dblack candl] For those who enjoy and/or learn from this kind of thing (I do both),

^ Delphi like properties ?
18116 [llothar mail] I want to implement a C extension for a GUI toolkit that supports
+ 18117 [decoux moulo] I don't know delphi, but
+ 18118 [aleksei.guze] You really missed methods "prop" and "prop="
+ 18139 [ljohnson res] Since you don't have to write the parentheses with a Ruby method invocation,

^ rbwrap
18119 [s.unsworth v] This is a multi-part message in MIME format.

^ Re: An exercise in minimalism
18120 [ugly-daemon ] Here's a first attempt. It weighs in at 66 bytes.
+ 18125 [maverick cs.] It should be exactly 98 characters.
+ 18126 [dblack candl] You can take out that space, in which case I declare a tie :-)
+ 18127 [tammo.freese] 60 byte :-)
+ 18151 [pete vilya.p] I almost squeezed out as much from this direction.

^ Debugging minimalism for newbies (Re:  Re: An exercise in minimalism)
18128 [feoh fourfuz] I think it can be a really useful exercise in learning a language to study
18172 [decoux moulo] You can always ask ruby to know what it do
18175 [matt lickey.] Where do you get iis?
18177 [decoux moulo] Guy Decoux

^ Who can count change??
18129 [ugly-daemon ] I would like to propose another game of golf only a little bit different. I am
18138 [joe vpop.net] I think it will take longer than a few seconds unless you have a
18143 [ugly-daemon ] Whoops I didn't think that far ahead :) Dumb me. Perhaps a more reasonable goal
18145 [ugly-daemon ] I would be very interested in hearing about this. Would you be so kind as to
18152 [ jimm io.com] Does your version include $2 bills or not? (I've added a command line
18165 [ugly-daemon ] Any and all denominations in your favorite currency.

^ NodeXmlDump
18130 [maki open-ne] I hacked Dave's nodeDump to output in XML.

^ Why does this fail?
18131 [thucdat hotm] <html><div style='background-color:'><DIV>
18148 [feoh fourfuz] No closing bracket on the block.

^ Why does this fail?
18132 [thucdat hotm] <html><div style='background-color:'><DIV>

^ Why does this fail?
18133 [thucdat hotm] <html><div style='background-color:'><DIV>

^ instance variables by name?
18136 [aaron.barnet] i'd like to have a method that operates on an instance variable given its
18140 [jjenning ste] here ya go
+ 18142 [aaron.barnet] thanks for the reply, i tried it and i get...
| 18144 [aaron.barnet] ah!  'says=' becomes defined when i set it as attr_writer, not exactly what
+ 18149 [neumann s-di] eval("@#{name}=value") if name =~ /^\w+$/

^ dRuby - calling methods of DRbObject defined in Object
18137 [neumann s-di] a = DRbObject.new(nil, there)
18146 [m_seki mva.b] Hmm,
18153 [neumann s-di] I thought method_missing is a private method. But it isn't.

^ Re: instance variables
18147 [jjenning ste] # -----

^ Opaque constants? (in C?)
18150 [onge mcs.anl] Is it possible to define opaque constants in ruby similar to true and
18160 [kom mail1.ac] You can make an object 'opaque' by defining "inspect" as a
18185 [emilong midw] Great, thanks!  BTW, I'm planning on using capitalized constants, but I

^ Ruby Golf
18154 [spwhite char] I've been enjoying the games of Golf in here, but there's something I'd
+ 18157 [dblack candl] This is why in my first "bottles" version I explicitly stated that I
| 18169 [mdemello ruf] As in perl, I think the nice point about keystroke golf is that it provides
+ 18180 [luigi.ballab] 100m dash / synchronized swimming / weight lifting ?  :)

^ Ruby integration with Vim editor?
18159 [ned bike-nom] I know that Vim 6.0 can be built with a Ruby interpreter installed. Its

^ Enabling "super"
18161 [aleksei.guze] I really need some docs...
18162 [aleksei.guze] How can one rb_enable_super for "super" singleton method of module?

^ Enabling "super"
18167 [aleksei.guze] (1)
18170 [decoux moulo] def A.v
18171 [aleksei.guze] #     tt_mM = rb_define_module("M");
18173 [decoux moulo] They do the same thing, in this case. In a C extension you don't really
18174 [aleksei.guze] #
18176 [decoux moulo] Are you sure ?
18178 [aleksei.guze] # -----Original Message-----
18179 [decoux moulo] You have not understood.

^ 
18182 [murtz yifan.] This is a multi-part message in MIME format.

^ Ruby for Macintosh (OS < X)
18184 [peccatte clu] I have seen that it exists a version 1.1c9 of Ruby ported on Macintosh
18197 [ljohnson res] one
18198 [peccatte wan] tlh43lfjftpk26@corp.supernews.com...

^ Invoking a method from C side
18186 [llothar mail] The "method_call" function is declared private. So how can i
18187 [decoux moulo] rb_funcall(methodobj, rb_intern("call"), 1, rb_str_new2("foo"));

^ Newbie. Sinking fast. Please help.
18188 [matt greenvi] I bought Programming Ruby a number of months back and finally have an opportunity to try out Ruby. However, I can't get it to build. Actually, that's not quite accurate. It builds fine. It won't pass 'make test'.
+ 18189 [decoux moulo] This is the line 985 of sample/test.rb
| 18190 [matt greenvi] $ cat > script_tmp
| 18194 [matt greenvi] OK. Here I go replying to my own mail. I've gotten this to work from the command line now.
| 18200 [S.Udrea gsi.] built ruby with --prefix=$HOME, maybe this gives rise to problems?!
| 18202 [Dave Pragmat] If that's the case, we need to know about it, because they _should_
| 18240 [matt greenvi] So, what's the recommended course of action for me to take? I've been tinkering and trying to get it to build for about 20 hours now... (That's excluding sleeping time.) I'm no closer than when I started. I'd really like to use ruby for this project, but it's already taken me 10 times longer to try to just build it than it would have to have written this in perl. I was allocating extra time since I don't know ruby yet, but this is ridiculous! ;)
| 18252 [Dave Pragmat] OK - the situation is that you have a test that's failing. We don't
| 18264 [matt greenvi] $ make test
| 18266 [matt greenvi] OK, tried to compile it on fbsd 4.3 from source (not ports) and it worked fine. So, it's not inherently FreeBSD that has issues. It may even be just this one 3.3 machine.
+ 18195 [neumann s-di] Ruby is included in FreeBSD's ports collection. Thus, you don't have to build it yourself.
  18196 [matt greenvi] I'm aware that it's in the ports collection. However, FreeBSD isn't the platform on which I'm most proficient. It just happens to be what the machine I'm on is running. I'm not root, so AFAIK I can't install anything from the ports tree. That's why I'm building by hand. I'm not sure that I'd trust the patches to 1.4.0 (what's in th ports tree on here) applied against 1.6.4. But I'll take a look anyway. Not being familiar with Ruby, I doubt anything in there will jump out at me and say "Look! Apply me and life will be good!"... ;)

^ Array threadsafe ?
18191 [uwe.matthaeu] A short question. Is 'Array' or 'Hash' threadsafe ?
18192 [hfulton pop-] Short answer: No.

^ Pattern Matching takes all Resources
18199 [flcl gmx.net] I'm having some big problems with Pattern Matching of Regex.
+ 18201 [Dave Pragmat] You have got one of those Regexps that operate in exponential time
+ 18246 [decoux moulo] Like have said Dave Thomas, your regexp is wrong but

^ Shooting yourself in the foot with Ruby
18203 [jeremy chaos] Ruby must have the requisite folk heritage before it will be taken

^ how does hash locate pairs?
18220 [stephen.hill] in methods such as [], []=, fetch, etc. how does Hash locate a key,
+ 18221 [ranx2 yahoo.] You need to have a method (say to_s) in your Class that returns
+ 18223 [avi beta4.co] Anytime you redefine ==, you need to redefine hash such that if a == b,
  18235 [matz ruby-la] Hash uses "eql?", so that you need to redefine hash such that if

^ Ruby/GTK: example needed of Widget written in Ruby
18222 [mrp cre.cano] i want to write a gtk widget in ruby.  i've tried lots of things like

^ how to become a Ruby FTP mirror?
18236 [anany ece.vi] Hey!

^ Trouble with C extensions
18238 [rtarpine hot] I'm new to both Linux (I unfortunately abandoned BeOS) and Ruby, so I
+ 18239 [sean-ruby-ta] Have you read the Extending Ruby chapter Programming Ruby? =20
+ 18241 [waisun.chia ] void Init_testlib()
+ 18254 [rtarpine hot] Thanks, that completely fixed it!  Does case matter?  I initially used
  18255 [decoux moulo] Yes,

^ Determining whether a file exists
18242 [harryo zipwo] Is there a clean way to determine whether a file exists, without having
+ 18243 [dblack candl] FileTest.exists?("filename")
+ 18245 [neumann s-di] test(?e, name)
  18247 [harryo zipwo] Aha!   I didn't look closely enough.  I see it now, listed under
  18248 [dblack candl] See also Michael N.'s response.  I'm not sure what criteria one would
  18251 [harryo zipwo] I read yours before I saw Michael's and I've already changed the code, so

^ RCR: Transient instance variables
18244 [neumann s-di] Currently it is very time consuming to leave some instance varibles
18253 [decoux moulo] class Transient
18263 [uu9r rz.uni-] This works fine, but has one major drawback, that you have to
18286 [decoux moulo] Well, it exist a possibility but this make something complex.
18339 [uu9r rz.uni-] Yes, please sent it to me. I am exited ;-)

^ Re: [Foxgui-users][OT] Sample Application Ideas?
18249 [alwagner tca] This reply is only marginally related to your post, but I couldn't help but

^ missing message: xmp patch contribution
18250 [gotoken notw] Greetings,

^ Init & "shutdown"
18256 [rtarpine hot] I'm trying to write a ruby extension that needs to run a init() function
18261 [gotoken notw] In ``[ruby-talk:18256] Init & "shutdown"'',

^ Ruby 1.6.4 Windows Installer V2 Now Available
18257 [andy toolshe] For those who have been anxiously awaiting a new version
18563 [lucid users.] Oh frabjous day! Halooh, hallay!  Thankyouthankyouthankyou.
18565 [yves.pouplar] It seems that I have missed a few messages :)
18567 [Stephan.Kaem] Happy rubying!

^ FastCGI for Ruby (an announcement, not a question)
18265 [eli.green co] Well, thanks muchly to the help and encouragement of Michael Neumann, the Ruby
18308 [web2ed yahoo] Outstanding job!  I will test this right away.
18355 [eli.green co] Hrm. Sorry, folks. I have this really bad habit of not posting URL's when I'm

^ 99 bottles of sake
18269 [thucdat hotm] <html><div style='background-color:'><DIV>
18270 [glen enabled] (jeez, I really *hate* HTML email!)
18288 [matz ruby-la] Ah, sorry.  I don't drink alcohol at all.  Try something else.
18292 [   xm w3d.ru] Good ... alcohol is no good ;) Maybe some fruit juice ... cherry+blackberry+apple mix?

^ Effecient indexing algorithm
18272 [joe aiobject] Does anyone have an efficient indexing algorithm or care to point me in the
18273 [kero d4050.u] Tried Rubies hashtable?
18274 [joe aiobject] Thanks, of course not! (hahaha)  This is about as open ended as you can get.
+ 18275 [mdavis sevai] I am planning to release my version of a btree written in Ruby sometime
| 18276 [mikkelj-anti] the
| 18277 [joe aiobject] Excellent suggestion, thanks.  There is a ubiquity to this solution that I
| 18296 [ned whidbey.] How does this compare to libdb-ruby, which is a Ruby interface for the
| 18299 [joe aiobject] It was a joke because I asked a silly question.  Or was it?  (hahaha)  It
| 18300 [mdavis sevai] My btree is written almost completely in Ruby.  I created several small C
| 18301 [joe aiobject] my bad, it wasn't a joke.  sorry thought poking fun at the confused. ;-)
+ 18307 [john.carter ] Hmm. It depends on whether this is a indexing and rapid update /

^ FIFO TCP socket pooling server
18279 [joe aiobject] Another little code snippet I wanted to grok was a pooling TCP socket

^ Re-loading a modified class definition
18280 [harryo zipwo] I was chatting with a friend of mine last night and we were discussing
18281 [harryo zipwo] Never mind.  I took a guess that there might be a special variable that
+ 18282 [uu9r rz.uni-] Try load instead of require!
+ 18287 [harryo zipwo] Thanks Michael.  That's precisely what I was looking for.  Saves me doing

^ New Ruby FTP Mirror
18283 [anany ece.vi] I have just finished setting up a new Ruby FTP Mirror here on

^ environment variables
18284 [jens irs-net] how can I access environment variables?
+ 18285 [barry_shultz] ENV[key]
+ 18305 [sean-ruby-ta] Check out the ENV global variable.  It's not really a hash, but=20
threads.html
top