Pequod is a small PHP-flavoured scripting and templating language for
PiROS. You run it as the psh
command — freestanding scripts from the shell, and, served by the tintin web
server, it turns .psh files into dynamic web pages backed by the
queequeg SQL engine.
Everything here runs on a from-scratch OS: no libc, no framework. Pequod is a tree-walking interpreter that lives entirely in a signed, ring-3 program and reaches the system only through the PiROS syscall ABI. This manual is task-first — each page ends with examples you can paste and adapt.
Running scripts, variables, types, strings, operators, comments, and the two ways Pequod reads a file.
Every control structure, operator, array form, and built-in function — with exact syntax.
Functions, include libraries, reading and writing files, and practical script recipes.
Template mode, <?= ?>, forms with $_GET/$_POST, and safe HTML output.
qq_query, result arrays, writes, error handling, and injection-safe qq_quote.
files/page.psh are relative to your PiROS
/data/<user>/files store. A file cap of 4096 bytes applies to
scripts and to values read/written via psh; large jobs are split with include.
Every example was written against the shipped interpreter.