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

  • Arithmetic expressions
  • Error reporting with line numbers
  • Conditional statements
  • Loops
  • Modules
  • Dictionaries / Maps
  • 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.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 therl 0.1.3
File Size Uploaded
therl-0.1.3.tar.gz 21.0 kB Details

Built distribution (wheel)

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

Total release size: 43.2 kB

Release files / therl-0.1.3.tar.gz

Download URL therl-0.1.3.tar.gz
Size 21.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9803388978c4653e9264033579fb5fa6bd2b07f4cceb2a286b8f473f9b6ad036
BLAKE2b-256 checksum
How to use checksums
f3b6ecf43b96a2d1d900f9405e13767fd13961136234b94422b29b0de70734c9
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.3-py3-none-any.whl

Download URL therl-0.1.3-py3-none-any.whl
Size 22.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
34a6696137e6e4093bbbec49813891d3c1f20788542b3a5cd6176b978494b704
BLAKE2b-256 checksum
How to use checksums
a5df62ded24133547670387d9f1fcb83db72af0bc43ea28525f2387115e9df95
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

This release

0.1.3 This release

2 release files

0.1.2

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