New project

"An extremely naïve, brutalist attempt at packaging up simple Lua (5.1) apps with all the stuff needed to edit and build them."


Fun with the kids on a Saturday morning messing around with daddy's new program.

We gave each ring its own color, and we have it set up to move the towers randomly around after every move. Supremely silly.

· · Web · 1 · 1 · 10

You knew this was coming. Conway's Game of Life in text mode using Unicode Braille glyphs.

git clone
cd teliva
make linux
src/teliva life.teliva


App runtimes should support modifying apps.

Here's a 2-minute video on how that might look.

Teliva now has network access. Including https. And support for streaming APIs. All of luasocket and luasec libraries are supported.

(Obviously none of this is original development. I'm just putting together libraries created by my betters.)

Try it out:
git clone
cd teliva
make linux
src/teliva chesstv.tlv

Known issues:
- Code browser is broken for this app. It's likely the callback.
- Reading from network blocks keypresses.

Main project page:

Beginnings of a Gemini browser in Teliva, a way to share small, hackable, text-mode Lua apps.

Try it out:

git clone
cd teliva
make linux # or macosx or bsd
src/teliva gemini.tlv

Largely built from within Teliva. Here's a session of me implementing links. (video; 45 minutes)

Running untrusted apps in Teliva

Programming languages assume you trust all code you run. Browsers assume you trust all network access from websites you visit. With Teliva I'm exploring other approaches in search of a sandboxing model that's both more flexible and easier to understand/trust. Here's a first draft. (video; 2 minutes)

Main project page:

@akkartik I love the idea behind this; nice work.

I am super curious about the decision to use a version of Lua that dates from 2006 though; even 5.2 fixes almost all of the most glaring flaws in 5.1 without having the higher LOC count of the latest version.

@technomancy Yeah, totally. I'm not really sure what I'm doing there, and might change this. My reasoning at the moment was:

- preserve the luajit option
- go with a smaller implantation if it's still widely used (thanks to luajit)

I'd love to be corrected on either score.

@akkartik I see, yeah. unfortunately those two goals are somewhat at odds with each other; if you prioritize speed you have to sacrifice size.

despite being compatible with 5.1, luajit fixes almost all the big flaws in it, though some of its fixes need to be specifically opted into at compile time.

IMO either switching to luajit or a newer PUC would be better than staying on PUC 5.1 but I can understand wanting to keep options open.

@technomancy That's really helpful. I'm going to keep an eye out for flaws since I haven't experienced them myself yet. Is there a definitive list somewhere?

I plan to write lots of Lua code over the next few weeks and months, so I'm sure I'll run into them for myself.

@akkartik the biggest problems are the inability for coroutines to yield across protected calls or C code boundaries and the inability to construct proxy tables (using metamethods) that can be iterated.

these are both issues which beginners are unlikely to hit on their own, but coroutines and metamethods are both pretty important as means of abstractions for using 3rd-party code. if your goals don't involve users pulling in libraries, maybe it's less of an issue.

@akkartik this doesn't work for libraries but if you control the final environment you can more or less fix the metamethod problem completely in userspace:

it's very ugly but it gets the job done. I used this in my game Bussard to implement read-only tables being exposed to the in-game sandbox which allows users to run whatever code they write while playing.

now that I think about it, a similar approach could work for teliva.

@akkartik other main 5.1 drawbacks are: lack of utf8 support (easily backported), lack of bitwise operations (also backportable) and lack of integers (have to upgrade to 5.3 to get this if you want it; I've never personally needed it yet)

@technomancy @akkartik Also worth noting for those metamethods, if you're already working from C, is the native patch approach as seen in the Lua wiki

Though in the case of __ipairs you get the extra confusion of the fact that Lua 5.3 went on to deprecate it and 5.4 to remove it in favor of making ipairs respect __index and __len :(

@technomancy @akkartik Correction: ipairs respects __index and stops when it hits a nil, it doesn't check __len.

Not sure what I conflated it to throw __len in when I misremembered but figured I should correct myself after @technomancy asked me about it!

@akkartik can retrieved string be evaluated in lua vm?
Very cool project. Amazing progress in a few week :flan_aww:

@klve Thanks! :pilin: :pilin:

Yeah it's totally dynamic. I'm actually actively trying to hold back the dynamism :) I want to avoid situations where a program behaves differently after restarting, because what was in memory diverged from what got persisted into the .tlv file.

Sign in to participate in the conversation

Revel in the marvels of the universe. We are a collective of forward-thinking individuals who strive to better ourselves and our surroundings through constant creation. We express ourselves through music, art, games, and writing. We also put great value in play. A warm welcome to any like-minded people who feel these ideals resonate with them.