176255-177968 subjects 176625-180183

^ Minimizing memory allocations
176457 [ilmari.heikk] So there I was this morning, staring at an ObjectSpace counter tellingme that I'm allocating 1500 Arrays and 10000 Floats per frame. Whichpretty much ground my framerate to ground by requiring a 0.2s GC runevery other frame. So I decided to get down and rid my code of as manyallocations as possible.
+ 176462 [ruby-forum-r] Nice! I wonder if this would be eligible for core patching?
+ 176463 [ilmari.heikk] Argh, sorry, magnitude error. The correct GC run time is 0.02s. Not sobad, but still a 60fps -> 20fps glitch.
| 176468 [gavin refine] In a completely separate world (Lua code running under a scene graph
| 176668 [interfecus g] I don't know anything about Lua, but Ruby is unlikely to see and speed
| 177127 [pbrannan atd] The marking time is proportional to the number of referenced objects,
+ 176512 [john.carter ] Good Stuff.

^ SwitchTower with public key authentication
176466 [pgquiles elp] I am developing what we may call a "distributed video player" in Ruby (this is
176669 [interfecus g] I don't know that switchtower is your best option here. Why not simply

^ file locking
176471 [r.mark.volkm] I'm trying to understand usage of file.flock(File::LOCK_SH) which
+ 176483 [ruby-forum-r] A shared lock is usually implemented as a read-lock; in
+ 176670 [jeremy chaos] A shared lock locks out anyone who wants an exclusive lock.  Typically

^ Debugging endless loops
176474 [alex verk.in] Say, we have a Ruby app going into an endless loop (or perhaps a thread
+ 176486 [ruby-forum-r] Can you do ruby -rdebug program.rb instead of running it normally?
| 176497 [alex verk.in] By the conditions of our imaginary problem, we only reproduce our
| 176499 [florgro gmai] Moin Alexey.
| 176501 [alex verk.in] As well as a thread dump default signal handler on "kill -3". In some
+ 176490 [florgro gmai] This might work and give you a remote debugging back door. I'm just not
+ 176514 [john.carter ] Thread.abort_on_exception = true
| 176517 [alex verk.in] Neither endless loop, nor deadlock are exception conditions.
| 176577 [john.carter ] Yup, but if a thread dies and you don't have a handler of last resort nor
+ 176678 [bob.news gmx] You can write a singnal handler that outputs current thread states.
+ 176719 [snail objmed] <alex@verk.info> writes

^ Fwd: [QUIZ] Grid Folding (#63)
176477 [james graypr] charset=US-ASCII;

^ remove non-ASCII characters in a string
176479 [levin grunde] I'd love to hear your comments. (or pointers to existing libraries forthis task)
176495 [ezmobius gma] I have a need for something like this as well. But I need to
+ 176496 [rubytalk gma] What is considered an ascii char? i used the
| + 176500 [levin grunde] I use everything <127 because I want to preserve tabs and linebreaks
| + 176671 [dave burt.id] Your range excludes ASCII character 32, space.
|   176675 [pere.noel la] i'd like not to remove no-ascii chars but replace all accentuated chars
|   + 176679 [dave burt.id] Try the code below, translated from
|   | + 176680 [pere.noel la] thanks a lot this works great even with ligatures, i don't need speed
|   | | 176683 [dmitry.sever] , you say? What about these (incomplete list, and w/oligatures) :))))
|   | + 176685 [martindemell] # one time preprocessing
|   |   176689 [dave burt.id] Except that won't work, because tr only matches bytes, not multi-byte
|   |   176697 [martindemell] Oh - didn't know that! Pretty sad. Thanks for the correction.
|   + 176771 [chneukirchen] require 'iconv'
+ 176739 [levin grunde] # basic usage  "schテカn".asciify #=> "sch?n"  # with mapping  map = Asciify::Mapping.new(:default)  "窶枅oo"".asciify(map)   #=> '"foo"'  Asciify.new(map).convert("schテカn")  #=> "schoen"  Asciify.new(Asciify::HTMLEntities.new).convert("schテカn") #=> "sch&#246;n"

^ Newbie: Recursive deletion of files and dir
176491 [fredrik.cron] I'm designing (newbie level) a script to clean up empty directories and
176492 [ruby-forum-r] I did not read this code yet but take a look at ri FileUtils,

^ sending email body text based on form content
176505 [jpfeifer sha] As a noob to Rails and web development in general, I think I still need
176508 [logancapaldo] ...

^ [QUIZ][SOLUTION] Grid Folding (#63)
176510 [horndude77 g] I didn't use multidimensional arrays for my solution. I keep track of
176515 [bob_showalte] My solution is at

^ Net::HTTP post
176511 [r.mark.volkm] Can someone point me to an example of sending a POST request using Net::HTTP?
+ 176518 [james_b neur] What is your version of Ruby?
| 176530 [r.mark.volkm] It's 1.8.2 and I'm running under XP.
| + 176531 [matthias kl-] I think, your code should work..
| | 176535 [r.mark.volkm] I figured out why it wasn't working. There were two problems.
| + 176690 [steve uptime] Yep - see my other post.
|   176691 [steve uptime] Oops, poor form to reply to self, etc....
+ 176687 [steve uptime] 1) Looking at the URL you specified, I'm not sure you can POST to it; as

^ #define _ and #define __
176516 [brian.takita] I can't find #define __ and #define _.
177129 [pbrannan atd] These are provided so ruby can compile on old (pre-ANSI) compilers that lack

^ [QUIZ][SOLUTION] Grid Folding (#63)
176519 [email55555 g] def fold(row, col, operations)
+ 176522 [ef alum.mit.] This is the kind of problem where it makes sense to trade off
| 176611 [bdolinar xmi] Cleaned up the code in my previous solution.  Made check_fold not
+ 176532 [email55555 g] found a little bug on my script.

^ Two Lines of C in Ruby Source
176520 [brian.takita] Can somebody tell me what these lines of code mean?
+ 176521 [nobu ruby-la] See defines.h for _ and __.  Look for a tutorial of C for ...
+ 176610 [brian.takita] Thank you for the pointer. I found the defines.
  + 176615 [ml gioelebar] Are there still compilers that don't support function prototypes?
  + 176762 [chneukirchen] Christian Neukirchen  <chneukirchen@gmail.com>  http://chneukirchen.org
    176903 [brian.takita] Thank you for your help Christian.
    176996 [chneukirchen] Christian Neukirchen  <chneukirchen@gmail.com>  http://chneukirchen.org
    177238 [brian.takita] Thank you Christian. This is really neat.

^ [ANN] TeensyWeb 0.2.0
176524 [jlsysinc all] TeensyWeb 0.2.0

^ Line breaking in Ruby can be dangerous
176525 [sky.yin gmai] After programing in ruby for the past 3 months, I must say I'm
+ 176526 [flori nixe.p] "1 * 2" and "+ 1" are both valid ruby expressions, the latter "(unary +)
| + 176527 [a.r.ferreira] Ruby would find it out because of the leading "(" or that would be
| | 176529 [sky.yin gmai] Thanks. When I first found it out, it's really a *big* surprise. This
| | 176550 [chneukirchen] I recommend an intelligent-indenting editor.
| + 176593 [mental rydia] The parenthesis.  It shouldn't parse if they were treated as
| | 176594 [mental rydia] Okay, never mind.  Now I know the real answer.
| + 176686 [uval rz.uni-] because of (
|   176764 [a.r.ferreira] A SyntaxError here may seem unnatural for Ruby syntax rules.
+ 176528 [chneukirchen] 1 * 2 +
  176591 [mental rydia] Whoa.

^ ruby-opengl glut on osx
176533 [tsuraan gmai] I grabbed the port of ruby-opengl for OSX from
176537 [james.adam g] I have an updated version of my patched OpenGL module - I'll post
176555 [tsuraan gmai] Thanks!
176701 [anne wjh.har] I would be interested.
177326 [james.adam g] You should have the Developer Tools and the GLUT framework sources

^ Creating "windows binaries" on Linux
176538 [guslist free] There was some discussion about packing Windows executable with
176939 [google erikv] So, cross-compiling wihth RubyScript2Exe is possible? Nice! :)
177003 [guslist free] Yeah, kind of cool. Thanks for your good work.

^ greetings
176539 [mage mage.hu] some months ago I started to use Python and to see the light.
+ 176540 [joevandyk gm] The second edition of the book was released two years ago or so and
| 176560 [mage mage.hu] Thanx.
| + 176562 [zacharooni c] I may be totally off base, being a Ruby Newbie myself, but I believe the
| | 176564 [r.mark.volkm] The fact that the right-hand side is surrounded by curly braces is
| | + 176568 [mage mage.hu] I think I understand now, thanx.
| | | 176573 [zacharooni c] Exactly. I see Rails using this especially in generating views from ERB.
| | + 176574 [zacharooni c] "The fact that the right-hand side is surrounded by curly braces is
| |   176575 [r.mark.volkm] In your previous example, you ARE passing a Hash to the link_to
| |   176576 [zacharooni c] Great, thanks for the clarification!
| + 176565 [rubyforum mi] I think you mean colons ( : )  not semicolons ( ; ) !
| + 176699 [gene.tani gm] ...
+ 176558 [james graypr] I strongly recommend picking it up.

^ WeakRef Hash
176543 [james graypr] I need a Hash-like structure, using WeakRef, so that the key value
+ 176557 [james graypr] The following code, adapted from an old post by Guy Decoux seems to
| 176595 [ mfp acm.org] ==============================
| + 176596 [james graypr] [snip sensational examples]
| + 176720 [jeff schwabc] I like your technique, but suppose the same value is stored for more
|   176778 [ mfp acm.org] You're very right, I should have written something like
+ 176696 [bob.news gmx] Can't you just do something like this?
| 176750 [james graypr] I didn't see this message while the gateway was down.  Sorry about that.
| 176785 [shortcutter ] What problem exactly do you have with it?
| 176792 [james graypr] When I placed the code you posted in a file and tried to create
| 176809 [shortcutter ] Yep.
| 176892 [james graypr] idiom.  I mainly copied it from Matz's usage in TempFile.  (I believe
+ 176820 [ mfp acm.org] I summarized the solutions seen in this thread so far, and presented a couple
  176825 [shortcutter ] Nice work. Btw, it's expected that my lookup code is slow because it

^ (none)
176552 [cremes opend] chaddr cremes@opendarwin.org cremes.devlist@mac.com

^ gstreamer tag usage
176553 [payton foolo] I'm working on a Ruby application which uses the GStreamer bindings, and

^ Raising my own exceptions with DRb
176554 [reto-ruby-ta] I'm looking for a way to raise my own exceptions over drb. It's no
176587 [drbrain segm] You don't usually want to inherit exceptions from Exception.  If you

^ Ruby at O'Reilly Rough Cuts
176561 [makenai gmai] Not sure if this is old news or not, but it would appear that both the
176566 [r.mark.volkm] Who are the authors of these books?
+ 176567 [makenai gmai] Well, I know that the Ruby Cookbook is the one being worked on by
| 176572 [jonbaer jonb] It does say it on the official roughcut site ...
+ 176569 [lyle.johnson] Amazon.com claims that Bruce Tate and David Geary are the authors of
+ 176570 [verbena1 gma] Can't find the author of the cook book but the rails book is written by
+ 176571 [james_b neur] Ruby Cookbook: Rough Cuts Version

^ Disk Free Space
176578 [faivrem gmai] Is a way to know free disk space left other that using Win32 API or a
+ 176598 [m.fellinger ] for linux, it is the command dfno idea about easy ways to do that on windows - but there sure is someapi-call for that too...2006/1/24, Mickael Faivre-Macon <faivrem@gmail.com>:> Hi,>> Is a way to know free disk space left other that using Win32 API or a> system call on linux ?>> Mickael.>>
+ 176709 [interfecus g] This is highly OS-specific so I sincerely doubt there is a general
+ 176721 [jeff schwabc] On {U,Li}n[iu]x, df.
| 176772 [vjoel path.b] You can install the GnuWin32 tools on windows to get df working there, IIRC.
+ 176774 [edder tkwspi] size = 64
  177279 [faivrem gmai] I thought there would be a portable library to manage disk in general.

^ Unsubscribe?
176579 [mail chriss-] How can I unsubscribe from this mailinglist?!
176588 [daniel.cedil] When you first registered, this list sent you an email with all you need
176590 [bianchi gmai] unsubscribe FirstName LastName

^ [ANN] flickr-ruby moved to Rubyforge
176586 [premshree.pi] Just wanted to inform that I moved flickr-ruby to rubyforge some days

^ Net::imap exceptions
176601 [r.fulton auc] I have a program that I am using to do password auditing on various
176608 [stefan mahli] and so on. Maybe it helps to rescue Net::IMAP::Error only, but can't
176783 [r.fulton auc] Thanks for your response Stefan!
+ 176854 [r.fulton auc] I have now tried this and it still throws the exception with an explicit
+ 177146 [stefan mahli] No, it will only catch all Exceptions that are derived from
  177158 [r.fulton auc] Ah! missed that, my bad!

^ Buffered IO and UDPSocket
176603 [guslist free] This one is driving me nuts! What causes and IO object (more
176605 [ysantoso-rub] You should not mix buffered methods (read, write, puts, etc.) with
176607 [guslist free] But I don't. There is no call to any of read, write, puts, gets in the

^ [ANN] Test::Unit::XML 0.1.4
176604 [henrik.marte] release adds Doctype comparisons, including comparisons of entity and

^ Making Array#uniq work
176612 [damphyr free] OK, according to the Pickaxe 2nd. Edition, Array#uniq judges uniqueness
176613 [simon.kroege] you have to define a 'hash' method because Array uses a Hash to remove

^ class_eval(aString) vs class_eval(aBlock)
176614 [ml gioelebar] why does class_eval behave differently is you pass a string or a block to it?
177179 [ruby-ml magi] Reason for that is that all blocks are closures (they 'enclose' the

^ [QUIZ] Ruby Quiz Solutions (#63 Grid Folding)
176616 [james graypr] Since the gateway is misbehaving, I have crawled the newsgroup

^ CR/LF in data read from a socket
176617 [mtscolony gm] SGVsbG8sCkkgYW0gdHJ5aW5nIHRvIHdyaXRlIGEgY2xpZW50L3NlcnZlciBwcm9ncmFtIGluIGFu
176929 [pit capitain] outputFile = File.new( "test_image"+ind.to_s, "wb" )
177061 [mtscolony gm] Pit,
177064 [gene.tani gm] I had to respond to this.  I'm not sure if you're comparing to

^ Re: Any kind of source protection?
176618 [gene.tani gm] there is 1 thing I haven't tried: newobfusc.rb in
176790 [drbrain segm] the ruby_to_c project.  It is not publicly available, however.

^ Re: event-driven networking
176619 [x versatechs] Couldn't you use DRuby (require 'drb')? That's what I do in my Rails
176635 [alenpeacock ] You certainly could use the asynchronous completion token pattern, but
+ 176642 [gene.tani gm] but this must be a very entertaining or informative list, or something
| 176644 [raims dot.co] Oh yes I like ruby very much (I tried it for Rails, like many other people)
+ 176855 [cremes.devli] You might want to take a look at the Myriad framework [1] written by

^ Re: Grid Folding (#63)
176621 [mjb asplake.] Matthew, thank you for sharing your results (and in the form of test
+ 176639 [morus.walter] me too :-)
| + 176653 [agafonkin gm] Thanks for the test, passed.
| | + 176663 [morus.walter] 502.175 (~90 for the 1024x1024 and 411 for the 2048x2048)
| | | 176702 [morus.walter] I did another solution doing an unfold of the final stack.
| | + 176734 [matthew.moss] My solution took only 143 seconds to do all the tests...  of course,
| + 176654 [mjb asplake.] Sorry, I missed this earlier, but as per my submission a few minutes
|   + 176656 [agafonkin gm] Mike, you have an interesting concept for this quiz, but the script is
|   | 176657 [mjb asplake.] Not 100% surprised, and it's longer than others too.  For the large
|   | 176658 [agafonkin gm] Excuse me for a dumb question, but how do you preallocate the array?
|   | 176659 [mjb asplake.] and if "preallocate" was the wrong word, I apologise!
|   | 176662 [agafonkin gm] Thanks. I don't know how to apply it to my code, though. Lets say I
|   + 176664 [morus.walter] I don't see a problem, I was just curious how you understand validation
|     177193 [GENIE prodig] I was waiting to clean up my solution, but it's Thursday, so here it
+ 176727 [matthew.moss] Well, sure...  That's like setting the speed limit to 300mph and

^ About rant on Dave Thomas site, titled 'imitation...'
176622 [simonharriso] Couldn't post a reply on Daves site so thought i'd post one here. Here
+ 176624 [ oop poo.com] In not so many words, publishers should commission Daves company
+ 176730 [ezmobius gma] I can attest to the great process Dave & Andy have going for their
+ 176768 [keith oreill] Keith
+ 176816 [lists turnip] This is something called competition which is generally considered to be
+ 176824 [james_b neur] How many people or companies create anything out of thin air?  How much
| + 176878 [wilsonb gmai] Indeed. From what I've seen of Pragmatic Markup Language, I wouldn't
| | 176940 [alex.combas ] "For this reason, I honestly don't mind other publishers blatantly
| | 176997 [dale.martens] ground for others. They are the leaders (reluctant as they may be).
| + 176970 [steve asklat] No, you can't steal but you might infringe.
|   177011 [sera fhwang.] Ideas can't be copyrighted; only their expression can be copyrighted.
|   177218 [Dave PragPro] charset=US-ASCII;
|   + 177219 [alex.combas ] Well its good to hear you arent aiming for global monopoly! :)
|   | 177269 [Dave PragPro] charset=US-ASCII;
|   | + 177272 [alex.combas ] I understand what you are saying regarding rails and I agree.
|   | | 177387 [drbrain segm] I believe Dave is trying to say the inverse.  "We're not a big
|   | | 177389 [alex.combas ] I see where you are coming from now, thanks for clearing this up.
|   | | 177393 [jp jeffpritc] Reading through this thread as merely an interested bystander who only
|   | | 177395 [james_b neur] Any mechanism would need to consider that different people will have
|   | | 177422 [jp jeffpritc] Thanks James,
|   | | + 177462 [mental rydia] I'm not so sure.  I mean, just in the past few weeks, look at the
|   | | | + 177467 [jp jeffpritc] Mental,
|   | | | | 177471 [M.B.Smillie ] Ah, but what about when popular, marketing-savvy Ms Q "popularises"
|   | | | | + 177480 [mental rydia] There's also the situation where Mr. X and Mr. Y both independantly
|   | | | | | 177482 [M.B.Smillie ] Yep.  I've reinvented tons of things.  Generally it happens like
|   | | | | | 178102 [damphyr free] Just look at my post about callbacks and events: me reinventing the
|   | | | | | 178174 [snail objmed] writes
|   | | | | | 178178 [kiaroskuro g] In Italy you might also get a SIAE inspector (our local RIIA) giving you a
|   | | | | | 178181 [snail objmed] <dd533d4b0602030248o663df9c1s42914c58dfe2ef4b@mail.gmail.com>, chiaro
|   | | | | + 177594 [eeklund gmai] To me, it's not clear that we can create a system where the average Mr
|   | | | + 177830 [kero chello.] I'll try to stimulate thought a bit.
|   | | |   177932 [jp jeffpritc] Looking at both what came before and especially what came after my
|   | | + 177499 [arpan arkfam] I don't think that they would be considered acts of Genius. If they were
|   | + 177293 [mental rydia] Perhaps that is true, but imitation is often a prerequisite for new
|   | | 177300 [znmeb cesmai] Interesting thoughts ... I'm attempting to create a Rails-like framework
|   | + 177827 [Bil.Kleb NAS] This mechanics behind this lack of vitality is well
|   + 177222 [henrik.marte] As you have proved yourself, there _is_ innovation in the publishing
+ 177073 [groups grand] <snort>