How to install Norscode
A step-by-step guide to getting the nc runtime up and running on Linux, macOS, and Windows.
This guide takes you through installing Norscode from scratch, no matter which operating system you are on. All you need is the nc runtime — a single tool that checks, runs, and serves your code.
1. Download the runtime
Go to downloads and get nc for your platform. There are builds for Linux, macOS, and Windows. You download a single file — there is no package registry to set up and no dependencies to install alongside.
2. Make it executable and put it on your path
On Linux and macOS, make the file executable and move it somewhere on your PATH:
chmod +x nc
sudo mv nc /usr/local/bin/On Windows, add the folder containing nc.exe to the Path environment variable, so you can run nc from any folder.
3. Check that it responds
On any platform, confirm the installation like this:
nc --versionIf you get a version number back, you are ready.
4. Run your first program
Create a file hei.no:
funksjon start() -> heiltall {
skriv("Hei, verden!")
returner 0
}And run it:
nc run hei.noIf you see Hei, verden! in the terminal, everything works.
Common problems
- "command not found" or "not recognized":
ncis not on yourPATH. Revisit step 2. - Refuses to run on macOS: the first time, the system may block a downloaded binary. Allow it in System Settings under Privacy & Security.
- Wrong architecture: make sure you downloaded the build that matches your machine — Intel vs. Apple Silicon, x86-64 vs. ARM.
Next steps
Now that nc is in place, take Getting started for a full walkthrough, or browse the examples.
Check that everything fits together
A quick way to confirm that the installation is complete is to run the three commands the tool consists of. nc --version should give a version number, nc check hei.no should say the file is fine, and nc run hei.no should print Hei, verden!. If all three work, you have the runtime, the type checker, and execution all in place.
Keep the runtime up to date
Norscode is in active development, and new versions come out regularly. Updating is the same job as installing: download the new nc file from downloads and place it over the old one in the same spot on your PATH. Your programs need no change — they are ordinary .no files, and a newer runtime runs them as before. If you want to know which version you have, nc --version will tell you.
The same files across platforms
It makes no difference whether you wrote the program on macOS and run it on Linux. The source code is the same, and an NCB built on one platform runs on another as long as the runtime is the same version. That makes it easy to develop locally and deploy to a server somewhere else entirely.
When something still doesn't work
- "Permission denied" on Linux or macOS: the file lacks execute permission. Run
chmod +x ncagain. - Wrong architecture: a binary for Intel does not run on Apple Silicon, and vice versa. Download the build that matches your machine.
ncexists, but the program does nothing: remember that execution starts in thestartfunction. Without it, the program doesn't know where to begin.
If you still can't get any further, include what nc --version says and which platform you are on when you ask — see the contact page.
Related
- Norscode or Python?An honest comparison of two accessible languages — one where Python also comes out well.
- Norscode or Go?Two languages that value simplicity and a single deployable unit — but choose differently on syntax and security.
- Norscode or JavaScript?JavaScript is everywhere. In some areas a young language cannot compete — in others, that is exactly the point.