Skip to main content

Interpreter for the RUNTIME programming language

Project description

RUNTIME is a complete reimagining of what a programming language could and should be.

RUNTIME is a heavily opinionated, dynamic interpreted language built for flexibility and adaptability. No type cages. No compile-time errors. No bloat. Just you, your ideas and a blank canvas.

PHILOSOPHY - The 6 Core Pillars of RUNTIME

DISCLAIMER: RUNTIME is in active development and not all features described in the philosophy are available as of now.

Typed languages are cages

Typed, compiled languages promise "safety", but all they do is get in your way. Type mismatches, rigid syntax and compile-time errors kill your ideas before they even start. In RUNTIME, stuff just RUNS. With no rules and no types, you can focus on ACTUALLY CODING and bringing your raw, unfiltered ideas to life.

Variables are memory entries

Variables and functions are just named memory entries. So why do most languages treat them like sacred artifacts? In RUNTIME, names are flexible. You can construct them, change them or pass them around, just like ANY OTHER VALUE.

Code is text

When you're writing code, you're writing text. So why do most languages act like code and text are completely separate worlds? In RUNTIME, they're the same thing. Code is data and data is code. Want to store functions in plain text? Generate logic on the fly? Rewrite your code while it runs? Go for it.

Programs should evolve

Other languages treat your program like a dead script: once it runs, it’s frozen. But that’s not how humans think. With RUNTIME, your program is alive. You can interact with the interpreter, redefine built-ins, and mutate your logic while it runs. Handle bugs. Inject new features. Adapt and evolve.

Errors are values

Make one typo and your whole app explodes? That's a JOKE. In RUNTIME, errors are values. They don’t crash your program, they just show up, like ANY OTHER RESULT. You can inspect them, log them, ignore them, or react to them. Your code keeps going.

Simplicity is key

An idiot admires complexity, a genius admires simplicity

  • Terry Davis, creator of TempleOS

Tuples, arrays, lists, stacks, queues... WHY? RUNTIME gives you just 7 types. No bloat. No confusion. No distractions. Still, all the tools you need to ACTUALLY bring your projects to life.

USE CASES

  • Self-modifying programs: AI written on-demand features? Self-evolving code? You can do that and much more.
  • Self-debugging code: Instead of crashing on errors, your program can patch itself and keep going.
  • Hot-swappable features: Replace or generate entire functions and modules at runtime. No restarts required.

Examples

1. Code is text (code_is_text.run)

code = "print({ Hello from text! })"
code() // Executes the text object as code

// > Hello from text!

2. Dynamic variables (dynamic_variables.run)

make_variable = {
    name = arguments[0]
    value = arguments[1]

    [1]$(name) = value

    // [1] references the parent scope
    // $ starts the variable assignment
    // (name) is a dynamic variable name
}

make_variable("message", "Hello world!")
print(message) // > Hello world!

3. Hot-swapping built-ins (hot_swapping_built_ins.run)

// Overwrite print to add a prefix
print = {
    [default]print("LOG: " + arguments[0])
}

print("Hello World!") // > LOG: Hello World!

// Restore default
print = [default]print // Get function from default scope
print("Back to normal!") // > Back to normal!

4. AI written features (ai_written_features.run)

while (true) {
    request = input("INPUT (execute | add feature): ").strip().to_lowercase()

    if (request == "execute") 
    {
        feature = input("What feature should I execute? ")
        $(feature)() // Execute a function from a dynamic name
    } 
    else if (request == "add feature") 
    {
        // Request a feature and ask AI to code it
        feature = input("What feature should I add? ")
        code = ai.vibecode(feature + "\n\nOutput a function only.")

        print(); print("AI wrote the following code:")
        print(); print(code)
        
        code = "[global]" + code // Declare the function in the global scope
        (code)() // Execute the code

        print(); print("Feature added! Try running it now.")
    }

    print()
}

GETTING STARTED

Prerequisites

Installation

pip install runtime-lang

Usage

  • Run ai_written_features.run from the examples

    runtime ai_written_features
    

    or

    runtime ai_written_features.run
    
  • Run my_program.run in the current directory

    runtime my_program
    

    or

    runtime my_program.run
    
  • Start REPL

    runtime
    

Resources


RUNTIME isn't just a new language.

It's a new way to think.

Project details


Download files

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

Source Distribution

runtime-lang-0.1.1.tar.gz (40.0 kB view details)

Uploaded Source

Built Distribution

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

runtime_lang-0.1.1-py3-none-any.whl (39.4 kB view details)

Uploaded Python 3

File details

Details for the file runtime-lang-0.1.1.tar.gz.

File metadata

  • Download URL: runtime-lang-0.1.1.tar.gz
  • Upload date:
  • Size: 40.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for runtime-lang-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bbb45c7ddd8a8ff8cf086430c4e11798adf0da2fbc419a4e8dbe9eac579a0cf3
MD5 35ff237661d19a6debea1dc6231b07d7
BLAKE2b-256 f8afa3f0cabcb403909d1da4569929999255ce5ee55f16a4dbdc3910de139431

See more details on using hashes here.

File details

Details for the file runtime_lang-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: runtime_lang-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 39.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for runtime_lang-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3f8216f2c968f35518334c0716049dc08abce5ce0709d95f9cd4503ae7fbca92
MD5 d396d4c1d38162573e7fd9b7be1900e5
BLAKE2b-256 8a56f64c1cf3c0642e173fdb2995f88d733558f8f6ca1798d179321ba6f3ef22

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page