Skip to content

Nihil v4.20.0

Latest

Choose a tag to compare

@github-actions github-actions released this 29 Nov 14:43
eba21d5

A program can read its command line. argv() in std:env.nihil gives the arguments it was started with, so a
tool with options no longer needs a wrapper in another language to turn them into input.

  • argv() in std:env.nihil: the arguments the program was started with, after its own name, as [STRING]
    (./prog a "b c" "" gives ["a", "b c", ""]; nihil run prog.nihil a b passes a and b). Linux reads
    /proc/self/cmdline, as env reads /proc/self/environ; on macOS the runtime gives that file from _NSGetArgv.
    The test suite passes the lines of NAME.args as arguments (tests/run.sh, macos/test-native-c.sh,
    linux-arm64/test.sh); tests/stage1/std_argv checks an empty argument, spaces and UTF-8
    • Why: a program could not read its command line, so a tool with options needed a second program in another
      language (a CLI in Python, for a simulation engine written in Nihil) only to turn them into input. The name is
      argv, not args: args is a parameter in std:mcp.nihil and in programs, and would collide

Install

curl -fsSL https://nihil-lang.dev/install.sh | sh

Linux on x86_64 and on ARM64 (with binutils), and macOS on Apple silicon (with the Xcode Command Line Tools).

Each package has a build provenance attestation: gh attestation verify nihil-linux-x86_64.tar.gz --repo nihillang/nihil.