DEV Community

Cover image for I Built a Programming Language with Inline Assembly in 5 Hours (On a $150 Phone). Here’s How H-Code Works.

I Built a Programming Language with Inline Assembly in 5 Hours (On a $150 Phone). Here’s How H-Code Works.

Harun - solo dev on December 05, 2026

I just spent the last 5 hours building a programming language. I didn't use a laptop. I didn't use a $2,000 MacBook with a fancy IDE. I built the...
Collapse
 
pengeszikra profile image
Peter Vivo •

Great concept

Collapse
 
koda2026 profile image
Harun - solo dev HYNAWEB •

Appreciate it, Peter! If you get a chance to run it, I'd love to know what you think of the inline assembly syntax. Let me know if you hit any bugs! 🐯☁️

Collapse
 
aheadkit profile image
AheadKit •

Five hours on a $150 phone is the kind of constraint that forces honest decisions, and building a language with inline assembly under it is the opposite of a demo. Our own experiment rig runs a 1.5B model on a 2-core box at about 3 tokens a second, and the small box is what keeps the measurements honest, because nothing there can hide behind scale. What did the phone force you to cut that the laptop version would have kept, and did any of those cuts turn out to be the better design?

Collapse
 
koda2026 profile image
Harun - solo dev HYNAWEB •

AheadKit — running a 1.5B model on a 2-core box is exactly the kind of constraint I respect. Nothing hides behind scale there.

To answer your question: the phone forced me to cut a complex multi-file watch mode and a heavy local language server. I couldn't keep a background daemon running in Termux without draining the battery and choking the RAM. So I made the compiler strictly single-pass with inline preprocessing.

Did it turn out to be a better design? Yes. It eliminated dependency resolution hell. You just get a single, flat C file that Clang compiles instantly. Sometimes constraints don't just limit you; they force you to simplify the architecture. Keep pushing that 2-core box! 🐯☁️

Collapse
 
zarb450 profile image
Ameer Hamza •

I have a few questions: what can we build with it at the moment?
What are your plans regarding this?
Are you planning to take this long-term or just as a side project?
And lastly,
How did you do it?🤧

Collapse
 
koda2026 profile image
Harun - solo dev HYNAWEB •

Ameer — great questions! Let me break them down:

  1. What you can build: Right now, it's best for CLI tools, data processing scripts, and basic 2D games (using the SDL2 wrapper). It's not ready for web backends yet, but it's great for systems-level logic.
  2. The plans: I'm actually planning to add H-code as the 13th supported runtime on my cloud platform, HYNA-Stage. Imagine writing H-code and deploying it to an isolated MicroVM in 7 seconds.
  3. Long-term: Definitely long-term. This isn't a weekend throwaway; it's a core part of the HYNAWEB ecosystem.
  4. How I did it: I used a recursive descent parser to build an Abstract Syntax Tree (AST), and then wrote a tree-walking transpiler that converts that AST into standard C99 code. Then I just let GCC/Clang do the heavy lifting to make it a native binary. All of it written entirely on my phone.

Let me know if you try building something with it! 🐯☁️

Collapse
 
zarb450 profile image
Ameer Hamza •

All of this without AI?

Thread Thread
 
koda2026 profile image
Harun - solo dev HYNAWEB •

WHO SAID WITHOUT AI?

Collapse
 
amintacccp profile image
tamina •

The honest limitations section is the strongest part of this — net.get shelling out to curl via popen, and the longjmp leak on throw, are exactly the things most 5-hour builds would quietly skip. Transpiling to C to get Clang/GCC optimizations for free was the right shortcut for a build like this. Curious what the package manager plan looks like — is the inline-import preprocessing going to get a real resolver, or is that deliberately out of scope for now?

Collapse
 
koda2026 profile image
Harun - solo dev HYNAWEB •

tamina — glad you caught the popen and longjmp notes. I figured if I didn't call them out, someone would find them the hard way, and I'd rather be honest upfront.

For the package manager: a real resolver is deliberately out of scope for v1.2.0. Right now, the inline preprocessing keeps the compiler dependency-free and fast. Building a proper resolver means handling versioning, caching, and network fetches, which is essentially building a second tool from scratch. I want to stabilize the core transpiler and the standard library first. Once the language syntax is rock solid, hpm (H-code Package Manager) will be the next major build. 🐯☁️

Collapse
 
koda2026 profile image
Harun - solo dev HYNAWEB •

@effessdev bro Gem back

Collapse
 
effessdev profile image
EffessDev •

Bro using this website I noticed that I follow you but you don't follow me back on GitHub.

effessdev.github.io/whoflow

You are strongly advised to follow me back.

(I'll give the gem please wait...)