June 16, 2025
Some optimisations have been made to the Coputer VM – I'm starting with low-level functions like vector mathematics and bit32 operations because they're the smallest and easiest to test. In some cases, like floating-point operations, my custom functions were actually a lot slower than standard library ones!
I'll keep benchmarking higher-level functions until we can actually make an impact on performance, as at the moment Coputer's main VM is around 10x slower than the Luau reference implementation for most operations. The main reason the system is still fast enough is because of aggressive caching and memoisation on function results and arguments wherever possible, though better VM performance is always nice.
More work has been done on the upcoming documentation site for Mercury. This will encompass more in-depth setup guides than currently in the README, installation guides for tools needed for development and production, and common usage patterns in integration with larger projects.
The documentation site is built with Astro + Starlight. As I had previously used Astro I found the documentation to be pleasant and easy to build, and trivial to style with the Mercury Core colour scheme and design. Implementing the documentation directly into Mercury Core was also considered, though this would mean that users would have to set up the system correctly before being able to see the guides on how to set it up.
The first Coputer webpage now features some information about how the network works, detailing the path taken when a program is requested to be run by the network.
Some program bundling bugs that were uncovered while updating the site have also been fixed, and the public gateway at https://coputer.heliodex.cf has been updated to list programs for each user correctly. I'm actually pretty surprised the system has been running for a few weeks now without crashing.
Alongside the system for working with the output of luau-ast
, the ast branch now also contains a working Luau lexer, passing all test cases of the reference implementation, and a work-in-progress parser. The parser seems like it will be the more difficult side of the system to implement, though I'll be able to reuse the existing AST node structure I was testing previously.
The ast branch of the repository contains an experimental system for working with the syntax of the Luau language used to write Coputer programs, parsing the JSON output of the luau-ast
tool into a typed and more easily workable hierarchy. A set of tests are also provided alongside the system with inputs and expected outputs.
Hopefully in future this means we'll be able to provide advanced tooling for Luau, specially tailored to use in Coputer, to improve development experience.
Mercury is a suite of tools for building self-hostable MMO game creation platforms with rich social interactions and a wide variety of features. We call it a "build-your-own-Roblox". The central piece of the Mercury suite is Mercury Core (https://github.com/tp-link-extender/MercuryCore), a web and API platform to facilitate interaction between users and handling API requests from a game client. A hosted instance of Mercury is available at https://xtcy.dev. This version is currently in heavy development so might not be stable.
More tests have been added to the VM, which is the thing that actually runs Coputer programs. Test coverage has increased from 91.4% to 92.7% if that's a metric worth caring about, and bugs with string pattern matching and table sorting uncovered while testing have been fixed.
Coputer serves its first ever program as a webpage!
Its URL is https://first-h2lk2orlh-cctfxch0x-5yd7n93mg-zxmn64hy4-wfe6s2l9z.coputer.heliodex.cf. The domain might initially look strange: the part before the first - is the program name, then the rest is my public key so you can tell I published the program.
The program is accessed through a 'gateway' hosted at coputer.heliodex.cf, which asks the network for a program and returns it as a web response. I will go into more detail on how this process works later.
Coputer is a network for running programs written in Luau (luau.org). The network is decentralised and collaborative (that's the co- in coputer), and any uploaded program should be free to run and accessible 24/7 from anywhere across the network. Right now it isn't 'decentralised' and there isn't really a 'network' – there's just one server and it's mine, but it does run Luau! The demo link shows the first program on the network, which makes this the most overengineered web server ever.
This was widely regarded as a great move by everyone.