HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
teal-language
tl
Lua2020–2026
teal-language / tl

tl

The compiler for Teal, a typed dialect of Lua

42Distinct people
62Mentions
1Explicit recommenders
3KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

The compiler for Teal, a typed dialect of Lua

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

I need to clean up this page but I'm working on a local(-ish) book collection tool (calling it Livtet for "book head" in Haitian Kreyol). https://www.jacky.wtf/projects/livtet/…

jalcine used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 10:01:16 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year62 dated mentions

Observed mentions: 2020-07-27 13:11:12 UTC to 2026-10-18 09:49:20 UTC.

0510152020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 11 mentions; 2 submissions, 9 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 11 mentions; 1 submissions, 10 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 10 mentions; 1 submissions, 9 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 13 mentions; 1 submissions, 12 comments20232024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 8 mentions; 1 submissions, 7 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 7 mentions; 0 submissions, 7 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC1129
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC11110
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC1019
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC13112
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC817
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC707
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC202

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
Teal This is the repository of tl, the compiler for Teal, a typed dialect of Lua. The core compiler has no dependencies and is implemented as a single tl.lua file which you can load into your projects. Running tl.loader() will add Teal support to your package loader, meaning that require() will be able to run .tl files. Introduction You can read the tutorial chapter of the Teal documentation to get started with an overview of the language. Installing Via LuaRocks Install Lua and LuaRocks, then run: luarocks install tl This should put a tl command in your $PATH (run eval $(luarocks path) if the LuaRocks-installed binaries are not in your $PATH). Teal works with Lua 5.1-5.4, including LuaJIT. Binaries Alternatively, you can find pre-compiled binaries for Linux x86_64 and Windows x86_64 at the releases page. The packages contain a stand-alone executable that can run Teal programs (without the need of a separate Lua installation) and also compile them to Lua. Try it from your browser You can give Teal a try directly from your browser with the Teal Playground! It compiles Teal into Lua using Fengari, a Lua VM implemented in JavaScript, so everything runs on the client. Running Using the compiler directly Once tl is in your path, there are a few subcommands: tl run script.tl will run a Teal script. tl check module.tl will type check a Teal module, report any errors and quit. tl gen module.tl will check for syntax errors and generate a module.lua file in plain Lua with all type annotations stripped. tl warnings will list all warnings the compiler can generate. tl also supports some compiler options. These can either be specified on the command line or inside a tlconfig.lua file at the root of your project. Building projects with Cyan To build whole projects, you probably won't want to run tl on each file individually. We recommend using Cyan, the build tool designed for Teal. Loading Teal code from Lua You can either pre-compile your .tl files into .lua, or you can add the tl.lua module into your project and activate the Teal package loader: local tl = require("tl") tl.loader() Once the package loader is activated, your require() calls can load and compile .tl files on-the-fly. Documentation You can read the rendered documentation online; it can also be generated locally from the files in the docs/ folder of this repository. Type definitions tl supports declaration files, which can be used to annotate the types of third-party Lua libraries. We have a collaborative repository for declaration files at https://github.com/teal-language/teal-types — check it out and make your contribution! Text editor support Teal language support is currently available for Vim, Visual Studio Code, lite with linter support and Helix with LSP support. Community Join the chat on Gitter! You can also join via Matrix at #teal-language_community:gitter.im Teal is a project started by Hisham Muhammad, developed by a growing number of contributors and is written using Teal itself! License License is MIT, the same as Lua.
Read the full README on GitHub

What Hacker News says

8 sources
jalcine·Aug 24, 2024Recommendation phrase
I need to clean up this page but I'm working on a local(-ish) book collection tool (calling it Livtet for "book head" in Haitian Kreyol). https://www.jacky.wtf/projects/livtet/ has some notes but https://man.sr.ht/~jacky/livtet is much better. It's been fun using Lua to externalize a lot of logic (and I'm looking into using https://github.com/teal-language/tl because I love me some typing. Outside of that, I've been blogging a lot more (https://www.jacky.wtf/essays/ - August looks so full, ha) and now I'm writing about things I'm reading too (https://www.jacky.wtf/links/). Been doing this to try to ween off social media and rely on places like this to share stuff.
In Ask HN: What are you working on (August 2024)?
I don't think Teal can be total. Lua is super expressive and you would need to get deep into dependent types and whatnot to caption a fraction of the power of its types. > Some Lua libraries use complex dynamic types that can't be easily represented in Teal. In those cases, using any and making explicit casts is our last resort. https://github.com/teal-language/tl/blob/master/docs/tutoria... Personally if I paid the cost of having an extra compile step then I would rather wish for some serious type safety like what Elm or Reason provide. But then you end up with a different language. I agree though that for your use case of making complicated libraries Teal might be actually good fit. I was going to argue that Luau is superior anyway if you really can't cope with annotations but obviously if you want to make libraries for lua users that d
Read the rest
oesn't work. (Though I guess you could technically compile down from Luau to Lua, just not sure if anyone has ever bothered.)
In What I think about Lua after shipping a project with 60k lines of code

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.