Better HN
topnewbestaskshowjobs
Log inSign up

tack1234

10 karma · joined Jul 27, 2025 (1y ago) · 8 submissions

Submissions

comment 2mo ago · link · parent

Thanks for pointing that out, I think it was somewhere on my TODO list which miraculously got lost. I'll have a look at it!

comment 2mo ago · link · parent

Thanks!!

comment 2mo ago · link · parent

Thank you!

From the conceptual standpoint, it felt way clearer to me from the start. I knew I "just" had to parse some input text and figure out the instructions into which it should be turned into. The actual lexing and parsing of the source code text character by character lead me to way more errors and debugging sessions than I expected, but that's probably just me being a bit rusty.

So I would say the emulator was harder to grasp at first, as I had no prior lower level experience, had no idea what a register or a stack pointer or a program counter is, etc.

comment 2mo ago · link · parent

Thanks! Well at first I did not have much structure, I just went full procedural and did what I needed to do at each step. It was an ugly, long chain of loops and switches. Then I read up about assemblers a little bit, figured out what should go into the lexing/parsing/emitting stages and split it into classes.

The steepest part.. probably trying to do things efficiently, using string views instead of strings where relevant, references and also ranges + iterators in C++. The from_char function and how it reports errors (e.g. when the iterator it returns is the end of the provided range, there were no errors) etc.

5.

Show HN: I wrote a custom assembler for CHIP-8 in C++(github.com ↗)

28 points · by tack1234 · 2mo ago · 8 comments

6.

Show HN: I wrote the emudev hello world (CHIP-8 emulator in C)(github.com ↗)

4 points · by tack1234 · 3mo ago · discuss

comment 1y ago · link · parent

Glad you noticed it! Indeed I tried to mix modern UI with retro style interfaces (like vim) with the hotkey bar at the bottom.

8.

Show HN: I built a desktop reminder app using Rust and Vue.js(github.com ↗)

3 points · by tack1234 · 1y ago · 2 comments