134202-138472

134079-136629 subjects 134465-135994

Case with strings
134202 [braempje@ne ] case key.strip
+ 134208 [flgr@cc n. e] case key.strip
| 134212 [braempje@ne ] Actually the code has less duplication, this was just an example. But why
| 134214 [flgr@cc n. e] Hah, I knew that you weren't supposed to use when like that. You're
+ 134216 [malteNOSPAM@] # You need the keyword 'then' here.

Class Methods
134209 [adelle@bu le] I have a routine that creates classes based on data retrieved from a
134211 [flgr@cc n. e] def self.foo() 'foo' end
134293 [adelle@bu le] Woohoo!  That was easy!  Thanks.

[ANN] RhizMail 0.1.0
134239 [sera@fh an .] I've just released RhizMail 0.1.0.

RCR 296: Destructive methods return self
134262 [daniel.amela] I know that it's not standard policy to announce RCRs on ruby-talk,
+ 134266 [dblack@wo bl] No war on RCRchive, please....  The 150 or so discussions of this
| + 134268 [dblack@wo bl] Actually you can do this as a minor edit, as the RCRs author.  (Silly
| | 134275 [daniel.amela] 'minor edit', I swear!
| | 134283 [dblack@wo bl] I manually fixed it -- it's 296 again :-)  (with the comments and
| + 134296 [hal9000@hy e] That's disappointing. I found that feature very convenient.
|   134298 [Daniel.Berge] Yeah, you're right.  I just used string literals instead of variables.
+ 134267 [ruby-ml@ma i] In data 3/19/2005, "Daniel Amelang" <daniel.amelang@gmail.com> ha
+ 134276 [daniel.amela] Perhaps a more interesting solution would be to get rid of all
  + 134278 [mailing-list] No they're not.  Where are you getting these assertions from?,
  | + 134279 [daniel.amela] I use ruby in the bioinformatics field. We deal with very long
  | | 134294 [mailing-list] How long?  Are you sure String is the class for you?  Is it possible
  | + 134287 [djberg96@ho ] noticeably
  |   134292 [mailing-list] Well, with slice!, you have to do more work than doing a slice.  The
  |   134300 [glenn.parker] Seems to me that the same logic should apply to gsub vs. gsub!, but it
  |   134329 [mailing-list] Hm, yeah, that seems reasonable.
  |   134338 [glenn.parker] AFAIK, that is not actually a requirement for a Ruby implementation.
  |   134346 [mailing-list] What does that mean?  That is how it's implemented in Ruby.  There's no
  |   134351 [glenn.parker] Sure there is: a Ruby implementation should implement the Ruby language
  |   + 134357 [mailing-list] RSTRING(str)->ptr is used in a lot of modules.
  |   | 134358 [ruby-ml@ma i] Forgot to respond to the previous post.
  |   | 134362 [mailing-list] That's a very good point.  There is definitely some sort of correlation
  |   + 134366 [dblack@wo bl] I would say that Thing X is a Ruby implementation iff Matz says it is
  + 134577 [matz@ru y- a] I don't like this proposal, since it loose some feature (modify
    + 134591 [glenn.parker] Backwards compatibility is lost.
    | 134631 [matju@sy pa ] Perl shows some cases of LISP-style multiple return values. Especially,
    + 134594 [daniel.amela] Yes, I am liking the proposal less and less as time goes on. And I'm
    | + 134598 [dblack@wo bl] str, = "hello ".strip
    | + 134691 [flgr@cc n. e] Of course that would be nice, but with Ruby's current multi-return-value
    | | + 134696 [Daniel.Berge] Hm...actually this reminds me of a Perl module called "Want" by Robin
    | | + 134739 [daniel.amela] Yes, with the current state of Ruby, you are right. But let's travel
    | |   + 134772 [csaba@ph ny ] What would get_mult_values return if it's used elsewhere, not as a right
    | |   | 134777 [daniel.amela] Sure, multiple return values are only accessable in an assignment
    | |   | 134788 [csaba@ph ny ] So the point is that we should not create a situation in which it easily
    | |   | + 134791 [flgr@cc n. e] Actually it's already used for both senses.
    | |   | + 134907 [daniel.amela] From what I can tell, the basis for your alternative syntax (**) was
    | |   |   135110 [csaba@ph ny ] You've misunderstood me. ** is not a proposed alternative syntax, it's
    | |   + 134790 [flgr@cc n. e] Yup, I tried to hint at that solution as an alternative in the email.
    | |   | + 134903 [daniel.amela] No need to apologize, I was just too blind to see it :)
    | |   | + 134905 [daniel.amela] No need to apologize, I was just too blind to see it :)
    | |   + 134810 [pit@ca it in] class C
    | |     134826 [matju@sy pa ] My only regret with that, is that I can't define a method whose "name" is
    | |     + 134837 [pit@ca it in] At least it's an interesting idea, but I imagine this would be hard to
    | |     + 135094 [matju@sy pa ] D'oh. Converting Fixnum to a string. Like,
    | + 134806 [transfire@gm] I do not think there's much hope for multiple return values of this
    |   + 134809 [cameron.mcbr] I'm not a CS guy, nor a language designer - but this looks intriguing.
    |   + 134820 [malteNOSPAM@] That's something I encounter often, too. It' especially tiresome when
    |   | 134861 [bg-rubytalk@] That happens to me too.  That's why I hope that with Ruby 2, Matz makes
    |   | 134880 [surrender_it] I agree with your hope, but notice that matz said more than one times
    |   + 134839 [flgr@cc n. e] Let's keep talk about this for a moment.
    |     + 134916 [daniel.amela] Obscure, yes, but it is interesting. The passing _in_ of arguments is
    |     + 134966 [transfire@gm] Ruby
    |     | + 134970 [ummaycoc@gm ] strip_result, strip_changed = *obj.strip!.values_at(:result, :changed)
    |     | | 134971 [ummaycoc@gm ] Note that I was just showing something for not using that temporary
    |     | | 134974 [transfire@gm] My, my! Infallible even while sleepy! :-) Not a problem. Thanks for
    |     | + 134978 [flgr@cc n. e] result and changed. It assigns the keyword return value with that name
    |     |   134985 [transfire@gm] name
    |     + 135111 [csaba@ph ny ] Are they in current CVS? And how to use them? I didn't find any info
    |       135119 [flgr@cc n. e] Hm, I'm not sure if the support has already been added to def, but the
    |       135222 [csaba@ph ny ] def x *a
    + 134620 [hal9000@hy e] Obviously I'm only expressing my opinion here, which often
    | + 134623 [billk@ct .c ] It looks a little silly, but it seems pretty straightforward
    | | 134657 [chneukirchen] I actually like that. :-) I think it's the best proposal of this thead
    | | 134689 [malteNOSPAM@] +1
    | + 134662 [phurley@gm i] I am curious, it is not the case that chaining the bang functions is
    | + 134682 [glenn.parker] Not all that silly looking, IMHO.
    | + 134711 [ruby-ml@ma i] +1 for interrobang!
    | | + 134714 [Daniel.Berge] I can't wait to be the first kid on my block to write a Kernel#wtf!?
    | | | 134840 [agorilla@gm ] +1!?
    | | + 134949 [ummaycoc@gm ] So, why not have an operator -> such that
    | |   + 134952 [ummaycoc@gm ] I of course meant
    | |   | 134956 [billk@ct .c ] # I suspect any of these ought to work, but we can try them all
    | |   | 134960 [ummaycoc@gm ] If you want to get in the way of some dead things that chase non-dead
    | |   + 134987 [transfire@gm] far
    | |     134989 [ummaycoc@gm ] But it is useful if you are not self-destructive (ie, you are still
    | |     135030 [transfire@gm] if
    | + 134728 [csaba@ph ny ] I also have a proposal which I tought to be half a joke, but since then
    |   134847 [sellberg@go ] I thought about it as well, but the idea has problems. One problem is
    + 134697 [bg-rubytalk@] I think this one is the most consistent way of doing things.  In a way,
      + 134733 [ruby-ml@ma i] In data 3/22/2005, "Ben Giddings" <bg-rubytalk@infofiend.com> ha
      + 134734 [matz@ru y- a] I want some syntactical support if cascading method call have to be
      | + 134792 [flgr@cc n. e] What do you think about Perl 6's given statement?
      | + 134802 [matju@sy pa ] Unlike Perl, Ruby requires a space between a $-prefix and a variable
      |   + 134807 [transfire@gm] Ruby
      |   | 134841 [flgr@cc n. e] And this is a very interesting alternative to the a.apply { strip!;
      |   | 134845 [rampant@gm i] class Sample
      |   | 134852 [flgr@cc n. e] While I'm not sure if I prefer this syntax it would still be acceptable.
      |   + 134843 [flgr@cc n. e] That is an interesting approach to viewing this.
      + 134857 [chneukirchen] I like the idea of a safe instance_eval (one that doesnt circumvent
        + 134860 [aredridel@nb] +1!
        + 134865 [bg-rubytalk@] There's also the idea that everything in the group would be assumed to
          135012 [chneukirchen] This would be inconsistent, which is bad.  If you really want that, go

(",) Do You Want To Know For Sure You Are Going To Heaven?
134286 [Ron038547@ya] ...

[ANN] Raggle 0.4.0
134288 [pabs@pa lo r] It's SHOCKING...  It's DARING!  It's INCREDIBLE!!
134373 [demerzel@gm ] Thank you for this. I have a problem though. I've installed
134374 [demerzel@gm ] Sorry for the noise. It seems to be some problem with terminfo on the

Announce: Qanah Enterprise eCommerce
134291 [jkugler@bi f] [Warning: this will be long.  My appreciation if you should read through

soap4r and nws.noaa.gov (moving from ruby-core)
134297 [tsuraan@xy n] Has anyone used soap4r with the US weather service's soap server?  I'm
138356 [nakahiro@sa ] client of this weather service for another person and find this article
138441 [tsuraan@xy n] The problem that I had was when I set various elements to false, the
138459 [nakahiro@sa ] Hmm.  Actually the sample retrieved all data.  And when I set false
138472 [nakahiro@sa ] Seems to be a simple XML structure as you said.  Here is an example.

Variable scoping
134308 [xrfang@ho ma] Recently I found a slightly annoying behavior in Ruby -- local variable
+ 134309 [vjoel@PA H. ] a=b=c=d=nil
+ 134349 [sroberts@un ] aNumber goes somewhere in the meta-class of Object, I think.

Call for Ideas/Developers: Qanah Open Source Enterprise eCommerce
134314 [jkugler@bi f] [I realized after I sent this that "Announce" in the subject might be

fun syntax.carldr.com trick for Emacs on OSX
134317 [mintxian.lis] A fun trick I whipped up to make syntax.carldr.com more useful to me.

Ruby Weekly News 14th - 20th March 2005
134318 [timsuth@ih g] Ruby Weekly News 14th - 20th March 2005
+ 134327 [dave@bu t. d] No, I didn't.
| 134387 [tim.sutherla] that
+ 134328 [flgr@cc n. e] It's officially UTC as far as I know.
+ 134552 [curt@hi bs c] Gee... I didn't even realize that happened. There is a new release of the

Ruby Weekly News 14th - 20th March 2005
134321 [tim.sutherla] playing up. Please send any feedback to timsuth@ihug.co.nz rather than

RubyonRails DB2 adapter and Windows
134330 [david.schons] I have tried some of the tutorials for RubyonRails. It seems great.

Values?
134339 [lists@be tr ] what's the use of class Values below Array?
134343 [ruby-ml@ma i] In data 3/20/2005, "Bertram Scharpf" <lists@bertram-scharpf.de> ha
134361 [lists@be tr ] I'm assembling a quick reference. I find out predefined

[QUIZ SOLUTION] Texas Hold'Em (#24)
134340 [tone_hole@ya] ...
134533 [angus@qu va ] [Derek Wyatt <tone_hole@yahoo.ca>, 2005-03-20 15.55 CET]
134867 [angus@qu va ] [Carlos <angus@quovadis.com.ar>, 2005-03-21 19.44 CET]
134870 [angus@qu va ] [Carlos <angus@quovadis.com.ar>, 2005-03-23 18.21 CET]
134883 [james@gr yp ] Most seem pretty tolerant of our ramblings.  I prefer solutions stay on
134891 [angus@qu va ] [James Edward Gray II <james@grayproductions.net>, 2005-03-23 20.07 CET]

(",) Do You Want To Know For Sure You Are Going To Heaven?
134342 [Ron038548@ya] ...

[ann] net-mdns-0.1 - multicast DNS and DNS service discovery
134363 [sroberts@un ] This is a complete rewrite of net-mdns-0.0. The major additions are a

Re: [SOLUTION] Texas Hold'Em (#24)
134369 [glenn.parker] #!/usr/bin/ruby -w

can WEBrick bind to port 0, and then tell me what port was allocated?
134370 [sroberts@un ] I don't want to use a hard-coded port number, I want it to bind to
+ 134371 [eemoragas@gm] maybe you can bind to port 0 then just query the socket which port it is on?
| 134375 [sroberts@un ] Maybe it wasn't clear, I'm asking about how to do this with WEBrick.
| 134377 [gotoyuzo@no ] % ruby -r webrick -e '
+ 134376 [gotoyuzo@no ] Setting :Port to 0 works like you want. However WEBrick
  134383 [sroberts@un ] Thank you for your suggestions.
  134448 [gotoyuzo@no ] I prefer nil than 0 for this behavior. It the specified port
  134498 [sroberts@un ] I can understand not liking 0, I think a :Port of zero would best be
  134632 [gotoyuzo@no ] using port 0. (please forget my last post;-)
  134667 [sroberts@un ] I think that you didn't notice that if nil is passed, it also causes a
  134890 [gotoyuzo@no ] I understand :auto clearly means its purpose, however I'd

Dynamically requiring files - scoping issues
134393 [gordonhartle] Given the source and output below, it should be fairly obvious what
134399 [vjoel@PA H. ] Briefly, Script.load and Script.require still read and eval the file,

Re: Texas Hold'Em (#24)
134409 [matthew.moss] I'll add my (partial, again) solution...  I didn't get a whole lot of

Another gem feature request (Re: Codefest Grant - RubyGems cleanup and enhancement)
134411 [dave@bu t. d] Uninstall should offer to uninstall dependencies (or at least list them).

Ruby, brother of VB?
134413 [mikecoxlinux] Visual Basic.  Visual Basic.NET is nothing like the old VB.  Having been
+ 134415 [ptkwt@ar cn ] Well, I wouldn't call Ruby (the Ruby we all speak around these here c.l.r
| 134421 [dave@bu t. d] I have been noticing recently, writing both VB and Ruby, that they do often
| 134422 [jamesUNDERBA] Wow.  We have very different VB exposure.  Most VB code I've worked with
| + 134425 [horacio.lope] Yeah, you get all sorts of language constructs both in VB and Ruby...
| | 134429 [jamesUNDERBA] Mr. Bunny's Guide to ActiveX
| + 134431 [dave@bu t. d] I've certainly imported chunks of Windows API, and built pages of wrapper
|   + 134433 [jamesUNDERBA] That was in another life, but, given another thread going on here, I'm
|   | 134435 [dave@bu t. d] That is cool. My other life doesn't even have computers in it.
|   + 134442 [jkugler@bi f] That is THE number one thing I miss about VB.  Not that I really like VB
|   | 134444 [dave@bu t. d] - Ruby Documentation plugin integrated (hit F1 to launch the plugin,
|   | 134472 [curt@hi bs c] Yes, it does... and its *really* nice!
|   + 134502 [rob.02004@gm] I'm hoping to implement this style of code completion in a Ruby Editor
+ 134418 [jamesUNDERBA] Forget all the VB you've ever learned.  Really.  I was a VB hacker for
+ 134420 [horacio.lope] [sinp all good stuff]
+ 134447 [centrepins@g] Mike

equivalent idiom for ruby " perl -pe 's/(\d+)/localtime($1)/e'"
134414 [botp@de mo t] forgive my perl ignorance, but how do you convert the ff perl idiom to
+ 134416 [jim@fr ez .o] I think it would be
+ 134417 [james@gr yp ] ruby -pe 'gsub!(/\d+/) { |t| Time.at(t.to_i) }'
  134419 [jason.sweat@] cat /var/log/squid/access.log | ruby -pe '$_.gsub!(/^(\d+)/,
  134427 [michael.camp] No need for "cat" there.
  134432 [jason.sweat@] Yes, I started from what Jim Freeze posted above, and switched to the
  134436 [eban@os ri .] $1 becomes a result of the match last time, beause $1 is
  + 134440 [botp@de mo t] //  ruby -pe '$_.gsub!(/(\d+)/, Time.local("\\1".to_i).to_s)'
  | + 134441 [botp@de mo t] //$1 becomes a result of the match last time, beause $1 is
  | + 134478 [jim@fr ez .o] Oops. I should have submitted the block version of gsub.
  + 134512 [flgr@cc n. e] ...

Re: IORCC Crossword and Wordfind Puzzles
134424 [iorcc@ya oo ] Here is a neat Ruby-centric 84 word crossword puzzle.  To follow will

RCR to warn about ++ and --
134428 [aredridel@nb] I'd like to propose a warning for ++ and -- being used, as they're

Re: n body problem
134443 [jzakiya@ma l] tried
+ 134525 [igouy@ya oo ] Manual loop unrolling is one optimization too many.
| + 134626 [jzakiya@ma l] I'm a litlle tired, and will respond more fully later, but I felt
| | 134859 [igouy@ya oo ] You're welcome to your opinion - and we're happy to include the program
| | + 134872 [rhkramer@gm ] Just to inject my $.02, I'd say both types of benchmarks are useful.  IMHO,
| | + 134874 [angus@qu va ] [Isaac Gouy <igouy@yahoo.com>, 2005-03-23 17.34 CET]
| |   + 134886 [martindemell] I sort of agree with you - looping over a Struct is an unnecessary
| |   + 135045 [igouy@ya oo ] program
| + 134877 [surrender_it] I think there is a thing that you may have not noted and could make your
|   135046 [igouy@ya oo ] your
+ 135178 [igouy@ya oo ] nbody Ruby #2
  135188 [premshree.pi] Unfortunately, we don't share the same home. :-)
  + 135202 [igouy@ya oo ] ...
  + 135251 [igouy@ya oo ] And I guess you don't know what this discussion thread is about.

Compiling when libedit is in path  Is there a trick to compiling Ruby when libedit must exist in the search path?  Can you statically link to readline 5.0 in some manner?  -- Lon Baker
134446 [lon@sp ed ma] Is there a trick to compiling Ruby when libedit must exist in the
134452 [csaba@ph ny ] Could you be a bit more verbose?

[ANN] FireRuby 0.2.0
134463 [peter@nj ni ] FireRuby Version 0.2.0

string.tr and \
134464 [tamc2@ca .a ] I'm a little confused and would appreciate your help.  I would like to
+ 134468 [lists@be tr ] 'b\\c'.tr '\\\\c', '.'
+ 134469 [angus@qu va ] [Tom Counsell <tamc2@cam.ac.uk>, 2005-03-21 11.43 CET]
+ 134473 [bob.news@gm ] "Tom Counsell" <tamc2@cam.ac.uk> schrieb im Newsbeitrag
  134500 [chneukirchen] String#delete exists.
  134504 [bob.news@gm ] "Christian Neukirchen" <chneukirchen@gmail.com> schrieb im Newsbeitrag
  134550 [lists@be tr ] String#delete will be called when tr's second parameter is
threads.html
top