186552-403406

186410-188481 subjects 186752-270207

Binary (dmg) for Ruby 1.8.4 on OS X 10.4?
186552 [keith@ke th ] I would like to upgrade Ruby from 1.8.2 to 1.8.4 on OS X 10.4 and am
+ 186559 [dharple@ge e] This was created using darwinports -- port mpkg ruby, which creates
+ 186593 [mats@ey ma z] I know it's not exactly what you asked for, but could be off use for

two arrays problem (although different from the other two arrays)
186562 [kevin.jackso] I have a bunch of japanese encoded words in Kanji and Hirigana (I
+ 186584 [chris.hulan@] rd = corp_data_1.map{|cd1| corp_data_2.map{|cd2| cd1 + cd2}}
+ 186682 [baumanj@gm i] I'm not really clear what you're trying to do. Could you provide a bit

Functions scope
186563 [mirek.rusin@] class C
+ 186566 [danielbaird@] ...
| 186572 [mirek.rusin@] require 'open-uri'
| + 186579 [zdennis@mk e] A = true
| + 186582 [one.three@gm] class C
+ 186604 [lopexx@au og] lopex
  186771 [danielbaird@] ...
  186777 [zdennis@mk e] Well now you know how :: works when there is nothing preceding it, and you know that OpenURI modifies the Kernel#open and

'select' semantics
186567 [srinivas.j@s] Dear all,
+ 186577 [pit@ca it in] Right.
| 186585 [srinivas.j@s] Thank you for pointing out the chained 'select'!
| 186621 [marcel@ve ni] => {0=>0, 1=>2, 2=>3, 4=>4}
| 188122 [zdennis@mk e] What about splitting that up a little...
+ 186601 [damphyr@fr e] I've stumbled on the same issue yesterday and was a bit miffed, mostly

ruby-lex
186569 [adelcambre@g] I am not sure if this is the place to ask this, but I dont really have
186820 [frdrch@we .d] Try rex (http://raa.ruby-lang.org/project/rex/). Rex is the pardon for

Range#to_a, each - why inconsistent?
186571 [gm.vlkv@gm i] Could someone explain me, please, why Range with one element is
+ 186576 [robert.dober] ...
+ 186578 [farrel.lifso] I initially thought it was because "".succ == "" which is not correct,

How to 'space' certain things apart?
186575 [directly_abo] I'm trying to learn a programming language and this one came up in my
+ 186580 [gm.vlkv@gm i] 1. you don't need extra variables var, var2, var2 - you already have
+ 186581 [chris.hulan@] You picked a good starter language to learn!
  186596 [directly_abo] Thanks CrisH and vsv. That got me through it better.

Rails view sub directories?
186586 [caldridge@gm] Can anyone show me how to go about placing specific views within a directory?
186590 [adelcambre@g] to suit your needs.

Calling R from Ruby
186592 [alexg@eb .a ] I'm interested in making (well using, but I might be prepared to make)
+ 186635 [wilsonb@gm i] How about this?
| 186770 [alexg@eb .a ] Yeah, from the description it is exactly what I was thinking of.
+ 186671 [gordon.j.mil] Have you thought about simply spawning an inferior process and simply
| 186795 [znmeb@ce ma ] The "guts" of how to interface R with C, C++ and Fortran, and how to
+ 186756 [interfecus@g] May I ask what this is for? I've had to learn R recently after working
| + 186759 [ara.t.howard] you really can subtract
| | 186799 [ptkwt@ar cn ] what are the alternatives to gnuplot?  What does R use for it's graphing
| | 186801 [ara.t.howard] you can make production quality graphics using
| | 186812 [alexg@eb .a ] Wow. That's nice. Really nice! Thanks for the link - not seen it
| + 186776 [alexg@eb .a ] Like you, I spend most of my time in R wishing I could use Ruby.
| + 186797 [znmeb@ce ma ] Au contraire! R is at heart a functional language with a Lisp ancestry!
| + 186798 [ptkwt@ar cn ] This has come up before, but maybe we need a Ruby-based DSL that could be aimed
|   + 186802 [ara.t.howard] i realize it's not totally numerical... but he's thinking along the same
|   | 186807 [ptkwt@ar cn ] Looks interesting.  Hadn't run across it before.  Maybe Tioga would be a good
|   + 186804 [znmeb@ce ma ] When you say "we", who are you referring to? People who only know Ruby?
|     186811 [ptkwt@ar cn ] Where reinvention would take too long, then perhaps it would be best to build
|     186824 [edder@tk sp ] You can already do a lot of what matlab does with ruby-gsl. There are
|     + 186826 [sanobast-200] If you're on windows, you could quite easily use ole for accessing R.
|     | 186944 [znmeb@ce ma ] Yeah ... in fact there is an R DCOM server and client in the CRAN
|     + 186848 [ptkwt@ar cn ] True, these things already exist to some degree, but what we need is something
|     | 186945 [znmeb@ce ma ] Hmmm ... the R folks say the same thing about R. :) Download it, load
|     + 186943 [znmeb@ce ma ] Both Octave and SciLab are more or less "Matlab clones", if that's what
+ 187761 [alexg@eb .a ] This is very very rough and early. Think pre-pre-alpha. It is a

how to build a daemon
186597 [13thmonkey@a] I have no idea how much data I can read without blocking. So an attacker
186599 [bob.news@gm ] You'd typically have a thread that handles a connection.  So the worst

Compiling ruby code
186613 [sn@ne dh st ] i know very little about ruby, have only looked shortly at rails
+ 186616 [xmlarchitect] ...
| 186620 [damphyr@fr e] rubyscript2exe untars the whole ruby environment, together with your
| 186624 [guslist@fr e] It's even easier than that. The executable created has an option
| 186630 [xmlarchitect] ...
| 186683 [graham@no he] People seem to want a compiler for 2 reasons
| 186692 [guslist@fr e] There are already been discussion about this on some schemed proposed.
| 186701 [graham@no he] Well PGP is available as source - and it seems to provide pretty
+ 186619 [dmitry.sever] There's currently no ruby compiler.
  186627 [james.herdma] Thanks for the link dseverin!  Definitely add to my to-do list.

Re: One-Click Ruby Installer 184-16 release candidate 1 is a
186623 [bttman@bi tr] Curt,
+ 186632 [ml.chibbs@gm] Thanks!
| 186642 [pfharlock@ya] ditto, thankyou very much for all your hard work.
| 186654 [pfharlock@ya] I feel a little sheepish, I didn't realize I was replying to one of
+ 186664 [tom@in oe he] But even if I had zero interest in the subject matter, I'd buy it just
  186796 [listrecv@gm ] I second the thanks for the installer - nice work.

Compiling QtRuby
186626 [HQuiroz@en .] I've been trying to compile Qt Ruby without success.
187051 [tashiro@zi n] A question from a non-Qt user.  Does Qt Ruby try to match version

reading/writing binary problem
186634 [wollez@gm .n] I have some binary files which I need to delete some data at the
+ 186655 [bob.news@gm ] def cut_prefix(file, length)
+ 186673 [ara.t.howard] this sould be easy if i understood that method and the nature of your data ;-)
  186684 [wollez@gm .n] yes I want to extract a matrix of 1024x1024 of binary data (2bytes for
  186687 [ara.t.howard] ok.  so, just to clarify, you want to read a 2mb matrix out of a file after
  186690 [dharple@ge e] open(..., 'rb') ...
  + 186693 [bob.news@gm ] In fact I recommend to use that switch regardless of OS used: it's more
  + 186694 [ara.t.howard] ah.  indeed.
    186709 [wollez@gm .n] Thank you all,

Get the size in pixels for a string
186639 [sthibaudeau@] Id like to know the width and height in pixels for a string given a
186647 [chris.alfeld] require 'tk'

[QUIZ] alarm.rb (#73)
186651 [james@gr yp ] 1.  Please do not post any solutions or spoiler discussion for this quiz until
186653 [james@gr yp ] Sorry about this message folks.  It was a comical naming error.  I

Tools to improve testing
186656 [imobachgs@gm] An easy one: what tools do you use to improve testing? I've read some
186667 [pat.eyler@gm] autotest and unit diff (both in ZenTest) are awesome.
186729 [kiaroskuro@g] I have done PingPong programming in the past using the collaborative
186731 [pat.eyler@gm] Sean and I have not tried a multi-user editor yet, though we've kicked
186740 [kiaroskuro@g] ...

unpack signed short in network (big-endian) byte order
186679 [baumanj@gm i] Is there any particular reason why there is no format specifier in the
186725 [vjoel@pa h. ] I'd vote for that. Looks like you already found this thread :)
186884 [baumanj@gm i] Perhaps this should be a new subject like "adding formats for
+ 186889 [drbrain@se m] Don't bother with an RCR, just submit a patch to ruby-core.
| 186897 [baumanj@gm i] Perl's pack options seem to be largely the same. It has the same holes
| 186908 [matz@ru y- a] Since Perl used to use underscore when I implemented it.  Besides Ruby
| 186939 [baumanj@gm i] Oh? I don't think that's mentioned in the rdoc for pack/unpack. In any
+ 186890 [ara.t.howard] i use pack/unpack alot and would love to see more types handled.  i'm with
+ 187045 [baumanj@gm i] Oops, 'y' can't be both signed network long and signed little-endian
+ 187375 [matz@ru y- a] The pack templates are derived from Perl, and I don't want to add our

Mongrel and CGI
186704 [Walter@mw ew] Are there any examples of using Mongrel to server regular CGI scripts.
186789 [zedshaw@ze s] Hey Walter,

[ANN] IMAPCleanse
186715 [drbrain@se m] = IMAPCleanse

Where is Fixnum#power! coming from?
186716 [Daniel.Berge] Ruby 1.8.4
+ 186717 [dharple@ge e] $ irb -rubygems
| 186718 [Daniel.Berge] Aha!  I'm not explicitly require'ing it, but my $RUBYOPT was set.  Once I unset
| 186735 [jim@we ri hh] RubyGems uses time.rb
+ 186720 [lopexx@au og] flo_pow(x, y)...

Rational, Fixnum#power! and negative values
186722 [Daniel.Berge] Another question about Rational#power!.  I tried this
186728 [chris.hulan@] power! is an alias of Fixnum::**, then ** is reused as an alias of

Learn to Program, by Chris Pine
186732 [non@no e. om] Does anyone know where I can find the solutions to the exercises in
+ 186733 [kjw.ruby@gm ] I've been programming for over 20 years and I *still* feel like thatsometimes.  While I can't say what way is definitively best to dealwith it, I tend to take a five or ten minute walk when I get tofeeling like that.  Often, by time that that's done, I've got a freshidea for how to approach the problem, or I've thought of something Imay be missing.
| + 186737 [chris.alfeld] I recommend dancing.  Reading fiction also often works for me.
| + 186830 [Bil.Kleb@NA ] Good advice.
| + 186839 [jesusrubsyou] Well, might I say that he's picked a good language to try out.  With
+ 186739 [benjohn@fy h] *snip*
| 187050 [baumanj@gm i] This is incredibly true. I often will describe my programming problems
+ 186741 [jeppe88@gm i] ...
| 186743 [jeppe88@gm i] ...
| 186782 [non@no e. om] I can't use "Until" because it wasn't covered in the book so far (even
| + 186822 [dave@bu t. d] Have you been typing his examples into IRB and running them as you go? I
| | 186883 [non@no e. om] It is indented. Must be your client.
| | 186896 [dave@bu t. d] Wow, my client's not displaying tabs. That really kinda sucks. Thanks for
| | 187000 [non@no e. om] You're right, I didn't implement one of the features after reading the
| | 187039 [non@no e. om] byes = 0
| | 187118 [dave@bu t. d] You're absolutely right. I should claim that I put the error in deliberately
| + 187031 [agorilla@gm ] Here's a very simplified example that I believe uses only what's been
|   187038 [non@no e. om] I'm not really understanding what last_input is exactly doing. Looks
|   187040 [agorilla@gm ] I may be reading ahead of you, but it doesn't look like it.
+ 186778 [paul.denling] Sometimes I find myself leaving a problem without trying to analyze it,
+ 186949 [directly_abo] I'm stuck trying to do the part to make it do '99 bottles of beer on the
| + 186960 [wfroelich@db] How's this for a solution.  Note I tried to only use constructs covered
| | 186969 [directly_abo] Wow! It was so simple once I saw how it should/could be done! I'd (for some
| + 186983 [dave@bu t. d] But if you ask this group, you can get interactive answers!
|   187154 [chneukirchen] 99.downto(1) { |bottles| ... }
|   187169 [dave@bu t. d] A good point, Christian, and that syntax is introduced in the very next
+ 187084 [non@no e. om] (everything looks OK to me)
| + 187114 [directly_abo] Okay, here's what I got, and it works too, heh. The 'if' had to be in there,
| | 187126 [dave@bu t. d] Like I told Jan, put the "beer = beer - 1" at the end of the loop - then you
| | 187140 [wfroelich@db] First off, thanks to Dave for providing the explanation that should have
| + 187124 [dave@bu t. d] I just looked at the book samples at pragprog and was surprised to see there
|   187185 [non@no e. om] Crap, I knew I should have fully tested my code.
|   187195 [jzakiya@ma l] puts 'Please enter the starting year'
|   187215 [non@no e. om] Cool.
+ 187325 [non@no e. om] (I'm skipping the 2nd exercise - just a bunch of busywork)
| 187337 [dave@bu t. d] You mean chapter 7.
| + 187370 [non@no e. om] I'm actually reading the book and "Arrays and Iterators" is chapter 8.
| + 187381 [non@no e. om] Actually, I just flipped through the rest of the book and it starts to
|   187475 [dave@bu t. d] Good idea; it's sure to avoid further confusion, and I'm sure Mr. Pine
+ 187340 [david.bailey] Yes, that is a typical outward manifestation, or projection, of the
+ 187434 [non@no e. om] Chapter 9, exercise 1 (page 76)
| 187482 [dave@bu t. d] Perfect. I can't see any problems at all.
+ 187529 [non@no e. om] Chapter 9, exercise 2 (page 76)
| 289597 [kelly.tangua] def roman_num number
| 289639 [caduceass@gm] Just for fun. Certainly not great for speed for large numbers, but the
| 289643 [caduceass@gm] Actually, better production code that keeps in line with OO concepts would be...
| 289654 [caduceass@gm] gsub('number', 'n') on that code...and there's a missing parenthesis
| + 289671 [shevegen@li ] BTW a little trick for later, if you i.e. have an array, and find
| + 289820 [moises.trovo] ...
|   289834 [caduceass@gm] Here's the copy and pasted code...
|   303208 [hummerpj@gm ] Hey everyone I was having a slight problem with one of the examples in
|   303213 [eleanor@ga e] You need to reorder your logic slightly so that bword is changed as
+ 187530 [non@no e. om] Chapter 9, exercise 3 (page 76)
| + 190733 [c.esch@we .d] thank you very much for all these good answers
| | 190738 [jdevries@pf ] Restricting to what is covered in chapters 1-10, how about the
| | 191348 [c.esch@we .d] Thank you Jeff,
| | 209864 [hfashina@ho ] For interest, before I bought the book I did this exercise for the
| | + 218689 [mike.agres@g] I'm having some issues modifying the Civ continent example from ch. 10
| | | 218774 [mariano.kamp] I don't know the book and that is probably true for a lot of the
| | | 218834 [mike.agres@g] here's the whole code...
| | | 218850 [mariano.kamp] what your guard should do is prevent the recursion go across the
| | | 218874 [mike.agres@g] That worked!  Thanks.
| | + 219773 [mike.agres@g] Good Job!  However, I don't fully understand how this worked.
| + 403401 [lists@ru y- ] Modern Roman numerals using arrays and each.
|   403406 [ryand-ruby@z] ...
+ 190734 [devlists-rub] I'm not quite sure there are solutions. However, as a fellow beginning
| 190743 [jtregunna@bl] ...
+ 255525 [vineire77@gm] tremendous help. I have a quick question on Chapter 11 - Reading and
| + 255527 [donald.ball@] the 'w' option opens the file for writing.
| | 255534 [vineire77@gm] Thanks, donald. I don't know why I missed that before.
| | + 255605 [onebitcipher] ...
| | + 255609 [dangerwillro] You will do well to make notes on File and read/write modes!
| + 255532 [agorilla@gm ] It's the file 'mode'.  w = write.
| + 255533 [perrin@ap th] Looking at it, I see that File.open is sometimes a synonym for File.new,
+ 398144 [lists@ru y- ] Posted via http://www.ruby-forum.com/.
  398171 [alexandermcm] ...

Nitro examples missing?
186734 [benjohn@fy h] after reading about Nitro here, I went off to look, and it sounds
186744 [aglarond@gm ] spark and flare have been packaged-up separately now, and can be found
186803 [benjohn@fy h] Thanks for the info, Dimitri, very helpful.

%r regex matching is ignoring my leading zeros
186738 [dsand1@ve iz] I hope someone can help me or at least confirm that I'm not going
+ 186747 [uval@rz un -] i am not an expert in RE but don't you think [\d]{4,4} should be
+ 186748 [dblack@wo bl] My guess is that somewhere along the line the month is being turned
+ 186749 [surrender_it] %r{^\d{4}$}
  186773 [dsand1@ve iz] First of all, thanks guys for trying to help.
  186821 [surrender_it] this is just the the script/console thing in rails

Enable line-numbers for text entered - How to?
186745 [RichardDummy] I'm running ver. 1.59 and using SciTE primarily for writing Ruby
+ 186754 [interfecus@g] I'm not sure about line numbers in SciTE, but you should definitely
| 186757 [RichardDummy] Thanks, Timothy.
+ 186760 [ara.t.howard] gvim runs on windows...
| 186768 [james_b@ne r] James Britt
| 186779 [RichardDummy] Hey Jim and Ara,
| 186788 [akiba.rubyns] Options | Open User Options File
+ 186828 [ffsnoopy@gm ] line.margin.visible = 1
  + 186836 [RichardDummy] Thanks, Mitchell.
  + 186913 [RichardDummy] I think my recollection of toggling breakpoints in SciTE for Ruby
threads.html
top