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
saystatement for output - ✏️ Mutable list elements
- 🔀 Conditional statements with
if,else if, andelse - 🚀 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)
| File | Size | Uploaded | |
|---|---|---|---|
| therl-0.1.3.tar.gz | 21.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|