Skip to content

Instantly share code, notes, and snippets.

@yhara
Last active February 24, 2017 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yhara/fc509fba37e1b6d473dcdc18cd3fd0f4 to your computer and use it in GitHub Desktop.
Save yhara/fc509fba37e1b6d473dcdc18cd3fd0f4 to your computer and use it in GitHub Desktop.
extern i32 putchar(i32);
# P3\n
putchar(80); putd(3); putchar(10);
# W H\n
putd(256); putchar(32); putd(256); putchar(10);
# D
putd(255); putchar(10);
# Output a ppm image
for (x: Float ; 0 ... 256 ; 1) {
for (y: Float ; 0 ... 256 ; 1) {
putd(x); putchar(32); putd(y); putchar(32); putd(0); putchar(10);
}
}
@yhara
Copy link
Author

yhara commented Feb 24, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment