208427-400232

208225-261961 subjects 208650-386003

[SoC][ANN] Ruby Reports 0.4.99
208427 [gregory.t.br] == Ruport 0.4.99 : The "Snakes on a Plane" Edition ==

[ANN] RMagick 1.13.0 for Windows
208435 [TimHunter@nc] Brett DiFrischia has prepared a new release of RMagick for Win32. This
208472 [botp@de mo t] # ("rmagick-1.13.0-IM-6.2.9-0-win32.zip") file from RubyForge
208474 [devlists-rub] I'm also getting a file not found when I try to download the .zip file.
208506 [TimHunter@nc] I think it takes a while for new files to make it out to all the

regexp for finding floats in a string
208437 [Bil.Kleb@NA ] What RegExp should I be using for floats?
208438 [fxn@ha hr f.] Have a look at the regexp in
208797 [Bil.Kleb@NA ] /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/
209046 [aledonne.lis] Quick caveat - that's for a c float (as mentioned in that perldoc

problems with dup and clone...
208439 [r.fulton@au ] In the snippet of code below hosts holds a set of class instances for
+ 208464 [surfunbear@y] Not sure if this is any help, but just today I found there is a way to
+ 208469 [r.fulton@au ] More investigations reveals that the objects are being at least
| + 208471 [Gennady.Byst] As several people have already indicated, Ruby's clone() and dup()
| + 208676 [r.fulton@au ] OK, not a bug but a feature.  My copy of the pickaxe was at home and I
|   + 208714 [rick.denatal] My point wasn't so much that the classes were anonymous, but that
|   + 208720 [r.fulton@au ] final word on this one. Yes initialize_copy does the trick.  Iv'e
+ 208630 [rick.denatal] But those ARE two different instances.  The interesting thing is that
  208637 [devlists-rub] As I recently discovered, arrays don't get deep copied with dup or

_ in URI subdomain problem
208445 [ray.c.chen@g] I am currently working with some code for fetching webpages, and I have
208446 [aredridel@nb] Should be able to extend URI.parse and have it work there. Good luck!
208620 [ray.c.chen@g] I think I found the answer in URI.escape after discovering the goldmine

Still no love on ubuntu
208452 [chet@no at r] I posted last week about some trouble I was having getting Ruby (not
208454 [chet@no at r] Belay that. Of course, after posting, I found an answer almost
208459 [jcribbs@ne p] Chet, if you take a look at the third line of the error message you

Ruby extension and static function in C++
208461 [yue_nicholas] I am writing an extension for Ruby in C++ and as I have more and more
208467 [garbagecat10] As a general rule, I dislike exposing C++ as a library interface. I
208482 [yue_nicholas] Thanks.
208489 [garbagecat10] ...

starting a business/web site, how to protect code ?
208462 [surfunbear@y] I have been working on some code for a dateing service in Ruby/Rails.
+ 208466 [garbagecat10] Aren't you going to run it on your own servers?
| 209237 [surfunbear@y] I'd like to, but I have to see how many people will go on the site and
| 209247 [garbagecat10] This isn't a site to get business advice, but a potential investor
+ 208477 [dido.sevilla] Have them sign a non-disclosure agreement. That's the easiest, most
+ 208502 [rene@so 6. e] well - most efficient way is to GPL your code.

How to compile extensions in Visual Studio 2005
208470 [ruby@mu rm n] I found this a while ago (on an SAP mailing list, if I recall
208481 [halostatue@g] How? You don't. Visual Studio 2005 does not produce extensions
208485 [ruby@mu rm n] Did you read the post? It wasn't a question... I am aware there are
208550 [halostatue@g] Yes, I did. I'm trying to discourage anyone from using your
208698 [ruby@mu rm n] Fair enough.

Programming Ruby for $27...
208479 [chiology@gm ] Not to take away from folks buying from Amazon or direct from the
208510 [Bil.Kleb@NA ] AFAIK, you can only get the PDF format by
208540 [ben@bl yt in] Nope, you can get the paper books as well.  I own 5 or 6 PragProg books
208551 [johnwilger@g] I'm pretty sure that Bil was trying to (correctly) say that you cannot
+ 208565 [ben@bl yt in] Oh yeah, now that I'm awake that's how I read it too.  Heh, oops.
+ 208566 [Bil.Kleb@NA ] Yep, and that it's cheaper than the paper version.

Problem getting gems/listing gems. EINVAL
208480 [none@no e. o] rubygems 0.9.0

special characters within [] in a regexp
208486 [martindemell] What characters have to be escaped within a [] in a regular
208511 [angus@qu va ] to interpolate special variable $%.
208573 [martindemell] Oh! Okay, I get it now :) Thanks.

Question about the threequal operator .===
208492 [jweizman@gm ] *What is special to the threequals operator when it comes to when
208493 [shortcutter@] It's simply the fact that it's invoked.  "when" doesn't invoke ==, eql?
208557 [halostatue@g] And it does it differently than might be expected.

[ANN] Net::LDAP 0.0.4 released
208501 [garbagecat10] ...

question about if-statements
208509 [fabbyfabs@gm] Im a newbie to ruby (hehe).
+ 208513 [daniel.schie] print "enter username: "
+ 208520 [shortcutter@] puts "Enter Username"
  208531 [fabbyfabs@gm] Thanks!
  208536 [M.B.Smillie@] Well, you're testing for equality, so greater than wouldn't catch a
  208541 [daniel.schie] I only think that's because most other languages don't have `unless' :)
  208577 [M.B.Smillie@] That was my first intuition too, and I'm certain that's part of it,
  208616 [daniel.schie] Interesting thoughts (and cool example). I do however tend to use short,

Re: Rails 1.1.5: Mandatory security patch (and other tidbits
208523 [f@an re s- .] It's not as easily exploitable as the one that was fixed in 1.1.5, but

Ruby will enter the top 10 within half a year and replace Delphi
208529 [enogrob@ho m] According to the TIOBE Programming Community index the chances are that
208647 [gsc@om ga og] ...

[Facet] Hash#each
208532 [daniel.schie] # File lib/facets/core/hash/each.rb, line 19
208605 [sylvain.joye] On a related note, both solution create one Proc (in the block=>Proc

Scripts framework
208534 [benjohn@fy h] I've been writing a few unix scripts recently. I'm very much feeling the
+ 208538 [M.B.Smillie@] The optparse library is distributed along with Ruby, and will
| 208554 [benjohn@fy h] be using, but I was hoping for more.
+ 208575 [transfire@gm] There are a number of alternative out there. A couple in particluar are
| 208593 [jgbailey@gm ] ...
+ 208594 [phrogz@gm il] I've been using Usage for its simplicity.
  208613 [gavin@re in ] Because it's hard to find the information (you have to install the GEM
  208661 [benjohn@fy h] they look like they'll be very useful.

.NET and Java to get better dynamic language support
208535 [enogrob@ho m] With highly expressive syntax that is easy to read, write, and

two newbie questions
208543 [bitdoger2@ya] practical ruby here @ work means access to M$ACCESS97 and Hardcopy
208668 [jan.svitok@g] 1. from the page seems DBD::ADO or DBD::ODBC are appropriate. Try to

Lightweight Ruby?
208544 [chanon@vi ua] I was the one who started the "Using Ruby in a commercial application?"
+ 208556 [greg.kujawa@] What do you mean by lightweight? Ruby certainly seems to be portable,
| 208560 [chanon@vi ua] Yes, Nintendo DS and other game consoles could be future targets.
| 208583 [greg.kujawa@] Hmm. I would think your options might be more restricted to proprietary
+ 208561 [coder68@ya o] Cganon,
| 208863 [kero@ch ll .] Why's sandbox (see another current thread) might help here.
| + 208945 [halostatue@g] I would include zlib if you haven't already; otherwise, you won't be
| | 209172 [kero@ch ll .] zlib is in the main package.
| + 208987 [greg.kujawa@] This Ruby for a Linux-based iPAQ sounds great! By chance would this be
|   209171 [kero@ch ll .] It runs on familiar. Both GPE and Opie derive from that, so it should work
+ 208869 [brianm@ap ch] Lua embeds much easier than Ruby, IMHO. This is especially if you use
  208934 [u.alberton@g] Lua is also a nifty language :). Lua and Ruby seem to have the same
  208936 [greg.kujawa@] I briefly looked at Lua but didn't get a chance to fully research its
  + 208942 [james@gr yp ] I sure hope so.  The language doesn't even implement bitwise
  + 209005 [u.alberton@g] After looking at the site a bit, I saw it does have libraries for all

Re: Dr Nics Magic Models
208558 [drnicwilliam] I'm not convinced, earth man, that an HABTM association is really useful
208568 [drnicwilliam] people =>* group_people *<= groups

Re: Hash#each
208562 [transfire@gm] Yes that's much better.
+ 208571 [ara.t.howard] h = {:k => :v}
| 208580 [transfire@gm] I'm not following how it fails? I may be missing something but it seems
| + 208582 [decoux@mo lo] svg% /usr/bin/ruby -ve '{:a => 1, :b => 2}.each {|*v| p v}'
| | 208822 [transfire@gm] Woh. So why the change?
| + 208587 [ara.t.howard] h.each{|a| p a.first.size}
+ 208574 [phrogz@gm il] Is this whole facet just to avoid typing two extra characters in the
| + 208576 [james@gr yp ] And why the heck wouldn't we just use each_value() there?!  ;)
| + 208584 [transfire@gm] Actually an interesting question. This is one of the earliest facets in
|   208590 [ara.t.howard] i'm totally with the concept of hash/array interchangeability in some
+ 208579 [daniel.schie] No, I'm not using it, I'm just reading through some of the Facets source
  208585 [transfire@gm] Thanks I'll have a look!

=?WINDOWS-1252?Q?Re:_Dr_Nic=92s_Magic_Models?=
208563 [logancapaldo] You don't always want a has_many :through though. Sometimes the only

problem with date.succ
208564 [russ.pridemo] I'm having difficulty with a small program I'm writing dealing with
208674 [pit@ca it in] Russ, for November, "mo" is 11, and "(mo+1) % 12" is zero, but
208689 [russ.pridemo] Pit,
208769 [jan.svitok@g] Because the Date is stored as Astronomical Julian Date number

Semantics of VALUE
208572 [drjflam@gm i] VALUEs today in Ruby are (sometimes) pointers to objects, and since
208578 [logancapaldo] a VALUE won't be a VALUE then anymore. I imagine the whole api would
208727 [drjflam@gm i] Thanks, Logan!

rSQLiteGUI 0.1
208588 [ffsnoopy@gm ] Hey all, I sort of forgot I had an unfinished project...so here's a new
208589 [ffsnoopy@gm ] A URL would probably be helpful, sorry about that.

Ruby bug or not?
208591 [devlists-rub] Using 1.8.4 on OSX.
+ 208595 [james@gr yp ] => nil
+ 208596 [decoux@mo lo] Write it like this
+ 208597 [marcel@ve ni] a.instance_variable_get(:@one).object_id
  208600 [devlists-rub] Yeah, one of those things you figure out right after you post it.

newb: setting up GNU Emacs for Ruby -- help
208592 [jmg3000@gm i] I'd like to get GNU Emacs set up for use with Ruby, and I'm hoping
+ 208612 [ryand-ruby@z] (autoload 'ruby-mode "ruby-mode" "Mode for editing ruby source files")
| 208624 [jmg3000@gm i] I appended those to my ~/.emacs file, but there's still no syntax
| + 208643 [ryand-ruby@z] I just copied in some of what I have from my setup... It looks like
| | 208651 [jmg3000@gm i] Uh oh. I might have to live dangerously then. ;)
| | 209121 [kristof@vl e] I personally find 2 too narrow to distinguish different indentation
| + 208656 [llasram@gm i] Which OS / distro are you running?  Many provide a package which
|   + 208681 [jmg3000@gm i] Right now: Debian Etch. At home: Ubuntu 6.06. On servers, usually Sarge.
|   + 208758 [jmg3000@gm i] For those interested...
+ 208725 [julian.kamil] =====
  208811 [jmg3000@gm i] Thanks Julian.

|| and RegEx
208599 [aidy.rutter@] Here is a snippet of a case statement
+ 208601 [devlists-rub] Why not do something like this...
+ 208603 [ssmoot@gm il] Put commas between the values you want to threequal against, not the ||
+ 208610 [decoux@mo lo] When you write this, ruby first execute ||, something like

Gems not working (Windows 184-20)
208609 [gavin@re in ] I hate that I don't understand why this is failing, and have to turn to
208611 [gthiesfeld@s] irb(main):001:0> require 'usage'
+ 208614 [gthiesfeld@s] Umm, I was wrong.  Disregard my last email.  I'll try to think before I reply from now on.
+ 208615 [gavin@re in ] Hrm, mine doesn't work quite like yours, but I got it to work.
  208873 [gregory.t.br] See http://redhanded.hobix.com/inspect/autorequireIsBasicallyGoneEveryone.html

What deployment setup are production Rails sites using? and pros/cons
208618 [vasudevram@g] Did some Google searching, came across James Duncan Davidson's blog
208621 [asbradbury@t] Your question is more suited to the ruby on rails mailing list[1]. Mongrel is

FileTest.exists? over HTTP
208625 [caphonic@gm ] I would like to test for the existence of a file over HTTP. I have tried
+ 208628 [khaines@en g] Using FileTest.exists?() for an HTTP operation.
+ 208749 [logancapaldo] As Kirk mentioned, the only transparent url support is with open-uri.

building a log by watching a file
208626 [Bil.Kleb@NA ] I've been paying attention to some mind-numbing chores
+ 208632 [gavin@re in ] edit_logger = Dir::DirectoryWatcher.new( 'directory/to/watch', 2 )
| 208781 [Bil.Kleb@NA ] Thanks.
+ 208776 [chneukirchen] while true; do git commit -m "$(date)" input_deck; sleep 1; done
  208779 [Bil.Kleb@NA ] Excellent.

Instance and Related Class Methods
208627 [mguterl@gm i] I have a class with a lot of instance methods which are related to
208631 [eero.saynatk] The simplest thing would be to eliminate these calls on
208633 [mguterl@gm i] ...
208644 [eero.saynatk] Yes, I apologise, I misread this as a simpler scenario.

(none)
208636 [jeppe88@gm i] ...

Organizational advocate for Ruby
208638 [Jamal.Mazrui] nonprofit corporations intended to further the interests of those
208641 [asbradbury@t] Ruby Central is the organisation you're looking for.

php x ruby (64 bits em linux)
208642 [alexandre@ob] Boa tarde a todos.
+ 208646 [schapht@gm i] Just to warn you, this list is usually english.  But maybe someone
| 208648 [jan.svitok@g] This is what babelfish made of it; I only added spaces around slashes.
| + 208715 [kenosis@gm i] And entertaining, to say the least.  "I hug to all," - that really
| + 208765 [daniel.schie] I think it's Portuguese.
|   208788 [u.alberton@g] It is, and the "hugs" thing was a bit of an artifact of translation
+ 208654 [devlin.daley] ...
+ 208787 [u.alberton@g] Talvez sua d?vida seja melhor recebida nesta lista brasileira de Ruby,

goto function?
208645 [fabbyfabs@gm] Hey!
+ 208662 [bulliver@ba ] charset="iso-8859-1"
+ 208672 [shortcutter@] begin
| 208679 [fabbyfabs@gm] I don't really understand..
| + 208686 [logancapaldo] % cat cc.rb
| | 208693 [gwtmp01@ma .] Yikes, someone asks questions which indicate that they
| + 208695 [david@va ln ] Let me introduce you to my good friend: structured programming. I'm sure
| | + 208703 [nsmith5@um c] In some very rare circumstances, using gotos does in fact have a rightful
| | | 208711 [Gennady.Byst] I have to respectfully disagree. Having actively used C (among many
| | + 208782 [chneukirchen] It is often said that continuations are as powerful as goto.
| |   + 208800 [toalett@gm i] A continuation is, by definition, the *continuation* of the
| |   | 208841 [pit@ca it in] irb(main):001:0> require "goto"
| |   | 210359 [wrecklass1@g] Ah very clever. Corrupting the minds of the innocent by introducing
| |   + 208806 [logancapaldo] callcc do |cc|
| |   + 208836 [david@va ln ] As others said, continuations continue. You can jump backwards, because
| + 208766 [shortcutter@] You call File.open() but you do not call #close().  Note that there are
|   208775 [fabbyfabs@gm] Yes, I fixed the file.close thing. :)
+ 208701 [interfecus@g] There is a reason why there are no gotos in Ruby or the vast majority
| 208707 [fabbyfabs@gm] Naa, Im just testing to create something simple.. I think thats the
+ 208731 [eero.saynatk] Since no-one mentioned it, how about a throw/catch solution?
| + 208735 [david@va ln ] Throw / catch is for hairier nonlocal returns, he wanted to repeat
| | 208739 [jtregunna@bl] Even if you need a return value you can break with a value. I.e.,
| + 208740 [logancapaldo] I originally tried to do it with throw/catch, but its not really
+ 400174 [lists@ru y- ] My friends! Let's not become dogmatic, please!!! 
  + 400175 [echristopher] You can use continuations (although I think I recall hearing that they
  | 400187 [whitequark@w] They were, in fact, added in 1.9.
  | + 400222 [echristopher] Oh, interesting.
  | + 400228 [jwise@dr ga ] Neither, actually -- callcc is present in both 1.8.7 and 1.9, but was moved from the core to a stdlib in 1.9 (the 'continuation' module).
  | + 400231 [ryand-ruby@z] No, they were added MUCH earlier than 1.9.
  |   400232 [tony.arcieri] I'm guessing he was probably thinking of Fibers
  + 400177 [matma.rex@gm] You can compile Ruby with SUPPORT_JOKE to enable goto.
    400178 [keystonelemu] It's a question of structure and proper planning more than any type of

compile of Ruby fails on Ubuntu
208649 [navjeetc@gm ] I recently upgraded my Ubuntu to Dapper. I am trying to compile ruby on
+ 208652 [nephish@gm i] ...
| 208659 [navjeetc@gm ] That did not help.
+ 208655 [cameron.math] I think if you just do "apt-get build-dep ruby" you should be able to
| 208660 [navjeetc@gm ] Cameron,
| 208665 [cdc@cy he s.] The above will install all dependencies (libs) that are required to
| 208682 [navjeetc@gm ] Cliff,
| 208690 [cameron.math] Hey,
| 208712 [navjeetc@gm ] Well thanks for that clue Cameron. I did the ultimate, blew away
+ 208657 [cdc@cy he s.] Maybe you want to use --disable-FEATURE as options to configure.sh
+ 208716 [akulbe@gm il] ...
threads.html
top