Stephen Molyneaux


Blog CSS Optimization via LLM

For the longest time this blog was using tailwind v1 in all it’s bloated glory. Compressed on the wire, this CSS took 304.74 kB and a whopping 2.93 MB on disk! For the longest time I’ve wanted to move to newer versions of tailwind that only output the classes that are used, but that would drastically increase the complexity of generating the site which otherwise only depends on python and hugo.

LLM’s to the rescue!

Read more...

Rust Flexible Memory

Rust allows you to jump from high-level algorithms and data handling to low-level byte manipulations and optimizations. I’ve found it incredibly helpful to be able to shift between the two. You can start out with heap allocated Vec and HashMap and slowly migrated to more specialized and byte-optimized structures.

This flexibility is what made it practical to implement my scripting language in Rust.

Read more...

Game Script Implementation Notes (Draft)

I’ve previously blogged about the “Shimlang” language. This is not a continuation of that design. Instead, this page solidifies some of the internal implementation details of the programming language.

A large amount of virtual memory (4 GB) will be dedicated for the interpreter. All memory operations are done relative to the base address of this memory chunk. A dump of this memory should be sufficient to completely restore the state of a game written in the language. This includes loading state from some point in the past of a gameplay session to be able to easily reproduce errors and tweak behaviour.

Read more...

Shimlang Stage 1: Vertical Slice

To start working towards the design goals of Shimlang, the first goal is to create a “vertical slice” of a many of the interfaces that Shimlang will provide.

Read more...

Shimlang Design Goals

Shimlang is a new scripting language and interpreter that’s intended to be modern, lightweight, and easily distributed. But what does that mean, exactly?

Read more...

Shimlang Embeddable Scripting Language

There’s a niche of programming languages that I’m looking to fill. This is the first part of what will (hopefully) be a series of the journey of the development of my little scripting language called shimlang.

Read more...

Recipes

Here is a collection of recipes I’ve transcribed/tweaked since 2020. It follows the “Modernist Cuisine” recipe template I worked on mid-2021. The template ought to have it’s own blog post, but for now an outdated version of the script and template can be found in this GitHub Gist.

Read more...

Rust Modules in LÖVE

Calling Rust code in Lua is great for calling optimized routines, and leveraging libraries from the Rust ecosystem. Packing Rust code for consumption in Lua requires learning how to:

  • Generate Rust bindings from C headers
  • Generate dynamic libraries in Rust
  • Creating Rust ↔ Lua interop code
  • Load dynamic libraries in Lua

This post covers all the steps needed to wrap the Rust regex crate into a library loadable by the Lua-based LÖVE game framework.

Read more...

Hugo Knowledge Checklist

Hugo is a flexible way to generate static sites. Many people reach for premade themes/templates, but some people (like me!) want to create their own. There’s a lot to learn about Hugo and it can be daunting to take it all in at once.

This post is a beginner’s checklist for learning Hugo. This picks up right after you’ve completed the Hugo Quick Start Guide.

Read more...