News for hackers. Stuff that matters.
Re:Fizz Buzz codegolf challenge in 15 languages by ollysb on Friday December 14, 2012 @12:44PM (#4922138)
Bit confused by the ruby version. The signature you're given is:

    #!/bin/ruby

    # Head ends here
    def fizzbuzz_solve n

    end

    # Tail starts here 
I presumed this meant you were supposed to return a value of n, fizz, buzz or fizzbuzz for the value of n. When I tried to compile I got a score of 0 though. What are you supposed to do with the value of n, solve fizzbuzz for 1..n ?
Re:Fizz Buzz codegolf challenge in 15 languages by hallowtech on Friday December 14, 2012 @12:47PM (#4922150)
In other languages n is the number between 1-100 passed into the method. The loop is outside of fizzbuzz_solve.
Re:Fizz Buzz codegolf challenge in 15 languages by ollysb on Friday December 14, 2012 @12:49PM (#4922160)
I presumed you just return the value and that the print was in the outer loop, seems you need to include the print statement in your method.
Re:Fizz Buzz codegolf challenge in 15 languages by rvivek on Friday December 14, 2012 @12:58PM (#4922211)
Sorry this is wrong. Removed the templates. You've to output from 1-100.
Re:Fizz Buzz codegolf challenge in 15 languages by 4ngle on Friday December 14, 2012 @12:50PM (#4922166)
The boilerplate (include the shebang) counts towards your score, so just ditch it and start anew.