Repository navigation
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()instd: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 bpassesaandb). Linux reads
/proc/self/cmdline, asenvreads /proc/self/environ; on macOS the runtime gives that file from_NSGetArgv.
The test suite passes the lines ofNAME.argsas arguments (tests/run.sh, macos/test-native-c.sh,
linux-arm64/test.sh);tests/stage1/std_argvchecks 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, notargs:argsis a parameter instd:mcp.nihiland in programs, and would collide
- Why: a program could not read its command line, so a tool with options needed a second program in another
Install
curl -fsSL https://nihil-lang.dev/install.sh | shLinux 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.