Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hints to achieve FizzBuzz golf in < 56B

48 views
Skip to first unread message

Damien Wyart

unread,
Sep 30, 2012, 7:59:20 AM9/30/12
to
Hi,

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

Krzysztof Wilczynski

unread,
Oct 9, 2012, 7:13:34 AM10/9/12
to
Hey,

[...]
> Very frustrating!
[...]

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 :)

KW

Damien Wyart

unread,
Oct 9, 2012, 9:14:02 AM10/9/12
to
* Krzysztof Wilczynski <krzysztof....@linux.com> in comp.lang.ruby:
> Haha! There was a stream of FizzBuzz question on the IRC (#ruby on
> irc.freenode.net) for some bizarre reason :)

I'm not on IRC, so I do not understand what you mean...

--
DW

Krzysztof Wilczynski

unread,
Oct 9, 2012, 11:34:17 AM10/9/12
to
Hey,

[...]
> 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.

Anyway, good luck with your pursue :)

KW
0 new messages