DEV Community

Cover image for NoB (Noticeably Better): a compiled language that tries to stay out of your way
RoTSL
RoTSL

Posted on

NoB (Noticeably Better): a compiled language that tries to stay out of your way

Most new languages promise the same things: performance, simplicity, better tooling. NoB is trying to hit those too—but the interesting part is how it actually does it.

At its core, NoB is a compiled language that targets C++20, with a second execution path through a bytecode VM. That split ends up being more practical than it sounds.


What NoB actually is

NoB compiles .nob code into C++20, then uses clang++ to produce a native binary.

There’s also a VM mode that skips compilation entirely and runs bytecode instead.

That gives you two very different workflows:

  • Native pipeline → slower startup, fast runtime
  • VM pipeline → instant startup, slower runtime

In practice, it feels like using two tools under one language.


The two pipelines (and when they matter)

Native (default)

nob file.nob
nob file.nob -o app
Enter fullscreen mode Exit fullscreen mode

This is what you’d use for anything serious.
• Compiles via C++20
• Uses clang++
• Runs as a native binary
• Supports everything (networking, threads, async, etc.)


VM mode

nob --vm file.nob

Enter fullscreen mode Exit fullscreen mode

This skips the compiler completely.

It’s useful for:
• quick scripts
• REPL work
• testing ideas

But it’s not feature-complete. Networking, threading, and some advanced features don’t work here.


The syntax (closer to Python than C++)

The syntax leans readable without being too loose.


set name to "Alice"

function greet(name)
  return "Hello, {name}"
end

print greet("Bob")

Enter fullscreen mode Exit fullscreen mode

A few things stand out:
• set vs let (mutable vs immutable)
• 1-based indexing
• string interpolation built-in
• structured blocks without braces

It’s easy to pick up, especially if you’ve used Python or Lua.


Features that are actually interesting

  1. Tail-call optimization

Recursive functions don’t blow the stack if written in tail form:


function sum_tail(n, acc)
  if n == 0 then return acc end
  return sum_tail(n - 1, acc + n)
end

Enter fullscreen mode Exit fullscreen mode

This gets compiled into a loop automatically.


  1. Pipe operator

words
  |> filter(function(w) return len(w) > 3 end)
  |> map(function(w) return upper(w) end)
  |> sort()

Enter fullscreen mode Exit fullscreen mode

It makes chained transformations easier to read.


  1. Macros (compile-time)

macro swap(a, b)
  set tmp to a
  a = b
  b = tmp
end

Enter fullscreen mode Exit fullscreen mode

These run at compile time, not runtime.


  1. Python backend

nob py file.nob -o file.py --run

Enter fullscreen mode Exit fullscreen mode

This converts NoB into Python so you can use Python libraries like NumPy or OpenCV.

There are limits (no macros, no pipe operator), but it’s useful when you need the ecosystem.


  1. Built-in concurrency (native only)

set t to thread_spawn(function()
  print "running"
end)

thread_join(t)

Includes threads, mutexes, channels, and async support.

Enter fullscreen mode Exit fullscreen mode

Tooling (built-in)

NoB ships with a lot already included:


nob repl
nob check file.nob
nob profile file.nob
nob fmt file.nob
nob gui

Enter fullscreen mode Exit fullscreen mode

Notable pieces:
• GUI REPL (nob gui)
• formatter and profiler included
• package manager (nob pkg)

You don’t need to assemble a separate toolchain.


Performance

From the official benchmarks:

Benchmark Python NoB Speedup
Simple loop 0.498s 0.046s ~10.9×
Prime count 0.090s 0.018s ~4.9×
Fibonacci 0.734s 0.484s ~1.5×

What this means
• Big gains in loops and numeric work
• Smaller gains in recursive workloads
• Much faster than Python for CPU-heavy code


Compilation targets


nob file.nob --profile simd
nob file.nob --profile cuda
nob file.nob --profile wasm

Enter fullscreen mode Exit fullscreen mode

Supports:
• SIMD optimized builds
• CUDA / OpenCL
• WebAssembly
• LLVM IR


Platform support

Platform Support
macOS Native
Linux Native
Windows WSL2


Pricing (indicative)

Tier Price
Free £0
Indie £5–10/month
Pro £10–20/month

Where it fits

NoB makes sense if you want:
• something faster than Python
• something simpler than C++
• built-in tooling without extra setup

Less ideal if you need:
• a large ecosystem
• long-established tooling


Final thoughts

NoB isn’t trying to reinvent programming. It’s trying to remove friction.

The dual pipeline is the most practical part—you can prototype quickly in VM mode, then switch to native when performance matters.

It’s early, but the core design is solid. Worth keeping an eye on.

Top comments (0)

The discussion has been locked. New comments can't be added.