{
"path": "/projects/sigi",
"site": "at://did:plc:ofrbh253gwicbkc5nktqepol/site.standard.publication/3mfyq5mpohw25",
"tags": [
"c",
"compiler",
"python"
],
"$type": "site.standard.document",
"title": "Sigi",
"description": "A pure symbolic stack language — all syntax is punctuation, no alphanumeric keywords.",
"publishedAt": "2026-04-10T00:00:00.000Z",
"textContent": "Sigi is an esoteric stack language where all syntax consists of symbols and punctuation. No alphanumeric keywords anywhere.\n\nCharacter set: !@#$%^&()-+=[]{}|;:'\",.<>/?\\~ plus digits 0-9\n\nInstallation\n\nThis installs the sigic compiler.\n\nUsage\n\nSymbol reference\n\n| Symbol | Name | Effect |\n|--------|------|--------|\n| !N | PUSH | Push number N (int or float) |\n| @ | DUP | Duplicate top of stack |\n| # | SWAP | Swap top two elements |\n| $ | DROP | Discard top of stack |\n| + | ADD | Pop b, pop a → push a + b |\n| - | SUB | Pop b, pop a → push a - b |\n| ` | MUL | Pop b, pop a → push a b |\n| / | DIV | Pop b, pop a → push a / b |\n| % | MOD | Pop b, pop a → push fmod(a, b) |\n| = | EQ | Pop b, pop a → push 1 if equal, else 0 |\n| < | LT | Pop b, pop a → push 1 if a < b |\n| > | GT | Pop b, pop a → push 1 if a > b |\n| ~ | NOT | Pop a → push 1 if zero, else 0 |\n| | | PRINT | Pop and print as number |\n| ^ | PRINTC | Pop and print as character |\n| ? | INPUT | Read number from stdin |\n| : | STORE | Pop address, pop value → store to var |\n| <n> | LOAD | Push value of variable n (digits 0-99) |\n| [ body ] | WHILE | Loop while stack top is nonzero |\n| { then ; else } | IF-ELSE | Pop condition, execute then or else |\n| {N body } | FUNC | Define function N (0-99) |\n| (N) | CALL | Call function N |\n| \"text\" | STRING | Print characters |\n| 'x | CHAR | Push character code |\n| \\ | COMMENT | Line comment (rest of line ignored) |\n\nData model\n\n- All values are 64-bit IEEE 754 doubles\n- Stack depth: 1000 by default\n- 100 variables: vars[0]–vars[99]`\n\nExamples\n\nHello World\n\nArithmetic\n\nStack operations\n\nVariables\n\nFunctions\n\nControl flow\n\nWhile loops\n\nLoop semantics: peek at stack top. If zero, exit. Otherwise execute body. Body must leave updated counter on stack.\n\nFactorial\n\nProject layout\n\nLicence\n\nAGPL 3.0",
"canonicalUrl": "https://docs.ewancroft.uk/projects/sigi"
}