290976-374908 subjects 291299-369968

[QUIZ] The Smallest Circle (#157)
291141 [matthew.moss] 1.  Please do not post any solutions or spoiler discussion for this
+ 291170 [denis@he ne ] I for one welcome our new quiz masters.
| 291181 [james@gr yp ] Me too.  ;)
+ 291173 [hraducan@gm ] ...
| + 291175 [lionel-subsc] the points are defined by floating point coordinates : I'd say that
| + 291179 [ jupp@gm .d ] This is necessarily so if the task is to make sense. Assume you have two
+ 291384 [justin.ethie] ...
| 291389 [frank.fische] Nice solution, this was also one of my first ideas. The problem with
| 291413 [billk@ct .c ] My variation using an axis-aligned bounding box to pick the
+ 291404 [lionel-subsc] here's my solution. I initially thought that the best circle would be
| 291409 [lionel-subsc] Update : it seems I was wrong and probably had a bug in this
+ 291548 [phil@s1 6. e] ...
  291558 [lionel-subsc] Wow, that was awfully fast for the random distribution, it takes more
  291662 [phil@s1 6. e] What you call a 'badly shaped point clouds' is in fact an approximate
  291667 [lionel-subsc] In fact initially I tested with a disk (which is an intermediate level
  291711 [phil@s1 6. e] sorry, I haven't come across a public paper of clarkson's algorithm,

closing files with abrupt interruptions
291144 [devi.webmast] loop do
+ 291145 [peter@se an ] f = File.open("fred.txt", "r")
+ 291219 [shortcutter@] Yes.  See also Peter's explanation.

ruby-debug-ide installation problems
291148 [tc@to cl yd ] I'm running Kubuntu Linux 7.10 (and still very much learning Linux).

Broken Ruby framework symlinks in Leopard SDK?
291149 [has.temp3@vi] Been trying to embed Ruby.framework in an application and after
291191 [laurent.sans] It's unfortunately a well-known issue, the SDK team is aware of it.
291295 [has.temp3@vi] On 15 Feb, 19:43, Laurent Sansonetti <laurent.sansone...@gmail.com>

[help] sorting & comparing complex array
291150 [yves_dufour@] As per Ruby CookBook, I learnt how to sort a simple array by

Ruby on mac - requires don't work
291151 [toastkid.wil] normally).  In irb i can require a gem fine, but when i write a little
+ 291157 [jari.william] require 'rubygems'
| 291158 [toastkid.wil] doh!  of course :)
+ 291159 [gwtmp01@ma .] require 'rubygems'

recursive merge for hash
291152 [goodieBoy@gm] Does anyone know of a good recursive merge method for Hashes? I'd like
291153 [farrel.lifso] new_h = first.merge(second).merge(third)
291155 [goodieBoy@gm] Thanks. But the only problem with that is, the overriding hash will
291293 [koflerjim@ma] How about Hash#deep_merge, http://snippets.dzone.com/posts/show/4706 ?
291661 [apeiros@gm .] The question came up on IRC recently and I remembered this post. But I
292023 [koflerjim@ma] Well, maybe it's a bit easier to modify or extend the verbose version.

EOF in TreeTop?
291154 [iamday@gm il] I ran into a problem writing my praser: there's a comment in the last
291209 [no@sp m. le ] rule eof
291235 [iamday@gm il] Nice! I'll try it out this evening. It never occured to me that EOF

[ANN] rosc 0.1.2
291156 [fugalh@zi ne] Announcing rosc (Ruby OpenSoundControl library) version 0.1.2. This is a

special type of string replacement
291162 [laredotornad] I want to insert the "&#x200B;" character in between each character of
+ 291163 [jg@co ne ti ] email = "me@mine.com"
| 291167 [sepp2k@go gl] I guess you want that to be email[0..-2] not email[0..-1] (otherwise you'll
+ 291165 [s.korteling@] p "astring".split("").join("&#x200B;")

Which data-type can I use for this task?
291164 [adnarim@po h] street
+ 291166 [iamday@gm il] info = {:street => '1234 Street st.', :house => 'purple', :person =>
+ 291169 [s.korteling@] I prefer a Struct is for this.
+ 291223 [shortcutter@] Yes, because you assigned to the global constant "Street" and did not
  291240 [s.korteling@] I didn't know this. I never noticed it, but all examples I used to learn
  291278 [sepp2k@go gl] An anonymous class is a full blown class, too. The only difference between a

291172 [transfire@gm] Hey all,

Re: sorting & comparing complex array
291174 [chris.hulan@] array_of_arrays.sort_by{|a,b|

poll about the community
291177 [pat.eyler@gm] I just put together a poll at dzone's RubyZone.  I'm interested
291200 [ryand-ruby@z] I'm glad you didn't have to rake all five. Two of those aren't worth

Finding smallest integer division?
291178 [jari.william] In Ruby, what would be the most efficient way to find the smallest
+ 291185 [micathom@gm ] Are you looking for the lcm?
+ 291186 [Rob@Ag le on] Ask Google about "least common multiple"
+ 291224 [shortcutter@] Somehow your wording puzzles me: you write that you look for the
  291232 [jari.william] Yepp, I got it reversed. Using inject and lcm worked great!

Thread safety
291180 [jeff.turcott] With the discussion surrounding merb/rails and thread safety, I've been
291195 [cwdinfo@gm i] Rule #1: Don't use global variables.
291225 [shortcutter@] most objects are used in a single thread at a time only.  Restrict need
291226 [cwdinfo@gm i] One way or another :)
291230 [jeff.turcott] I'm gonna getcha!
291429 [jeff.turcott] 8 Simple Rules for Designing Threaded Applications
291954 [mental@ry ia] I think this is a good article and I wouldn't mind recommending it to

Re: The Smallest Circle (#157)
291182 [matthew.moss] Yes, points on the circle are considered enclosed.
291286 [alex.shulgin] May I propose a bit refined random method?
291349 [matthew.moss] Sure, but your algorithm should work with any set of random points,
291362 [alex.shulgin] I'm trying to utilize gnuplot for visualization.  With any luck I can
+ 291395 [micathom@gm ] Well, I didn't have the time to check out how to do this the right way
| 291397 [micathom@gm ] And again I reply to my own post. The test code requires a distance()
| 291419 [micathom@gm ] This is getting a bad habit. Sorry. This slightly modified version
| + 291427 [alex.shulgin] This is really way more difficult than it seemed to me...
| + 292012 [micathom@gm ] Since Matthew has a cold, I decided to take another look at my
+ 291401 [lionel-subsc] Glad to see that I'm not the sole old-school minded :-)
  291407 [billk@ct .c ] Hehe... if Wikipedia is to be believed, gnuplot is 22 years old, and
  291410 [lionel-subsc] True, but using OpenGL for rendering data sets was only recently made

[OT] Programmatic VCR Control
291187 [boss@ai bl d] I was flicking through the Ruby Quizzes when I saw the VCR Program

[ANN] RubyCocoa 0.13.2
291188 [laurent.sans] I am honored to announce the immediate release of RubyCocoa 0.13.2.

qtruby install on redhat
291189 [scootercook@] checking if UIC has KDE plugins available... no
291203 [AEtzold@gm .] Dear Scott,
291236 [scootercook@] Thanks for the reply Axel!
291237 [scootercook@] BTW - I did try to look for a korundum rpm but couldn't find one (good

Proper way to RDoc markup?
291192 [skoren@co ca] I can't figure this out.  Is there a way to inline markup an accessor
+ 291194 [jari.william] # this is an X comment
+ 316190 [tony.strauss] That sounds very reasonable.  If you would, please add an enhancement

Tools for working with x86 assembly in Ruby?
291198 [lonnie.princ] I'm starting a project that will involve injecting instructions into
+ 291201 [matt@te hn r] You may want to take a look at Metasploit, I think it does some of that.
+ 291262 [znmeb@ce ma ] Have a look at RubyInline. It lets you put C code in line in Ruby code.

Re: Proper way to RDoc markup? not quite
291202 [skoren@co ca] Not quite what i wanted. I wanted to capture inline comments.  i know
291207 [jeremymcanal] I don't think that's possible.  Unless you want to hack on the RDoc
291208 [skoren@co ca] hm oh well.
291228 [jeremymcanal] I guess...?  You just need to pay attention to what you're doing. :P
291233 [gwtmp01@ma .] Yuck, that is 8 lines vs. 3 (below). I always found it
+ 291263 [jeremymcanal] I'd rather have really readable code and good generated documentation
| + 291265 [cwdinfo@gm i] Readability is in the eye of the beholder. To me, good inline
| + 291499 [Rob@Ag le on] Well, if you take a look at vendor/rails/railties/lib/code_statistics.rb
+ 291271 [jari.william] Perhaps a reason for RDoc not supporting inline documentation for

Will a "system call" wait until the command finishes?
291204 [sayoyo@ya oo] I wish to know, if I use system() to execute a time consuming task, will
291205 [brandon.g.jo] it appears that Ruby will wait.  try this

Re: Programmatic VCR Control
291206 [yermej@gm il] If the VCR can be programmed solely via remote, you could use a
291279 [boss@ai bl d] Thanks for the suggestions and the link to that site.
291368 [ juso@ik .f ] This is quite a bit OT, but maybe building a DVR or using something like

syntax problem: @var=="v" ? { ... } : { ... }
291210 [lcalje@gm il] I tried to print an "M" or "V" depending on the value of a variable,
+ 291211 [stefano.croc] p(@var == "v" ? "V" : "M")
+ 291212 [sepp2k@go gl] Leave out the curlies.
  291213 [stefano.croc] And put brackets around the arguments of p, otherwise you'll get a syntax
  291216 [lcalje@gm il] thnx, that works, but what if I want to do 2 or more actions/statements
  291217 [stefano.croc] if @var == "v"

[ANN] Webby 0.7.4 (Cuddly Death Monkey)
291215 [tim.pease@gm] == Webby

sqlite3-ruby 64bit bug
291221 [jeremy@hi eg] ...

eventmachine and rev
291234 [rogerpack200] What would you say is the difference between rev and eventmachine?
291242 [tony@cl ck a] ...
+ 291245 [james@gr yp ] Is that true?  I thought they were added to the 1.8 branch too.
| 291246 [tony@cl ck a] ...
| 291253 [james@gr yp ] Yes, I'm pretty sure EventMachine added a pure Ruby branch after they
+ 291247 [rogerpack200] Can it buffer incoming I/O?
| 291248 [tony@cl ck a] ...
| 291250 [rogerpack200] It might well be noted that evented mongrel is something like a 1K patch
+ 304904 [rogerpack200] Looks like EM supports 1.9.  Might want to try them both out speed-wise
  304920 [tony@me io .] ...

Favorite Ruby idioms, shortcuts?
291239 [skoren@co ca] As relatively new to Ruby, I'd be interested in seeing what people
291243 [phrogz@ma .c] =A0

RDoc new/initialize discrepency
291244 [skoren@co ca] Thanks that makes sense.
291260 [jeremymcanal] Right.  Your API documentation should typically document public API

cannot install eventmachine.
291249 [junkone1@gm ] i cannot install event machine. i get error. i tried all the options.
+ 291251 [billk@ct .c ] What happens when you try #3 ?
+ 291252 [luislavena@g] You need a compiler to build native extensions. more precisely, you

[ANN] icanhasaudio 0.1.0 Released
291254 [aaron@te de ] icanhasaudio version 0.1.0 has been released!
291258 [iamday@gm il] Hah! Okay. Points for having a hilarious announcement.

[ANN] betabrite 1.0.1 Released
291255 [aaron@te de ] betabrite version 1.0.1 has been released!

collection sum
291256 [graysonpierc] I really like the ability to do sums right in the object model, for
291272 [cmdicely@gm ] This sounds like a Rails question, and you may want to ask it on a

[ANN] Decimal 0.0 released
291257 [shiba@ma l2 ] I released Decimal 0.0 somehow, an arithmetic extension library for Ruby.

My Boggle Solver: I welcome any tips and tricks!
291266 [philip.broco] Griddle on Facebook, and it works great! However, I'm pretty new at
+ 291268 [w_a_x_man@ya] IO.foreach("enable.txt"){|word|
| 291270 [w_a_x_man@ya] IO.foreach("data"){|word|
+ 291274 [micathom@gm ] IMHO you might also want to try to avoid using global variables. A

Alter String base class to perform new (private methods) before  returning itself when called by print statements
291269 [steven.harms] class String
+ 291282 [shortcutter@] Actually your summon methods do not alter self.
+ 291289 [caduceass@gm] Keep in mind that these methods output what you want in irb, but
  291291 [caduceass@gm] No, no , no!!  Not using all the previous code!  My bad.  More "after"
  291306 [steven.harms] Robert, Todd, et. al.,
  291371 [shortcutter@] No problem at all.  Sometimes it's hard to see where one should draw the
  291374 [steven.harms] Robert,
  291390 [shortcutter@] You're welcome!

Code organization and modules
291275 [brad@da ko e] I'm working on an application for generating code skeletons from xml
291283 [shortcutter@] You want to use modules as namespaces but actually you define instance
291317 [brad@da ko e] Thanks for the fix and the advice.  Using the self.getDeclaration fixed

GC error ?
291280 [piotr.sawick] Run this program and observe memory usage.
+ 291288 [shortcutter@] Your point being?
| 291311 [piotr.sawick] I run this on  ruby-1.8.6 (Linux and cygwin [WinXP]).
| + 291325 [gwtmp01@ma .] I ran that code via irb and compared the memory usage to running
| + 291462 [shortcutter@] Well, concluding from the postings not all versions of Ruby on all
|   + 291476 [piotr.sawick] I have simple, but ugly solution for this problem.
|   | + 291477 [shortcutter@] That's not a solution.  That's a bad workaround which might degrade
|   | + 291547 [justincollin] Obviously this is a just an example to illustrate the issue, but
|   + 291553 [cmdicely@gm ] To perhaps underscore Robert's point, I did this in IRB on the OCI
+ 291328 [vjoel@pa h. ] ...
| 291341 [radek.bulat@] R3V5cywgaXQncyB3b3J0aCB0byBzZW5kIGl0IHRvIHJ1YnktY29yZSBhbmQgYXNrIHRoZXJlLiBJ
+ 291584 [evanwebb@gm ] Not a bug in any way. It's simply that the garbage collector has not
  + 291586 [piotr.sawick] Yes, I agree. I analyzed source code of gc.c. GC was triggered each time
  + 291604 [radek.bulat@] T24gRmViIDE5LCAyMDA4IDg6NTkgQU0sIGV2YW53ZWJiQGdtYWlsLmNvbSA8ZXZhbndlYmJAZ21h
    291618 [piotr.sawick] Beacuse in this program
    291623 [radek.bulat@] PiBCZWFjdXNlIGluIHRoaXMgcHJvZ3JhbQo+Cj4gPGNvZGU+Cj4gYSA9ICIiCj4gMTAwMDAudGlt
    + 291624 [decoux@mo lo] Write it like this
    + 291627 [piotr.sawick] malloc_limit = 8_000_000
      291928 [eliotm@pa be] In my day they were called libraries.  Now its called "wikipedia".
      292021 [rick.denatal] I hadn't seen this article before, a quick skim and I'd say it looks
      + 292034 [pbrannan@at ] I've known people who have such a policy (in the real world).  And then
      + 292045 [eliotm@pa be] I wish :)  I've never done anything innovative in the GC field.
        292066 [rick.denatal] Yes, and it also suffers from two facts that make it perform
        292072 [matz@ru y- a] Indeed, we need two visits (one write to mark live objects/one read to
        292075 [djberg96@gm ] When I applied Izumi's patch to the 1.8.x branch it took a ~20%
        292077 [matz@ru y- a] I made a patch[1] against 1.9 which is slightly more efficient than

TRAC - Trac, Project Leads, Python, and Mr. Noah Kantrowitz  (sanitizer)
291281 [ilias@la ar ] * Trac is deficient, cause of "proud to be an egoism driven amateur"
+ 291292 [shortcutter@] <snip/>
| + 291294 [ben@bl yt in] Just like you didn't?
| + 291307 [jeff@sc wa c] Thank you.  I didn't recognize his name at first.
| | 291330 [tadmc@se si ] ["Followup-To:" header set to comp.lang.perl.misc.]
| + 291343 [ilias@la ar ] It's really funny how easily people fall into the
| + 291421 [tpo2@so rc p] Very witty article, made me laugh, thanks!
| + 291467 [ryand-ruby@z] "Ilias is a character on ruby-talk / comp.lang.ruby that is dominating
+ 291470 [ilias@la ar ] [RESEND answer to all initial groups]
  + 291471 [ilias@la ar ] [RESEND of answer to all initial groups]
  + 291475 [cokofreedom@] Dear Ilias,
    291551 [deets@no pa ] He has to, in hopes to gain the traction he desires - as otherwise he's
    291560 [george.sakki] Was the pun intended ? ;-)

Re: Decimal 0.0 released
291284 [alex.shulgin] Very impressive! :-)
291315 [ssmoot@gm il] to
291320 [shiba@ma l2 ] Thank you for your comment.  My motivation of developing low-layer library

291285 [liushi.ever@] ...
291643 [patrick.mcdo] ...

Inferior Ruby for Emacs
291287 [arcadiorubio] I've recently switched to Emacs for programming in Ruby.

Thin errors out -> `gem_original_require': no such file to load --  daemons
291290 [junkone1@gm ] i installed thin  thin 0.6.4 (x86-mswin32-60) and eventmachine 0.8.1

Iterate through array twice
291296 [nocturneer@g] I have array of horizontal segments and I need to find which of them
+ 291300 [shortcutter@] Unfortunately the problem you are trying to solve is O(n*n) and there is
+ 291314 [cmdicely@gm ] def find_square_sides(horiz_segments)
  291319 [nocturneer@g] Yes, Ruby is the most beautiful language!

Readline history bug on Windows
291297 [h3rald@gm il] I just wanted to know if anyone had any idea on how to solve a rather

Re: Thin errors out -> `gem_original_require': no such file
291298 [kevwil@gm il] We'll get it fixed. As a work-around, you can install the 'daemons' gem.