Hints to achieve FizzBuzz golf in < 56B

D

Damien Wyart

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,
 
K

Krzysztof Wilczynski

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
 
D

Damien Wyart

* Krzysztof Wilczynski said:
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...
 
K

Krzysztof Wilczynski

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top