Origin Programming Language · v1.7.28
Origin is a Python/Java-based programming language with a syntax designed to be expressive, English-like, and hardware-first. It enables AI models and developers to produce scalable code with high readability while retaining the full power of the Python ecosystem.
Visit the official documentation: docs-origin.onrender.com
September 2026 re-issue: The v1.7.28 release adds dialect support, letting foreign-language lines compile through a bundled
origin.tomltable, on top of v1.7.27's modular package layout (lexer, parser, interpreter, classes subpackages) ported fromorigin-dev, with the bytecode VM as the default backend. It retains v1.7.26's import normalization plus v1.7.24's bytecode VM and interpreter stability and v1.7.23's multi-import and transformer library updates. The bytecode VM migration continues on theorigin-devbranch and will ship as v1.8.
What's new in v1.7.28
- Dialect support (TOML): mix lines from another language straight into a
.orprogram. Each line is looked up in the bundledorigin.toml("<origin source>" _ "<dialect line>") and compiled to real Origin before execution. Supports$nametemplate captures, e.g."let $n:int = $v" _ "$n:$v"turnsx:5intolet x:int = 5. Expansion happens inline, sharing the program's constants and control flow. - Dialect-aware runner:
origin/runner.pynow loadsorigin.tomlfrom the installed package, precompiles exact mappings toorigin_bytecode.toml, and resolves templated lines at parse time. Interpreter mode (origin i) still skips dialect lines; use the default VM. - Bundled
origin.toml: every install ships the dialect table (package_data+MANIFEST.in), so dialects work out of the box. - Fresh binaries: rebuilt
origin.exeandOriginInstallerV1.7.28.zip. - Carried from v1.7.27: modular package layout (lexer, parser, classes, interpreter subpackages), split parser and interpreter, and the bytecode VM as the default backend.
Key Features
- English-Like Syntax: Write code that reads like natural language.
- Built-in Library System: Import
.orlibrary files withimport calc, including a math library (calc.or) and graph plotting library (graph.or). - Hardware Primitives: Native, intuitive commands for Raspberry Pi GPIO and ServoKit (PCA9685).
- Strict Typing: Recommended type annotations (
let x: int = 10) for predictable state and AI-native safety, with untyped declarations auto-inferred. - Safe Hardware I/O: Automatic angle clamping (0-180 degrees) for servos to prevent physical damage.
- Formal Module System: Professional namespacing and module support (
import math as m,from lib import x). - Binary Builder: Compile your Origin scripts into standalone, zero-dependency
.exefiles. - Modern Logic: Support for Object-Oriented Programming (classes),
try/except/else,parallelthread blocks, and robust scope management.
Installation
Standalone (Recommended)
You can now download Origin as a standalone installer for Windows. This is the fastest way to get started.
- Download: Origin v1.7.28 Stable
- Install: Run
secure_install.ps1with PowerShell. - Usage: Open a new terminal and type
origin.
Developer / Source
-
Clone the repository:
git clone https://github.com/boblio-max/origin.git
-
Install Dependencies:
pip install -r requirements.txt
Language Reference
1. Variables & Types
Origin uses let for variables and const for immutable references. Types are recommended; untyped declarations are auto-inferred.
let x: int = 10 # Scalar integer
let name: str = "Origin" # String literal
let flag: bool = true # Boolean (lowercase)
const e: float = 2.71828 # Immutable constant
let data: none = none # None literal
Multiple variables can be declared (and typed) in one statement:
let a, b = 1, 2 # Inferred: int, int
let p, q: int, str = 6, "hi" # Per-name annotations
Built-in constants and math helpers are available without imports:
print pi # 3.141592653589793
print abs(-7) # 7
2. Built-in Libraries
Origin includes a standard library system under lib/. Use import to load them:
import calc
import graph
# Math utilities
calc = calc()
print calc.sqrt(25)
print calc.pi
# Graph plotting
graph "My Plot" with {
X: color(1,0,0) as "Line A",
}
3. Hardware Control
Control hardware directly with the set namespace and native protocol primitives.
# Set Servo 1 to 90 degrees (clamped 0-180)
set servo.angle 1, 90
# Drive BCM Pin 12 HIGH
set pin 12, 1
# Parentheseless I2C, SPI, and UART calls
i2c.read 0x40, 4
spi.write 0x01
4. Data Structures
# Lists
let tools: list = ["Servo", "GPIO", "I2C"]
print tools[0]
# Dictionaries (Access via { })
let config: dict = {"speed": 100, "active": true}
print config{"speed"}
# Tuples
let coord: tuple = (10, 20)
5. Raw Python Blocks
Seamlessly bridge the gap between Origin and Python.
py {
import math
import os
print("Python process ID:", os.getpid())
print("Sine of 90 degrees:", math.sin(math.pi/2))
}
6. Module System
Origin supports a formal module system for clean namespacing.
import math_utils as mu # Import with alias
from robotics import drive # Selective import
print mu.square(10)
drive(1.0)
7. Object-Oriented Programming
Define classes with fields and methods natively for structured development.
class Sensor (pin type) {
def read() {
return pin
}
}
Origin scripts use the .or extension.
Running a script:
origin main.or
Building a standalone binary:
origin build main.or
Roadmap
The following features are currently in development:
- Pattern Matching:
matchandcaseconstructs. - Advanced Structures:
structandenumtypes. - Asynchronous I/O: Native
asyncandawaitsupport. - Metaprogramming:
macroandinlinedefinitions. - Unified IDE: A dedicated cross-platform IDE for Origin development.
License & Contact
Distributed under the MIT License. Author: Nikhil Mahankali Contact: nikhilmahankali56@gmail.com
Metadata
Release files for origin-or 1.7.28
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| origin_or-1.7.28.tar.gz | 64.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| origin_or-1.7.28-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 137.8 kB
Release files / origin_or-1.7.28.tar.gz
| Download URL | origin_or-1.7.28.tar.gz |
|---|---|
| Size | 64.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
821ecbfd430cad5c68731792a24e25392eab1bc548533a84ec1b220751af3d1c
|
|
BLAKE2b-256 checksum How to use checksums |
d983d87ecadf1c8a042165c1e843ed2cf92a8e26c4df4388b35fa9af6aa2a06c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / origin_or-1.7.28-py3-none-any.whl
| Download URL | origin_or-1.7.28-py3-none-any.whl |
|---|---|
| Size | 73.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ad4e0889a40228e93fc8ce5b6c13df8321481c46c93f92f9aca89177de0545cf
|
|
BLAKE2b-256 checksum How to use checksums |
ab93e1f248960cd995764d78f342be8741670c8b0d69e0dfab64e9d6d5d88a74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|