HeadlinesBriefing favicon HeadlinesBriefing.com

Betbet: A New Language Runs DOOM

Hacker News •
×

The creator of betbet, a novel programming language featuring slang keywords and a robust compiler, has successfully ported the entirety of DOOM to it, demonstrating the language's capabilities.

betbet compiles to native code via LLVM, manages its own memory, and is self-hosting. The language was conceived as a contained experiment, built during a break from commercial projects, with the goal of creating something with a clear objective that could be completed. The rule of "no research" was initially imposed to prevent external ideas from stifling the project, though it was later discovered that Geoffrey Huntley had explored similar concepts.

A key feature of betbet is its arena memory management system, designed to optimize game development by allowing for the allocation and deallocation of memory within specific scopes, a pattern also seen in languages like Zig and Odin. This feature is a first-class citizen in betbet, intended to be a core design element rather than a mere syntactic sugar.

The language's true test lies in its ability to run DOOM, a port that involved rewriting over 56,000 lines of the original C source code. The betbet version precisely replicates the original game's behavior, achieving bit-for-bit identical results by replaying recorded inputs. This accomplishment validates betbet as a language capable of handling significant software, moving beyond the status of a mere toy project.