NPIET(1)
π NPIET(1) π
okay so you opened the manual page for npiet, section 1 of the General Commands Manual β welcome, bestie, let's get you fluent π
β¨ NAME β¨
npiet β an interpreter for the piet programming language πΌοΈ
π SYNOPSIS π
npiet [ -v | -q | -d | -dpbug | -v11 | -t ] [ -e <n> ] [ -tpic ] [ -tpf
<n> ] [ -tps ] [ -ts <n> ] [ -te <n> ] inputfile
π DESCRIPTION π
So npiet is an interpreter for the piet programming language, and the whole vibe of piet is that the programs are literally pictures, built out of 18 colors plus black and white, where changes in the color are stack-based commands. like, the art is the code, no cap π¨
If the input (supported is ppm and optional gif and png format) includes unknown colors, they are substituted per default by white (optional by black or leading to an error). choose your fighter ig π
The input picture is per default examined, if it is zoomed (for better "readability"), and the zoomfactor (the codelsize) is automatically guessed β and if this failes, please specify the codelsize by the -cs option. lowkey she tries her best but sometimes you gotta step in π«Ά
Special fun gives the optional output of a trace picture β¨ If the GD library is compiled in, the npiet interpreter can paint the trace of the program run to a png file, named npiet-trace.png. Different zoom factors and additional options lead to varying detail and readability β it's giving customization, it's giving options π
π OPTIONS π
-hβ print usage help and exit. she's helpful, she's brief, she's iconic π-vβ be somewhat verbose. not a lot, just somewhat. a lil chattier than usual π£οΈ-qβ be more quiet. shhh, she's concentrating π€«-dβ print debug output (lot's of more or less cryptic and mostly useless blurb). fr fr it's a lot of nonsense but it's our nonsense π-dpbugβ changes the execution mode of the perl piet interpreter. this changes the behavior when crossing white blocks (wrong interpretation of blocking after white). it's the legacy chaos mode, ok bestie π-v11β changes the execution mode to thenpietversion 1.1 interpreter. this changes to the first fixed version of corrected behavior when crossing white blocks. the glow-up era β¨-tβ print trace details. For every step the interpreter print some details:
trace: step 0 (0,0/r,l nB -> 3,0/r,l dB):
action: push, value 9
trace: stack (1 values): 9
The trace step with the codel x,y coordinates and the dp,cc values and the codel color (here: normal Blue to dark Blue). The action describes the command executed and the stack with its values is shown. little step-by-step receipts, we love to see it π§Ύ
-e <n>β Sets the number of execution steps. This allows to abort a erroneous program, but the default is unlimited, ie. run until program end (or forever ;-). so yeah, the default is chaos, set this if you fear infinity π³-tpicβ Create a trace picture. The file is namenpiet-trace.png. The picture is written on program exit, or if the normal trace options is specified too, after every step (makes execution notably slower, because this is quite expensive, but maybe helpful). (only avail if compiled with gd support). art class but make it runtime ποΈ-tpf <n>β Sets the size of the pixel in the trace picture. For small input files, eg.20x20codels, the resulting trace picture is640x640pixel with apizelzoom of32. (yes, 'pizel'. we stan a typo π ) Just try different values, to get useable readability versus picture size. There are some internal values, where different information is written by different zoom factors. (only avail if compiled with gd support).-tpsβ Do not include thedp/cctries in the trace picture. This can increase readability with smaller pixel zoom factors. Additional there are some internal values too, where different information is written depending of the zoom factor. (only avail if compiled with gd support). decluttering queen π§Ή-ts <n>β Please look at-te <n>just below: π-te <n>β Values where to start and end when painting a trace picture. To avoid clobbered output when running in loops, for better readability a start and an end step can be specified.
Note: this does not stop or change the program execution or the textual trace output. It affects only the saved image.
Note: this enables now tracing, so specifying -tpic is no longer necessary.
Note: if you specify -te 0 you can easily get an bigger picture of the input saved ;-) πΌοΈ
inputfileβ The picture to read. Forppm-formatted pictures this may be a-to read from<stdin>. pipe it in, we love a stdin moment π
πΈ EXAMPLES πΈ
npiet -tpic hello.gif
run the hello.gif program and create a trace file named npiet-trace.png . that's it, that's the whole tutorial, slayed π
π¦ FILES π¦
npiet-trace.pngβ name of the trace picture file. It is overwritten if it exists. so don't get attached to your old trace, she's getting replaced π
π AUTHOR π
Erik Schoenfelder <schoenfr@web.de>. -dpbug option by Bertram Felgenhauer <int-e@gmx.de>.
shoutout to the devs, absolute legends π«Ά
π§ BUGS π§
None seen β they are hidden in the oil painting ;-) π
β SEE ALSO β
and that's the whole page babes β¨ this is npiet v1.3, dated Aug 2011, so like, vintage but make it iconic β go paint some code, bestie π¨π
π¦ where this page comes from
- nixos 26.05: npiet 1.3f
- nixpkgs unstable: npiet 1.3f
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms