Coluber: Language Written in Nim. Speaks Nim, C, Vlang, Python, and JavaScript

baranul1 pts0 comments

distantfar/coluber: The programming language compiled, object oriented, extensibilities, coluber. - Codeberg.org

This website requires JavaScript.

distantfar/coluber

Watch

Star

Fork

You've already forked coluber

Code

Issues

Pull requests

Activity

The programming language compiled, object oriented, extensibilities, coluber.

310 commits

1 branch

0 tags

39 MiB

Nim

74.9%

JavaScript

15.4%

7.1%

Python

2.6%

main

Find a file

HTTPS

Download ZIP<br>Download TAR.GZ<br>Download BUNDLE

Open with VS Code

Open with VSCodium

Open with Intellij IDEA

refrigerant_v1

82b31201d2

fix: fixing bugs

2026-07-13 08:11:46 +07:00

docs

fix: fixing bugs

2026-07-13 08:11:46 +07:00

examples

fix: fixing bugs

2026-07-13 07:59:26 +07:00

library

fix: fixing bugs

2026-07-13 07:29:47 +07:00

logo

refactor: revamps to polite interfaces

2026-07-07 05:43:39 +07:00

src

fix: fixing bugs

2026-07-13 07:59:26 +07:00

stdlib

fix: fixing bugs

2026-07-13 07:59:26 +07:00

test_escapes

feat: supporting escape characters

2026-07-11 23:58:12 +07:00

vscode-coluber

feat: adding misc type data

2026-07-13 05:43:10 +07:00

.gitignore

feat: supporting escape characters

2026-07-12 02:11:30 +07:00

coluber.nimble

feat: portability upgrades, zipping, FFI bundling, and docs

2026-07-11 09:08:30 +07:00

config.nims

feat: portability upgrades, zipping, FFI bundling, and docs

2026-07-11 09:08:30 +07:00

documentation.md

fix: fixing bugs

2026-07-13 08:11:46 +07:00

LICENSE

docs: rename foliagetree -> refrigerant_v1

2026-07-01 01:35:07 +07:00

NOTICE

feat: adding NOTICE

2026-07-11 10:08:10 +07:00

README.md

feat: add misc type for arbitrary FFI data across all backends

2026-07-13 05:12:41 +07:00

README.md

██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ ███████╗██████╗<br>██╔════╝██╔═══██╗██║ ██║ ██║██╔══██╗██╔════╝██╔══██╗<br>██║ ██║ ██║██║ ██║ ██║██████╔╝█████╗ ██████╔╝<br>██║ ██║ ██║██║ ██║ ██║██╔══██╗██╔══╝ ██╔══██╗<br>╚██████╗╚██████╔╝███████╗╚██████╔╝██████╔╝███████╗██║ ██║<br>╚═════╝ ╚═════╝ ╚══════╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝<br>A compiled language written in Nim. Speaks Nim, C, Vlang, Python, and JavaScript fluently.

Coluber is a genus of non-venomous snakes known for being fast, agile, and adaptable, just like the language.

Note: Coluber is a personal hobby project born out of curiosity and a love for programming.

What is Coluber?

Coluber is a compiled, statically-typed programming language that:

Compiles to native code, supports dual-backend target: Nim (default, transpiling to C via Nim) and Vlang (experimental, transpiling to C via Vlang)

Interoperable , a single .clbr file can declare bindings to C, Nim, Python, JavaScript, and Vlang via its FFI system

Automatic memory management , delegates to the underlying backend collector (Nim's ORC/ARC or V's GC)

The compiler itself is written entirely in Nim .

Note

Vlang Backend Target (Experimental)<br>Coluber now politely offers an experimental Vlang compilation target (-b vlang or --backend vlang). This backend transpiles your .clbr code to clean Vlang code (.v), which is then compiled to a native binary.

FFI Compatibility : Under the Vlang target, FFI support is limited to C, JavaScript, and native Vlang modules. FFI bindings for Nim (.nim) and Python (.py) remain exclusive to the default Nim backend target.

Taste of the Syntax

serve name = "world"<br>constant VERSION = 1

cond first (VERSION > 0):<br>say("Hello, {name}! Welcome to Coluber.")<br>cond nothing:<br>say("Something went very wrong.")<br>public data Rectangle:<br>width: int<br>height: int<br>area: int = width * height

public task main():<br>serve r = Rectangle(width: 10, height: 20)<br>say("Area is {r.area}")<br>serve primes: list[int] = [2, 3, 5, 7, 11, 13]<br>crawl p of primes:<br>say("{p} is prime!")<br>introduce core/math task sqrt(x: float) -> float<br>introduce core/math task pow(base: float, exp: float) -> float

public task main():<br>say("sqrt(144) = {sqrt(144.0)}")<br>say("2 ^ 10 = {pow(2.0, 10.0)}")<br>introduce core/mathpy task compute_half(x: float) -> float<br>introduce core/mathnim task compute_double(x: int) -> int

public task main():<br>say("Python says half of 10 is: {compute_half(10.0)}")<br>say("Nim says double of 7 is: {compute_double(7)}")

Why Coluber?

Pain Point<br>What Coluber Does

Complex syntax<br>Indentation-based syntax, no braces or semicolons

Python performance<br>Python FFI is used selectively; core logic compiles to native code

FFI boilerplate<br>introduce path task name(args) -> type, single-line binding declaration

Garbage collector pauses<br>Uses Nim's ARC/ORC deterministic collector, which avoids stop-the-world GC

Inconsistent loop constructs<br>Two loop forms only: loop (condition-based) and crawl (iteration)

The FFI System 🔌

One of Coluber's core features is its multi-language FFI . You can link to any backend from a single source file:

use gfx/pygamecanvas alias canvas<br>introduce core/math task sqrt(x: float) -> float<br>introduce crypto/hash task hash_string(s: string) -> string alias nim_hash

public task main():<br>canvas.init(800, 600, "My...

coluber vlang task float python language

Related Articles