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:49:33 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

10 sources
I want to like Teal, but the lack of nil checks[1] is a pretty big sacrifice in the name of "staying true to Lua idioms". >>> Every type in Teal accepts nil as a valid value, even if, like in Lua, attempting to use it with some operations would cause a runtime error, so be aware! I know you can use (or implement your own in about 8 lines) strict.lua[2], but that just seems like such a shame to omit nil checks from a gradual type system. I still follow the project, but I put a little more hope in Pallene's[3] development, although the aims are slightly different. [1]: https://github.com/teal-language/tl/blob/master/docs/tutoria... [2]: https://www.lua.org/extras/5.1/strict.lua [3]: https://github.com/pallene-lang/pallene
In #lang Lua
Odd to suggest that if they're interested in Lua, that they should check out Moonscript which is a different language altogether (although it compiles to Lua). But if you insist, something a little more Lua-ish is Teal[1] (gradual types ala TypeScript) or Pallene[2] (companion typed subset of Lua meant to generate optimized C libraries for use with Lua). [1]: https://github.com/teal-language/tl [2]: https://github.com/pallene-lang/pallene
In Lua, a Misunderstood Language (2021)
I prefer TypeScriptToLua's approach: https://typescripttolua.github.io/ The data structures are unchanged, so you have to remember to use base index 1 etc, but you get modern syntax and TS's great inferred typing system. Definitely scales better than raw Lua but you get the perf and compat wherever Lua[jit] is supported. It's nice if you used to use Lua and you use TS as a daily driver, you just have to remember the differences. There's also Teal (https://github.com/teal-language/tl) but I haven't gotten around to trying it, it may be less confusing to others.
In Yuescript is a dynamic language that compiles to Lua

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.