nntrac

No-nonsense TRAC T-64 reimplementation under 1000 SLOC of ANSI C
git clone git://git.luxferre.top/nntrac.git
Log | Files | Refs | README | LICENSE

commit 5bd1524917a0589ef1a89ceb4d69df42f2d40f59
parent 2535dabf08a9e4fd041966efcf3c75de9db4a538
Author: Luxferre <lux@ferre>
Date:   Thu, 10 Aug 2023 08:47:34 +0300

rdm fx

Diffstat:
MREADME.md | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -174,6 +174,12 @@ Because this is probably the only functional scripting language that can be full While having more "batteries included", T-84/T2001 had diverged from the original elegant design by switching to name suffixes to decide what to do with the function return value. This is much less flexible and less convenient for large-scale programs. T-64, on the other hand, can be easily extended (when really necessary) to do all the same things as T-84 allowed out of the box without sacrificing its core simplicity and flexibility. +### Is nntrac binary-safe? + +In general, no. All nntrac programs are expected to not contain null bytes and the bytes from 248 to 255. Since nntrac, like all other TRAC dialects, is fully homoiconic and any piece of data can be treated as code, your data must not contain these bytes either. Emitting bytes with these values using the `av` primitive can and most probably will result in undefined behavior. + +To process arbitrary binary data in nntrac script, it is mandatory to convert it into readable format (like hex or dec) with external tools (like `od` or `xxd`) before feeding it to the script. The nntrac interpreter contains all features required for your script to be able to process this kind of data. + ### Is nntrac UTF-8-safe? Mostly. All the internal meta characters are chosen so that they never occur in any valid UTF-8 sequence. All primitives, however, operate on individual bytes, so the primitives that allow you to input/output/manipulate a single byte or some numbered bytes are not UTF-8-safe. These include `rc`, `cm`, `cc`, `cn`, `ac` and `av` primitives.