A perfectly normal scripting language psychoscript.com · 11 points · 2 comments ...
HN Best 200 @best
A perfectly normal scripting language psychoscript.com · 11 points · 2 comments · HN thread
TL;DR NormalScript is a small bytecode virtual machine that runs a subset of JavaScript inside a Node or Bun process, aimed at running short scripts and agent 'code mode' with host-provided functions. The landing page, written in a deadpan corporate style, pitches it with code examples for chaining host calls and suspending, saving and resuming runs as bytes; it also contains an ironic 'declaration of normal viewing' that hints at an interactive visual effect.
- Pure JavaScript package for Node 24 or later or Bun 1.4 or later, with no WASM module, native addon, or worker to set up.
- Runtime.make takes a globals function; plain objects of host functions become namespaces, and Host.fn wraps ordinary functions.
- Runs are bounded by timeoutMs or an AbortSignal; scripts end at the end of their body, so un-awaited work is interrupted.
- A paused run can be suspended with program.suspend(), serialized with toBytes(), and resumed later with fromBytes() and runtime.resume().
- Unsupported features include fetch, fs, process, DOM, eval, Proxy, Reflect, private members and TypeScript syntax; the page reports 19,408 test262 files passing and 2,845 skipped.
- Distributed under the MIT License.
Discussion The thread is very small, with only two comments. One commenter praises a visualization that appears when clicking the smile on the page, calling it one of the coolest things seen on the web. A second commenter says the effect requires WebGPU and suggests enabling it if the visual does not show up. The mood is light and amused, focused on the page's playful design rather than the technical product.
- The hidden interactive visualization is impressive (some): One commenter singles out the visualization revealed by clicking the smile as one of the coolest things they have seen on the web. The comment is enthusiastic about the site's design rather than the scripting engine.
- The effect needs WebGPU to work (a few): Another commenter notes that the visual only appears with WebGPU, and advises enabling it if the user does not understand what they are seeing. This is a practical hint for readers whose browser does not support it.
#javascript #virtualMachine #embeddedScripting #nodejs #bun #webgpu