I've been stuck with improving the "canonical" (from comp.lang.ruby in
2007) FizzBuzz golf solution for several weeks now, and can't get this
out of my head... Very frustrating!
I've tested many approaches, based on various data structures, but
I really can't make progress (I always stay around 56B).
I know the current record is at 50B and this drives me mad :-)
Could someone who know how these records have been reached give me some
hints? I am willing to go on by myself (not getting the full solution),
so this would *really* be greatly appreciated.
Seems like golfing is less popular these days than some years ago, but
once you try to play on a problem it is very addicting...
Many thanks in advance if some people can help,
-- DW
Haha! There was a stream of FizzBuzz question on the IRC (#ruby on irc.freenode.net) for some bizarre reason :)
Not really an answer to your question, but one day I could not sleep and was reading said channel looking at all the FizzBuzz implementations, and this was born: http://github.com/kwilczynski/fizzbuzz
This will give you: FB.fizzbuzz(1, 100); or if you do this:
class FizzBuzz ; class << self ; alias :fb :fizzbuzz ; end ; end
Then even this: FB.fb(1, 100).
Anyway, its a silly project :) And different approach to solving this problem :)
> I'm not on IRC, so I do not understand what you mean...
What I meant was that a lot of people in a course of one day / night (depending on your time zone) was asking about FizzBuzz and how to implement it and how to make it quicker, etc. Which was rather odd that many people in short time frame were asking about it :) I found it inspiring, and hence my take on it was born.