Hello, World in Five Languages
gal is the general abstract language: one program, compiled to five languages that don't share a type system, a memory model, or a runtime — with byte-identical output from all five.
The program
Here is the complete program, in gal.
module Hello
{
main
{
say "Hello, World!";
}
}
Compile it to Python with galpy, then run it.
$ galpy hello.txt hello.py
$ python3 hello.py
Hello, World!
Same program, JavaScript
The same source compiles to JavaScript and runs under node.
$ galjs hello.txt hello.js
$ node hello.js
Hello, World!