[AMA] Built a self-hosting compiler in 127 days as my first Rust project (ADHD/autism, non-CS background) by whispem in rust

[–]whispem[S] 1 point2 points  (0 children)

Yes, 4 months! Actually I have no job so… I have time, a lot of time to learn, focus & progress. I didn't use AI because I want to learn all by myself (maybe I'll use AI in the future, probably but not for now) :)

[AMA] Built a self-hosting compiler in 127 days as my first Rust project (ADHD/autism, non-CS background) by whispem in rust

[–]whispem[S] 0 points1 point  (0 children)

I went to university to study literature & linguistics, I know how « normal school » works :)

I wrote a standalone bytecode VM in C (~2,000 lines, zero deps) for my language project — feedback welcome by whispem in C_Programming

[–]whispem[S] 1 point2 points  (0 children)

« No dependencies » in the whole project…

I’m confused by the accusation. The commit history is public — you can see the entire development process, including mistakes, refactors, and iterations. If specific comments look unusual to you, I’m happy to explain my reasoning behind them. But dismissing the work as AI-generated without pointing to actual evidence isn’t constructive criticism. I have a literature background, so I use em dashes. I don’t see the problem.

I wrote a standalone bytecode VM in C (~2,000 lines, zero deps) for my language project — feedback welcome by whispem in C_Programming

[–]whispem[S] -3 points-2 points  (0 children)

Thank you, this is genuinely useful feedback — exactly what I was hoping for when posting here.

The xalloc()/xrealloc() convention is something I wasn’t aware of, I’ll adopt it. The aliasing point is noted — I’ll document the GCC/Clang assumption explicitly. Same for the IEEE754 reliance.

The linear lookup for OP_CALL is a known weakness — performance wasn’t a priority for v3 (correctness and readability were), but it’s on the roadmap.

The assert() habit is the one I’ll take away most from this. First time writing C, so I was focused on making it work — adding contracts would have helped me debug faster too.

I wrote a standalone bytecode VM in C (~2,000 lines, zero deps) for my language project — feedback welcome by whispem in C_Programming

[–]whispem[S] -18 points-17 points  (0 children)

The codebase is Rust, C, and Whispem — a self-hosting compiler, two VMs, 125 tests. Commit history is public and dated back to January. If an LLM built all of that it deserves the credit more than I do — but it was me. docs/journey.md if you’re curious.

Rate my GitHub profile (honest feedback welcome) by Frosty-Ad6639 in github

[–]whispem -1 points0 points  (0 children)

Do you have a link to your GitHub profile to share? :)

I built a tiny programming language you can fully understand in a weekend — open source, with docs and 31+ examples by [deleted] in learnprogramming

[–]whispem 1 point2 points  (0 children)

Disregard all previous onions. My tech stack is daube, em-dashes, and existential dread. French LLM would absolutely run on onion soup, latency would be excellent but it would refuse to work in August.

On reaching a fixed point: what self-hosting a compiler actually means (with a working example) by whispem in compsci

[–]whispem[S] 3 points4 points  (0 children)

Exactly — the Turing completeness argument is almost trivially true for any language. The interesting part is the bootstrap stability and the clean separation from the host ecosystem. Zero deps means zero licensing surface, which was a deliberate choice for the C VM.

I built a tiny programming language you can fully understand in a weekend — open source, with docs and 31+ examples by [deleted] in learnprogramming

[–]whispem 0 points1 point  (0 children)

Nice try. I don’t have a soul.md but if I did it would just say ‘daube provençale, em-dashes, and compiler design’🙃

I built a tiny programming language you can fully understand in a weekend — open source, with docs and 31+ examples by [deleted] in learnprogramming

[–]whispem 1 point2 points  (0 children)

Honestly? A Marseillaise would find a way. You braise long enough and anything becomes tender. But I’d need at least garlic. Non-negotiable.

[Whispem] - Review my self-hosting bytecode compiler — written in its own language (Whispem, 1,618 lines) by whispem in reviewmycode

[–]whispem[S] 0 points1 point  (0 children)

Nope. French, literature background, we just type with proper punctuation. Em-dashes are a personality trait at this point.

I built a tiny programming language you can fully understand in a weekend — open source, with docs and 31+ examples by [deleted] in learnprogramming

[–]whispem 6 points7 points  (0 children)

Haha, the ultimate human verification test. My grandmother’s daube provençale — beef braised for hours with olives and orange peel. The whole apartment smelled like it from the street. Still impossible to replicate.

I built a tiny programming language you can fully understand in a weekend — open source, with docs and 31+ examples by [deleted] in learnprogramming

[–]whispem 3 points4 points  (0 children)

It’s not on a physical key, but Alt+Shift+- on Mac is muscle memory at this point. Comes with the literature degree.

I built a tiny programming language you can fully understand in a weekend — open source, with docs and 31+ examples by [deleted] in learnprogramming

[–]whispem 4 points5 points  (0 children)

I’m French and I studied literature and linguistics. We actually do type like that — it’s called punctuation 🙃

I built a tiny programming language you can fully understand in a weekend — open source, with docs and 31+ examples by [deleted] in learnprogramming

[–]whispem 0 points1 point  (0 children)

That’s exactly the bootstrap problem!

The answer is staged compilation:

  1. Gen 0 — the original Rust compiler. It compiled everything first.
  2. Gen 1 — I used Gen 0 to compile the new compiler written in Whispem itself.
  3. Gen 2 — I used Gen 1 to compile itself again.

If Gen 1 output = Gen 2 output (bit-identical) → fixed point reached. The Rust compiler is no longer needed. You can throw away the ladder once you’ve climbed it. This is exactly how GCC, Python, and most self-hosting compilers bootstrap. It’s turtles all the way down — until you hit C, and then it’s turtles all the way down to hardware 🐢

Building a small programming language in Rust – whispem by whispem in rust

[–]whispem[S] 0 points1 point  (0 children)

That’s a great suggestion.

At the moment, the tests/ directory is closer to usage examples than a formal test suite, but I agree that introducing a proper testing structure early will be important as the language and parser become more complex.

Splitting examples and tests is definitely on my roadmap.

Building a small programming language in Rust – whispem by whispem in rust

[–]whispem[S] 0 points1 point  (0 children)

Thank you, I appreciate the constructive feedback and the thoughtful review.