Skip to content

christabor-archive/fizzbuzz-world-tour

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FizzBuzz - World Tour!

Update

I found this gem, and well frankly, I've kind of lost hope. I will probably get to these later, when I'm bored, but I think I know when I'm licked. http://rosettacode.org/wiki/FizzBuzz

Here are some more for good measure http://en.wikipedia.org/wiki/Esoteric_programming_language http://esolangs.org/wiki/Esoteric_programming_language

Why would I do this?


  • I'm a little off my rocker
  • I wanted to learn some basics of various languages and expand my understanding, by using a common, simple program. The functional languages, in particular, taught me some interesting things.
  • If a future employer wanted to ask me for a fizzbuzz test (laughable), I could just point them to this, and say "Hey, I've done it in over N languages!"
  • I know what you're saying... "COBOL -- Really?" Yeah. I know.
  • Why not!
  • P.S. Brainf*ck loops are evil

List of languages currently completed


  • Python
  • Perl
  • JavaScript
  • Ruby
  • Go
  • Lua
  • Scala
  • Rust
  • Bash
  • Java
  • CofeeScript
  • R
  • Shell

Running/testing


I've tried to write files with the conventions of that particular language in mind, as best as I could find quickly and easily.

I've kept it very simple: to run, I use standard bash commands, and pipe the results to a file to run a diff and thus compare results (e.g. node fizzbuzz.js >> js-test.txt).

In many cases, you will need to install an interpreter to run each file.

Note: a couple files, notably R, output the contents of the file, as well as any stdout statements. I couldn't find a way to prevent that, though I am guessing it is some kind of flag when running the file via command line.

Some languages require compilation. You'll need to install the correct compiler in that case. For example, I use brew install [compiler-name] for all the languages that require it.

Unfinished


  • Clojure
  • Obj-c
  • Scheme
  • Pascal
  • Cobol
  • C++
  • Brainfuck
  • LISP
  • ADA