Skip to main content

Origin Programming Language · v1.7.27

Status Version Platform

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.27 release adopts the modular package layout (lexer, parser, interpreter, classes subpackages) ported from origin-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 the origin-dev branch and will ship as v1.8.


What's new in v1.7.27

  • Modular package layout: the flat lexer.py, parser.py, interpreter.py, and classes.py modules are now proper subpackages — origin/lexer/, origin/parser/, origin/classes/ (10 AST node groups), and origin/interpreter/ (5 codegen mixins plus hardware helpers). Same language, same behavior, maintainable structure.
  • Split parser: the 1000+ line recursive-descent parser is now BaseParser + ExprMixin + StmtMixin + BlockMixin, combined in parser_point.py. All 26 methods preserved in order.
  • Split interpreter: the AST-to-Python translator is now BaseInterpreter plus five per-domain codegen mixins (expressions, control flow, functions/OOP, data literals, system/IO), with generated code verified byte-identical to the legacy implementation.
  • Bytecode VM by default: origin file.or compiles through bc/to_byte.py and runs on the stack VM (bc/svm.py); origin i file.or uses the AST interpreter. Both backends produce identical output on arithmetic, f-strings, if/else, for, def, and collections.
  • Fresh binaries: rebuilt origin.exe and OriginInstallerV1.7.27.zip from the modular stack.

Key Features

  • English-Like Syntax: Write code that reads like natural language.
  • Built-in Library System: Import .or library files with import 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 .exe files.
  • Modern Logic: Support for Object-Oriented Programming (classes), try/except/else, parallel thread 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.

  1. Download: Origin v1.7.27 Stable
  2. Install: Run secure_install.ps1 with PowerShell.
  3. Usage: Open a new terminal and type origin.

Developer / Source

  1. Clone the repository:

    git clone https://github.com/boblio-max/origin.git
    
  2. 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: match and case constructs.
  • Advanced Structures: struct and enum types.
  • Asynchronous I/O: Native async and await support.
  • Metaprogramming: macro and inline definitions.
  • Unified IDE: A dedicated cross-platform IDE for Origin development.

License & Contact

Distributed under the MIT License. Author: Nikhil Mahankali Contact: nikhilmahankali56@gmail.com

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

origin_or-1.7.27.tar.gz (97.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

origin_or-1.7.27-py3-none-any.whl (114.1 kB view details)

Uploaded Python 3

File details

Details for the file origin_or-1.7.27.tar.gz.

File metadata

  • Download URL: origin_or-1.7.27.tar.gz
  • Upload date:
  • Size: 97.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for origin_or-1.7.27.tar.gz
Algorithm Hash digest
SHA256 395ea6302c00b8e3c6ef071ebcd170dce141475a8a919a13d0a203e204ee62a0
MD5 3fb74e2c541e64289d2c6f3a76b5a75b
BLAKE2b-256 675b33c510c121104b50b97289b720885b58ce6ad556b614952f4c632d2bc086

See more details on using hashes here.

File details

Details for the file origin_or-1.7.27-py3-none-any.whl.

File metadata

  • Download URL: origin_or-1.7.27-py3-none-any.whl
  • Upload date:
  • Size: 114.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for origin_or-1.7.27-py3-none-any.whl
Algorithm Hash digest
SHA256 2097ebb9c15642b3a9a6a197895cf33047da0ccbdd68a72ca6827fb83124dde1
MD5 82fcba619db169ae19963078dfd5aa1a
BLAKE2b-256 a87f78103abf1fd4ddb2a793ff2a8e86e93d4a9ca9b070e8cd81e91b802f2a79

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.7.27 This release

2 files

1.7.26

2 files

1.7.25

2 files

1.7.24

2 files

1.7.23

2 files

1.7.22

2 files

1.7.21

2 files

1.7.20

2 files

1.7.18

2 files

1.7.16

2 files

1.7.15

2 files

1.7.14

1 file

1.7.13

1 file

1.7.11

2 files

1.7.10

2 files

1.7.9

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page