Source code for the examples in a book.
See the test.sh
files within the individual directories to see how to build and run the examples, most of which are scripts with internal assertions.
The examples here have been tested on a machine running macOS using the following language implementations and versions:
Language | Version | Notes | |
---|---|---|---|
Ada | |||
APL | ngn/apl demo | ||
AWK | |||
Bash | |||
C | c11 | Apple LLVM version 7.3.0 (clang-703.0.31) | |
C# | Mono 4.4.1 | ||
C++ | Apple LLVM version 7.3.0 (clang-703.0.31) | ||
Ceylon | |||
Chapel | |||
Clojure | 1.8.0 | ||
CoffeeScript | 1.10.0 | (Run under Node 6.3.0) | |
Crystal | |||
D | |||
Dart | 1.18.1 | ||
Elixir | |||
Elm | 0.17.1 | ||
Erlang | Erlang/OTP 19.0.2 | ||
Factor | |||
F# | |||
Fortran | GNU Fortran (GCC) 6.1.0 | ||
Go | 1.7 | ||
Hack | |||
Haskell | 2010 | The Glorious Glasgow Haskell Compilation System, version 8.0.1 | |
Idris | |||
Io | |||
Java | 1.8.0_66 | ||
JavaScript | Node 6.3.0 | ||
Julia | 0.4.5 | ||
K | Kona Win.3.39-69 | Kona is an open source version of K | |
Kotlin | |||
LOLCODE | 0.11.2 | ||
Lua | 5.3.2 | ||
Mercury | |||
Nasm | 2.12.02 | ||
Nemerle | |||
Nim | |||
OCaml | |||
Perl | 5.24.0 | ||
Prolog | |||
PureScript | 3.5.2 | ||
Python | 3.5.2 | ||
R | |||
Racket | |||
Ruby | 2.3.1 | ||
Rust | 1.11.0 | ||
Scala | 2.11.8 | ||
Smalltalk | |||
Standard ML | mlton-20130715 | ||
Swift | 3.0 | swiftlang-800.0.46.2 clang-800.0.38 | |
Tcl | |||
Wake | |||
Whiley |