2 ms·
Show HN: Freelang - a no-libc AoT where the compiler is just JavaScript
- keepamovin 5mo ago[dead]
- keepamovin 5mo agoI originally just wanted a way to compile JavaScript to native binaries to protect source code IP. But then I realized, with AI agents making coding so cheap, I could just design a brandnew language from the ground up, exactly how I wanted. After three decades of programming, and seeing how AI agents still get stuck debugging the same old legacy issues and generating bugs, it hit me: AI is going to write hundreds of times more code in the next couple of decades than humans have in all of history. We need a language designed for this new era: something easily instrumentable, debuggable, and low-footgun. So, I started building Freelang. I thought a lot about my experience and decided on things I wanted to fix. First, exceptions. I hate how they lead to spaghetti code. In freelang, an incorrect program state is a fatal bug. External errors are modeled explicitly using what I call ""chaos tags"" because anything outside the program's control is real-world chaos. Also, concurrency. Instead of shared mutable state and threads, I went with strict process separation and a novel file system API approach. You just let the OS figure it out. It trades some raw performance for correctness, but hardware is getting faster, while the amount of bugs is only going to multiply if we keep using legacy languages with AI. I also wanted it as lowlevel as possible, so I forbade libc entirely, instead using direct kernel and system calls. This avoids many legacy C bugs and gives us tiny, tight, close-to-the-metal binaries. I am not claiming this replaces Rust or Go. And I'm not really qualified to be writing a programming language. But I am. I considered keeping it proprietary for the competitive advantage, but I think the space of new languages is opening up - also this feels like something that just wants to be free to exist in the big wide world - rather than just my corp. Also, I believe the actual compiler and OS experts interested would help lots. What I bring is a strong sense of taste and design for this, but I'm open to genuine improvements. However zero in litigating ideological orthodoxy or getting into energy-sapping theoretical debates. If you’re negatively aligned or just want to argue theory, please "keep steppin" ;) But if you don't think it's a dumb idea, and you’re inspired to help build a language for a new era of software, I’d love your help. I'm developing it in the open now. You can check out the landing page (freelang.dev), grab the repo, run the compiler, and see for yourself. There exist some clear next steps like fleshing out the net library and adding an execve call - it's fun getting agents to write and debug assembly that bypasses libc and goes straight to sys/kernell calls across multiple OS. If you want to get in on the ground floor, come aborad! :)