Sign in

Mattias Ljungström

@spacesofplay.com
522 followers 336 following 288 posts

minc.dev, spacesofplay.com, based in berlin.

PostsRepliesMedia
Mattias Ljungström @spacesofplay.com · 25/09/2026
Finally found an Atari game that LLMs can play, here's MiniCPM5-2B at Q4_K_M playing Hangman: (all local, all minc code, except for atari env which is in python).
100
Mattias Ljungström @spacesofplay.com · 23/09/2026
minc profile is a built-in mini-profiler for quick and accurate profiling with function names. Agent mode returns data as json, on the cli you get text:
000
Mattias Ljungström @spacesofplay.com · 23/09/2026
Especially query allows agents to navigate code fast. The minc compiler's own source, 149,000 lines indexes from cold in about 0.3 seconds. Later calls only re-index the files whose modification time or size changed. The LSP stays in-memory as mcp server. You can of course use it on cli as well:
200
Mattias Ljungström @spacesofplay.com · 23/09/2026
minc compiler 0.9.15 now available from minc.dev More correctness, optimizations fixes, updated sokol headers to latest, two new sokol-samples (cmdbuf, sparse_ub) at (spacesofplay.github.io/sokol-sample...). Also re-transpiled latest box3d api with new features (spacesofplay.github.io/box3d-minc/).
193
Mattias Ljungström @spacesofplay.com · 21/09/2026
Unikernel in minc, running a TypeScript runtime, TLS1.3, TCP, network driver, scheduler, memory manager. All written in minc. Live: tsmc.minc.dev
130
Mattias Ljungström @spacesofplay.com · 21/09/2026
Local LLM playing breakout. It's quite bad on this setup, but fast! (Not sure text representation is ever good here.) The state is given as "The ball is to the left of the paddle, drifting away from the paddle." and the model outputs {left, stay, right} state. (MiniCPM5-2B-Q4_K_M, M1 GPU)
220
Mattias Ljungström @spacesofplay.com · 20/09/2026
Single-pass LLM classification on M1 GPU, inspired by SemIf repo and Jev. Running at parity with llama.cpp or slightly faster on M1 for this specific task. (100% minc code, ggml transpiled for CPU path, GPU kernels from scratch in minc, all local).
110
Mattias Ljungström @spacesofplay.com · 17/09/2026
editing and rebuilding editor code project inside the editor itself. terminal session survives editor restart. (the process itself is handed over to the new editor process.)
031
Mattias Ljungström @spacesofplay.com · 08/09/2026
Added a new audio example, showing stb_vorbis decodes and audio mixing: minc.dev/playground/g... (click on it to activate audio in browser)
141
Mattias Ljungström @spacesofplay.com · 07/09/2026
One of my validation projects for minc compiler has been a TypeScript run-time. It currently pass ~80% on the ECMAScript test suite. Live-demo: spacesofplay.github.io/tsmc/
140
Mattias Ljungström @spacesofplay.com · 07/09/2026
minc doesn't have incremental builds (yet):
000
Mattias Ljungström @spacesofplay.com · 07/09/2026
Created an overview of minc compiler _compilation_ speed, using the box3d project as a benchmark since it exist as both C and minc. Details here: minc.dev/compile-time...
121
Mattias Ljungström @spacesofplay.com · 07/09/2026
added editor emoji support, works on win/macos so far.
editor emoji support, work in progress
010
Mattias Ljungström @spacesofplay.com · 05/09/2026
minc compiler 0.9.14 now available (minc.dev) Focus on numerical correctness - all math func now in pure minc and identical cross-platform (x64/arm64/wasm). The new implementations are either faster or similar performance of C runtime. New sample chaos pendulum with pinned results:
191
Mattias Ljungström @spacesofplay.com · 04/09/2026
Mechanical random fuzz tests on my editor project. This sequence runs in ~3s in headless mode. It's ~2000 random editor actions based on a seed. Any run that generates a bug can be reduced to a minimal repo. Fixed sequences can be pinned and added to permanent tests.
190
Mattias Ljungström @spacesofplay.com · 03/09/2026
been working on a thing, this is the source code, in the thing. not quite ready for other people yet.
a text editor showing source code for a text editor
050
Mattias Ljungström @spacesofplay.com · 28/08/2026
staring at pixels...
060
Mattias Ljungström @spacesofplay.com · 27/08/2026
There's also a small NEON optimization (UMAXV reduction) in minc 0.9.12 for box3d-minc, the convex pile benchmark is about ~4% faster on M1. (github.com/SpacesOfPlay...)
030
Mattias Ljungström @spacesofplay.com · 27/08/2026
New compiler version minc 0.9.12 now available (minc.dev). Focused mostly on correctness and bug fixes, but multi-dimensional arrays came along as a feature. LSP memory fixes and minc-dbg fixes. Three new sokol-samples (plmpeg, fontstash x 2) are transpiled to minc. (including stb_truetype).
141
Mattias Ljungström @spacesofplay.com · 21/08/2026
I got tired of keeping mac/win/linux build scripts in sync. minc 0.9.11 now comes with a basic build system, built in minc. There are a few default commands like "minc run/build/test/wasm", anything more complex can be coded up with a build.mc file, see sokol-samples-minc for example setup.
framebuffer_sapp lauched with opengl on windows, or with webgpu on wasm, hosted by minc compiler builtin web-server.
040
Mattias Ljungström @spacesofplay.com · 21/08/2026
As part of the latest update I've been preparing a detailed overview of the box3d benchmarks; minc vs clang/msvc. Overall on x64 minc is 1.18x clang and 1.05x msvc. It's faster than clang on 2/11, and beats msvc on 3/11 scenes: minc.dev/performance....
win x64 box3d benchmark results
250
Mattias Ljungström @spacesofplay.com · 20/08/2026
New minc compiler version 0.9.11 is now available (minc.dev). Main feature - all core sokol-sample features are now supported correctly. There's a wasm gallery available here: spacesofplay.github.io/sokol-sample...
about 20 sokol-samples examples running on windows.
1145
Mattias Ljungström @spacesofplay.com · 18/08/2026
doing some final validations, new minc update and new transpiled repo coming soon...
2152
Mattias Ljungström @spacesofplay.com · 03/08/2026
Also pushed an update to box3d-minc with some performance tweaks. box3d-minc is now faster on some benchmarks than MSVC on x64, arm64 and wasm are at around x1.2 compared to clang/emcc. wasm live demo: spacesofplay.github.io/box3d-minc/ box3d-minc: github.com/SpacesOfPlay...
011
Mattias Ljungström @spacesofplay.com · 03/08/2026
Minor correctness release of minc compiler (0.9.10) Fixed a codegen issue, added optimizations, compiler size reduced, and syntax highlightning tweaks. install from minc.dev (or run minc_update)
121
Mattias Ljungström @spacesofplay.com · 31/07/2026
I'm bad at blog posts, but the project started from zero. There was an initial prototype that was just "how small can you make a self-compiling language?". There's a bootstrap compiler in C that compiles the actual .mc compiler source. The compiler then self-compiles over 3 steps + 1 control step:
110
Mattias Ljungström @spacesofplay.com · 31/07/2026
raylib-minc example code, the basic shapes example:
source code for raylib-minc basic shapes example in minc
000
Mattias Ljungström @spacesofplay.com · 31/07/2026
Finally got around to setting up the raylib-minc wasm example page: spacesofplay.github.io/raylib-minc/
raylib 3d cam fps example running on wasm on webraylib color palette example running on wasmraygui controls test suite running on wasm
232
Mattias Ljungström @spacesofplay.com · 30/07/2026
You can live-edit a smaller box3d demo here, if you want to play around with the source code without downloads: minc.dev/playground/g...
minc graphics playground editor with box3d demo
085
Mattias Ljungström @spacesofplay.com · 30/07/2026
Released minc compiler 0.9.9 - this is a major correctness and optimization update. The motivation for this work was to run the transpiled Box3D library at equal performance levels as msvc/clang. Installer scripts and links to repos at minc.dev
152
Mattias Ljungström @spacesofplay.com · 27/07/2026
screenshot in minc, in C you need to write "return lo + (int32_t)(rng_next() % ((uint64_t)hi - (uint64_t)lo));" to avoid UB.
181
Mattias Ljungström @spacesofplay.com · 07/07/2026
Ported an old project to minc compiler, original C++ project is ~200k lines of code and compiles in 21s (without cmake generation, which would add another 35s). The minc project is 160k lines and compiles in ~1s. Left terminal apple clang c++, right terminal minc compiler:
060
Mattias Ljungström @spacesofplay.com · 06/07/2026
Working on a JIT/hot-reload module for minc compiler. This is a godot app written in minc, with a static "engine" part that loads the minc compiler as a .dll module (libminc.dll), then watches file dir with OS events, recompiles directly to executable memory and remaps. Cross platform win/mac/linux.
2191
Mattias Ljungström @spacesofplay.com · 04/07/2026
Added minesweeper example based on thirteen.mc header to the minc compiler wasm playground: minc.dev/playground/g... The thirteen header is a tiny library that opens a window and hands back an RGBA pixel buffer.
minc compiler graphics playground with source code for minesweeper example based on thirteen.mc header.
021
Mattias Ljungström @spacesofplay.com · 30/06/2026
Added a imgui_demo example to the gfx playground. minc.dev/playground/g...
screenshot of minc code for dear imgui + wasm app running side by side.
041
Mattias Ljungström @spacesofplay.com · 29/06/2026
the godot bindings repo comes with a polished next gen game as well, or... maybe not. (it's interactive and shows some more binding flow.)
131
Mattias Ljungström @spacesofplay.com · 29/06/2026
mc cube in godot, scripted from minc code.
000
Mattias Ljungström @spacesofplay.com · 29/06/2026
updated the minc gfx playground with webgpu compute shader example: minc.dev/playground/g...
screenshot from gfx code playground web site, running a wasm webgpu compute example rendering a mandelbrot zoom.
181
Mattias Ljungström @spacesofplay.com · 28/06/2026
user code looks like this:
dear imgui demo code in minc
010
Mattias Ljungström @spacesofplay.com · 27/06/2026
dear imgui transpiled to minc as one header - 149,708 lines.
source code from the imgui.mc single header minc transpile of dear imgui c++ library
160
Mattias Ljungström @spacesofplay.com · 25/06/2026
the minc compiler is 1.5MB. it requires ~512Mb to self-compile inside the minc micro kernel.
VMWare emulator running the minc kernel. a shell shows the minc compiler self-compiling.
1150
Mattias Ljungström @spacesofplay.com · 25/06/2026
sokol wasm/webgpu support in minc compiler, available in next release.
firefox running a sokol compute shader rendering of a mandelbrot zoom in real-time.
050
Mattias Ljungström @spacesofplay.com · 22/06/2026
things might have escalated
170
Mattias Ljungström @spacesofplay.com · 19/06/2026
Did you know that any language can be bound to control the Godot game engine? Here's a quick test setup with minc running the game loop, drawing a mc test cube. All scripted in minc, no godot editor used. Running on macOS.
part of source code used to run minc code inside godot game engine. a godot game window with a test cube is visible on the right.
2641
Mattias Ljungström @spacesofplay.com · 19/06/2026
git status showing "on branch riscv64-target"
010
Mattias Ljungström @spacesofplay.com · 18/06/2026
minc uefi kernel booting, reclaiming boot memory, setting up interrupts, a physical allocator and dropping to user mode/ring 3 with (a very basic) preemptive scheduler.
010
Mattias Ljungström @spacesofplay.com · 18/06/2026
Installing and running the examples:
010
Mattias Ljungström @spacesofplay.com · 18/06/2026
The thirteen-minc single header transpile/port for minc is now available at github.com/SpacesOfPlay... The original is "a header-only C++ library that initializes a window and gives you a pointer to RGBA uint8 pixels to write to." Targets win, linux, macos, wasm.
screenshot of example apps running on the thirteen-minc single header library
260
Mattias Ljungström @spacesofplay.com · 18/06/2026
who needs operating systems anyways...
kernel loaded by minc bootloader, all written in pure minc compiled with --target uefi-x64 (work in progress, unreleased)
130
Mattias Ljungström @spacesofplay.com · 18/06/2026
more scope creep is happening...
UEFI boot written and generated by the minc compiler. Screen says "Hello from minc on UEFI!" in large letters.
380