161186-165085 subjects 161529-197832

byte order issue
161330 [robert.evans] ...

161335 [tonikarhu@gm] Does anyone know how i would check if a domain name is available in
161341 [tokikenshi@g] Try http://raa.ruby-lang.org/gonzui/markup/whois/whois.rb

Inheriting yaml attributes
161340 [Alexander.J.] ...
161361 [pit@ca it in] return (super + %w{ @url })

Searching for a name
161342 [ruby.brian@g] I'm currently polishing my priority queue implementation, and I'm in
+ 161345 [bob.news@gm ] How about
| 161348 [ruby.brian@g] I assume you use deq as a short for dequeue. In this case I have the
| 161355 [bob.news@gm ] removed. :-) Does this method return the prio of the last removed element
| 161358 [ruby.brian@g] Sorry if I was not clear, english is not my native language. I tried
| 161431 [ruby-ml@ma i] I am still not sure :) By 'this method', do you mean delete/dequeue?
| 161481 [ruby.brian@g] delete_min_return_priority deletes the key that has the lowest
| + 161511 [bob.news@gm ] Honestly, what would anyone do with this method?  Removing the key and
| + 161608 [martindemell] gsub('delete', 'extract') perhaps
+ 161532 [neoneye@gm i] Array#shift is a nice name.

attaching code to run on regular expression match
161351 [eyal.oren@gm] I am parsing query expressions, using a regular expression with
+ 161354 [ruby.brian@g] Maybe you can refactor your regexp to be used with scan.
| 161357 [eyal.oren@gm] I am not sure that would help, I need to know which of the matches
+ 161356 [bob.news@gm ] No, I don't think it's possible.   You can do this
+ 161359 [pit@ca it in] string.scan(/(\w+):(\w+)/) do |m1, m2|
  161360 [eyal.oren@gm] thanks. that might work, but the problem is I think in the unions of
  + 161363 [pit@ca it in] OK, thanks for your example. I think the regexp engine of Ruby 1.9
  | 161386 [kballard@gm ] Oniguruma is indeed the regexp engine of Ruby, but are you sure named
  | + 161387 [christophe.g] I thought Oniguruma was not yet the regex engine of Ruby, but would become it
  | + 161388 [james@gr yp ] Ruby 1.9 you mean.
  | + 161389 [gavin@re in ] Oniguruma is only the engine in versions 1.9+; versions 1.8- use a
  + 161365 [ruby-talk@ba] could use a similar pattern,

Extract Tests from rdoc Examples
161353 [ruby.brian@g] I remember that Bill Kleb once proposed a method to extract tests from

Array.sort when it's items are String inheritors with redefined <=> works like if not redefined
161378 [ mig@19 4. z] I want to have a string which, if in array, will be sorted like numbers.
+ 161384 [bob.news@gm ] I think there is an optimization going on that doesn't use <=> for String
+ 161390 [matz@ru y- a] Why not use sort_by, much simpler solution?
| 161393 [james@gr yp ] puts a.sort_by{|x|x.to_i}.join(',')
| 161403 [matz@ru y- a] Oops, you're right.  Thank you for correction.
+ 161397 [Ara.T.Howard] class Array
  + 161402 [sean.ohalpin] I thought sort_by was a packaged form of the Schwartzian transform, i.e.
  | 161407 [Ara.T.Howard] you are quite right sean - i guess that only applies to the op's original
  + 161424 [leavengood@g] def sort_as(&block)

WEBrick & forms using post
161394 [mccarthyjame] Im trying to write a webrick servlet to process a html form.
161470 [ysantoso-rub] A WEBrick servlet is not a CGI, so, doing require 'cgi' is just a
161610 [mccarthyjame] cheers, exactly what I was looking for.

Advantages of Ruby
161399 [rjack@el ga ] I am new to Ruby. I have done most of my development in statically
+ 161406 [halostatue@g] other implementations are much larger.
+ 161417 [bob.news@gm ] One of the major advantages is that you get polymorphism without the need
+ 161429 [ef@al m. it ] by a factor of 11, despite having all the same functionality.
  161684 [chneukirchen] Getting off-topic, but this is a vast misjudgement of Lisp.  Lisp

Test of Google Groups
161409 [transfire@gm] Sorry for noise. Just ignore this post.
161411 [transfire@gm] Okay this is my test.
161425 [transfire@gm] FYI, it's NOT Google Groups. Sorry for the noise. We, now return you to

Re: Cut-based AOP
161423 [transfire@gm] As the RCR points out, this is purposeful and with good reason. We've
161426 [jeff.darklig] Thank you for the clarification.

When should x.eql?(y) != (x == y) ?
161430 [hgs@dm .a .u] I've read ri Object#== and seen how .eql? is usually the same as ==

namespaces implemented in ruby
161439 [pbrannan@at ] Rich and Nathaniel and I were standing around at the conference this
161567 [nbarnes@gm i] I hate to interrupt a techincal and probably excellent initial post
161641 [pbrannan@at ] The goal behind namespaces is the same as David Alan Black's Ruby
161706 [ruby-ml@ma i] The granularity used for declarations above would typically not be necessary.

161440 [xeno@es im .] #!/usr/bin/ruby

RubyMan - a Ruby binding for RenderMan - namespace question
161442 [noSpam@no pa] (see http://www.aqsis.org/ or http://www.renderman.org/ for more info),
161445 [hgs@dm .a .u] I think it will cause some confusion.  Would REND be sufficiently

161443 [xeno@es im .] #!/usr/bin/ruby

161444 [pertl@gm .o ] b x.sort_by { |v| if v ; 1 else 0 end }
161461 [ruby.brian@g] What is bigger, a true or a false? One might argue that the truth is
161543 [matz@ru y- a] Sorting is to reorder items according to their value order.  How can
+ 161553 [fabjcn@ya oo] Besides, why would you want to sort on only two values ?
+ 161787 [xeno@es im .] Another perspective is sorting is to bunch things into realms of like
  161788 [xeno@es im .] I'm a firm believer in things working in parallel.  If you can define an

Embedding Ruby in a C++ application...
161448 [steve_rubyta] I understand from the documentation that when I embed Ruby in a native
161452 [nightphotos@] Ruby 2.0 will support native threads.
161627 [steve_rubyta] Thanks, that is fantastic news...
161727 [wilsonb@gm i] YARV is the VM/thread implementation that will be present in Ruby 2.0.

Method annotation and anonymous functions
161449 [stevetuckner] I want to start a discussion about two things that Matz talked about at
+ 161451 [pbrannan@at ] private def foo(a, b, c)
| 161471 [stevetuckner] ...
| + 161484 [pbrannan@at ] Changing def to return a Method object could also be done, but this is a
| + 161645 [pbrannan@at ] private \
+ 161460 [dblack@wo bl] x = def (a=1,b=2)
| + 161475 [stevetuckner] x = def(a=1, b=2); ...; end
| + 161482 [pbrannan@at ] I like this too.  And there's no reason IMO why we can't have both
|   161490 [sean.ohalpin] I agree. See the thread "Anonymous methods, blocks etc. (Cont.
|   161707 [pbrannan@at ] [ruby-talk:150709] is what I think you meant.  The discussion actually
+ 161472 [transfire@gm] I just finished (are we ever "finished"?) an annotations system that is
| + 161478 [stevetuckner] From the replies I got so far, it seems as though "clean solutions"
| + 161574 [itsme213@ho ] That would be the best solution. Specially if MethodName was aware of
|   161576 [transfire@gm] Whoa! You may have just killed many a big bird with one ity bity hook!
+ 161545 [matz@ru y- a] Probably I will not use "def" for anonymous function, because there
| 161550 [jeff.darklig] Most languages define some token that specifically states method attribute...
| + 161552 [jeff.darklig] Of course, my use of '->' doesn't take into consideration the
| + 161555 [dblack@wo bl] David
|   161556 [jeff.darklig] Yes it would, but I don't see another way to do attribution of methods
|   + 161557 [transfire@gm] class X
|   | 161560 [dblack@wo bl] Ugh, if I may permit myself the expression  That means goodbye to
|   | + 161566 [jeff.darklig] ... the attributes have NOTHING to do with duck typing... that was
|   | | + 161570 [eric_mahurin] Attributes don't do a whole lot of good unless there is a
|   | | + 161628 [dblack@wo bl] The thing is, I've spent literally years watching literally dozens and
|   | |   + 161634 [sastph@sa .c] +1
|   | |   | 161636 [christophe.g] +100 (or is that not allowed to add so many points at once? ;) )
|   | |   + 161643 [hutch@re ur ] What punctuation has to be added? I like the way it is done in the
|   | |     161687 [jeff.darklig] ...
|   | + 161568 [eric_mahurin] I'll be the devil's advocate...  A good use of something like
|   | | 161571 [jeff.darklig] Seriously ....
|   | + 161573 [transfire@gm] Perhaps a bad example, b/c as Jeff said, it has no actual effect on
|   + 161559 [dblack@wo bl] I think I'm coming from a different perspective.  I haven't seen any
|     161651 [pbrannan@at ] It's useful for documentation.
+ 161586 [ruby-ml@ma i] Oh please no! Annotations are, as can be inferred from the name, comments on the
  161602 [gwtmp01@ma .] A couple thoughts.

Functional with Ruby
161450 [Andreas.Semt] here a really simple Haskell function, which sums all elements of a list
+ 161454 [tomsonp@ee p] Ummm, why wouldn't we be able to use inject?  I was under the impression that
+ 161455 [leavengood@g] What's wrong with inject? I find this very readable and not any more
| + 161459 [leavengood@g] One small thing, I had the order wrong on the parameters (i.e. the
| + 161489 [james@gr yp ] That can get a bit shorter too, since you don't need the (0) part.
|   + 161494 [flori@ni e. ] Yeah. And I always hated it, that your program is going to crash, if "a"
|   + 161495 [leavengood@g] Yeah I figured that out after posting, hehe (at the same time ri told
+ 161456 [ef@al m. it ] But inject *is* functional!  It's equivalent to Lisp's accumulate.  It
| 161466 [louis.j.scor] ...
| + 161467 [Ara.T.Howard] i don't think it is functional because the name of the function cannot be used
| | 161477 [ef@al m. it ] Well, that's true of Ruby in general.  If you want to turn a method
| | 161673 [jeffrey.dik@] I believe you mean...
| + 161468 [flori@ni e. ] foldr            :: (a -> b -> b) -> b -> [a] -> b
|   161480 [louis.j.scor] ...
|   161491 [flori@ni e. ] I think the point is, that you can use foldr, a function that is defined
|   + 161504 [louis.j.scor] ...
|   | + 161509 [louis.j.scor] ...
|   | + 161530 [flori@ni e. ] One of the main problems for Ruby in being a functional programming
|   + 161507 [bob.news@gm ] AFAIK it's implemented in module Enumerable but apart from that you're
|     161531 [flori@ni e. ] You're right. And I knew that. ;)
|     161599 [bob.news@gm ] Yeah, I wouldn't want to go that much into the details. I also forgot to
+ 161457 [flori@ni e. ] def list_sum(l)
| 161772 [dblack@wo bl] Just for fun I was trying to see how visually close I could get to the
+ 161462 [Ara.T.Howard] list_sum = lambda{|*list| list.flatten!; list.empty? ? 0 : list.shift + list_sum[list] }
| 161572 [dave@bu t. d] OK, this is the first actually functional post -- list_sum is a first-class
| 161583 [Ara.T.Howard] class << self
| 161596 [dave@bu t. d] Quite. Module#method is one of Ruby's most underrated methods.
+ 161506 [john.carter@] I'm not going to answer your concrete question. I'm going to answer the
+ 161769 [w_a_x_man@ya] irb(main):011:0> def sum(a,i)
+ 162006 [andreas.semt] so many thanks for all your answers!

"Connect Four" (was Re: Tic-tac-toe checking)
161453 [dooby@d1 .k ] (e.g. 4 from 6)

Compiling on AIX
161458 [wrbriggs@gm ] I'm just about at my wit's end here...  I am trying to compile Ruby
161738 [wrbriggs@gm ] So I had ok luck compiling on an AIX 5.3 box, but unfortunately I have
161751 [wrbriggs@gm ] Ok, I've managed to get things to compile up to the socket library,
161756 [nobu.nokada@] Yes.  Generated Makefile doesn't contain "ARCHFILE = ruby.imp"
161771 [wrbriggs@gm ] what I hope is a fully functioning Ruby install under AIX 5.1).  Here
161779 [nobuyoshi.na] Although you can also use

Can't type {, }, [ or ] in irb
161464 [rohdester@gm] As mentioned in subject when in irb I can't type the following
+ 161474 [rictic@gm il] What platform are you on?
+ 161497 [halostatue@g] Taking a guess, you're using the Ruby Installer for Windows and you're
  161535 [rohdester@gm] Yes, I'm on Windows XP and used the installer, as well as a non-US
  + 161539 [halostatue@g] Note that the file that was mentioned was *specifically* for the
  | 161541 [rohdester@gm] Yes I know. But I just can't seem to get it to work. But I'll just use
  | 161551 [surrender_it] I guess you need to set an INPUTRC environment variable pointing to your
  + 161593 [matthias-lue] My current 'workaround' is to simply switch to an english keyboard

Rails 1.0: Release Candidate 2
161469 [david.heinem] The release of 1.0 is near upon us! It has been a long time in the
161493 [caleb@ae -t ] Is it possible to download the .gem files from somewhere?
161496 [chadfowler@g] You can always get them from http://gems.rubyforge.org/gems/.
161499 [caleb@ae -t ] I didn't see the RCs there.  A mirroring delay or perhaps they just haven't
161500 [jamis@37 ig ] Rails 0.14.1 is RC2. However, it looks like somehow only the rails
+ 161503 [david.heinem] Sorry about that, chaps. It's all good now.
| 161515 [Ara.T.Howard] [ahoward@localhost ~]$ sudo gem install rails --source http://gems.rubyonrails.org --include-dependencies
| + 161518 [tom@in oe he] ===================
| | + 161522 [tom@in oe he] Argh, note to self, read messages more closely - I didn't see the
| | + 161523 [Ara.T.Howard] hmmm.
| + 161520 [jamis@37 ig ] Yah, it's a consequence of gems only knowing about a single
|   161524 [Ara.T.Howard] - accept multiple --source arguments
+ 161648 [caleb@ae -t ] Righto, but I was looking to download the .gem file and not actually do any

[ANN] Introducing SwitchTower: Distributed deployment for Rails
161476 [david.heinem] SwitchTower is a utility for executing commands in parallel on

wsdl2ruby.rb (SOAP4R) generator not working properly
161479 [lgalea@gm so] I'm trying to run wsdl2ruby.rb against an WSDL and I'm getting a
161615 [mikkel@gm il] try http://groups.google.com/group/soap4r

Gem server performance
161485 [chadfowler@g] FYI, users were reporting timeouts on the gem server at RubyForge

[SCIRUBY] cfruby - cluster management made easy
161486 [Ara.T.Howard] check out the sciruby weekly spotlight
161558 [drosihn@gm i] Interesting.  In my case, I'm more interested in the "tools for emulating and

Why Yet Another Ruby VM?
161498 [rjseagraves@] ...
161502 [matz@ru y- a] Just because it's easier for us to implement all the features in

Ruby 1.8.3 and RubyGems
161508 [tom@in oe he] There seems to be a problem with Ruby 1.8.3 and RubyGems; it's a YAML
+ 161510 [caleb@ae -t ] Please please please don't do this.  Release a new version instead (and delete
| 161512 [tom@in oe he] Ah, good thought.  Right on.
+ 161795 [sylvain.joye] Does anybody knows it it *is* fixed for sure, and where ? (In Ruby CVS ? In

DateTime.parse and long time zone names
161514 [Daniel.Berge] Does anyone out there have a patch to date/format.rb (i.e.
161521 [Ara.T.Howard] irb(main):015:0> RUBY_VERSION

DbC, const and freeze.
161517 [john.carter@] Hmm. I tend to do Test Driven Development and Design by Contract.
161659 [leavengood@g] irb(main):001:0> class Object
+ 161676 [shortcutter@] else have it truncated at their news server, too?
| 161726 [drbrain@se m] No, its not (well, you don't get the original back).
| 161733 [bob.news@gm ] I meant, it's missing from the sample implementation.  But: Marshal does
+ 161724 [drbrain@se m] Does not freeze instance variables.

vimrc and Ruby
161525 [me@da eb tt ] Does anybody have a .vimrc file geared specifically for Ruby development?
+ 161575 [tim@ve et .a] ~/.vimrc ??  No.  I keep Ruby-specific vim config data in
+ 161617 [hgs@dm .a .u] I have
| + 161642 [hutch@re ur ] Thank you Hugh! I added a few things to my .vimrc file based on yours
| + 161699 [me@da eb tt ] Hugh,
+ 161763 [ mfp@ac .o g] It creates a :B command that will turn

DRb Basics
161527 [james@gr yp ] I'm finally getting around to playing with DRb and I have some
+ 161546 [jeff.darklig] I know your question is/was about DRb but Roxy will do the block.
| 161635 [james@gr yp ] Just to be clear, DRb *does* do the block.  I'm just trying to figure
| + 161685 [jeff.darklig] ...
| + 161722 [ysantoso-rub] The block stays with the the caller and the method on the remote
|   161729 [drbrain@se m] Objects can be dumped or not dumped.
+ 161565 [r.mark.volkm] I recently gave a presentation on DrB and Rinda at the St. Louis Ruby
| + 161600 [dave@bu t. d] "You are not a member of the group stlruby.
| | 161637 [james@gr yp ] You can click Home, join the group, and then get the file.
| | 161646 [dave@bu t. d] But what if I don't want to join the St. Louis Ruby Users Group? I don't
| | 161683 [r.mark.volkm] I tried to attach the presentation to an email, but it was rejected
| | 161748 [dave@bu t. d] Thanks, it looks great.
| + 161956 [james@gr yp ] This was tremendously helpful to my studies!  Thank you so much.
|   162064 [r.mark.volkm] You're welcomed. Any feedback on this is welcomed. If there are errors
+ 161753 [james@gr yp ] James Edward Gray II
+ 161955 [james@gr yp ] I have learned a little now and can sort of answer this, I think.