Show HN: Hh.ht – a lightweight JSON-extended scripting language

github.com

2 points by chunpulee 5 hours ago

Hi all,

I've built a small scripting language called hh.ht.

It extends JSON with an embedded C-like code block that can directly manipulate the JSON object. The format contains a JSON part and a code part in `{ ... }`.

Features: - JSON + C-like code in one file - Weak typing and minimal syntax - `this` refers to the JSON section - JSON iteration in defined=>/reverse=</ascending=+/descending=- order - ljson objects can be executed as functions - Lightweight interpreter (186 KB) - Reference-counting GC - Full C FFI (loadlib + dynamic .so) - Bytecode save/load (savebc/loadbc) - Depends only on libc · Runs on any Linux since glibc 2.34

File size: 190632 bytes (exactly, -O2, x86_64 Linux)

Repo: https://github.com/chunpulee/hh.ht

I’d love feedback or criticism. Thanks!