https://github.com/jdan/fizzbuzz-polyglot
An experiment in writing FizzBuzz in every language, each with its own Docker container
https://github.com/jdan/fizzbuzz-polyglot
docker fizzbuzz
Last synced: 11 months ago
JSON representation
An experiment in writing FizzBuzz in every language, each with its own Docker container
- Host: GitHub
- URL: https://github.com/jdan/fizzbuzz-polyglot
- Owner: jdan
- License: mit
- Created: 2020-10-10T16:01:30.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-07-24T13:27:49.000Z (almost 4 years ago)
- Last Synced: 2025-04-16T14:32:19.617Z (about 1 year ago)
- Topics: docker, fizzbuzz
- Language: Lua
- Homepage:
- Size: 111 KB
- Stars: 11
- Watchers: 2
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## fizzbuzz-polyglot
An experiment in writing [FizzBuzz](https://en.wikipedia.org/wiki/Fizz_buzz)
in every language.
```
rake test
[1/7] ruby...OK
[2/7] javascript...OK
[3/7] javascript/from-npm...OK
[4/7] ocaml...OK
[5/7] ocaml/peano...OK
[6/7] j...OK
[7/7] factor...OK
```
```
rake test javascript
javascript...OK
```
### Adding a new language
Example: [factor](/factor) - https://factorcode.org
1. Create a folder with the language name
2. Write code in your language to print the first [100 numbers in FizzBuzz](/fizzbuzz.example)
3. Add a Dockerfile which will execute your code
4. Test your code with `rake test DIRECTORY_NAME`
#### Adding an additional solution to a language
Example: [javascript/from-npm](/javascript/from-npm)
Wanna show off a new technique/framework/etc? Feel free to follow the same steps
above, in a _separate folder_ under your language's directory.
`rake test LANGUAGE/FEATURE` (i.e. `rake test javascript/from-npm`) will still work.