Deadlock Empire (Single-link Web puzzle/game)
December 1, 2021 1:56 PM   Subscribe

Slay dragons, master concurrency! Fun little puzzle solving game playing around with all the ways parallel processes can go wrong under the guise of an epic battle between Sequentialists and Parallelists The skills you need are your intelligence, cunning, perseverance and the will to test yourself against the intricacies of multi-threaded programming in the divine language of C#. Each challenge below is a computer program of two or more threads. You take the role of the Scheduler - and a cunning one! Your objective is to exploit flaws in the programs to make them crash or otherwise malfunction.

Credit to Cory Doctorow for the link in Pluralistic today
posted by mincus (8 comments total) 20 users marked this as a favorite
 
It's been a bit since I posted a link here (just shy of 13 years ago!) so feel free to fix if I messed something up
posted by mincus at 1:58 PM on December 1, 2021 [2 favorites]


Yes, “the divine language of C#” is surely a typo.
posted by Going To Maine at 1:59 PM on December 1, 2021 [8 favorites]


So help me, I am starting to figure this out--thanks for posting!
posted by box at 2:07 PM on December 1, 2021 [1 favorite]


This is a lot of fun for me, not hard (so far) and it really triggers that little part of me that is very satisfied by troubleshooting/bug hunting.
posted by muddgirl at 4:45 PM on December 1, 2021


Or you can just write in Rust and have all the concurrency issues taken care of by the compiler.
posted by ocschwar at 5:00 PM on December 1, 2021 [1 favorite]


The Deadlock Empire ought to read up a bit on System.Threading.Channels. Cute idea and charming implementation though.

(There was a bit early on about locking on "any object, even classes" which simply isn't true. Classes as not objects in the .NET world.)
posted by bcd at 6:49 PM on December 1, 2021


re: Or you can just write in Rust and have all the concurrency issues taken care of by the compiler.
and
The Deadlock Empire ought to read up a bit on System.Threading.Channels

Thinking about concurrency and all the relevant gotchas is important even if you use Rust or .NET channels. [or software transactional memory, or functional programming, or whatever] Sooner or later, any real world program is going to interact with the world outside its controlled bubble, and you'll need to account for concurrency. Either you'll be accessing a database, or the filesystem, or some other resource that's shared with other actors, and you'll be vulnerable to
concurrency issues.
posted by mrgoldenbrown at 7:30 PM on December 2, 2021 [3 favorites]


ocschwar, until you get into unsafe code... in the end somebody has to make the CPU do the right thing for shared mutable values.
posted by WaterAndPixels at 7:08 PM on December 3, 2021


« Older "When I open it and it's not broken, it's...   |   It's Only a Little Stale Newer »


This thread has been archived and is closed to new comments