frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Turbine – 16-bit CPU Architecture and Emulator built in C

https://www.errorcodezero.dev/blog/building-my-own-cpu-isa-and-virtual-machine/
50•errorcodezero•7mo ago
Github: https://github.com/errorcodezero/turbine

Comments

lioeters•7mo ago
Fun article and project. I enjoyed reading and playing around with it.

My first run of `make release` failed with this error.

    cc -std=c11 -Wall -Wextra -Werror -pedantic -O3 -DNDEBUG -c -o build/main.o src/main.c
    src/main.c: In function ‘main’:
    src/main.c:23:3: error: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
      23 |   fread(file, file_size, 1, fp);
          |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors

It might have something to do with my local setup. It was simple enough to solve, to check the return value and exit with error code.
johnisgood•7mo ago
Yes, to fix it: either check its return value, or add "(void)" at the end of the function, e.g. "(void)fread(...)". Since they did not add "(void)", I assume they meant to check the return value, they just simply forgot.
johnisgood•7mo ago
s/end/beginning/
errorcodezero•7mo ago
Ah oops small mistake with the C file handling. Thank you for the kind words on my project and finding the issue I'll be sure to fix it when I get the time.
lioeters•7mo ago
The article was really good, explaining the details of how the virtual machine works.

I starred the Git repo, good luck with the Hack Club!

errorcodezero•7mo ago
Thank you for the star. It means a lot that you found the stuff I make cool.
drob518•7mo ago
Fun project. You might want to build an emulator for a real 16-bit CPU like a 6502. That would allow you to run real, existing software on it. That way you don’t have to write your own code.
AlexeyBrin•7mo ago
6502 is an 8-bit CPU. Writing an emulator for it would be cool though.
vardump•7mo ago
It's interesting how arbitrarily CPU bitness is defined. Sometimes it's the register size, sometimes data bus width and sometimes the address width.

6502 has 8 bit registers, 8 bits wide data bus, and 16 bit addresses. Only PC register is 16-bit, but 6502 does have a zero page indirect 16-bit addressing mode.

wang_li•7mo ago
Sometimes by register size, sometimes by ALU size, sometimes by data bus width. But I've never heard of a CPU bitness defined by address bus size.
drob518•7mo ago
Yea, I was thinking about the address width, but I guess it’s really an 8-bit accumulator width. LOL, and I used to hack 6502 assembly language when I was a kid. As I get older, I’m starting to understand the term “senior moment.”
pjc50•7mo ago
M68k is probably the best choice for that. Not because of the architecture but because it was so widely used.
dmitrygr•7mo ago
68k has too many addressing modes. It is a pain to emulate properly.
errorcodezero•7mo ago
Thank you! I think building an emulator for a real platform is going to be next on my list. A game console might be interesting to try especially or a 16-bit cpu like you mentioned.

Al Lowe on model trains, funny deaths and working with Disney

https://spillhistorie.no/2026/02/06/interview-with-sierra-veteran-al-lowe/
50•thelok•3h ago•6 comments

Hoot: Scheme on WebAssembly

https://www.spritely.institute/hoot/
115•AlexeyBrin•6h ago•20 comments

Stories from 25 Years of Software Development

https://susam.net/twenty-five-years-of-computing.html
49•vinhnx•4h ago•7 comments

OpenCiv3: Open-source, cross-platform reimagining of Civilization III

https://openciv3.org/
810•klaussilveira•21h ago•246 comments

The AI boom is causing shortages everywhere else

https://www.washingtonpost.com/technology/2026/02/07/ai-spending-economy-shortages/
90•1vuio0pswjnm7•7h ago•101 comments

Reinforcement Learning from Human Feedback

https://rlhfbook.com/
72•onurkanbkrc•6h ago•5 comments

The Waymo World Model

https://waymo.com/blog/2026/02/the-waymo-world-model-a-new-frontier-for-autonomous-driving-simula...
1053•xnx•1d ago•599 comments

Start all of your commands with a comma (2009)

https://rhodesmill.org/brandon/2009/commands-with-comma/
470•theblazehen•2d ago•173 comments

Selection Rather Than Prediction

https://voratiq.com/blog/selection-rather-than-prediction/
8•languid-photic•3d ago•1 comments

Vocal Guide – belt sing without killing yourself

https://jesperordrup.github.io/vocal-guide/
196•jesperordrup•11h ago•67 comments

Speed up responses with fast mode

https://code.claude.com/docs/en/fast-mode
9•surprisetalk•1h ago•2 comments

France's homegrown open source online office suite

https://github.com/suitenumerique
536•nar001•5h ago•248 comments

U.S. Jobs Disappear at Fastest January Pace Since Great Recession

https://www.forbes.com/sites/mikestunson/2026/02/05/us-jobs-disappear-at-fastest-january-pace-sin...
42•alephnerd•1h ago•14 comments

Coding agents have replaced every framework I used

https://blog.alaindichiappari.dev/p/software-engineering-is-back
204•alainrk•6h ago•310 comments

A Fresh Look at IBM 3270 Information Display System

https://www.rs-online.com/designspark/a-fresh-look-at-ibm-3270-information-display-system
33•rbanffy•4d ago•6 comments

72M Points of Interest

https://tech.marksblogg.com/overture-places-pois.html
26•marklit•5d ago•1 comments

Software factories and the agentic moment

https://factory.strongdm.ai/
63•mellosouls•4h ago•67 comments

Unseen Footage of Atari Battlezone Arcade Cabinet Production

https://arcadeblogger.com/2026/02/02/unseen-footage-of-atari-battlezone-cabinet-production/
110•videotopia•4d ago•30 comments

Where did all the starships go?

https://www.datawrapper.de/blog/science-fiction-decline
67•speckx•4d ago•71 comments

Show HN: Kappal – CLI to Run Docker Compose YML on Kubernetes for Local Dev

https://github.com/sandys/kappal
21•sandGorgon•2d ago•11 comments

Show HN: Look Ma, No Linux: Shell, App Installer, Vi, Cc on ESP32-S3 / BreezyBox

https://github.com/valdanylchuk/breezydemo
271•isitcontent•21h ago•36 comments

Learning from context is harder than we thought

https://hy.tencent.com/research/100025?langVersion=en
199•limoce•4d ago•110 comments

Monty: A minimal, secure Python interpreter written in Rust for use by AI

https://github.com/pydantic/monty
284•dmpetrov•21h ago•151 comments

Making geo joins faster with H3 indexes

https://floedb.ai/blog/how-we-made-geo-joins-400-faster-with-h3-indexes
155•matheusalmeida•2d ago•48 comments

Hackers (1995) Animated Experience

https://hackers-1995.vercel.app/
553•todsacerdoti•1d ago•267 comments

Sheldon Brown's Bicycle Technical Info

https://www.sheldonbrown.com/
424•ostacke•1d ago•110 comments

Ga68, a GNU Algol 68 Compiler

https://fosdem.org/2026/schedule/event/PEXRTN-ga68-intro/
41•matt_d•4d ago•16 comments

Show HN: If you lose your memory, how to regain access to your computer?

https://eljojo.github.io/rememory/
348•eljojo•1d ago•214 comments

An Update on Heroku

https://www.heroku.com/blog/an-update-on-heroku/
466•lstoll•1d ago•308 comments

Show HN: I spent 4 years building a UI design tool with only the features I use

https://vecti.com
367•vecti•23h ago•167 comments