Hacker News new | ask | show | jobs
by prvak 3779 days ago
Thanks! We agree, memory models/instruction reordering is where it gets really fun and educational. The complexity scared us and we wanted to make the game usable as soon as we could, so we rather left it on the TODO list for now. Maybe one day in V2 :)
1 comments

You could add a CPU write buffer or cache lines as an intermediate step between the code and memory, and allow the player to choose when those get flushed to memory, constrained by memory barrier operations.

This kind of problem comes up very often in the context of the Linux kernel. And the ability to deal with it is as even rarer among programmers experienced with concurrency than experience with concurrency is among programmers in general. A tutorial of this form for memory ordering issues would be invaluable.

I'd be happy to help with problems and game-element design for a memory-ordering version of this tutorial.