honziitko/good-luck-compiler
When the compiler doesn't have enough work
A library that generates and runs a random Turing machine — at compile time.
Because why wait for runtime when you can confuse yourself earlier? :sweat_smile:
Good luck, compiler! is an experimental library that explores the limits of compile-time computation. On every build, it generates a fully random Turing machine and executes it as part of the compilation process. :hammer_and_wrench:
The result? A program whose behavior isn't known until it's compiled — and maybe not even then. :man_shrugging:
:test_tube: Test the boundaries of what your compiler can handle.
:bulb: Demonstrate the halting problem in a real-world, build-time context.
:slot_machine: Introduce non-determinism into your build process (for science!).
:books: Explore computability theory in a tangible, hands-on way.
:thread: Break CI pipelines
:game_die: Random Turing machine generation at compile time — new machine every build!
:stop_sign: May halt... or not — compile-time simulation of undecidable computation.
:gear: Fully configurable: number of states, tape symbols, transitions.
(Editorial note: Why the fuck did it switch to colons?)
(Editorial note: Huh?)
const std = @import("std");
const glc = @import("glcompiler");
pub fn main() !void {
@setEvalBranchQuota(6767); // Set to BB for correctness
try glc.haveFun(std.io.getStdOut().writer());
}
I sincerely apologize for using AI, but, I am not an expert in emojis nor marketing. I thought it was funny. In a serious project, I'de write the README myself.
This was intended to be a monorepo of different libraries in different languages. So far, only Zig is supported, so the directory structure looks weird.
Languages:
Zig
C++