Skip to main content

Rubus

A tree-walking interpreter for the Rubus programming language, bundled with rubed — a lightweight, terminal-based text editor built specifically for writing and running .rub files.

Overview

The Rubus ecosystem consists of a Python-like, indentation-based programming language and a dedicated command-line environment. The interpreter processes raw source code through a lexer and parser to build an Abstract Syntax Tree (AST), which is then directly executed without an intermediate compilation step or bytecode generation.

Installation

pip install rubus-b1

On Linux/macOS, no extra dependencies are needed. On Windows, windows-curses is installed automatically.

After installing, the rubed command is available globally:

rubed                          # open the editor with an empty buffer
rubed path/to/script.rub       # open a file in the editor
rubed path/to/script.rub --run # run a script headlessly

Features

The Rubus Language

  • Control flow: if / elif / else, for, while
  • Types: integers, floats, booleans, strings, and f-strings
  • Built-in collections: lists, dictionaries, sets, and tuples
  • List and dictionary comprehensions
  • Custom struct definitions
  • Function definitions (def) and variable declarations (let)
  • Lexical scoping and environment management
  • Try / except / finally error handling
  • Tuple unpacking: a, b = 1, 2
  • Default parameters and keyword arguments

The Rubus Editor (rubed)

  • Terminal-native: built with curses for a seamless command-line workflow
  • Syntax highlighting: real-time colorization for keywords, types, strings, numbers, comments, and operators
  • Integrated execution: run .rub scripts directly from within the editor

Keybindings

Key Action
Ctrl+S Save file
Ctrl+R Run the current file
Ctrl+N New buffer
Ctrl+O Open an existing file
Ctrl+Q Quit (prompts if unsaved)

Usage

# Open editor with empty buffer
rubed

# Open a specific file
rubed path/to/script.rub

# Run a script without opening the editor
rubed path/to/script.rub --run

Example

def greet(name: str) -> str:
    return f"Hello, {name}!"

let names: list = ["Alice", "Bob", "Carol"]
for n in names:
    print(greet(n))

Requirements

  • Python 3.10+
  • windows-curses (Windows only, installed automatically)

Metadata

Release files for rubus-b1 0.1.2

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

Source distribution (sdist)

Source distribution for rubus-b1 0.1.2
File Size Uploaded
rubus_b1-0.1.2.tar.gz 22.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rubus-b1 0.1.2
File Interpreter ABI Platform
rubus_b1-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 45.5 kB

Release files / rubus_b1-0.1.2.tar.gz

Download URL rubus_b1-0.1.2.tar.gz
Size 22.7 kB
Tags Source
SHA-256 checksum
How to use checksums
441ea920f0c54d941f12a62bc03b6f9fe6327c5610d7ac61241c0b5b74879de2
BLAKE2b-256 checksum
How to use checksums
6b2bdce41e7c410763055b9e876f8e8e9d108cebb3c07007f7701030af373b68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / rubus_b1-0.1.2-py3-none-any.whl

Download URL rubus_b1-0.1.2-py3-none-any.whl
Size 22.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
40e4819ac2601b31e86f1c538f989c1fe29cd7ce632d5069a0dfe7192e81e91b
BLAKE2b-256 checksum
How to use checksums
c5913c5526952d0577463911f441875e53e67f01fddec737793c150281683da0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release 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