253847-255750

253790-255470 subjects 254085-287029

^ One More Bias (or perhaps I'm too novice )
253847 [vineetraja g] 1  class Person
+ 253851 [B.Candler po] Correct. a % b is syntactic sugar for a.%(b) or a.send(:%, b)
+ 253868 [skoot ideico] Always in 'current' object, then in its parent and so on.

^ Re: FizzBuzz (#126)
253854 [novakps gmai] I do not think there is a lot of room for cleverness in the FizzBuzz
+ 253856 [seebs seebs.] ...
+ 253861 [caduceass gm] ...
| + 253864 [robert.dober] Me too I consider this a very good psychological quiz.
| | 253866 [james graypr] I think we're already getting plenty of insightful interpretation.
| | 253890 [cmshea gmail] Isn't your test ambiguous? Do you want "Hello World" to become "World
| | 253892 [mikemondrago] Ah yes, thanks for jogging my memory, "Write a function that reverses
| | 253898 [Rob AgileCon] I'd think that would be another opportunity to see how the person
| | 254005 [jballanc gma] I'll match your 62, but I'm still thinking that some clever tricks might
| | 254037 [B.Candler po] I've got 60 now. But it sounds like the magic target is 56 :-(
| | 254076 [apeiros gmx.] Darn, just wanted to write that I got a 58 one here. We had that in
| | 254096 [jballanc gma] sh-3.2$ wc fizzbuzz.rb
| | 254097 [robert.dober] Have been there, but this is not a valid solution, sorry to say so :(
| | 254104 [jballanc gma] Crud, I just tested at http://golf.shinh.org/p.rb?FizzBuzz and you're
| | + 254106 [geniusleonid] ...
| | + 254108 [fophillips19] ...
| | | + 254133 [james graypr] This solution cracked me up, but there is a typo in it...
| | | | + 254136 [agorilla gma] But would you hire him (minus the typo)?  I'd be a bit worried that
| | | | + 254154 [rick.denatal] %w{1   2  Fizz  4 Buzz Fizz  7  8 Fizz Buzz 11 Fizz 13 14 FizzBuzz
| | | |   254156 [dblack wobbl] puts %w{ 1 2 Fizz 4 ... }
| | | |   + 254157 [olsonas gmai] One-liner?
| | | |   + 254168 [robert.dober] .join("\n")
| | | |     + 254172 [james graypr] I think you were kidding, but just to be clear, the join() call is
| | | |     | 254183 [robert.dober] No I was not, I was just wrong :)
| | | |     + 254204 [dblack wobbl] You don't need that though; puts will puts each element in the array.
| | | |       254216 [fzagarzazu g] Finally a quiz for newbies like me. :)
| | | |       254225 [CHubas7 gmai] Interesting quiz, as usual.
| | | |       254278 [vjoel path.b] Didn't you hear? Google is developing a soft drink containing nothing
| | | |       + 254295 [CHubas7 gmai] IMO, the only thing you would need inject here is to store the output
| | | |       + 254296 [warrenb aqui] I hear the original name was "Gurgle", but apparently they're shying
| | | |         254353 [CHubas7 gmai] So, if the new boss tells you to make a program to print the salary of
| | | |         254359 [robert.dober] So if I tell you to write a program that prints "Goolge" you will
| | | |         254362 [CHubas7 gmai] I would make a program that prints
| | | |         254367 [robert.dober] But you are not rude, just wrong ;) - kidding.
| | | |         254377 [CHubas7 gmai] Communication indeed is the base of a good relationship, of any kind.
| | | |         + 254388 [robert.dober] Hmm this too is an interesting point, would people ask you for
| | | |         + 254634 [rick.denatal] Sorry if you're in the position of selling your soul, but if you are,
| | | |           254644 [smokinn gmai] The point of giving FizzBuzz as a screening question was nothing more
| | | |           254671 [has.sox gmai] Avert your eyes!!!
| | | + 254137 [sam powersou] Awesome!
| | + 254109 [geniusleonid] ...
| | | 254114 [geniusleonid] ...
| | + 254110 [grzm seespot] 1.upto(?d){|i,x|i%5>0||x=:Buzz;puts i%3>0?x||i:"Fizz#{x}"}
| | | 254111 [robert.dober] if only 'puts'.length were 'p'.length ;)
| | | + 254115 [grzm seespot] s/proper solution/expected results/
| | | | 254121 [jballanc gma] Thanks. I'd push it a bit further, but I think I've already wasted
| | | | + 254128 [ymendel pobo] (1..100).each { |x|  str = ''; str += 'Fizz' if (x % 3).zero?; str +=
| | | | | 254143 [robert.dober] This is for a higher position than sheer Software Engineer, pah...
| | | | + 254437 [jesse.d.merr] Its much worse than NP - its uncomputable. You'd run into the halting
| | | |   254440 [geniusleonid] ...
| | | + 254118 [phurley gmai] (1..100).each do |i|
| | + 254131 [B.Candler po] Why the ,x here? x is locally scoped within the block anyway, and it works
| |   254173 [jballanc gma] Yeah, I realized that shortly after posting this...still, I'm over by
| |   + 254176 [caduceass gm] Just build a self-sustaining computer complete with time-travel
| |   | 254177 [seebs seebs.] ...
| |   + 254189 [rick.denatal] Ah, but another approach which might get there faster is to start with
| + 253865 [james graypr] I happen to agree and I worded the quiz very carefully with that in
+ 254397 [spooork gmai] I disagree.  I challenged several of my coworkers to solve FizzBuzz a
  254423 [novakps gmai] As the last few days have shown, there *are* clever ways of solving
  254424 [robert.dober] Actually I feel that somehow - sorry I have said this before, but I am
  254433 [Rob AgileCon] Regardless of how simple or clever the code, if it isn't
  254434 [james graypr] I guess you wouldn't hire me.  I used the double-test form because I
  + 254436 [Rob AgileCon] I said "extra credit" (you didn't use the ?d thing, right? ;-)
  + 254489 [4fires gmail] ...
    254490 [james graypr] && does short-circuit.
    254495 [vjoel path.b] irb(main):010:0> x = false && 3; x

^ can i abbreviate this expression to fit on one line?
253855 [nephish gmai] ...
+ 253860 [avdi avdi.or] next if x > 23
+ 253862 [jan.svitok g] if x > 23 ; next ; end
  253867 [nephish gmai] ...
  253872 [dpcahill gma] ...

^ ANN: Sequel 0.1.6 Released
253869 [ciconia gmai] Sequel version 0.1.6 has just been released. New in this release is

^ read_multipart bug (in Ruby's CGI and Rail's AbstractRequest)
253884 [ctm ardi.com] I have written code that receives multipart forms.  I'm currently

^ generating CReturn in xml file
253887 [josselin wan] I am generating an xml output file from my rails app to be read in
253896 [B.Candler po] "\r" is character 13. "\n" is character 10.
253953 [josselin wan] thanks Brian...  I was mixin chracter sets.....   \r is the right one

^ Help with emailing attachments with Ruby...
253893 [ryangs mac.c] I am working on a script that will send an email with a .csv file
+ 253901 [pgquiles elp] and compare with what you get. I'd say your output is pretty different.
| 254765 [ryangs mac.c] Thanks for the input.
+ 254770 [gregory.t.br] require "rubygems"
  254779 [ryangs mac.c] That looks awesome.  Nice and simple.  I'm going to give that a try.
  254781 [gregory.t.br] ...
  254877 [ryangs mac.c] I ended up just using mailfactory that was included with ruport-util,
  254896 [gregory.t.br] Yeah, MailFactory is a seriously under-praised lib that really works
  254897 [agorilla gma] That does raise the question... should it be it's own library?
  254906 [gregory.t.br] It is :)
  254932 [agorilla gma] Good to know.  Thanks for the link.

^ XML library with validation
253894 [goodieBoy gm] I'm looking for a library that can validate xml against a dtd or
253972 [vasudevram g] I'm not sure of this, but I think existing Ruby XML libraries don't

^ parse text with ruby
253899 [kgkazakos uh] I have the following txt log file ==>
+ 253900 [ryand-ruby z] % cut -f 5 -d: x.txt | grep . | cut -c2-
| 253902 [vjoel path.b] Who knows if that's going to work right if other output is mixed in?
| 253907 [ryand-ruby z] Presumably the OP.
+ 253908 [mforal.news ] You could iterate through each line, scanning for a second ':' and grab
+ 254962 [grzechg DELI] I think that you should tell us some about this log. Eg if '*' character

^ Running multiple simultaneous interpreters/scripts
253904 [eclubb valco] I have a setup where cron is calling N instances of a particular Ruby
253909 [vjoel path.b] Why not fork the N instances from one ruby script called by cron?
253964 [shortcutter ] Or use threads to implement parallel execution.  OP, what do your
253976 [B.Candler po] Well, you can't make a CPU run faster than itself. So let's say for the sake

^ unsubscribe
253922 [halldorgud g] ...

^ new project ( was Re: logging off windows users remotely with ruby)
253927 [gthiesfeld s] <code>
253936 [botp delmont] # active_wmi

^ [ANN] libmtag-ruby-0.2.0: music tagging library
253931 [felipe.contr] This release has a new get_info function that returns the mime-type of the file.

^ Help with moving files
253932 [its_conebred] I am in need of some help with moving some files. I have some folders
253938 [jeremyheiler] On Jun 1, 7:59 pm, Jeremy Woertink <its_conebred_...@hotmail.com>
253940 [jeremyheiler] Also, your Dir.glob returns an array holding all your jpg or gif
253942 [jeremyheiler] Okay, I feel like a doofus. My script only works for one directory. I
254140 [its_conebred] thanks for the idea. I knew the glob returned an array, I was thinking I
254164 [its_conebred] I think i'm getting closer, but I just need a little help getting over

^ [JOB] Atlanta, Ga
253937 [stonelists g] ...

^ soap4r-1.5.6-RC (1.5.6-GA will be released at 2007-06-09)
253943 [nakahiro sar] 'SOAP4R' is an implementation of SOAP 1.1 for Ruby.  The latest stable
253992 [nakahiro sar] I've written "Changes in 1.5.6."  Please see

^ URL for the most current, still maintained, Ruby Language FAQ?
253944 [james.britt ] Language FAQ.

^ Is [ ] really a method ?
253946 [vineetraja g] Well while running down the text I read that [] (used in case Arrays and
+ 253947 [m_goldberg a] You are really asking about []= which is a different method than [].
+ 253949 [ruby anthrop] Everything is a token in the grammar, of course. When the code is being
+ 253950 [mortonda dgr] a.[](1)

^ developing a frame work
253955 [onlyforrkut ] I have to develop a framework in such way that it has to support work
253966 [tpo2 sourcep] in order to fit your style i'll also try to write the answer without

^ Array index of first bigger number...
253958 [josselin wan] Is there a simple function (I solve it w a loop.. C-minded) to find the
+ 253960 [stefano.croc] anArray.index(anArray.find{|i| i > item})
+ 253963 [shortcutter ] Yes, it can.  Just use Enumerator.
  253965 [josselin wan] thanks, Robert

^ [OLD QUIZ] Pascal's Triangle
253985 [ari aribrown] Hey all,
253989 [james graypr] (1..n).inject(1) { |fact, i| fact * i }

^ work flows in ruby on rails
253993 [onlyforrkut ] does ruby on rails support work flows .if so how to  develop a frame
253999 [TimHunter nc] language.  You'll probably get more & better answers to your question on

^ Module/Class Organization
253994 [transfire gm] I wonder what's the general consensus on modular organization. Overall
+ 254001 [shortcutter ] I'd rather call this "namespace" because that's what the module is all
| 255694 [transfire gm] Sorry for the delayed response on this. So very busy.
| 255715 [shortcutter ] Foo is not part of the namespace but its subclasses are.  Considering
| 255750 [transfire gm] I see. Thanks.
+ 254203 [dan-ml dan42] The only reason this is popular - or even exists at all - is because it
  254311 [rick.denatal] Ah, but all your base belong to us! <G>
  254368 [robert.dober] are belong to us

^ so lost on singleton, metaclass and virtual class
253998 [dorrenchen g] Q1: in pick axe book page 364, it talks about metaclass should be a
+ 254000 [dorrenchen g] # http://whytheluckystiff.net/articles/seeingMetaclassesClearly.html
+ 254002 [shortcutter ] The term "singleton class" has been discussed a lot.  Other names have
+ 254048 [rick.denatal] Here we are talking about singleton classes used to provide instance
  254213 [dorrenchen g] much thanks.

^ I'm new to mailing list
254006 [genusleonid ] ...
254007 [lyle.johnson] I'm subscribed to the ruby-talk mailing list via my Gmail account, and
254017 [jeremyheiler] I use Google Groups instead of Gmail. I just like to keep the mailing
254018 [grblanco gma] I use gmail, and created a filter that assigns all mail from the list
+ 254021 [shortcutter ] Same here.  Although I use a news access most of the time.
+ 254034 [jeremyheiler] Yeah I've thought about that but I have my Gmail e-mail downloaded to
  254038 [fwmailinglis] ...

^ What is the latest ruby quiz?
254009 [genusleonid ] ...
+ 254010 [ben benatkin] Sure. http://www.ruby-forum.com/topic/110306
| 254012 [geniusleonid] ...
+ 254014 [mikemondrago] If you pass the quiz then you're hired :)
+ 254069 [robert.dober] And there is even a site :-P

^ charting / graphng library
254015 [junkone1 gma] I am looking for a good charting library to draw graphs. can someone
+ 254032 [oraora82 gma] maybe? this will helpful.
| 254035 [oraora82 gma] well jesus -_- i'm sorry.
+ 254043 [edder tkwspi] Edwin

^ (none)
254020 [sayash.kumar] ...

^ mixing onlick functions in link_to_function
254026 [michael.ders] <%= link_to_function "expand",
+ 254028 [alex blackke] This quote mark isn't closed.
+ 254039 [Rob AgileCon] <%= link_to_function "expand" do |page|

^ `active_gem_with_options': undefined method `activate'
254036 [daniels171 g] i have some problems with this

^ Re: Pascal's Triangle
254044 [apeiros gmx.] row_num.times { |ticker| ...
254045 [apeiros gmx.] Most of it has already been said, anyway, here's my take based on your

^ JRuby 1.0.0RC3 Released!
254051 [Thomas.Enebo] The JRuby community is pleased to announce the release of JRuby 1.0.0RC3.

^ playing a sound from Ruby - what's the easiest way???? (Mac OS X)
254053 [greg.hauptma] ...

^ No way of looking for a regrexp match starting from a particular point in a string?
254054 [kenneth.m.mc] I'm probably just missing something obvious, but I haven't found a way
+ 254056 [nobu ruby-la] string.index(regexp, n)
| 254059 [phurley gmai] I think he wanted MatchData objects. The String#index method returns
| 254063 [nobu ruby-la] String#index also sets $~.
| + 254064 [phurley gmai] I should have know to never question Nobu Nakada :-), I always forget
| + 254066 [shortcutter ] irb(main):002:0> "ababb".scan(/(a)b+/) {p $~}
| + 254067 [twifkak comc] For that matter, so does String#scan.
|   254113 [rick.denatal] irb(main):001:0> "abcdefabc".scan(/abc/) {puts "#{$~.inspect}, #{$~}"}
|   254201 [kenneth.m.mc] Is $~ thread safe?
|   + 254202 [vjoel path.b] Yes. All the regex match "global" variables are actually per-thread. See
|   + 254234 [shortcutter ] Yes.
|   + 254240 [dblack wobbl] The best thing is really just to use Ruby without thinking about Perl.
+ 254057 [list.push gm] You could match the string but ignore the first part of the match.
| 254061 [list.push gm] If you want to specify the point in the string by number, you could do this.
+ 254058 [phurley gmai] I don't know of anything obvious, but I would probably do something a
+ 254090 [logancapaldo] require 'strscan'
+ 254235 [robert.dober] Hmm apart of using #scan and #index with $~ as indicated, I do not
  + 254236 [robert.dober] My bad how stupid, am I thinking in C????
  + 254237 [transfire gm] How can that be? You have to create a whole new String. If that can be
    254238 [robert.dober] Beating a dead man Tom? As mentioned I had a terrible slip to C in my
    254241 [shortcutter ] Robert, actually string[n..-1] is cheaper than you might assume: I
    254243 [robert.dober] I am afraid that this is not true anymore when the slice is passed as
    254245 [shortcutter ] Copying in this case is not caused by using the string as a parameter
    254248 [robert.dober] def change( x )

^ Re: No way of looking for a regrexp match starting from a pa
254060 [efine145-nos] How about this?
254062 [kenneth.m.mc] That's clever. Obscure, but clever :-). I wonder if the regexp engine is

^ Looking for an array method
254068 [geniusleonid] ...
254070 [dan fluentra] Array#fill?
254071 [geniusleonid] ...
254072 [robert.dober] irb(main):008:0> a='abc'
254075 [geniusleonid] ...
+ 254079 [apeiros gmx.] a = "abc"
| 254081 [robert.dober] This was not my post!!
+ 254080 [robert.dober] Yes #[]=, what is wrong with it? Would you prefer a method with a
| 254082 [list.push gm] a = "abc"
+ 254116 [caduceass gm] None directly that I know of, but ...
threads.html
top