Skip to main content
๐Ÿงช 120/120 tests passing โ†’

Externum v3.0 "Sentient"

A fully functional programming language that fuses Python's readability, binary performance, and Bash's system control into one paradigm. Compiles to three targets at once: Python, Bash, and binary.

What It Can Doโ€‹

AreaSupport
Data typeslists, dicts, tuples, sets, f-strings, 0b/0x literals
Control flowif/elif/else, while, for ... in, break/continue, try/except/finally, with, assert
Functionsdefault params, *args/**kwargs, lambdas, closures, generators (yield)
OOPclasses, inheritance, methods, self
Modulesimport, own .ext modules, standard library
Expressionsfull operator precedence, bitwise ops, ternary, comprehensions
Shellinline bash `cmd` and %% ... %% blocks
ToolingREPL, 3 compile targets, argv, browser playground

Quick Startโ€‹

git clone https://github.com/BartoszOsiej/externum.git
cd Externum
pip install -e . # Python 3.10+

externum --version # Externum 3.0.0

# Run a program
externum run examples/pokedex.ext

# Interactive shell
externum repl

Exampleโ€‹

# fibonacci.ext
fn fibonacci(n: int) -> int {
if n <= 1 {
return n
}
return fibonacci(n - 1) + fibonacci(n - 2)
}

for i in range(20) {
print(f"fib({i}) = {fibonacci(i)}")
}

Three Compile Targetsโ€‹

TargetUse Case
PythonFull-featured execution with Python's ecosystem
BashSystem scripts, cron jobs, shell automation
BinaryStandalone executable, no runtime dependencies
# Compile to all three
externum compile examples/fibonacci.ext

# Output:
# examples/fibonacci.py
# examples/fibonacci.sh
# examples/fibonacci.bin

Architectureโ€‹

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ .ext source โ”‚โ”€โ”€โ”€โ”€โ–บโ”‚ Parser โ”‚โ”€โ”€โ”€โ”€โ–บโ”‚ AST โ”‚
โ”‚ (Externum) โ”‚ โ”‚ (recursive โ”‚ โ”‚ โ”‚
โ”‚ โ”‚ โ”‚ descent) โ”‚ โ”‚ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ–ผ โ–ผ โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Python โ”‚ โ”‚ Bash โ”‚ โ”‚ Binary โ”‚
โ”‚ transpiler โ”‚ โ”‚ transpiler โ”‚ โ”‚ compiler โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Featuresโ€‹

Standard Libraryโ€‹

Written in Externum itself โ€” the stdlib proves the language is expressive enough to build real programs:

  • math.ext โ€” math functions
  • string.ext โ€” string manipulation
  • io.ext โ€” file I/O
  • list.ext โ€” list operations
  • random.ext โ€” random number generation

Browser Playgroundโ€‹

The Externum playground executes entirely in your browser โ€” the transpiler (written in Python) runs through WebAssembly (Pyodide), with no server at all.

Module Systemโ€‹

# Import own modules
import utils
from math import sqrt

# Import with alias
import collections as coll

Testsโ€‹

120/120 tests passing โ€” comprehensive coverage of:

  • Parser correctness (all syntax constructs)
  • Transpiler output (Python, Bash, binary)
  • Runtime behaviour (all data types, control flow)
  • Standard library functions
  • Edge cases and error handling

See also: Syntax ยท Compiler ยท Architecture ยท Standard Library ยท Playground