It's somewhat strange to me that their tech journey is so narrative and ends up with a VM stack, rather than any kind of salvaged / repurposed hard tech. But then again, I'm probably on the forth side of the spectrum.
It's somewhat strange to me that their tech journey is so narrative and ends up with a VM stack, rather than any kind of salvaged / repurposed hard tech. But then again, I'm probably on the forth side of the spectrum.
It's a good first step in that direction, the first attempt at permacomputing good enough to criticize.
Many of these might be more powerful than your 90s workstation, but if someone's scavenging technology they're more likely to find a Chromebook than a Sun.
As for what you're more likely to find in usable shape in a hypothetical collapse scenario, it probably depends on what kind of scenario you're talking about. Certainly vastly more Chromebooks exist than Suns, but the Chromebook's SSD only has a few months of data retention, so you probably won't be able to get it to boot if it's been sitting around unpowered for many years. All the Sun SPARCs are going to be in non-working order because their IDPROM batteries will have died, but some older 68000-family Suns like the 3/60 I theoretically still have are probably okay, because their IDPROMs are actually PROM rather than battery-backed RAM.
(Of course you also have to worry about capacitors drying out.)
What's vastly more common than Chromebooks, Suns, or GBAs, though, are Flash-based microcontrollers like the AVR family and 48MHz members of the STM32 family. (You can probably salvage a couple out of the wreckage of the drone that killed your parents.) And those will probably still be in working order, unlike anything SSD-based. I don't think Uxn is a good fit for those chips.
In a multiple-centuries sort of collapse scenario you also need to worry about the retention time of the NOR Flash in these microcontrollers. Hopefully if they lose their memory you'll still be able to rewrite it, but if the manufacturers used Flash to implement some supposedly-read-only memory, they might not bother to mention it.
In the collapse scenario we're actually in at the moment, GBAs, Nintendo DSs, and Chromebooks are all immensely more expensive than such microcontrollers. That seems likely to remain true even after the PRC invades Taiwan in a few years.
And while they're far more numerous, ultimately I think they're less likely to be used for personal computing. Sifting through the ruins, if you can find any functioning personal computer, you can get started immediately. Even if you don't have a compiler, you certainly have a web browser and write permissions. All you need to bring is the emulator spec.
That's an easier bar to clear than harvesting chips, a set of other working parts, gathering documentation for each, ensuring you have tooling and likely libraries for each, and most critically: enough existing, functioning tech to program it all. But if you already have that, you already have everything you need to compute without bootstrapping a new device. Not to say it wouldn't be worth the effort, but it's not an easier or alternative path to personal computing, just a path to share or persist it.
The most popular model of STM32 is probably the STM32F103C8T6 https://www.st.com/en/microcontrollers-microprocessors/stm32... used on the Blue Pill, which is a 72 MHz Cortex-M3 with 64KiB of Flash and 20KiB of SRAM, consuming up to almost 0.2 watts at full speed. The Cortex-M3 is 1.24 Dhrystone MIPS per MHz https://developer.arm.com/Processors/Cortex-M3 so that's about 89 Dhrystone MIPS. Looking at historical Dhrystone results https://netlib.org/performance/html/dhrystone.data.col0.html similarly powerful CPUs include a 133MHz Pentium, a 66MHz PowerPC 602 (as used in a PowerMac 7100 or an RS/6000 250), a 100MHz PA-RISC HP 9000/715, and a 110MHz μSPARC-II as used in the SPARCstation 5.
We ran web browsers and did video playback on these; they're totally adequate for personal computing as I understand it.
As another piece of context, remember that the original Macintosh had 128KiB of RAM, 64KiB of ROM, and a 7.8MHz 68000 that achieved roughly 0.4 DMIPS (according to the above link). It could run a WIMP GUI, MacPaint, MacWrite, and a WYSIWYG version of Microsoft Word, despite its only mass storage being slow floppies, thousands of times slower and smaller than SD cards.
Currently popular personal computing machines are significantly faster. The Raspberry Pi 3 is about 2.5 DMIPS/MHz, 2201 DMIPS http://www.roylongbottom.org.uk/Raspberry%20Pi%20Benchmarks..... So if you take CPU-bound software that barely runs fast enough on the Pi 3 and run it on the STM32F103C8T6, it will run about 250 times slower. A response that it manages in 100 milliseconds on the Pi 3 will take almost 30 seconds.
But that's assuming it's not memory-bound! The Blue Pill only has 20KiB of RAM, while the bigger machines it's being compared to typically had 2–64 MiB of RAM. You can run 64KiB of code (or data) from Flash, but not self-modifying code, because Flash can only be erased blockwise. (A minimum of ten thousand times, so this is a viable thing to do a few times a day.) You can access off-chip memories, but not at anywhere near 72 MIPS. With the LDM and STM instructions you can theoretically read and write the on-chip memory at something like 250 megabytes per second, 2 gigabits per second, while off-chip SPI (which supports DMA!) tops out at 0.018 gigabits per second, roughly 100× slower. Still, the original Macintosh's floppy was closer to 0.0001 gigabits per second.
Here are the top five most popular STM32 models listed on Digi-Key, with 53000 units or more in stock https://www.digikey.com/en/products/filter/microcontrollers/...:
US$1.73 STM32F030R8T6 (48MHz, 8KiB RAM, 64KiB Flash, Cortex-M0) https://www.digikey.com/en/products/detail/stmicroelectronic...
US$1.21 STM32G030K8T6 (64MHz, 8KiB RAM, 64KiB Flash, Cortex-M0+) https://www.digikey.com/en/products/detail/stmicroelectronic...
92¢ STM32G030F6P6 (64MHz, 8KiB RAM, 32KiB Flash, Cortex-M0+) https://www.digikey.com/en/products/detail/stmicroelectronic...
US$3.08 STM32L071CZT6TR (32MHz, 20KiB RAM, 192KiB Flash, Cortex-M0+) https://www.digikey.com/en/products/detail/stmicroelectronic...
US$3.25 STM32L071RZH6 (32MHz, 20KiB RAM, 192KiB Flash, Cortex-M0+, tiny BGA form factor) https://www.digikey.com/en/products/detail/stmicroelectronic...
So any of these devices is probably pretty capable of running the kinds of apps Uxn is directed at, if you hook up a screen and speaker to them. They have less RAM than the original Macintosh, but their CPU is around 100 times faster, and they can swap to off-chip memory, including MicroSD cards, which consume no power for memory retention, just reading and writing. When I was a kid, I ran word processors, high-level-language interpreters and compilers, spreadsheets, databases, and IDEs on machines that were less powerful than these chips in every way, including having less memory (though usually it was almost all RAM).
Take a look at https://rossumblog.com/2011/10/08/8-bit-device-kindles-ebook... and the rest of Rossum's blog by Peter Barrett to see the kinds of things all that CPU power can do despite the small RAM.
Power consumption seems worth a mention, because "minimization of energy usage" figures prominently in the permacomputing ethos as explained in https://wiki.xxiivv.com/site/ethics.html. Running at full speed, the higher-speed STM32 parts use more power, up to hundreds of milliwatts, while the lower-speed, lower-power STM32L parts are more like tens of milliwatts. By suspending execution, though, this power consumption is proportional to CPU load down to a few thousandths of a milliwatt. A Chromebook uses about 10000 milliwatts; a cellphone about 3000; and, according to https://www.eetimes.com/nintendo-gameboy-eases-down-the-road..., a Game Boy Advance uses about 200 milliwatts playing Donkey Kong.
(In human terms, 100 milliwatts is the amount of mechanical work per unit time done by pulling the pull cord to start a chainsaw or lawnmower about every 15 minutes. So, if you hooked up an electrical generator to such a pull cord, very roughly, you could keep a Chromebook running by yanking on the pull cord about every 10 seconds, a cellphone about twice a minute, a Game Boy Advance about twice an hour, or a 1-milliwatt STM32 about once a day.)
But these chips are probably not capable of running the apps Uxn is written for if they're running Uxn! I mean, if you're moving sprites around the screen or sounding tones with ADSR envelopes, that's handled by Varvara's "devices", which you can implement in native code, so they're just as lightweight as they would be in any other form. But your own application code is being interpreted by the Uxn bytecode interpreter, so 95% (my guess) of the CPU time is devoted to stack manipulation and interpretation overhead. So instead of 89 Dhrystone MIPS like a SPARC 5, you get 5 DMIPS. CPUs in this class from the above list include the 25MHz SPARCStation 1+, a 40MHz AMD 80386, an Amiga 2000, and a deskside 16.7MHz 68020 Sun 3/160C server http://www.obsolyte.com/sun3/, which was one of the very first Sun-3 models http://www.sun3zoo.de/en/history.html.
And you can't usefully JIT-compile Uxn code because it idiomatically relies on pervasive self-modification in order to squeeze a bit more performance out of the inherently expensive bytecode-interpreter strategy. Uxn is also not very suitable as a compilation target for higher-level languages like C.
So, the STM32 family is great as a target, but except for the higher-end members of the family like the 168MHz STM32F746 used in the Playdate (US$14.33 https://www.digikey.com/en/products/detail/stmicroelectronic...), Uxn is not great as a way to make them useful.
It's wonderful as a way to inspire us to imagine what could be, though!
I'll address your comments about the bootstrapping path in a second comment.