350342-351048

350147-351724 subjects 350485-360939

^ [QUIZ] Found Senryu (#224)
350342 [yahivin gmai] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+ 350680 [martindemell] Sorry, this was underspecified (I was hoping that the example would
+ 350685 [martindemell] Here's my solution (code both inlined below and attached). It uses the

^ Another rubygem install problem
350345 [erik.l.nelso] I'm trying to install a fresh copy of Ruby into empty directory
+ 350348 [luislavena g] On Nov 13, 5:48=A0pm, Erik Nelson <erik.l.nel...@bankofamerica.com>
| 350591 [erik.l.nelso] I did a reinstall, this time *not* including the prefix=, and that fixed
+ 350380 [imedina gros] This message is in MIME format.  The first part should be readable text,

^ YAML dump, load: class not properly reconstituted
350346 [rps salas.co] - :status: :failure
350356 [ryand-ruby z] {"path"=3D>"/mydev/iaharness/ballotsamples/432Leon200dpibw003.tif"}>}

^ irb woe
350349 [rogerpack200] for file in Dir['910???'] do

^ Trajectories
350359 [t_leeflang h] im having a problem with trajectories,
+ 350443 [eleanor game] This is mostly for people who want to model the real-world movement of
+ 350444 [marnen marne] Those algorithms look like they'd be fairly simple to implement, but as
  350446 [eleanor game] That rather depends on the required level of precision...
  350447 [marnen marne] Well, error accumulates pretty quickly in IEEE 754 floats, and
  + 350448 [t_leeflang h] hey all,
  + 350449 [eleanor game] In a hardcore physics simulation with many forces then no I wouldn't,
    350451 [marnen marne] Why?  I can't see a single reason to use IEEE floats, unless you've done
    + 350452 [eleanor game] Because often expressing non-integral values as floating-point in code
    | 350453 [marnen marne] True, perhaps.  Ward was doing fixed-point currency, so expressing
    | + 350469 [james grayso] If you put BigDecimal against Float, I'm pretty darn certain you will =
    | | 350489 [marnen marne] $ time ruby -rbigdecimal -e "1000.times{x = BigDecimal.new('3.5') *
    | | 350494 [ shot hot.pl] Decimal.new('4.2')}"
    | | 350495 [marnen marne] Yeah, I tried longer runs as well and saw larger differences.  I
    | | 350499 [ shot hot.pl] To clarify, I also believe BigDecimals should be used by default (when
    | | 350501 [marnen marne] Yes, this is what I was trying to say.
    | + 350519 [eleanor game] Well currency is an interesting problem. It can be viewed as a scalar =20=
    + 350502 [josh.cheek g] Why? unless you've done benchmarks and are absolutely certain it's causing a
    + 350509 [rick.denatal] So Ward found that fixed point integers weren't SLOWER then floats,
      + 350521 [eleanor game] Well there were books of log tables for greater precision, but the
      + 350523 [marnen marne] Why?  Sure, I could work around their problems, but I don't care to when
      | + 350524 [eleanor game] The physical limitations imposed on arbitrary-precision decimal
      | | + 350529 [caduceass gm] I think Marnen originally was suggesting that the imprecisions will
      | | | 350532 [eleanor game] This isn't an issue of chaotic behaviour (that has a very fixed =20
      | | | + 350538 [marnen marne] If it gives you the wrong answer, it's a bug.  Period.   If your
      | | | | 350577 [paul pollyan] Your above two points appear to be in conflict with each other.
      | | | | 350593 [marnen marne] think you missed the "if" on the second one.
      | | | | 350600 [paul pollyan] No, I really mean your two points.
      | | | | 350602 [marnen marne] Interesting question.  I don't think that's a contradiction so much as
      | | | | 350628 [vikkous gmai] transcendentals can also be represented exactly by formulae with a
      | | | | 350629 [marnen marne] Oh, good point.  Hadn't thought about that.
      | | | | + 350636 [colinb2r goo] Doesn't that depend on the transcendental?
      | | | | | 350644 [vikkous gmai] When I said 'transcendental', I meant a transcendental which is not
      | | | | + 350645 [vikkous gmai] Yeah, but you can't manipulate their results when they return one if
      | | | |   350696 [marnen marne] Of course you can, unless I'm totally misunderstanding.  Got a concrete
      | | | |   350715 [vikkous gmai] The pi_over_4 method I posted earlier is a good one. You can't
      | | | |   + 350717 [marnen marne] You can't manipulate the future in any language that I'm aware of --
      | | | |   | 350729 [eleanor game] Yes you can: http://en.wikipedia.org/wiki/Futures_and_promises
      | | | |   | 350730 [aldric trevo] Looks like there's no gem for this.
      | | | |   | + 350732 [james grayso] James Edward Gray II
      | | | |   | | 350735 [aldric trevo] Well, that'll teach me. How did you find it, out of sheer curiosity? I
      | | | |   | | 350739 [james grayso] I've just been reading this list forever and knew it existed.  I had an =
      | | | |   | | 350779 [aldric trevo] Time to get some more reading underway. Oh... And did you know that the
      | | | |   | | 350935 [gregory.t.br] at
      | | | |   | | 350940 [aldric trevo] Alright, so I'm a n00b ;-) I turned two more pages to see his name show
      | | | |   | + 350733 [marnen marne] Wow, that's very interesting -- thanks for the reference.
      | | | |   + 350718 [aldric trevo] Do a search for 'fibonacci' and check out the lazy implementation.
      | | | + 350747 [caduceass gm] I'm talking about result.  A small difference in initial conditions
      | | + 350536 [marnen marne] I am aware of the limitations.  I believe I'm even fully aware of them.
      | + 350527 [colinb2r goo] (Unfortunately I had *very* little success in persuading people to
      + 350736 [gregory.t.br] I took numerical analysis, but ironically, only after dropping my CS
        350775 [eleanor game] Never hire a computer scientist if you can get a maths, physics or =
        + 350776 [marnen marne] Yup.  Or music. :D
        | 350778 [eleanor game] Java/C++
        + 350797 [caduceass gm] Don't want to hijack (these are all good qualities by the way, but
          + 350804 [enitharmon g] osophy grad instead ;)
          | 350806 [eleanor game] philosophy grad instead ;)
          + 350815 [marnen marne] Hmmm...
            350845 [caduceass gm] You should include differences in frequency :)  That was a pretty cool

^ [ANN] upr 0.2.0 - Upload Progress for Rack
350363 [normalperson] upr 0.2.0 - twice as good as the first!

^ Naming conventions -- was: Re: DRYing a Regex
350367 [marnen marne] It doesn't work that way in programming.  Good naming practices are an
350368 [james grayso] As the saying goes, "When in Rome, do as the Romans do."  You're =
+ 350369 [marnen marne] Do you make much use of singleton mixins or singleton methods in your
| + 350405 [james grayso] use=20
| | 350423 [marnen marne] How do you keep such code maintainable?  It seems to me that
| | 350429 [james grayso] your=20
| + 350415 [dblack rubyp] I write class methods sometimes (I know those are singleton with an
|   350426 [marnen marne] Sometimes they're the right thing...
|   + 350430 [james grayso] If you mix a module into the String, you can still use is_a?() to check =
|   | 350432 [marnen marne] OK.  That makes more sense to me than the sample I gave.
|   | 350437 [james grayso] It seems to me like an extra step that isn't needed.  :)
|   | 350439 [marnen marne] I think I can answer this question, but the perspective from which
|   | 350440 [james grayso] I'm not sure I'm write either.  It just seems to be working well for me =
|   + 350483 [dblack rubyp] I'm not saying (and I don't think James would say) that this is a
|     350486 [marnen marne] Yes, I suppose it's somewhat circular.  If the truth be told, I don't do
|     350518 [eleanor game] RubyQuiz #214 involved implementing Ruby for prototype inheritance. Of
+ 350371 [dsturnbull g] On 14/11/2009, at 15:21, James Edward Gray II <james@graysoftinc.com>
| + 350372 [marnen marne] I would too.  James is correct that it isn't the whole story, but it's
| + 350377 [billk cts.co] A human looking to documentation to find out what an object
| | + 350401 [james grayso] ActiveRecord from Rails works this way.  If you would like to see the =
| | | 350422 [marnen marne] Great idea!
| | + 350418 [dblack rubyp] $ ./script/console
| + 350397 [rick.denatal] er
| + 350408 [james grayso] use
+ 350465 [phrogz mac.c] On Nov 13, 9:21=A0pm, James Edward Gray II <ja...@graysoftinc.com>

^ Re: Create Api to create document and add,edit,delete text a
350373 [marnen marne] Do your own homework. :)  If you're stuck, let us know what you've tried
350431 [skrithikaa g] This is what I coded and I need to change so that it accepts the text,
350433 [marnen marne] No!  The comments provide all the information you need for you to do

^ Re: Good term for "super-project"
350375 [transfire gm] You know, I almost went for it. I like how "Anthology" makes me feel

^ [ANN] locale-2.0.5, locale_rails-2.0.5
350376 [mutomasa gma] Ruby-Locale(locale-2.0.5) and

^ [ANN] gettext-2.1.0, gettext_activerecord-2.1.0, gettext_rails-2.1.0
350379 [mutomasa gma] Ruby-GetText-Package-2.1.0 and the families

^ elsif
350386 [ralphs dos32] As a newbie I would surely like to know why the language decided on
+ 350389 [mark thomasz] Because a precedent had been set in Perl. That's one of the
+ 350391 [caduceass gm] I'm pretty sure it's a Perl artifact.

^ Surprising behavior when extending instances
350392 [jim crossley] module English; def say; "yes"; end; end
+ 350398 [matz ruby-la] #extend (and #include) include a module only once.
+ 350399 [ shot hot.pl] This adds English to the front of the method look-up path.
+ 350403 [rick.denatal] Matz has already explained that module inclusion is a one-time only deal.

^ download Ruby for Win-x64
350393 [rviegas inbo] In the Web there are a lot of references to the Windows 64bits version of =
+ 350409 [walton vyper] Think it through though... are you sure it's worth it?  Most Gems won't have
| 350410 [rviegas inbo] I'm completely newbie on Ruby; since I have a 64bit system and found Web =
+ 350412 [luislavena g] Ruby (a.k.a. x64-mswin64), but I was unable to find the site where I can d=
  350413 [rviegas inbo] Thanks for your hint.

^ Customized GUI
350394 [scorpionl13 ] first off, sorry if this in the wrong place, i just signed up here.
+ 350395 [marnen marne] Will Limelight (a bit like shoes, in JRuby) or Monkeybars (Swing
| 350400 [scorpionl13 ] i did see limelight, and i dont know java. which some java is required
| + 350402 [cremes.devli] Limelight is pure ruby so you don't need to learn any java.
| | + 350404 [scorpionl13 ] thanks for the heads up on limelight, i will have to give it a second
| | + 350425 [james.britt ] Um, not quite.  It's a robust MVC library that makes it much easier to
| |   350427 [scorpionl13 ] not even sure what swing is...    i dont mind learning new things, i
| |   + 350436 [scorpionl13 ] What about SDL?
| |   + 350445 [james.britt ] It can be tricky.  If you can spend a bit of time with different
| |     350464 [scorpionl13 ] yea, im kinda getting that vibe...    thanks everyone for the info, i
| + 350421 [james.britt ] My IBM article is slightly dated, but fundamentally correct.
+ 350601 [arndt.roger ] Are you trying to create a visualizaition with gui elements?

^ Array within an array
350406 [mittina gmai] for i in (0..@cw_num)

^ Array within an array
350407 [mittina gmai] $array_floor = []
+ 350428 [marnen marne] * Never use global variables.
+ 350438 [greg5000 ear] if you want to define a 10x10 multi-dimensional-array you can use the
+ 350442 [shortcutter ] $array_floor[n,i]=... does not assign to a two dimensional Array.
  350846 [mittina gmai] that is interesting.. i am only discovering more and more how

^ NArray, How to install
350411 [ralphs dos32] I'm trying to install NArray so that irb can get access to its
350424 [marnen marne] Did you do
350434 [ralphs dos32] Marnen,
350435 [marnen marne] Is there a gem available (the website should say)?  If so, install it
350441 [vjoel path.b] Yep, there is.

^ How to do a getPixel on Win32 using Ruby?
350414 [blueskybreez] Does someone know how to do a getPixel on Win32 using Ruby?  (either to
350417 [blueskybreez] ah... and also setPixel() too.
+ 350419 [blueskybreez] I thought it would be something like
+ 350420 [sutniuq gmx.] Do you want to draw onto the screen?
  350450 [blueskybreez] can wxRuby get a pixel's color value off from the screen too?  (not
  350482 [sutniuq gmx.] If you create the window like I showed, it will fill the *entire*

^ How do I get a random number between two random numbers?
350454 [somebodydc69] I want to create a program that asks you to guess a number between two
+ 350456 [marnen marne] Well, you know how to generate the first two random numbers, right?
| 350457 [somebodydc69] So, would it be something like this?
| 350459 [somebodydc69] OK, that didn't work. That just added the two numbers. How do I make a
| 350460 [somebodydc69] I did not see your reply when I typed this. Thanks!
| 350462 [somebodydc69] I found the solution.
| 350544 [steve studio] This can return: num1 = 1000, num2 = 1001, number = 2001
+ 350458 [tony medioh.] first + rand(last + 1 - first)
+ 350556 [josh.cheek g] max = 100
  350561 [steve studio] The problem with your solution is that low and high can be the same
  350562 [josh.cheek g] In that case, the cardinality of the solution set is 1, perhaps not
  350566 [cidza tin.it] ciao

^ Implementation inheritance -- was: Re: DRYing a Regex
350455 [marnen marne] Oh, Allen Holub.  This is the same guy who thinks that MVC is not
350470 [james grayso] and=20
350472 [marnen marne] Unfortunately, it's a terrible example.  A poorly reasoned, marginally

^ Re: How to make net-ping thread safe?
350461 [lsternlicht ] This does not work.
350463 [lsternlicht ] => #<PingerController:0x10232dc20>
350537 [lsternlicht ] The gem is not thread-safe. I am using ruby 1.8 and Mac os X 10.6. I

^ Array.assoc
350466 [ralphs dos32] If I want to find the source to the Class Array ... specifically
350467 [phrogz mac.c] Slim2:~ phrogz$ cd /usr/local/src/ruby-1.9.1-p243/
350468 [phrogz mac.c] Bah, of course I meant rb_ary_assoc. Looking at your pasted text while
350479 [ralphs dos32] Phrogz,
350481 [ryand-ruby z] Well, first, write it in pure ruby. Ruby classes are open and there =

^ very newbie question
350474 [duxieweb gma] irb(main):001:0> queue=0
350475 [stefano.croc] Because 0 is a true value in ruby, so !queue is false and the body of the if
350477 [duxieweb gma] Oh, that sounds so different from other languages that 0 is a true value.
+ 350487 [bbxx789_05ss] x = 0
+ 350490 [bbxx789_05ss] Whoops.  I misinterpreted what your issue was.  Yes, ruby is strange
| 350507 [usenet-nospa] Lua's the same way.
| 350516 [shortcutter ] I think initially I found it irritating, too.  But that was just for a
| 350533 [steve studio] This as well as many other unique features of Ruby are covered very
+ 350496 [Gennady.Byst] e if
+ 350498 [marnen marne] Perl has the additional complication that certain math operations will
+ 350500 [ shot hot.pl] That=E2=80=99s one of Ruby=E2=80=99s (more-or-less-)distinctive features, w=

^ Traversing the contents of a proc (for a DSL)
350476 [siemenbaader] Is it possible to traverse and modify the statements inside a Proc
+ 350506 [kcy5b yahoo.] charset="iso-8859-1"
| + 350511 [siemenbaader] Thanks! The two introspection libs look really interesting.
| | 350528 [ryand-ruby z] just
| | 350581 [siemenbaader] Yes, I will definitely have a look at them!
| | 350583 [paul pollyan] Are you posting form Google mail?  For some reason that I don't
| | 350598 [siemenbaader] Yes I am, and it still looks like they are double-posted. Yours do not to
| + 350512 [ryand-ruby z] source=20
|   350513 [flo andersgr] Markaby is also Ruby 1.8 only, though I can't figure out why. Some of
+ 350585 [b.candler po] Two string literals on the same line are concatenated - so in the above
  350599 [siemenbaader] Yes. Again, this is more an exercise to see what can be done with an inline

^ edit related record
350478 [hawat.thufir] There's a one-to-one relation between the base model "item" and the

^ bsearch.rb
350480 [ralphs dos32] I found online http://0xcc.net/ruby-bsearch/.  Yippee!

^ what's ||
350484 [duxieweb gma] sorry just was learning ruby so have some low level questions, :)
+ 350488 [ralphs dos32] I'm just learning Ruby, too .. and I found this fairly tough to wrap
| 350491 [marnen marne] It declares block arguments.  See the sections in the Pickaxe Book on
+ 350492 [bbxx789_05ss] The topic you want to read about is "blocks".
| 350493 [bbxx789_05ss] which is delimited with the |....| you asked about!
+ 350503 [kcy5b yahoo.] charset="iso-8859-1"
| 350504 [kcy5b yahoo.] charset="iso-8859-1"
+ 350505 [kcy5b yahoo.] charset="iso-8859-1"
  350540 [steve studio] Block syntax is also clearly explained in "The Ruby Programming
  350557 [duxieweb gma] Thanks all.
  351048 [imran.nazir ] book?>=0A =0AYes I highly recommend that you buy and read it from end-to-e=
threads.html
top