/hello-world

An "Hello world!" which works in 17 languages. Mirror of https://gitlab.com/DPDmancul/hello-world

Primary LanguagePythonMIT LicenseMIT

Hello world!

Davide Peressoni (davide.peressoni@tuta.io)

An "Hello world!" which works in:

  1. (Literate) Agda
  2. C
  3. C++
  4. Objective-c
  5. CoffeeScript
  6. Brainf***
  7. (Literate) Haskell
  8. Julia
  9. Nim
  10. Perl
  11. PHP
  12. Python
  13. Raku
  14. Ruby
  15. Rust
  16. *sh (sh, bash, zsh, ...)
  17. fish

Explanation

See How does it work?

Usage

  1. temp=$(mktemp --directory) && cp hello "$temp/hello.lagda" && cd "$temp" && agda --compile hello.lagda && ./hello
  2. gcc -x c hello && ./a.out
  3. g++ -x c++ hello && ./a.out
  4. clang -x objective-c hello && ./a.out
  5. coffee hello
  6. ./brainf.py hello
  7. temp=$(mktemp --suffix=.lhs) && cp hello "$temp" && runghc "$temp"
  8. julia hello
  9. temp=$(mktemp --suffix=.nim /tmp/tmpXXX) && cp hello "$temp" && nim c -r "$temp"
  10. perl hello
  11. php hello
  12. python3 hello
  13. raku hello
  14. ruby hello
  15. rustc hello -o hello.out && ./hello.out
  16. sh hello, bash hello, zsh hello
  17. fish hello

Automatic test

make test

You can optionally pull all dependencies with

nix-shell --pure --run make

License

Released under MIT license