Skip to main content

Therl

Truly Human Readaby Language
(Yes, the acronym is a little cursed. I know.)

Therl is a human-readable, instruction-based programming language written entirely in pure Python. Its goal is to make code read almost like plain English while remaining predictable and easy to parse.

set greeting to "hello"

func greet <name>

    say greeting + " " + name + "!"

end

func main

    run greet with <name> as "Jeff"

    set numbers to [1..10]

    say numbers

end

run main

Output:

hello Jeff!
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

Features

  • 📖 Human-readable syntax
  • 📝 Instruction-based language design
  • 🐍 Written entirely in pure Python
  • 🔄 Strictly dynamically typed variables
  • 📦 Built-in lists
  • 🔢 Integer, float, string and boolean types
  • 🧩 Functions with named parameters
  • 📢 Simple say statement for output
  • ✏️ Mutable list elements
  • 🔀 Conditional statements with if, else if, and else
  • 🚀 Easy to extend

Example

set greeting to "hello"

func greet <name>

    say greeting + " " + name + "!"

end

func main

    say "Welcome!"

    run greet with <name> as "Jeff"

    set ids to [1..10]

    say ids

    set ids at 0 to 1000

    say ids

    add 10 to ids

    say ids

end

run main

Output:

Welcome!
hello Jeff!
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
[1000, 2, 3, 4, 5, 6, 7, 8, 9, 10]
[1000, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10]

Conditional Statements

Therl supports if and else for conditional logic:

set name to "bob"

if name == "bob"
    say "Go away bob!"
else

    say "Hello " + name

end

Output:

Go away bob!

Installation

Therl requires Python 3.10 or newer.

Install the latest release from PyPI:

python -m pip install therl

Run a Therl program:

therl hello.therl

or

python -m therl hello.therl

Project Status

⚠️ Therl is currently in active development.

Expect missing features, breaking changes, and plenty of experimentation as the language evolves.


Roadmap

  • Conditional statements
  • Arithmetic expressions
  • Loops
  • Dictionaries / Maps
  • Modules
  • Classes
  • Error reporting with line numbers
  • Standard library

Why?

Because making programming languages is fun.

And because writing

set score to 100

add 10 to score

say score

just feels oddly satisfying.


Release files for therl 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 therl 0.1.2
File Size Uploaded
therl-0.1.2.tar.gz 20.4 kB Details

Built distribution (wheel)

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

Total release size: 42.0 kB

Release files / therl-0.1.2.tar.gz

Download URL therl-0.1.2.tar.gz
Size 20.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ff6f291c53b27f55a2c7bb82dd5b2036b3733b502851f91ae117b325edf028ac
BLAKE2b-256 checksum
How to use checksums
55e8fe6a3f40afccd4b5b22f21cfafb64f5779dfb9ec1ffe6f556026d82122a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.1

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

Download URL therl-0.1.2-py3-none-any.whl
Size 21.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a802775f839ac32ce0bf3e7a662f81a82eb40b8aeee452c61ee40633cd8d628
BLAKE2b-256 checksum
How to use checksums
37d78f464087140405509e0365d54fdca1cd54fdf62ce76f90ba70ec4254a368
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.1

Release history Release notifications | RSS feed

0.1.3

2 release files

This release

0.1.2 This release

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