Hints to achieve FizzBuzz golf in < 56B

Discussion in 'Ruby' started by Damien Wyart, Sep 30, 2012.

  1. Damien Wyart

    Damien Wyart Guest

    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,
     
    Damien Wyart, Sep 30, 2012
    #1
    1. Advertisements

  2. Hey,

    [...]
    [...]

    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
     
    Krzysztof Wilczynski, Oct 9, 2012
    #2
    1. Advertisements

  3. Damien Wyart

    Damien Wyart Guest

    I'm not on IRC, so I do not understand what you mean...
     
    Damien Wyart, Oct 9, 2012
    #3
  4. Hey,

    [...]
    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
     
    Krzysztof Wilczynski, Oct 9, 2012
    #4
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.