frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Luau – fast, small, safe, gradually typed scripting language derived from Lua

https://luau.org/
45•andsoitis•2h ago

Comments

ngrilly•1h ago
I learned about Luau via my 13 years old who is looking into Roblox Studio. That's how I ended up visiting luau.org and I'm quite impressed by Roblox's engineering on this.
Ciantic•1h ago
Typed Lua is something I've always wanted, but writing a very comprehensive type-checker and LSP for another dynamic language is pretty difficult. All dynamic languages have similar problems to those TypeScript encountered, as most dynamic languages have a sort of structural typing in the form of dictionaries or objects.

I do wonder if we could reuse TypeScript in other dynamic languages.

Transform Luau to a subset of TypeScript, check with tsc, transform errors and results back to Luau. In the same way, one could reuse a TypeScript language server. This way of utilising TypeScript's engine could jump-start many other type checkers for other dynamic languages.

cjbgkagh•43m ago
Like a LLVM but for type systems instead of compilation / interpreters / JIT. I don’t see why that couldn’t work.

My thinking in this space has always started from a type inferred MetaLanguage but starting from a dynamic language does enable some interesting options. I tend not to touch dynamic languages, even going so far as to use transpilers, but I definitely would be more open to the idea of working with them if they had TypeScript level of gradual type checking and tool support. As you mention such a bidirectional transpiler would work I guess for things that don’t translate it could just give up and that’ll be part of the gradual typing aspect.

I would love to have TypeScripts type system on a Lua runtime, so I’ve been keeping an eye on Luau.

giraffe_lady•24m ago
For all its success typescript demonstrates the downside of this approach. Like you said it's just difficult, and the end result of having every corner of the dynamic language expressible in the type system forces you into the most complex & novel type systems.

IMO a better approach is the one used by rescript and gleam. With a few careful restrictions of the target language you can fit it into a hindley-milner type system. These are extremely well understood, robust & usable, and give you a much smaller interface than the expansive turing complete one of TS.

I'm kind of surprised there's not an active project for a small ML language outputting lua code. I really wish gleam could pick it up as a third backend, it would be an amazing fit.

pansa2•1h ago
How does Luau compare to Teal [0], which is described similarly as a "statically-typed dialect of Lua"?

[0] https://teal-language.org/

Scaevolus•44m ago
Teal transpiles to Lua, but Luau is a fork of Lua. Luau can implement wider ranging changes, like improving interpreter performance and security or adding syntactic sugar.

Roblox has a market cap near $100B and has multiple developers working full-time on Luau.

cardanome•42m ago
Teal compiles teal files into plain Lua just like TS does for JS. So all the advantages and disadvantages apply.

Luau is a backwards compatible superset of Lua that comes with it's own performance-tuned runtime. It offers more than just gradual typing.

So they are very different things. You can use Teal in cases when you don't control the runtime. Like write a Love2d game or your neovim config in it. Anywhere where Lua runs, you can use teal.

On the other hand Luau can offer superior developer experience because you don't have a separate compile step. They can do a lot more things that are impossible with teal as they have their own runtime and types do not get erased by compiling.

pansa2•30m ago
Luau seems to be significantly more complex than Lua - I'm not sure it can still be called "small". Looking at the relative size of the implementations: Luau's is 120,000 lines of C++ [0], an order of magnitude larger than Lua 5.1's 14,000 lines of C.

But I think that complexity is unavoidable for a gradually- or statically-typed language. Any language with a reasonably-complete type system is inevitably going to be much more complex than a dynamically-typed scripting language.

[0] Counting *.cpp files in the "Analysis", "AST", "Compiler" and "VM" directories

eel•27m ago
It's a shame that Lua did not evolve in a more backwards-compatible manner. In addition to Roblox, lots of others projects started adopting Lua 5.1 as a scripting language in the late 00s. Lua itself is now at 5.4, but it did not keep backwards compatibility. LuaJIT and related projects pretty much only support 5.1. It's similar to the situation Python had with 2.x/3.x, except that the majority of Lua users I am aware of are preferring to stay with the older 5.1.
fithisux•11m ago
It is an impressive achievement.

Unfortunately, there is not a Luau distribution of windows like Luarocks.

Eventually we may see something in this place.

The well known libraries, IUP, CD, IM have not been ported to Luau.

But code is Free Open Source, who knows.

Geizhals Preisvergleich Donates USD 10k to the Perl and Raku Foundation

https://www.perl.com/article/geizhals-donates-to-tprf/
95•oalders•1h ago•27 comments

Fuck, You're Still Sad?

https://bessstillman.substack.com/p/oh-fuck-youre-still-sad
113•LaurenSerino•1h ago•30 comments

Flipper Zero Geiger Counter

https://kasiin.top/blog/2025-08-04-flipper_zero_geiger_counter_module/
74•wgx•2h ago•21 comments

Slack has raised our charges by $195k per year

https://skyfall.dev/posts/slack
2164•JustSkyfall•14h ago•941 comments

TernFS – An exabyte scale, multi-region distributed filesystem

https://www.xtxmarkets.com/tech/2025-ternfs/
48•rostayob•1h ago•7 comments

KDE is now my favorite desktop

https://kokada.dev/blog/kde-is-now-my-favorite-desktop/
341•todsacerdoti•3h ago•283 comments

The quality of AI-assisted software depends on unit of work management

https://blog.nilenso.com/blog/2025/09/15/ai-unit-of-work/
71•mogambo1•2h ago•37 comments

Luau – fast, small, safe, gradually typed scripting language derived from Lua

https://luau.org/
45•andsoitis•2h ago•10 comments

Midcentury North American Restaurant Placemats

https://casualarchivist.substack.com/p/order-up
94•NaOH•1d ago•23 comments

Automatic Differentiation Can Be Incorrect

https://www.stochasticlifestyle.com/the-numerical-analysis-of-differentiable-simulation-automatic...
26•abetusk•1h ago•4 comments

CERN Animal Shelter for Computer Mice

https://computer-animal-shelter.web.cern.ch/index.shtml
233•EbNar•8h ago•32 comments

WASM 3.0 Completed

https://webassembly.org/news/2025-09-17-wasm-3.0/
1001•todsacerdoti•21h ago•432 comments

Show HN: The text disappears when you screenshot it

https://unscreenshottable.vercel.app/?text=Hello
418•zikero•13h ago•137 comments

Meta Ray-Ban Display

https://www.meta.com/blog/meta-ray-ban-display-ai-glasses-connect-2025/
537•martpie•15h ago•773 comments

Pnpm has a new setting to stave off supply chain attacks

https://pnpm.io/blog/releases/10.16
127•ivanb•8h ago•83 comments

This Website Has No Class

https://aaadaaam.com/notes/no-class/
151•robin_reala•6h ago•71 comments

You Had No Taste Before AI

https://matthewsanabria.dev/posts/you-had-no-taste-before-ai/
166•codeclimber•3h ago•134 comments

CircuitHub (YC W12) Is Hiring Operations Research Engineers (UK/Remote)

https://www.ycombinator.com/companies/circuithub/jobs/UM1QSjZ-operations-research-engineer
1•seddona•6h ago

Fast Fourier Transforms Part 1: Cooley-Tukey

https://connorboyle.io/2025/09/11/fft-cooley-tukey.html
55•signa11•6h ago•10 comments

Nvidia buys $5B in Intel stock in seismic deal

https://www.tomshardware.com/pc-components/cpus/nvidia-and-intel-announce-jointly-developed-intel...
279•stycznik•4h ago•180 comments

Mirror Life Worries

https://www.science.org/content/blog-post/mirror-life-worries
23•etiam•4h ago•11 comments

Keeping SSH sessions alive with systemd-inhibit

https://kd8bny.com/posts/session_inhibit/
36•kd8bny•2d ago•13 comments

An Afternoon at the Recursive Café: Two Threads Interleaving

https://ipfs.io/ipfs/bafkreieiwashxhlv5epydts2apocoepdvjudzhpnrswqxcd3zm3i5gipyu
8•robertothais•3d ago•2 comments

Boring is good

https://jenson.org/boring/
256•zdw•2d ago•57 comments

One Token to rule them all – Obtaining Global Admin in every Entra ID tenant

https://dirkjanm.io/obtaining-global-admin-in-every-entra-id-tenant-with-actor-tokens/
270•colinprince•16h ago•41 comments

A better future for JavaScript that won't happen

https://drewdevault.com/2025/09/17/2025-09-17-An-impossible-future-for-JS.html
8•warrenm•20m ago•0 comments

Orange Pi RV2 $40 RISC-V SBC: Friendly Gateway to IoT and AI Projects

https://riscv.org/ecosystem-news/2025/09/orange-pi-rv2-40-risc-v-sbc-friendly-gateway-to-iot-and-...
92•warrenm•2d ago•83 comments

A postmortem of three recent issues

https://www.anthropic.com/engineering/a-postmortem-of-three-recent-issues
346•moatmoat•18h ago•109 comments

60 years after Gemini, newly processed images reveal details

https://arstechnica.com/space/2025/09/60-years-after-gemini-newly-processed-images-reveal-incredi...
40•rbanffy•2d ago•1 comments

History of the Gem Desktop Environment

https://nemanjatrifunovic.substack.com/p/history-of-the-gem-desktop-environment
59•ibobev•8h ago•26 comments