Getting Started with Nitpick

Welcome to the Nitpick programming language! This guide will take you from installation to running your first deterministic Nitpick program in under 5 minutes.

1. Installation

Nitpick can be installed through our official APT repository, via Docker, or by building from source.

Ubuntu/Debian (APT)

If you are on Ubuntu 24.04 (Noble), the easiest way to install Nitpick is via our official package repository.

# Add the Nitpick signing key
curl -fsSL https://packages.ai-liberation-platform.org/nitpick-archive-keyring.gpg | sudo tee /usr/share/keyrings/nitpick-archive-keyring.gpg > /dev/null

# Add the repository
echo "deb [signed-by=/usr/share/keyrings/nitpick-archive-keyring.gpg] https://packages.ai-liberation-platform.org/ noble main" | sudo tee /etc/apt/sources.list.d/nitpick.list

# Install
sudo apt update
sudo apt install nitpick-compiler nitpick-stdlib nitpick-libc-dev

Using Docker (Multi-Architecture)

For a sterile build environment or CI/CD pipelines, use the official Docker image.

# Run the minimal compiler runtime directly
docker run --rm -v $PWD:/src ghcr.io/alternative-intelligence-cp/nitpick:latest npkc src/main.npk -o main

2. Hello World

Create a file named hello.npk and open it in your favorite editor (or neditor!):

pub func:main = int32() {
    sys::print("Hello, World!\n");
    exit(0i32);
};

Note: In Nitpick, exit() is only permitted in pub func:main or pub func:failsafe.

3. Compilation and Execution

Compile the program using the Nitpick compiler (npkc):

npkc hello.npk -o hello

Run your compiled executable:

./hello
# Output: Hello, World!

Congratulations! You have successfully compiled and run your first Nitpick program. Continue reading the rest of the Language Specs and the Standard Library reference to learn about safety features, the module system, and memory management.