Teal – A statically-typed dialect of Lua

(teal-language.org)

40 points | by Lyngbakr 1 day ago

2 comments

  • Kinrany 32 minutes ago
    I'm curious if there is a comparison to Luau.
  • arisAlexis 1 hour ago
    What is the purpose of these kind of experiments if not for artistic purposes in the new age of AI?
    • gucci-on-fleek 1 hour ago
      1. Teal has been around since before LLMs were good at coding [0].

      2. I don't see anything wrong with coding for purely artistic purposes?

      3. Presumably a static type checker would be quite helpful for LLMs, since it would help them catch lots of their mistakes.

      [0]: https://github.com/teal-language/tl/blob/main/CHANGELOG.md#0...

      • saghm 26 minutes ago
        I ported a mod I made to Teal when adding a feature was taking me way too long in regular Lua to get working correctly (I freely admit that I'm seriously crippled in my ability to write correct algorithms without being able to define types that I can enforce). This was before I had ever tried to use an LLM to code before.

        Now that LLMs are a common thing for coding, modding communities (which in practice have a large number of people using Lua since quite a lot of the most widely modded games use Lua for mods) are having to adapt a bit to handle the influx of a huge number of mods from people who have never programmed before, which I tend to view as a good thing in the long run, but right now LLMs seem to be rather abysmal at writing reasonable Lua. There's a meme (in the original sense of the word) that you can tell when a mod is LLM generated because it will use pcall in ridiculous ways, seemingly because it's a lot quicker to abuse it as a retroactive control flow mechanism than to go back and add proper checks up front (and probably restructure the code in the process). Teal doesn't fully solve the underlying issue of LLMs apparently being very poorly trained on Lua but it does at least give a pretty good way of statically enforcing what the actual types it should be using are.

    • HexDecOctBin 1 hour ago
      What is your purpose in the new age of AI?
    • arshxyz 1 hour ago
      What is the purpose of gcc in the new age of AI? Can't you ask your agent to build a compiler if you want to run Hello World?
    • computerfriend 1 hour ago
      Programming languages are useful?
    • mjmas 1 hour ago
      Teal isn't particularly new. First commit is Jan 2019
    • subversiontaco 40 minutes ago
      I agree with this sentiment.

      LLMs are already so incredibly capable and will only get better and faster with time.

      Learning a new programming language just feels redundant now.