Skip to main content

Obsidian Language v0.0.3

Obsidian is a compiled programming language that combines memory safety, zero-cost abstractions, and minimalist syntax. Built for developers who want the speed of Rust without the boilerplate.

This is a toy implementation (v0.0.1) written in Python. It features a lexer, parser, AST, and a transpiler to Python (which simulates "compilation" by generating and executing equivalent Python code). Published on PyPI as obsidian-lang.

Features (v0.0.3)

  • Minimalist syntax inspired by Rust
  • Variables with let (optional type hints, e.g. let x: int = 5;)
  • Functions with fn
  • Basic expressions + comparison operators (< > <= >= == !=)
  • Control flow with if / else
  • Control flow with while
  • Boolean literals (true/false) and logical operators (and, or, not)
  • Line comments (# ... to end of line)
  • Function calls (including built-in println)
  • Optional semicolons (statements can omit ; at end of line)

v0.0.3 update: Added support for line comments (# ...). Added boolean literals (true/false) and logical operators (and/or/not).

Installation

pip install obsidian-lang

Usage

# After pip install obsidian-lang
obsidian examples/hello.obs --show-code

# Or from source (development)
PYTHONPATH=. python -m obsidian.main examples/hello.obs --show-code

Example (hello.obs)

fn main() {
    let x = 5;
    let y = x + 3;
    println(y);
    println("Hello from Obsidian!");
}

Example (while.obs)

fn main() {
    let i: int = 0
    while i < 3 {
        println(i)
        let i = i + 1
    }
    println("while loop done")
}
# top level comment
fn main() {
    let x = 42  # trailig comment
    # comment inside function
    println(x)  # should print 42
    let y = true  # bool with comment
    if y {
        println("ok")  # if comment
    }
}

Metadata

Release files for obsidian-lang 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for obsidian-lang 0.0.3
File Size Uploaded
obsidian_lang-0.0.3.tar.gz 8.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for obsidian-lang 0.0.3
File Interpreter ABI Platform
obsidian_lang-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 17.9 kB

Release files / obsidian_lang-0.0.3.tar.gz

Download URL obsidian_lang-0.0.3.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
09e65522ebbea55d93a5993a7beeddfb2d2967732a803b8e7682a35d0dceb103
BLAKE2b-256 checksum
How to use checksums
29626a4037bb1ca1b741ed09b4d1ac6d8114483bd974b0e32e6da4e0d91f00ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / obsidian_lang-0.0.3-py3-none-any.whl

Download URL obsidian_lang-0.0.3-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5aa86d65ac79d1a4f5a0fd481a5d858367a2dbca8c0dcc74423aa84c2cf7ecea
BLAKE2b-256 checksum
How to use checksums
e31c3d40dfeb309e215dae5c097447d5630f66bd17fd6e903ceba797030ad50e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0
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