193176-194645 subjects 193553-413094

Re: Partial functions?
193398 [jim@we ri hh] [... curry example elided ...]
193403 [Daniel.Berge] Ah, ok.  Is there any kind of speed advantage to this approach?  Or is
+ 193494 [ilmari.heikk] In functional languages, the compiler can reduce all the computationinvolving the curried args, storing the computation.This can make things faster.
+ 193502 [dido.sevilla] Exactly. Partial functions are another term for what some references
  193561 [transfire@gm] Taked about this with Peter Vanbroekhoven some time ago (has it been a
  193567 [jim@we ri hh] def __() Curry::HOLE end
  193687 [transfire@gm] Thanks, Jim. That'll do the trcik for this first way --although it
  193688 [rossrt@ro co] True, but I think that for most purposes it comes close enough, thanks

Nested Exceptions
193405 [joiey.seeley] Can anyone tell me if Ruby supports nested exceptions correctly? I have
193417 [guslist@fr e] Does this answer your question?

mechanize error
193408 [dor@oc av .c] it seems Mechanize isn't working well with relative URLs -
193411 [alex@bl ck e] Where have you told it what host to look at?
193418 [dor@oc av .c] well, i didn't, where should I?
+ 193429 [alder.green@] agent.get('http://google.com')
+ 193441 [james_b@ne r] James Britt

Re: Welcome to our (ruby-talk ML)         You are added automatically
193414 [tekin@ra d. ] unsubscribe

How to "go to" in a RUBY script . . .
193419 [pbailey@bn .] Can someone tell me how to implement a "go to" kind of statement in
193422 [dor@oc av .c] These type of subroutines were replaced with functions (defined by 'def'
193424 [steve.debaun] I'll distract him, while y'all get a rope.
+ 193450 [masukomi@gm ] ...
+ 193452 [leslieviljoe] hehe. I recently noticed that C# still has a goto, although it seems
  + 193453 [steve.debaun] Cant... stop... laughing...
  + 193454 [ankarp1@gm i] -A
  | 193456 [Daniel.Berge] catch(:block) do ... end
  + 193463 [drbrain@se m] This is what the return keyword is for.
  | + 193468 [Nuralanur@ao] ...
  | | 193469 [Nuralanur@ao] ...
  | + 193526 [leslieviljoe] You are right, return works well there.
  + 193540 [phil@sh ll r] [ snip ]
  | 194028 [louis.j.scor] Precisely what I was thinking.  The spaghetti code problem is largely
  | 194034 [khaines@en g] The Ruby way involes a little more typing than the Perl way, but it seems
  | 194150 [leslieviljoe] This is great! It's exactly the way I was "abusing" exceptions, so I'm
  + 193552 [florgro@gm i] The one cool thing about C#'s goto that can't be easily done in Ruby is
  + 193565 [shortcutter@] When refactoring properly this is often easily solved with a "return" statement.
  + 193578 [miken700@ya ] I couldn't agree more.
  | 193582 [shortcutter@] I see this differently: experience has shown that GOTO in most cases
  | + 193583 [jake.mcarthu] ...
  | | 193586 [shortcutter@] Sometimes less is more.
  | | 193593 [jake.mcarthu] But that's kind of my point. To an experienced programmer, being able
  | | + 193600 [khaines@en g] The one time in 4 years of Ruby that I have needed something goto-like,
  | | + 193683 [shortcutter@] This was not my point: my point was, that the harm done with GOTO far
  | |   193701 [vladgalu@gm ] Nowadays I could only find goto useful in controlling the error
  | + 193605 [sroberts@un ] It is also formally proven that just a conditional and a goto is
  + 194154 [pbailey@bn .] Wow. I guess, way back when, my referring to GOTO really sparked a
    194173 [toalett@gm i] There's also continuations. They're not only for web frameworks, you
    + 194178 [leslieviljoe] As I understand it, continuations seem like blocks where all the local
    | + 194185 [toalett@gm i] Continuations represent "the rest of your program", or the
    | + 194203 [jim@we ri hh] Almost.  Neither the values of global variables nor local variables in
    + 194215 [leavengood@g] $labels = {}
      194260 [leslieviljoe] I am so amazed by how versatile and expressive Ruby is. It's almost as

Having a local copy of a gem - how to handle require_gem?
193446 [weyus@at .n ] In order to resolve namespace conflicts, I need to take ownership of two
+ 193448 [halostatue@g] Do not use require_gem unless you wish to set a particular *version*.
+ 193451 [james_b@ne r] I believe require_gem is outdated.

Who Wants to Be a Scripting Guy?
193449 [james_b@ne r] So asks Dr. Scripto at Microsoft TechNet
193461 [leavengood@g] It seems as if the whole point of that column is explaining annoying

unzip EAR file?
193457 [cdc@cy he s.] an EAR file technically just a zip file?  I've been able to untar tarballs
193460 [peter@ru yr ] I am just writing a deployment script for a web app, and there I am
193470 [cdc@cy he s.] =20

Solaris install
193465 [Eric.Armstro] Folks, I have a real opportunity to make a
193467 [ara.t.howard] it has nothing to do with ruby, the Makefile, or gcc - it's all about your

Where does one find documentation for Text::Format?
193466 [weyus@at .n ] I can't find any documentation for Text::Format.
193548 [halostatue@g] You won't find it in ri. The ri database is ... hard to update. If
+ 193597 [drbrain@se m] Ruby 1.8 CVS and Rubygems CVS integrate ri data from gems.
+ 193609 [jmg3000@gm i] Just curious -- any idea why it is that you need to process a ruby
+ 193627 [weyus@at .n ] There's no documentation available via gem_server either.
| 193633 [james_b@ne r] When installing the gem, you may have to pass a switch to tell it to
+ 193629 [weyus@at .n ] I also attempted to go directly into the root dir of the gem and run the
  193631 [weyus@at .n ] Attempting remote installation of 'text-format'
  193634 [weyus@at .n ] I generated it myself using "rdoc" and it looks good.

Annotated Ruby API Docs
193471 [jgbailey@gm ] ...
+ 193477 [runner@be ke] That is slick!  It would be great if RoR docs had that feature!
| + 193479 [brabuhr@gm i] You mean like?
| | 193483 [runner@be ke] Yes, exactly like that :-) .  *Bookmarked*
| + 193489 [phil@ha el .] You can always hoodwink.
|   193492 [james_b@ne r] True for ruby-doc.org, too.
+ 193481 [agorilla@gm ] Absolutely amazing.  I had suggested this for the Summer of Code (many
| 193484 [gregory.t.br] I saw this a few months ago at a NYC.rb meeting
| + 193487 [runner@be ke] Recently there has been a big push by the rails devs to get users to
| + 193490 [agorilla@gm ] It seems you're right.  It's been discussed since late last year, and
+ 193543 [jesusrubsyou] Pistos

(DBI::Utils::XMLFormatter) Output results as a string?
193496 [caldridge@gm] [xml.rb]
193499 [djberg96@gm ] The XMLFormatter.table method takes four arguments.  The fourth argument
195111 [caldridge@gm] I never could get it to work properly... It's like.. when I used the
195190 [Daniel.Berge] dbh.select_all("select * from people"), 'rows', 'row', asdf)
196263 [caldridge@gm] I'll check it out tomorrow and let you know.
196517 [caldridge@gm] Worked like a champ. Thank you!!

Re: Solaris install -- how it works, why it works (thanks Ara)
193497 [Eric.Armstro] Ah ha!! Thanks much for the additional info, Ara.

RubyGems hangs while updating the source index
193503 [jbrown2006@g] RubyGems hangs while updating the source index.
193505 [leavengood@g] Most of the time a firewall is to blame here. If you have a firewall

send vs. dot notation
193504 [gilesb@gm il] What's a good reason to use send() instead of a dot to send a message?
+ 193506 [eliben@gm il] Yes, this is a good example. Since Ruby has no real concept of "compile
+ 193507 [uncutstone@s] I think send is one of the key features of Ruby. It is a core underneath
+ 193513 [pit@ca it in] Giles, as others have noted, this is the main reason. Another one has
  193516 [rossrt@ro co] class C
  193611 [gilesb@gm il] Many thanks for all the helpful replies...the memoize and

Disk Free Space (Re: Who Wants to Be a Scripting Guy?)
193509 [dave@bu t. d] It's a good question.
+ 193510 [dave@bu t. d] should be
+ 193514 [alex@bl ck e] I'm not sure about that.  Unless I'm very much mistaken, the problem
  + 193530 [paulymer5ml@] It should work on most modern *nix systems, but `df -h` isn't
  | + 193556 [Daniel.Berge] See the "filesystem" package on the RAA for an actual C extension.
  | + 193562 [edder@tk sp ] I found a ruby version of df a long time ago. It did a syscall(99), so
  | | 193574 [dave@bu t. d] In the above code, what's hd? And would this be more or less portable
  | | 193588 [edder@tk sp ] The hd is the mount point read from /etc/mtab
  | + 196382 [cremes.devli] (Sorry for resurrecting an old thread.)
  + 193577 [dave@bu t. d] You are right, and the answer to this simple problem is to check the
    193579 [Daniel.Berge] Oof.  It looks like Mike Hall's filesystem package is gone from the RAA,
    193585 [dave@bu t. d] Would you add Windows support into the same package? I could add it into
    193587 [Daniel.Berge] One or two folks on the win32utils-devel mailing list have already

Ruby namespaces and require
193512 [alex@bl ck e] There have been a few threads recently both here and on the Rails list
+ 193515 [dave.m@em il] It should be better and more elegant to have a STD NS like in Java
| 193518 [alex@bl ck e] Alternative, certainly.  I'm not so sure about better or more elegant.
| 193667 [dave.m@em il] It is a necessary evolution, i think. To control the entropy :)
| 193769 [alex@bl ck e] There's more than one way to skin *that* cat :-)
+ 193564 [ruby@an hr p] } There have been a few threads recently both here and on the Rails list
| 193575 [alex@bl ck e] Fair enough :-)
+ 193566 [transfire@gm] In Rolls (roll.rubyforge.org) I added the import method which works
| 193572 [alex@bl ck e] I can't say I like the syntax (I came up with :into for precisely that
+ 193656 [halostatue@g] Awful and unworkable. Remember that in Ruby, a filename does not
  + 193665 [alex@bl ck e] Really?  There's already been one implementation posted that could
  | 193668 [dave.m@em il] ? | require 'foo', Bar
  + 193684 [transfire@gm] Austin may be right that there are too many problems with doing this
    + 193771 [alex@bl ck e] That does feel clumsy.  It's a simple fix, I know, but it's still clumsy.
    + 194389 [halostatue@g] Yes. Complain to developers who step on each others classes/namespaces.
      194401 [transfire@gm] The problem has been expirenced many times. I think your just looking
      194404 [halostatue@g] True namespaces exist, Trans. Selector namespaces are something

R and Ruby
193529 [alexg@ku cr ] I'm releasing the latest version of my R<->Ruby code called RSRuby.
193653 [znmeb@ce ma ] You might want to submit this to the Comprehensive R Archive Network

"Declaring" private instance variables
193531 [eliben@gm il] One thing I like about C++'s OO is the way in which all class & instance
+ 193533 [pergesu@gm i] Actually, the attr-family is just some metaprogramming to create new
+ 193534 [dblack@wo bl] The behaviors provided by attr_* are implemented using instance
| + 193535 [eliben@gm il] Interesting - I didn't know that it's possible to have private variables
| | 193536 [dblack@wo bl] You're actually getting private methods, not variables.  The methods
| | 193589 [eliben@gm il] 78: warning: private attribute?
| + 193551 [gwtmp01@ma .] Is there any existing (or previously proposed) way of 'scoping' the
|   193555 [halostatue@g] No, there isn't. Why would you want that? I see no advantage to it,
|   193559 [gwtmp01@ma .] Seems like a lot of redundancy there.  You are typing :b three times.
|   193635 [logancapaldo] Here's an implementation. I almost laughed at myself when i figured
+ 193541 [uncutstone@s] IMHO, declaration of private intance variable is a deep-rooted static

193532 [info@fb tt g] .oO(dexta@euphoria ~) soap4r-1_5_5/bin/wsdl2ruby.rb --type client
202321 [nakahiro@sa ] Sorry for late reply.

Curly brackets (was: Rescue clauses on do/end blocks?)
193539 [daniel.schie] Okay, if this proposal is blocked by the lack of an elegant way to add
193544 [halostatue@g] I don't think that it's elegant or inelegant. It's just something that
193595 [drbrain@se m] Agreed.
193602 [daniel.schie] I don't think it's pretty, either. But you seem very keen on destroying
+ 193606 [drbrain@se m] I've been using Ruby for a long time, and I can count on my two hands
| 193616 [daniel.schie] So you agree that there's no way in hell a Ruby programmer would never
| 193742 [hal9000@hy e] Are you deliberately misunderstanding? The only agreement I saw is
| 193758 [ mfp@ac .o g] <unimportant-info>
| 193801 [hal9000@hy e] I never knew that. Is there an obvious reason I'm not seeing?
| 193808 [matz@ru y- a] Since it's from AWK, I honored the AWK syntax, and saw no need to
+ 194391 [halostatue@g] Yes.

Writing a interpreter extension
193545 [krisleech@in] When writing a interpreter extension are there any hooks in to the
193596 [drbrain@se m] Override require.
193608 [krisleech@in] Many thanks Eric, do you have a code example by any chance to get me
193613 [drbrain@se m] You don't need to write any C at all.  Write it in Ruby.
193621 [logancapaldo] module Kernel
193779 [krisleech@in] Thanks for the reply.
193788 [sroberts@un ] Doing it in compiled C would leave it in plain text, too, just mildly
193828 [krisleech@in] It would take a higher skill set to extract it though.
193840 [leslieviljoe] Sorry to be a whiner, but can't you put the key in a file only readable
193866 [krisleech@in] Well there are several aspects to this, I want to protect the code from
+ 193880 [leavengood@g] Try to do this. I bet I could break it in 10 minutes.
| 193883 [krisleech@in] By reading the key from the binary or reading the un-encrypted code from
| + 193884 [krisleech@in] In any case how would you go about securing ruby code or do you think it
| | 194225 [halostatue@g] No code is secure against determined attackers. Please remember that
| + 193886 [rosejn@gm il] Haha, you really don't want to go down this road.  If you can't
| | 193890 [krisleech@in] The use case can't be changed, it would need to be secure code... At the
| | 193894 [a2800276@gm ] Then the prerequisite would be secure hardware. It's not possible to
| | 193911 [krisleech@in] Mainly I want to be able to sell ruby/rails applications without doing a
| | + 193935 [a2800276@gm ] * if people copy your software illegally, they can do so whether the
| | | 193938 [krisleech@in] Its an application that deals with highly sensitive data, I dont want
| | | 193962 [leslieviljoe] You are talking about two different things: hiding code (algorithms)
| | | + 193999 [krisleech@in] Yes two things I am concerned with, I have also looked at Java and .NET
| | | | + 194042 [strobel@se u] Because this is a general problem, not depending on language.
| | | | + 194226 [halostatue@g] No, hiding code is useless.
| | | + 194023 [ryand-ruby@z] How true is that? Bypassing a license key check is a LOT different
| | |   194088 [leslieviljoe] What I'm saying is that bypassing a license key check in a binary and
| | |   194109 [kris@al er a] Only for programmers. A key can be found, but it can't be reversed to
| | + 193989 [drbrain@se m] It might, but we've never tried it.
| | + 194022 [ryand-ruby@z] Which obfuscator are you referring to? We've never even tried
| + 193892 [leavengood@g] Yep.
+ 194057 [hal9000@hy e] Google for the phrase "security through obscurity" (STO).
  194079 [alex@bl ck e] There's a useful difference between full security and a picket fence.
  194082 [krisleech@in] I know what this is. But I'm getting no helpful suggestions on this.
  + 194086 [hal9000@hy e] Oh, anything can be done... but is it worth it, and have you really
  | 194108 [kris@al er a] It would be a layer of protection that would at least prevent casual
  | + 194221 [drbrain@se m] We resist the development of something that is known not to work.
  | + 194228 [halostatue@g] Casual attacks aren't your worry. Trust me on this. If you treat your
  | + 194284 [hal9000@hy e] Are you crazy? What am I resisting?
  + 194092 [a2800276@gm ] You're getting plenty of helpful suggestions: it makes no sense to go
    194110 [kris@al er a] But it is more secure than open source.
    + 194126 [alex@bl ck e] Careful with your terminology.  It's more obscure than unencrypted
    + 194130 [a2800276@gm ] That's a different problem, typically solved by using secure hardware.
    | 194138 [krisleech@in] Agreed, but how do you hide the key from people with access to the
    | 194144 [leslieviljoe] The keys are not embedded in the program but are secured using the
    + 194137 [u.alberton@g] I'm no expert, but I know encryption keys aren't present in the source
      194140 [krisleech@in] An open source project compiled (open at design time) and software that
      + 194151 [u.alberton@g] How so? I don't think I've ever read anything about this before. Sure,
      | 194165 [alex@bl ck e] It depends on what metric you use for "secure".  If you use "minimum
      | 194285 [hal9000@hy e] Exactly. ;)  Just as a closed book is more secure than one lying open
      + 194229 [halostatue@g] You're confusing your terms. Compiled software is harder to