descriptionFork of Lua 5.1 to encourage end-user programming
homepage URLhttp://akkartik.name/about
repository URLhttps://github.com/akkartik/teliva.git
ownerrepo.or.cz@akkartik.com
last changeMon, 27 Nov 2023 02:06:52 +0000 (26 18:06 -0800)
last refreshSat, 27 Apr 2024 07:13:45 +0000 (27 09:13 +0200)
content tags
add:
README.md

Teliva - an environment for end-user programming

“Enable all people to modify the software they use in the course of using it.” — https://futureofcoding.org/episodes/033.html

“What if we, and all computer users, could reach in and modify our favorite apps?” — https://www.inkandswitch.com/end-user-programming

“Software must be as easy to change as it is to use.” — https://malleable.systems

What's this, then?

Teliva is the most naive way to make software as easy to change as it is to use: an interpreted environment for running shareable little text-mode apps. Its language of choice is Lua, excluding all features that can conceivably introduce moving parts in running a Lua program.

Here's how you run one of the example apps (the Tower of Hanoi):

git clone https://github.com/akkartik/teliva
cd teliva
make linux  # replace with 'macosx', etc. depending on your OS
src/teliva hanoi.tlv

screenshot of Teliva running the Towers of Hanoi

No matter what app you run, you are always guaranteed access to a single obvious, consistent way (currently the hotkey ctrl-u) to inspect its sources.

When you look under the hood of an app, the first thing you see is a big-picture view which shows the app's major data structures and a top-down view of the app's code.

screenshot of big-picture view for the Towers of Hanoi

Select a definition, make a change, hit ctrl-x, and the app will run with your updates. (video)

You will need some Unix-like platform with a C compiler and the ncurses and openssl libraries. Some possible commands to install them, depending on your OS and package manager of choice:

So far I've tested Teliva on Linux, Mac OS X, OpenBSD, NetBSD and FreeBSD; it should work on other flavors of BSD, WSL on Windows, etc. with only minor modifications.

What else can it do?

Anything! Some more sample apps to try out:

src/teliva life.tlv

video

src/teliva chesstv.tlv

video

src/teliva gemini.tlv

video

These are just a start. The sky is the limit.

So, just a programming language, then?

There's one big difference with other programming languages: Teliva apps are sandboxed like a browser. Most languages assume the fiction that the person running a program trusts all the code in the program. This assumption hasn't been valid since a decade after the Unix big bang, if then. Teliva takes on the reality that apps can get complex and use code written by strangers. In response, Teliva tries to always summarize for you what the program you're running is trying to do, and to ask you before a random app tries to do something sensitive. Permissions you grant a Teliva app will be flexible and easy to understand. Browsers and mobile apps today tend to make you choose between those two properties.

The sandboxing experience is still under construction. See this talk (15 minutes) for a rundown of current thinking. It isn't yet safe to run untrusted Teliva apps you download from the internet. (Fortunately you're unlikely to run into any such apps.)

Isn't this just an IDE?

There's one big difference: these apps are not intended to be runnable outside of the Teliva environment. Editing the sources and visualizing permissions granted will always be core features that are front and center in the UI.

A second, more subtle difference: it's primarily an environment for running apps, and only secondarily for editing them. Starting up the environment puts you in a running app by default. Creating an app from a clean slate is a low-priority use case, as is lots of specialized support for developing complex apps. The sweet spot for Teliva is simple apps that people will want to edit after using for a while.

Who are we trusting by trusting you?

Teliva is designed to have a shallow, manageable software supply chain. I rely on packages distributed by the following reputable brands:

Teliva's codebase also includes forks of the following reputable brands:

I only add to this list with great deliberation. Since it includes indirect suppliers (suppliers of suppliers), I have an incentive to only include suppliers who also have shallow supply chains. Minimizing the size of the supply chain should result in more reliable software that requires less frequent upgrades.

(Look in the manual for more details of what's available.)

Why Lua?

It's reputedly the fastest interpreted language per line of implementation code.

Will it run any Lua program?

Not quite. My priority is providing a good experience for newcomers to comprehend and modify the programs they use. If it's not clear how to provide that experience for some kinds of Lua programs, I'd rather disable support for them in Teliva and let people use regular Lua. Or other platforms!

Look in the manual for more details of what's available.

I may delete more capabilities throughout this stack as I discover features that don't fit well with the Teliva experience. If you find Teliva of use, please introduce yourself to me so that I am aware of your use cases. Anybody who is interested can gain a say in its future direction.

What's with the name?

Teliva is the Tamil root for ‘clear’. Very much aspirational.

Known issues

Mirrors and Forks

Updates to Teliva can be downloaded from the following mirrors:

Forks of Teliva are encouraged. If you show me your fork, I'll link to it here.

Feedback

Most appreciated.

shortlog
2023-11-27 Kartik K. Agaramuse markdown syntax for imagesmain
2022-04-23 Kartik K. Agaramsmol.tv: get a few feeds reliably parsing
2022-04-23 Kartik K. Agaramsmol.tlv: start of a browser for the small web
2022-04-23 Kartik K. Agaramdocument `arg` var for commandline arguments
2022-04-23 Kartik K. Agaramavoid overly long lines in manual
2022-04-17 Kartik K. Agaram.
2022-04-12 Kartik K. Agarama sharp edge in Lua's dorequire()
2022-04-12 Kartik K. Agaramfix a few sample apps
2022-04-07 Kartik K. Agaramactually _use_ the ask permission
2022-04-06 Kartik K. Agaramnew perm: files under dir specified at commandline
2022-04-06 Kartik K. Agaramnew permission: any file specified at commandline
2022-04-06 Kartik K. Agaramexperiment: ask for permission on file operations
2022-04-06 Kartik K. Agaramshow common suggestions when editing permissions
2022-03-31 Kartik K. Agaramtoot-toot: stop clobbering existing files
2022-03-31 Kartik K. Agaramtoot-toot: disable ctrl-k
2022-03-27 Kartik K. Agaramsome more reorg of the standard library
...
heads
5 months ago main