Pluto, a Modern Lua Dialect

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • Pluto

    A superset of Lua 5.4 with a focus on general-purpose programming. (by PlutoLang)

  • I looked into the jump table optimization. The normal Lua version is here[1] and it uses the opcode as a index into a static array to jump to the label. The “faster” Pluto version is here[2] and it just uses a switch statement on the labels. I would naively assume that these would compile to the same code because the lua version is just manually creating the jump table and the pluto version is leaving it to the compiler. How could the compiler optimize the switch so that would outperform the manual jump table (by a decent margin)?

    [1] https://github.com/PlutoLang/Pluto/blob/main/src/ljumptabgcc...

    [2] https://github.com/PlutoLang/Pluto/blob/main/src/ljumptab.h

  • luau

    A fast, small, safe, gradually typed embeddable scripting language derived from Lua

  • Alternatively, Luau is a well-supported Lua variant with type checking and performance improvements, aimed more towards being a sandboxed embedded scripting environment.

    https://luau-lang.org/

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • Lua

    Lua is a powerful, efficient, lightweight, embeddable scripting language. It supports procedural programming, object-oriented programming, functional programming, data-driven programming, and data description.

  • It’s Portuguese. It’s the same in the Lua codebase [1].

    [1]: https://github.com/lua/lua

  • Penlight

    A set of pure Lua libraries focusing on input data handling (such as reading configuration files), functional programming (such as map, reduce, placeholder expressions,etc), and OS path management. Much of the functionality is inspired by the Python standard libraries.

  • To have enough batteries you kind of just need penlight[1] and maybe luastd. Of course there's posix, lfs, socket, luasec and you're semi set.

    [1]: https://lunarmodules.github.io/Penlight/

  • berry

    A ultra-lightweight embedded scripting language optimized for microcontrollers. (by berry-lang)

  • This is interesting, but lua needs a refresh.

    I think berrylang shows a lot of promise now https://berry-lang.github.io/. The documentation has improved a lot and while it doesn't have a 'luajit' yet it has a lot of really interesting optimisation/reduction techniques.

  • pluto

    Heavy Duty Persistence for Lua (by hoelzro)

  • Fennel

    Lua Lisp Language

  • Eh it's not just luajit and luajit didn't create that problem either. It's a symptom of lua actually succeeding at its design goal of being easily embedded as an extension language. A significant number of incompatible runtimes are more popular than the most recent puc lua, including I believe the older official lua 5.2 released in 2011.

    I've done a fair bit of professional lua development and I don't think I've ever written standalone up-to-date puc lua except maybe for some tooling & scripts. It's such a small language and used in such a way that the runtime, distribution method, and available APIs have much more impact on your use (and compatibility) than the version.

    Virtually everyone shipping a lua environment is also shipping changes to it that make it a unique target, if only extensions to the standard library. This is why I think syntax layer-only approach like fennel's is the correct choice for improving on lua. It mirrors lua's runtime semantics exactly, and allows you to access the implementation peculiars on their own terms and so can just be run on time of any lua system.

    https://fennel-lang.org

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts