NPIET-FOOGOL

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
FILES
AUTHOR
BUGS
SEE ALSO

NAME

npiet-foogol − a foogol to piet compiler

SYNOPSIS

npiet-foogol [ −v | −d ] [ -w <n> ] [ -b <n> ] [ -cs <n> ] inputfile

DESCRIPTION

npiet-foogol translates foogol input to a piet program. So npiet-foogol creates a picture from foogol source. The picture is, well should be, a valid piet program and can be executed, eg. by the npiet interpreter.

OPTIONS

−h

print usage help and exit.

−v

be somewhat verbose.

−d

print debug output (lot’s of more or less cryptic and mostly useless blurb).

−w <n>

Sets a wrap-width in pixel. This gives the compiler a hint about a block width to use when generating expressions or statements.

Usually code is generated left to right until the wrap-width is reached and then to the left. To avoid codel overlaps in loops and conditionals, code is generated with a virtual left border, but this wrap-width too. Here is lot of optimisation possible.

−b <n>

Sets the base used by generating a number. The default is 7 and a value greater or equal of 2 is acceptable.

In a piet program the number of codels (here pixels) of a color block represents a number. To be able to push a large number on the stack without wasting a lot of ink, the number is calculated and the given base is used to do so.

−cs <n>

Sets the output codel size to n pixels. The default is 1. Use a higher value to get a larger output picture.

−rnd

Experimental feature to set the start codel not always to red, but to a somewhat more random value. This does not work reliable - please avoid if running in trouble...

−o <filename> Sets the output filename. Default is npiet-foogol.png.

inputfile

The foogol program to read. Use a - to read from <stdin>.

FILES

npiet-foogol.png - default name of the piet program file to write. It is overwritten if it exists.

AUTHOR

Erik Schoenfelder <schoenfr@web.de>.

BUGS

Surely lots.

SEE ALSO

npiet(1), npietedit(1)
http://www.bertnase.de/npiet/