1. Intro
$ brew install ponyc
-
Every Pony Project must be in a folder - the name of the folder will be the default name of the compiled code.
-
Every Pony Project must minimally have a
Main
actor (will be described in detail shortly) — so I suggest naming that filemain.pony
-
Compile with
ponyc
-
Run with the
./project_name
2. Hello World
-
We need to make a project folder:
$ mkdir hello_world
-
We need a
Main
actor:
$ cat <<EOF > hello_world/main.pony
actor Main
new create(env: Env) =>
env.out.print("Hello, World!")
EOF
-
Lets compile our hello_world:
ponyc hello_world
-
Now lets run our hello_world:
$ ./hello_world/hello_world