Skip to content

Add gnaw to non-standard Forth implementations - #3

Open
warlyjr-cloud wants to merge 1 commit into
lassik:masterfrom
warlyjr-cloud:add-gnaw
Open

Add gnaw to non-standard Forth implementations#3
warlyjr-cloud wants to merge 1 commit into
lassik:masterfrom
warlyjr-cloud:add-gnaw

Conversation

@warlyjr-cloud

Copy link
Copy Markdown

Adding gnaw under Non-standard Forth implementations, which is where I think it honestly belongs — it borrows Forth's model but makes no claim to the standard (no IMMEDIATE/POSTPONE, no CREATE/DOES>, no vocabularies, and the README says so plainly).

It's a small language in Rust: whitespace-separated words, data stack, : name ... ;, a separate return stack (>r r> r@), if/else/then, begin/until, counted do/loop with i, and a see disassembler. Single-pass compiler (jumps back-patched from a stack of pending holes, no AST) into a bytecode VM.

What makes it not-just-another-toy-Forth is the set of built-in words for byte transforms used in CTF and reverse-engineering work — hex>bytes, xorkey (repeating key), rot13, b64encode/b64decode, brute (all 256 single-byte XOR keys, filtered by a text heuristic), and slurp to pull a real file in. They share one ( addr len -- addr len ) shape so they compose:

"051807040f010d15113c1d153c150a0a02031e" hex>bytes "ctf" xorkey type cr
→ flag{gnaw_is_alive}

There's a WebAssembly playground if it's easier to try than to clone. No hard feelings if you'd rather keep the list to more established implementations.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant