256428-257157

256259-258522 subjects 256660-262622

^ Sun Cobalt RaQ 550 Installation
256428 [landa landae] I tried to install Ruby per the instructions on

^ How can I implement cd (change dir) command in Ruby?
256429 [sam.s.kong g] This question is rather out of curiosity than practical.
256431 [sami.samhuri] Only if your shell is done in Ruby as well. chdir(2) changes the

^ Ruby doesn't know how to multiply
256447 [rjprado gmai] Dear friends, today I have stumbled into a really weird problem. Try
+ 256451 [juapdiaz gma] ...
| 256455 [james graypr] James Edward Gray II
| 256456 [juapdiaz gma] ...
| + 256459 [a.r.ferreira] Some numbers (like 0.1) cannot be represented exactly in binary with a
| | + 256463 [rjprado gmai] I'm starting to remember something about that on my computer
| | | 256468 [mental rydia] I guess it goes to show that one never really escapes this stuff,
| | + 256599 [rick.denatal] Actually in any base there are fractions which cannot be represented with a
| + 256460 [mental rydia] Not all numbers can be represented by an arbitrarily small number of digits, and floating-point numbers only have so many digits available (for Ruby, 53 binary digits, which is about 16 decimal digits).  In this case, the computation required more than 53 bits, so the result was approximate.
+ 256453 [ruby anthrop] % irb
+ 256454 [gregory.t.br] It's not a bug.  It's the way floating point arithmetic works, and is
+ 256457 [mental rydia] This happens in all languages that use floating point to represent decimal numbers (you will get precisely the same result in C or Javascript or Perl, for instance).  Floating-point arithmetic is only approximate, so the result does not _exactly_ equal 8.97, even though it is very close.
| + 256458 [juapdiaz gma] ...
| + 256461 [rubylearner ] ...
| + 256782 [ shot hot.pl] ...
|   256798 [apeiros gmx.] I think Float#== as it is is fine. Arguably it could use delta
|   + 256807 [gregory.t.br] I'd prefer in_delta?, but I think this is a great idea.  Maybe you
|   + 256833 [ mfp acm.org] Comparing floating-point values different from 1.0?
|   | 256842 [gregory.t.br] I'd say no default.
|   + 257009 [nobu ruby-la] What about Float#neary= ? :)
|     257010 [alex blackke] Float#=~ isn't being used for anything...
+ 256462 [rjprado gmai] Yes, you are all right. It's a common problem. I have confirmed this
  256484 [lloyd 2live4] I tried this in Delphi, smalltalk and oracle SQL and got the correct
  256509 [matz ruby-la] Interesting.  There are a few ways to get the "correct" result.
  + 256512 [_mwryder wor] A simple way to get the correct figure is to do what is used often with
  | 256514 [gregory.t.br] Much better is to store the numbers as integers and convert to
  | 256517 [Rob AgileCon] Which are just different ways of saying "fixed point numbers" that
  | 256519 [_mwryder wor] I think we have a difference of understanding of what fixed point means.
  | + 256524 [botp delmont] # My simple calculator is more precise for some math operations than my
  | | 256546 [_mwryder wor] I'm not trying to denigrate the project but it looks like it is still in
  | | 256577 [gregory.t.br] Um... BigDecimal part of the ruby standard library.  What is 'alpha' about it?
  | | 256597 [_mwryder wor] My mistake.  When I entered bigdecimal in the search screen at Ruby
  | | + 256600 [gregory.t.br] There is also a page in the stdlib section of Pickaxe II
  | | + 256605 [Rob AgileCon] ...
  | + 256593 [dan-ml dan42] Basically you are thinking of
  |   256601 [_mwryder wor] I have been using Business Basic for over 25 years and it is what I
  |   256646 [botp delmont] # I have been using Business Basic for over 25 years and it is what I
  |   + 256649 [caduceass gm] Yes, basically what you are dealing with is how the object is
  |   + 256689 [znmeb cesmai] As a matter of fact, the BigDecimal library comes with some scientific
  + 256534 [kubo jiubao.] Oracle uses base 100 floating numbers.
  + 256602 [rick.denatal] matz,
    + 256679 [robert.dober] Same for Gnu Smalltalk.
    + 256898 [lloyd 2live4] 7.4
      256918 [logancapaldo] ...
      256953 [lloyd 2live4] oops!  Sorry.  Yes, it is VisualWorks 7.4

^ pickaxe ruby extension example.
256448 [beingthexemp] Strange, I had the extension working a while ago from the pickaxe book.

^ Ruby/Zoom, Yaz problem
256465 [chris.stearn] Ok, I have successfully built Yaz and Ruby/Zoom on Feisty Fawn and OS

^ Modular classes and avoiding extension clashes
256466 [transfire gm] Ruby-talk: 240334
256467 [juapdiaz gma] ...

^ How do I intercept creation of fundatmental types, eg. []
256470 [mobiledurant] I'm new to ruby and I love the introspection and metaprogramming
+ 256474 [juapdiaz gma] ...
+ 256479 [mental rydia] It isn't possible without modifying the interpreter; in the latter case,
  256481 [vjoel path.b] def mkary

^ Problem with gems
256472 [cypher.dp gm] I just installed some gem but when I want to use it Ruby comes up with
+ 256475 [mental rydia] Did you require 'rubygems'?
+ 256477 [chris.stearn] require 'rubygems'
  256562 [cypher.dp gm] Okay, now it's working.

^ code source
256478 [juapdiaz gma] ...
256511 [gregory.t.br] Can you try to explain that more clearly?  I don't think you've given
256520 [reid.thompso] I think he might want to know where to get the source code???

^ Unit Testing Custom Validation Method
256480 [leah aput.ne] Hey there
256596 [leah aput.ne] I've also tried adding this
256838 [leah aput.ne] Alrighty, I have a solution...

^ string search
256487 [ja_bowen yah] @speed += 1 if sp.slice(8..13) == "03X16"
256490 [TimHunter nc] @speed += 1 if (/03\d16/.match(sp.splice(8..13)))

^ Problems with Rubyzip
256491 [billb ti.com] I am having a problem with Rubyzip when I try to archive numerous

^ Help with a common problem
256504 [Schiavi007 c] I'm a very new programmer and was reffered to Ruby from a friend.
+ 256513 [_mwryder wor] Have you checked your path to be sure that ruby\bin is there?
+ 256550 [shortcutter ] Did you actually install Ruby on that system...

^ Re: How do I intercept creation of fundatmental types, eg. [
256505 [mobiledurant] Ah, that's too bad. I was encouraged by seeing the count method show up
256507 [mobiledurant] Sorry, that does not work ... I was inheriting an orig_new in "class

^ Traits in Ruby
256516 [cypher.dp gm] I just read a nice article about traits and now I'm wondering if
+ 256566 [cypher.dp gm] Okay, maybe I should search more carefully next time :-)
+ 256655 [phillipsds y] No idea about the future roadmap for Ruby, but this is an interesting

^ newbie question - undefined method `replace_session_timeout' for main:Object (NoMethodError)
256521 [warrene33 gm] I'm a newbie to ruby, and programming really...
256523 [m_goldberg a] The Ruby interpreter needs to see the definition of
256571 [warrene33 gm] Wow. That simple. Thanks

^ [ANN] keybox 1.1.1 Released
256525 [jeremy hineg] ...

^ Dynamic method creation
256526 [wilsom8 rpi.] the pieces from that?  I can find how to add methods dynamically but
256528 [cdcarter gma] The following (untested) code should work.
256530 [wilsom8 rpi.] Thank you so much! Worked perfectly!

^ Why doesn't rescue catch Exception by default?
256529 [smarkle amaz] When you need to raise an exception, you can use one of the built-in
256544 [drbrain segm] Exception

^ Newbie Tk Problem
256536 [danielj slee] Windows can't find my tk84.dll when I try to
256539 [akbarhome gm] My dear,

^ Looking for minimalist ruby.
256537 [soliton.list] ...
256538 [alex blackke] $ cd ruby-1.8.6/
256579 [znmeb cesmai] There's another trick you can try -- before the ./configure, type
256583 [alex blackke] gcc -Os -fomit-frame-pointer  -DRUBY_EXPORT   -rdynamic
+ 256617 [vagabond cat] I think ruby *really* doesn't like to be built with optimizations. I
| 256634 [znmeb cesmai] znmeb@DreamGate ~/ruby-test/ruby-1.8.6-p36 $ set|grep CFLAGS
| 256647 [alex blackke] Me too.  Mine's an Ubuntu Dapper install on a P4, gcc version 4.0.3
| 256695 [znmeb cesmai] $ export CFLAGS='-Os -fomit-frame-pointer -march=athlon-tbird'
+ 256625 [nobu ruby-la] use -fomit-frame-pointer.
  256648 [alex blackke] It's not just that...
  + 256674 [bulliver bad] $ export CFLAGS="-Os -fomit-frame-pointer"
  + 256688 [znmeb cesmai] 1. As far as I know, you don't need "-fdisable-frame-address". Mine is

^ Re: eval going boom
256540 [ryand-ruby z] => CommandsIShouldNeverEval
+ 256612 [fxn hashref.] You don't even need #to_sym :-). Note that rewrite has the side-
| 256623 [fxn hashref.] Not really, update_attribute() bypasses validations by default, it's
+ 256659 [apeiros gmx.] Do you tell that your customers too?
  256704 [apeiros gmx.] I don't think it was rude. Assuming your application is in some way
  256705 [gregory.t.br] I thought Giles was joking...

^ Everything in ruby is an object?
256541 [mark.gargan ] Hey folks,
+ 256548 [jan.svitok g] No. Expressions are not objects. Objects are true and false, and && ||
| 256553 [gpygood 126.] class A
| 256555 [mark.gargan ] Thanks a million folks. That answers that I guess.
| 256563 [TimHunter nc] Rails? What's Rails?
+ 256549 [shortcutter ] No expression in Ruby is an object.  But results of evaluating them are

^ http://lkac.com
256542 [astasagie lk] Kogda nastanut holoda i belaja doroga ljazhe. Nastasia Griet.
256585 [onebitcipher] ...

^ from the ruby book install on win32
256551 [dglnz yahoo.] Though i'd give ruby a try :)
256564 [lyle.johnson] You saved the file as "Song.rb" and you're trying to run a file named
256638 [dglnz yahoo.] Bugger!!!
+ 256670 [lyle.johnson] Right. When you say "the Ruby book that comes with Ruby 1.8.6 win32",
| 256767 [dglnz yahoo.] You are correct. Also i know that this was the first edition so i
+ 256672 [robert.dober] Relax these things happen all the time, I remember debugging a file

^ ruby equivalent of htons or htonl
256554 [akbarhome gm] *(uint16_t *)(ptr+FSP_OFFSET_KEY)=htons(p->key);
+ 256630 [dave burt.id] We would still do htons() and hotnl() the same way.
+ 256654 [martin snowp] You are thinking about too low a level of porting.
  + 256665 [akbarhome gm] That gives me insight.
  | 256730 [jeremy hineg] pack/unpack should take care of that for you.  I whipped up this sample.
  + 256746 [vjoel path.b] bit-struct wouldn't be useful for a line-by-line translation.

^ avoiding nil.methodcalls short and cheap
256556 [rossnet gmx.] I often have to check if a methodcall A is not returning nil before
+ 256557 [farrel.lifso] textvalue = (text = xmltag.get_text) && text.value
+ 256558 [akbarhome gm] begin
+ 256559 [eeklund gmai] Variations using just logic operators and conditionals - I think the
| 256567 [hramrach cen] I would avoid code that relies on logical operators to preserve values.
| 256568 [eeklund gmai] And I would strongly disagree with this.
| 256888 [hramrach cen] Not always. It is defined behavior but unless you work exclusively in
+ 256588 [transfire gm] get_text  = xmltag.get_text
| 256590 [rossnet gmx.] Thanks for quick and helpful answers! I hope all of you will have a
+ 256650 [martin snowp] Since no one has pointed this out, I'll remind you that this *is*
+ 256662 [dan-ml dan42] textvalue = xmltag.get_text.ergo.value
  + 256667 [transfire gm] Interesting... I like this. Nice use of fluent / magic dot notation.
  | 256744 [dan-ml dan42] Indeed, that really simplifies the code.
  + 256877 [eeklund gmai] (... deleted ...)
    256986 [dan-ml dan42] cogito = [2,2]
    257018 [eeklund gmai] I know that (ergo is commonly used in my native tongue), I just didn't
    257038 [dan-ml dan42] Sorry, it seems I misunderstood the question. But I don't know what more

^ [ANN] rcodetools 0.7.0 (TDC: "test-driven, 100% accurate completion", automagic assertions/specs, doc/code navigation...)
256560 [ mfp acm.org] rcodetools is a collection of Ruby code manipulation tools. It includes

^ Howto add automatically a soap header in soap4r?
256565 [henning.pank] I must access a webservices that expect the SOAP action as a soap

^ [ANN] rocaml: Ruby extensions in Objective Caml
256569 [ mfp acm.org] rocaml allows you to write Ruby extensions in Objective Caml.
+ 256572 [benjohn fysh] a quick thought that I'm pretty sure you've already had: I notice that
| 256677 [ mfp acm.org] Even though the types are known by the compiler, human intervention is needed
| 257020 [benjohn fysh] *snip*
| 257157 [ mfp acm.org] If you mean by this that performance is easy to predict, you're very right :)
+ 257014 [martindemell] exciting stuff! looking forward to playing with this.
+ 257062 [rubyfan gmai] Nice.  I've been learning OCaml for the last few months.  I'll

^ Anyone, anyone...Bueller?
256573 [greg.kujawa ] There's a Rubyforge project I admin that I unfortunately don't have
256578 [james.britt ] reference to some character in a movie.
256592 [greg.kujawa ] True. Of course anyone who knows Ruby and is interested in TSAPI

^ What happened to Net::HTTP::Options ?
256582 [onebitcipher] ...

^ eval, bindings and scope
256586 [hellfeuer gm] hey
+ 256608 [m_goldberg a] It will work if the local variable has been defined before the Proc
| 256614 [hellfeuer gm] hmmm.. thnx. ur right. but even accepting that thats just how closures
| 256626 [m_goldberg a] There is nothing in your lambda to establish a binding for b.
+ 256633 [sami.samhuri] A nice one too. I learned quite a bit from it so thank you.

^ How do I find out what Exceptions a class may raise
256589 [funkytwig gm] at Been using the ActionMailer class, i.e.

^ assign greater of two ints?
256603 [eclubb valco] Is there a more concise way to write this?
256604 [donald.ball ] a = [a, b.length].max
256607 [eclubb valco] Excellent.  Thanks.

^ Is $! thread safe?
256618 [erikveen gma] Is it?
+ 256619 [mental rydia] Each thread gets its own private $!, so yes.
| 256621 [gregory.t.br] Is that a special case for built in globals?  I'm assuming so, but just curious.
| 256622 [vjoel path.b] No, only for a subset of them, including $SAFE and the pattern matching
| 256627 [gregory.t.br] Ah, the pattern matching vars were actually the ones I was interested
+ 256620 [vjoel path.b] Exception Information
  256642 [erikveen gma] Page 319 of Pickaxe v2 doesn't tell me anything about
  256686 [vjoel path.b] Sorry about that. I didn't expect that the PDF and the printed copy

^ xml newbie
256624 [bladenut gma] Okay, so I am scraping the FAA site and keeping track of some airplanes.
+ 256628 [gregory.t.br] You'll want to take a look at HPricot[0] and/or XML Builder[1]
+ 256635 [cardboard42 ] Why bother with xml at all? For something this small YAML would work
  + 256636 [cardboard42 ] On Jun 23, 12:16 am, "cardboar...@gmail.com" <cardboar...@gmail.com>
  + 256637 [gregory.t.br] Oh, for some reason I thought the OP was scraping XML files and wanted

^ Performance: Module vs Class
256629 [jnj thecoope] Is there a significant performance difference between these two ways to
+ 256669 [jnj thecoope] Apologies! I had meant to start a new thread.
| 256673 [m_goldberg a] IMO that's not a good reason. The main reason for grouping methods
+ 256699 [gregory.t.br] You don't need to use ::, that's mostly meant for constants and nested
  256701 [robert.dober] And to round up the picture and to keep David happy ;)
  256703 [gregory.t.br] sure. It's fairly OT from what was asked for though, but while we're here

^ RubyGarden regularly down
256631 [erwin.abbott] It seems every time I try to bring up a page on http://rubygarden.org,

^ ANN: yummy 0.0.2 has been released
256632 [bryanliles g] yummy version 0.0.2 has been released!

^ offer jersey as NBA,MLB,NFL,NHL,football jersey,basket ball
256639 [shoeso_1999 ] our company wholesales shoes ,clothing,IPODS MP3,MP4, as nike,jordan,

^ Re: offer jersey as NBA,MLB,NFL,NHL,football jersey,basket b
256640 [shoeso_1999 ] our credit. If the products can be not delivered to your address as

^ Cannot dump FeedNormalizer Feed objects using YAML
256641 [demerzel gma] I'm downloading and parsing an RSS/Atom feed using open-uri and
256643 [andy tinnedf] Either use Marshal.dump instead, or set parser to nil on the feed object
256644 [demerzel gma] Ah, so that's what I need to zero out. I need to use YAML because I

^ Read individual words from input?
256645 [keriostar gm] I'm a semi-newbie C++ programmer and a total newbie Ruby programmer, so
+ 256651 [rrafje gmail] ...
+ 256652 [has.sox gmai] ...
| 256657 [dblack wobbl] words = File.read("words.txt").split
+ 256658 [apeiros gmx.] Alternative if you want to avoid having interpunctuation and other stuff

^ Ruby on rail is fast?
256653 [howachen gma] i have been using our custom framework for apps development, and
256661 [TimHunter nc] You'll probably get better answers on the RoR mailing list. You can find

^ What is the last argument to rb_attr() ?
256656 [djberg96 gma] What is the last argument to the rb_attr function exactly? I looked at
256758 [nobu ruby-la] Follows the current visibility if it is non-zero.
threads.html
top