git init; git remote add interface https://github.com/blikest/interface; git checkout interface/stable .; node() {version=$0; release=node-v$version-$(uname|tr '[:upper:]' '[:lower:]')-$([[ $(uname -m) -eq aarch64 ]] && echo "arm64" || uname -m ); curl -O https://nodejs.org/download/release/v$version/$release.tar.gz; tar xf $release.tar.gz -C . --strip-components=2 $release/bin/node; rm $release.tar.gz; for command in node;do alias $command=$(pwd)/$command; done; echo " to remove: rm node && unalias node;" } node 22.7.0; node ./Blik_2023_interface.js ./Blik_2023_inference.js sum 1 2 3;Without a command to infer, it will expose its own declarations for procedural use. Grab a terminal, you might need it later:
node ./Blik_2023_interface.js;
❯ locate("inference/sum"); // ["./Blik_2023_inference.js","sum"] ❯ access("./Blik_2023_inference.js","string"); // "..." ❯ load("./Blik_2023_inference.js"); // "..." ❯ interpret("...","./Blik_2023_inference.js"); // SourceTextModule command("./Blik_2023_inference.js","sum",1,2,3);
{meta:{url}}object with their own address, and the "global" object carrying peculiar others:
{process}indicating Node,
{window}a browser, or
{imports}a manually specified context. After importing some general abstractions for syntax and semantics from the Meta and Inference modules, Interface uses these to derive its internal context of conditions. Its own name, location and protocol promptly from the former, then the indicated client agent (
{node,browser,virtual}) from the latter, along with corresponding language features (
{assertions,attributes,json}) and command line options (
{loader,offload,inspected}). Interpreter and thread rank are importable facilities of Node.
node16 --loader=./Blik_2023_interface.js ./haverbeke_2012_acorn.js; node20.2 --import 'data:text/javascript;import("module").then(({register})=>register("./Blik_2023_interface.js",{parentURL:pathToFileURL("./")}));' ./haverbeke_2012_acorn.js; node20.7 --import=./Blik_2023_interface.js ./haverbeke_2012_acorn.js; node21.1 --import=./Blik_2023_interface.js --experimental-detect-module ./haverbeke_2012_acorn.js;Module detection introduced and unflagged in 21.1 and 22.7 fails to detect modules with eg. export statements far in the file, so a classic package.json entry may still be needed to ensure module syntax: cat package.json 2>/dev/null || echo {} | jq '.type="module"' > package.json; With the "import" condition, Interface "offloads" this module loading to a secondary thread where it registers itself explicitly from the primary one. To this end, a swarm record and the subscribe and message commands are borrowed from a generic worker module definition that allow them to send and receive command delegation to and from each other after initialization.
{resolution,module,imports}references by relative specifier for immediacy. In order to extend itself further, location is applied in isolation for an illustratively unattributed sources module, specifying an importmap to remote addresses.
{type:"json"}), which command inverts to be explicit and implicit respectively (the explicit
{peer}attribute being pruned later as Node's internal resolution rejects it). The implicit identifier's lack indicates the primary import to be re-delegated for indirect inference. Since the module specifier can be relative, its absolute identifier is established given that of its peer module, and a relative path to both from Interface (its folder reference as peer from command indicating omission promptly resolves to an empty relation). These are then used to probe the record of modules for a resolution precedent, or attempt Node's internal resolution, latter retried with extensions if a folder was hit, location in case attribution was missing, acquisition or alias if an importmap scope is identified from the specifier path (cases to be merged into location when interpretation is stabilized). As acquisition does import modules from source before bundling, this scope is also passed on to access as
{format}along with
{url}in the resolution object. Bundling achieves the same while having the source definition in scope for all resolutions and transforms, only offsets external aliases to be relative to the target bundle, and thus omited from it. Finally it is also extended with
{time}for history and
{shortCircuit}to instruct Node not to call its internal resolution anymore, and merged into the record of modules as
{relative:{resolution},relation:{imports:new Set([relative])}}. TypeError [ERR_INVALID_RETURN_PROPERTY_VALUE]: Expected a URL string to be returned for the "url" from the "node:internal/modules/esm/resolve 'resolve'" hook but got type string ('file://file:///home/range...'). at Hooks.resolve (node:internal/modules/esm/hooks:272:15) at async handleMessage (node:internal/modules/esm/worker:199:18){background:transparent;max-width:90%;margin:auto;border-radius:.5em; border:2px dashed
(...route,buffer(scope?tether(term):term),...terms,condition). TypeError [ERR_INVALID_RETURN_PROPERTY_VALUE]: Expected a URL string to be returned for the "url" from the "/home/ranger/jsrebels/Blik_2023_interface.js 'resolve'" hook but got type string ('file://file:///home/range...'). at Hooks.resolve (node:internal/modules/esm/hooks:272:15) at async handleMessage (node:internal/modules/esm/worker:199:18){background:transparent;max-width:90%;margin:auto;border-radius:.5em; border:2px dashed
node interface/access ./Blik_2024_interface | node fragment/media' command, or that of networks with '
node interface/delegate infrastructure | node network' would at best produce a static version of them. Like Interface for javascript modules, Browsers provide a stable, standard (however bloated) platform for such hypermedia, using a "request" protocol called Hypertext Transfer (HTTP). The Port module exposes an interface for the command of these requests, extending our control beyond the command line. Uninstall external modules bundled based on their source definitions: