205118-207008

204882-239839 subjects 205260-209656

^ using the current method name within current method
205118 [matthew.heid] Is there a way to get the current method name within the current method?
205120 [dharple gene] In 1.9 (Ruby CVS HEAD) there is #__method__ and #__callee__: http://
205121 [aleks0 gmail] def get_mname
205130 [chiology gma] If you wanted to modularize it just for the sake of it, you could do
205150 [shortcutter ] You can rewrite that as
205243 [logancapaldo] I have a sneaking suspicion he might have done it with the global
+ 205336 [chiology gma] As much as I'd like to take credit for knowing its superior speed, I
+ 205400 [shortcutter ] Rehearsal --------------------------------------------
  205813 [aleks0 gmail] Depending on how you feel about mucking with core ruby types, a method
  205950 [shortcutter ] These methods are typically put into Kernel and made private.  Also, you
  206026 [chiology gma] I like that much better. That seems to fit in with the rest of how

^ Environment variables with empty value missing from ENV?
205123 [no.spam plea] Under Windows XP (using cygwin's bash, but native Ruby), I
205124 [znmeb cesmai] Have you tried this with Ruby 1.8.4? What does "which ruby" say?
205127 [znmeb cesmai] znmeb@DreamGate ~ $ export FOO=
205131 [no.spam plea] Yes, that's the way it should work. Same on Debian with 1.8.4
205137 [znmeb cesmai] Hmmm ... perhaps Ruby/Windows is stripping off or not stripping off an
+ 205138 [no.spam plea] There are no end-of-line characters stored in environment variables,
+ 205145 [nobu ruby-la] Win32 API GetEnvirionmentVariable() doesn't tell if the
| 205183 [ml.chibbs gm] As far as I know, Windows uses an empty env. var. as a signal to
| 205208 [nobu ruby-la] In accurate, Windows allows an empty env var, but cmd.exe (and
| + 205231 [ml.chibbs gm] Ok... thanks!
| + 205300 [no spam.plea] Thankyou!
+ 205147 [erikveen gma] I had the same problem a couple of weeks ago.

^ DRB ruby ACL problems
205125 [metrix1978 g] I have spent several hours trying to workout why drb ruby will not allow
205169 [cribbsj oakw] What error message are you getting when you try to connect to the

^ Session support for SOAP client
205136 [dtc.kay gmai] I have a web service with 3 methods: Login, Tasks and Logout.
206722 [nakahiro sar] You need to install http-access2 and set cookie file to a driver.

^ CHM files?
205139 [no.spam plea] In Debian Linux, there's a group of "libchm" packages that
+ 205140 [ksruby gmail] I'm not sure about debian, but ubuntu has libchm-bin package which
| 205142 [no.spam plea] Ahh, I thought it should have been done. Debian has it too, I just
+ 205153 [pbattley gma] Paul.
+ 205154 [dmitry.sever] Have you looked at http://sourceforge.net/projects/modchm/   ?

^ Re: Welcome to our (ruby-talk ML) You are added automatically
205146 [herbstwc gma] # guide

^ [UPDATE] More info on RubyConf 2006 registration
205155 [dblack wobbl] Registration for RubyConf 2006 is still scheduled to open on August 2,
205289 [joshua.messe] Loisiana or Los Angeles? ;) I'm in Los Angeles, but I'm more of a

^ Earn money easily
205163 [maxmexicana ] IF YOU EVER WONDERED IF IT IS POSSIBLE TO MAKE MONEY ONLINE AND DO SO

^ XCode 2.2.1 attaching to ruby process for debugging
205171 [yue_nicholas] I am developing an extension for Ruby and wish to debug it using

^ humanized Xml tree navigation
205174 [kiaroskuro g] Does anybody know of a library that allows to go through an xml tree as if
+ 205178 [hal9000 hype] I like the idea, but I'm unaware that it's been done
| 207008 [transfire gm] It's not really the best way to traverse XML becuase there's some
+ 205179 [pedro pedroc] My xmlcodec project will do this but you'll need to write some simple
| 205292 [ptkwt aracne] Nice.  I've done this sort of thing, but much more 'manually' than you
+ 205180 [canyonrat ma] <http://code.whytheluckystiff.net/hpricot/>
+ 205181 [nakahiro sar] 0% cat people.xml
| + 205190 [asbradbury t] That's really nice, I'd looked over that in the standard library. I've used
| | 205192 [kiaroskuro g] you guys sent me and see if I can throw away some code :-)
| + 205418 [hutch recurs] Nice! I didn't know about this.
|   206726 [nakahiro sar] Yes, Yes and Yes.  obj2xml and xml2obj is not for round-trip conversion
|   206991 [hutch recurs] I understand why you did this a little better after playing around
+ 205197 [tbray textua] Consider
| + 205201 [kiaroskuro g] uhm.. I admit I didn't think of that.  I guess I will have to write some
| + 205202 [dharple gene] class Foo
| + 205241 [logancapaldo] Workaround is the word <g>
| + 205275 [chneukirchen] document["vocab-item"].bla["second.form"]
| + 205291 [nakahiro sar] With xsd/mapping;
| + 205409 [hutch recurs] I feel *compelled* to mention xampl (<http://rubyforge.org/projects/
+ 205245 [2006 howell.] Your sample code looks a lot like RubyfulSoup. Although originally
+ 205261 [erikveen gma] I'm experimenting with this XML2RB [1]. The idea is to generate

^ Hpricot question
205175 [canyonrat ma] I'm trying to use Hpricot to clean up the text in a big site full of
205327 [canyonrat ma] Nevermind,

^ Ruby "Module" Repository?
205184 [david.weintr] I've been a Perl programmer for over 15 years, and I've decided to start
+ 205188 [halostatue g] Try the RAA (http://raa.ruby-lang.org), but that is just a list.
+ 205189 [james graypr] Welcome to Ruby.

^ cp * except .svn directories
205185 [markonlinux ] sorry if this is a repost! Don't know if it's Pan or my ISP but there's
+ 205187 [peter semant] Perhaps the svn export command is what you are looking for?
+ 205196 [listbox juli] rsync -arvz /from/ /to/ --exclude=".svn"
| + 205223 [kenosis gmai] And course you can simply run any of the above from a ruby script with
| + 205224 [kenosis gmai] And course you can simply run any of the above from a ruby script with
+ 205557 [Paul.vanDels] I think Julian Tarkh's solution is the easiest. But if you must do it in ruby, you can use
+ 205744 [markonlinux ] thanks to all for the suggestions. Paul, yep I settled on Julians solution
  + 205749 [markonlinux ] 'system' was what I needed. This is working!!
  + 205815 [kevin sb.org] It's because #exec replaces the current process with the new one. You
    205996 [markonlinux ] Thanks,

^ help with flexmock (please :-)
205191 [Tony.Day san] I suspect I am trying to misuse flexmock but I thought that I would ask

^ Re: state of unicode support (OT)
205194 [alex blackke] Off topic, what does/would that do?  Match a lower-case symbol?
205195 [tbray textua] Unicode characters have named properties.  "L" means it's a letter.
+ 205200 [alex blackke] Gotcha.  Thanks for that.
+ 205204 [listbox juli] That's one of the reasons why you _need_ tables when working with

^ Weird elusive bug using Comparable
205203 [pedro pedroc] class SimpleDate
+ 205206 [robin nibor.] def <=>(other)
| 205213 [pedro pedroc] Good idea. I'm gonna try it.
| 205214 [pedro pedroc] def <=>(other)
| 205217 [decoux moulo] Comparable#== catch StandardError
| 205220 [pedro pedroc] def <=>(other)
+ 205209 [shortcutter ] # shorter
| 205212 [pedro pedroc] How then? According to the docs if you implement <=> and include
| 205401 [shortcutter ] You get == but if you implement it yourself your version will shadow the
+ 205211 [decoux moulo] Try it with 1.9
  205215 [pedro pedroc] I don't have one around. Has this changed? I'd like to make this work

^ Does Ruby need a "line separator" class?
205207 [weyus att.ne] I've run into a problem where Ruby can't handle newlines on Windows
205219 [fxn hashref.] It shouldn't look for CRLFs. The rules of the game in languages that
+ 205221 [headius head] This has come up in the JRuby project fairly frequently since Java wants to
| + 205225 [weyus att.ne] FWIW, I'm pursuing this question because of the JRuby issue.
| | 205227 [headius head] I figured as much :) From what Xavier says, we may be closer (with Ola's
| + 205228 [fxn hashref.] If I am not mistaken, in Ruby that is delegated to stdio. After a
+ 205222 [weyus att.ne] Xavier,
  205235 [fxn hashref.] Yes, that is an important point.
  + 205237 [headius head] A large part of our problem is that we currently tend to normalize
  | 205239 [fxn hashref.] If those files are only handled by that application there is no
  + 205249 [fxn hashref.] Just for the archives, this normalizes in Ruby with only one pass
    205252 [weyus att.ne] I was thinking about this a little more.
    205258 [headius head] The issues get complicated, but the biggest underlying issue is that we
    205262 [weyus att.ne] In this particular case, could
    205264 [headius head] It's a bit more complicated than that...bring this up on the JRuby dev list

^ Getting a precise timestamp
205218 [angusma attg] I am new to Ruby and am trying to get the precise time (down to a fraction
205229 [ysantoso-rub] Time.new
205248 [angusma attg] It works. Thanks a lot for your help.

^ Re: Setting precision in Ruby-GSL calculations ?
205246 [Nuralanur ao] Dear Ed, dear Yoshiki,

^ Fwd: Please Forward: Ruby Quiz Submission
205250 [james graypr] ...

^ Fwd: Please Forward: Ruby Quiz Submission (88)
205251 [james graypr] charset=US-ASCII;

^ I thought this was the one that worked?
205256 [Eric.Armstro] #!/usr/bin/env ruby
205266 [logancapaldo] repeat is a local variable. class, def, and module introduce a new
+ 205268 [perrin apoth] As I understand it, this means that class, def, and module use dynamic
| 205277 [logancapaldo] All these examples are lexical scoping. Ruby doesn't really have
| 205286 [perrin apoth] Wait . . . you mean that *all blocks* are automagically lexical
| 205290 [logancapaldo] I'm not sure I understand your question. All blocks (by blocks I mean
| 205297 [perrin apoth] sub foo {
| + 205298 [lukfugl gmai] def foo
| | 205301 [perrin apoth] Who said it's different?  I'm just asking about the foregoing statement
| | + 205308 [logancapaldo] In ruby it does. I'm having difficulty thinking of a simple example
| | | 205320 [perrin apoth] Um, no . . . that's not the equivalent of what I just posted.  To make
| | | 205328 [logancapaldo] It's still a closure.
| | | 205344 [perrin apoth] That block, "lambda { puts @a }", is still making reference to a
| | + 205310 [ihatespam ro] Okay, the mere fact that you "used a Perl example" demonstrates that
| |   205322 [perrin apoth] I'm hoping that demonstrating how it does or does not work in Perl will
| |   + 205326 [hal9000 hype] I'm unfamiliar with your assertion that the context has to go
| |   | 205334 [perrin apoth] Closure
| |   | + 205340 [logancapaldo] In ruby this environment always exists for a block regardless of the
| |   | | 205345 [perrin apoth] I think that depends on what you mean by "creation of the closure" in
| |   | | 205346 [logancapaldo] I'm talking about what happens inside the ruby interpreter when it
| |   | | 205364 [perrin apoth] Arrrrrrgh.  We're talking past one another.  I can see where at least
| |   | | 205462 [Gennady.Byst] Chad,
| |   | + 205629 [hal9000 hype] I think "lexically" might be the key word there. Isn't it true
| |   |   205639 [perrin apoth] Lexical closures *are* "real" closures.  The term "closure" as it is
| |   |   205683 [hal9000 hype] I can't disagree with you. I have a friend, a very knowledgeable
| |   + 205348 [ihatespam ro] Well, I suppose the question can be directed only to those who know Perl
| |     205366 [perrin apoth] [ snip ]
| |     + 205385 [ihatespam ro] Well, I think that meshes just fine with my take on it...
| |     | 205392 [perrin apoth] I'm not exactly a C++ guy.  I suppose I'm more of a Perl guy than
| |     | + 205398 [dblack wobbl] You don't need the || (and hopefully that will continue to be the case
| |     | + 205468 [Gennady.Byst] class B
| |     |   205491 [perrin apoth] Great.  You just failed to answer the rest of my question, though.
| |     + 205563 [Eric.Armstro] I don't how everyone else will react, but this
| + 205307 [logancapaldo] Yes. It is just like perl.
| | 205323 [perrin apoth] Okay.  Looks like a closure.  It looks like a closure because of the
| | + 205329 [logancapaldo] def foo
| | + 205331 [dblack wobbl] It's a closure because it carries the context of its creation with it.
| |   + 205369 [perrin apoth] It sounds like what you're saying is that the lexical scope of the code
| |   | + 205388 [ihatespam ro] This seriously sounds like an "if a tree falls in the forest, does it
| |   | | 205393 [perrin apoth] Okay, let's translate that question into the terms we're actually
| |   | | + 205395 [fxn hashref.] Hahaha, in the next conference someone should bring a stick and hit
| |   | | + 205407 [logancapaldo] class A
| |   | | + 205425 [ihatespam ro] 3. If a lambda has the ability to access its context and nothing's around to
| |   | | | 205493 [perrin apoth] I don't.  A closure is a closure whether you use it or not, just as a
| |   | | | + 205497 [perrin apoth] Is a remote control for the TV still a remote control for the TV if the
| |   | | | + 205610 [ihatespam ro] I think 3 is a better example because in all the examples of (alleged)
| |   | | |   205612 [perrin apoth] That's why I went back to correct my analogy, such that in the new
| |   | | + 205632 [hal9000 hype] But there's always context. Even an empty block  { }
| |   | + 205406 [dblack wobbl] No; what makes something a closure, as I understand it, is that it
| |   | | 205496 [perrin apoth] That's far too broad to even be a meaningful distinction.  It's
| |   | | + 205505 [lukfugl gmai] Yes, this is exactly the point we've been trying to get across. Both
| |   | | | + 205509 [perrin apoth] Let's not.  Hair splitting actually came up in reference to the
| |   | | | | 205525 [lukfugl gmai] Actually, if you go back and read David's post [ruby-talk:205331],
| |   | | | | 205533 [perrin apoth] You were right, up to the point where you said "When he mentions hair
| |   | | | | + 205543 [lukfugl gmai] Ok, I've tried my bit at patience. I am certain now that you are being
| |   | | | | | 205547 [perrin apoth] You're wrong, and you can go screw yourself if you're going to start
| |   | | | | | + 205561 [lukfugl gmai] I apologize for my outburst. I was out of line in what I said. I was
| |   | | | | | | 205567 [perrin apoth] Le sigh.
| |   | | | | | + 205566 [Eric.Armstro] If I see another post like this one I'll create a
| |   | | | | |   205568 [perrin apoth] Thank you for your very one-sided view of the situation.  I really enjoy
| |   | | | | |   205570 [Eric.Armstro] Bye bye.
| |   | | | | + 205654 [dblack wobbl] No, I meant that my comments about whether blocks were closures was
| |   | | | |   205664 [perrin apoth] . . . so it was a complete non-sequitur?  Mea culpa.  I assumed that
| |   | | | |   205665 [dblack wobbl] Sorry -- at this point my head is spinning.  I really can't untangle
| |   | | | |   205667 [perrin apoth] No problem.  I've had to specifically choose to abandon some of the less
| |   | | | + 205636 [ihatespam ro] Maybe you know more about the implementation of blocks than I do but I
| |   | | |   205792 [lukfugl gmai] On 8/1/06, Just Another Victim of the Ambient Morality
| |   | | + 205507 [ara.t.howard] really?
| |   | + 205472 [lukfugl gmai] No, what he's saying is that what makes it a closure is exactly that
| |   |   205500 [perrin apoth] The current definition on Wikipedia is scattered, vague, and without
| |   |   + 205514 [lukfugl gmai] I don't necessarily agree with that, but it's incidental to my point,
| |   |   | + 205524 [perrin apoth] Good.
| |   |   | | 205536 [lukfugl gmai] Gymnastics? What exactly did I twist?
| |   |   | | 205544 [perrin apoth] My statement has been divorced of context by separating it from the rest
| |   |   | | 205559 [lukfugl gmai] I apologize. But in my defense, the rest of the paragraph (which
| |   |   | | 205569 [perrin apoth] Err, it seems self-evident to me, and I don't know how to make it
| |   |   | + 205626 [ihatespam ro] If you two agree then... why don't you improve it?  It's a wiki, after
| |   |   |   + 205642 [perrin apoth] I probably will.  Doing so during this discussion would have come off as
| |   |   |   + 205793 [lukfugl gmai] On 8/1/06, Just Another Victim of the Ambient Morality
| |   |   + 205765 [pit capitain] Chad, I didn't carefully read all of this long thread because I've been
| |   |     205794 [perrin apoth] While I've reached a point where I think I agree that all blocks can be
| |   |     205804 [lukfugl gmai] self is not just a memory address (well, not any more than any other
| |   |     205817 [perrin apoth] Are we sure, though, that we're not just looking at a number (associated
| |   |     205822 [lukfugl gmai] Actually, object_id is calculated from the reference itself.
| |   |     205825 [perrin apoth] That sounds plausible.  Okay, I believe you.  Heh.
| |   + 205391 [ihatespam ro] I would debate that it _is_ a closure because, although it's defined
| |     205397 [dblack wobbl] It's not exactly passed to the method, though.  You can capture it in
| |     205416 [ihatespam ro] ...and this would be a problem if the definition of a closure is the
| |     + 205419 [dblack wobbl] def x
| |     | 205438 [ihatespam ro] Now you're narrowly construing my statement to a ludicrous degree.
| |     | + 205444 [dblack wobbl] I'm just discussing the topic at hand, I think.  It's really not about
| |     | | + 205455 [ihatespam ro] The scope in the method "+" came and went.  The scope in the method
| |     | | | 205651 [dblack wobbl] I would say: control passes to the block.  The block itself is not
| |     | | | 205657 [dblack wobbl] (Nor, I should add, in the one in which it was created.)
| |     | | | 205666 [ihatespam ro] ...but does the definition of a closure require that the closure be an
| |     | | | 205669 [perrin apoth] Someone correct me if I'm wrong, but . . . I got the impression that the
| |     | | | 205678 [ihatespam ro] I know what you mean.  I was afraid that he meant "object" in the
| |     | | + 205506 [perrin apoth] Wait . . . are you serious?  Ruby is using dynamic scope here?  Ugh.
| |     | |   205520 [ara.t.howard] no.
| |     | |   205526 [perrin apoth] It's not lexical scoping if that "a" variable is separate from the "a"
| |     | |   + 205531 [ara.t.howard] a = 42
| |     | |   | 205534 [perrin apoth] If there's no "a", then perhaps you can tell me what the hell that is.
| |     | |   | 205542 [ara.t.howard] it's not that there is no 'a', it's that there is no enclosing scope.  the
| |     | |   | 205549 [perrin apoth] . . .
| |     | |   | 205553 [ara.t.howard] because in the original code
| |     | |   | 205572 [perrin apoth] Ahh, I see where you were going.  You were demonstrating that the "a" in
| |     | |   | 205576 [perrin apoth] gsub /state/, 'explain'
| |     | |   + 205532 [logancapaldo] Ah this is where you misunderstand. def does not close over a. defs
| |     | + 205504 [perrin apoth] If that's the case, then *everything else* is a closure too, because
| |     |   + 205513 [logancapaldo] Actually no one has access to a because it is a local variable.
| |     |   | 205521 [perrin apoth] The "a" to which I referred was the "a" that existed at "a = 1".
| |     |   | 205527 [logancapaldo] I know. It's still a local variable.
| |     |   + 205523 [ara.t.howard] 'has access to' and 'keeps a pointer to' are to totally separate things and
| |     + 205503 [perrin apoth] If any "thing" that has access to another scope is a closure, that makes
| |       + 205515 [ara.t.howard] class Object
| |       | 205519 [perrin apoth] That's not much of a closure, then.
| |       | 205528 [ara.t.howard] that's an absurd thing to say don't you think?  it's not bad or good - it is
| |       | 205530 [perrin apoth] No, I don't think it's "an absurd thing to say" -- it just doesn't have
| |       | 205540 [ara.t.howard] en·close   Audio pronunciation of "enclose" ( P )  Pronunciation Key  (n-klz) also in·close (n-)
| |       | + 205548 [ara.t.howard] they represent an entry for symbol lookup in which all variables are either
| |       | + 205551 [perrin apoth] We're discussing "closures", not "enclosures".
| |       |   205577 [ara.t.howard] Static scoping
| |       |   205597 [perrin apoth] So are "sex" and "reproduction", but they're not the same thing, and
| |       |   205616 [ara.t.howard] and yet
| |       |   205618 [perrin apoth] That's because it's about closures, which are not closures due to
| |       + 205620 [ihatespam ro] Again, there is context (in the English sense of the word) to what I
| |         205622 [perrin apoth] Define "from another scope", then.  The program as a whole is a scope,
| + 205460 [mvandegrift ] class Example
|   205517 [perrin apoth] Why?  Why should we keep trying unnecessarily complex examples that
|   205554 [mvandegrift ] In the hope that eventually an example might satisfy your all your
|   205562 [perrin apoth] The equivalent of line noise, distracting from the actual point of
|   205580 [logancapaldo] I was the person who originally said "every block in ruby is a
+ 205339 [Eric.Armstro] I swear to the heavens that it was an innocent question?
  205342 [logancapaldo] a = 1
  205372 [perrin apoth] This is one of the reasons that explicit scoping declarations are
threads.html
top