I worked with high-power EV chargers.
Each system had 4 RPi 4s. (Some due to 3rd-party hardware, some powering touch displays).
The main system started out with 4GB, but 8GB was more convenient for developing.
The systems generated a massive amount of metrics that got buffered in memory.
8GB memory is convenient when your only alternatives are SD-card and EEPROM.
Well, if that's true, have to agree raspberry pi may be better than esp32.
I'd be surprised if you can't buy a GPIO board that connects to USB for a few dollars on AliExpress.
But yeah, if you don't care about timing, that will work.
Rescue old hardware!
I grew up on machines chronically starved, think 16MB for Mac system 5-7, and 32MB for win98 :) (which leaked like a mofo, reboot required every 20 minutes.)
It's only a bargain if you need it. For a general purpose computer I'm with you, but the Pi5 often isn't used as a general purpose computer so if you know the software isn't going to be using it then it is pure waste.
Pi's aren't a great value for general purpose computing when cube-PCs will get you orders of magnitude more power and functionality for 2-4x the price, and people often neglect to factor in the price of a case, PSU, storage which stack up the cost rapidly.
Every generation I grab a couple of the latest model-B and run a few quick desktop tests to see where they're at subjectively (no benchmarks, just boot it up and "use" it) and Pi 5 is still orders of lower than what I expect from a computer.
Put them to work in a specific application and their reliability and great ubiquity shine; I have a couple of Pis in 3D printers, one powering a touch-screen dashboard, a couple in my server rack for Hashicorp Vault, Unifi Server, ARM build server, a half a dozen or so in home-made speaker/TTS devices, a couple in retro gaming-handhelds, one in a dedicated WiFi AP for MiTM/testing/traffic-inspection, and one with a NVMe HAT running a file-server for low-power network storage.
Each Pi serves a purpose, and I've allocated a device a specific model based on its requirements; a couple of them are probably over-powered just due to having a specific Pi spare, but I try to shuffle them around to be using the weakest/cheapest Pi available that suits the purpose.
... don't forget to add more cooling for that reliability
I don't see 3 Bs in stock in my usual places. 4s and 5s are plenty though.
Eh, not orders of magnitude more. An RP5 is like 25% of the speed of an Apple M3.
(Don't ask how I know it)
Once you are using a lot of paging, chances are performance has fallen through the floor to the point where doing anything to fix it (killing run-away processes, closing other processes (killing those that won't go willingly)) takes so long that you are fighting a losing battle. This is less of an issue with fast SD drives than it is with spinning rust (or slow SD cards / eMMC with some smaller devices) but still essentially the case.
I just have enough swap defined for some small unusual circumstances and assume that if I need more than that things are falling over anyway so OOM taking things our is not going to make it worse (if they continued to thrash I'd have to kill them anyway).
Ubuntu does this by default and has done since 18.04 or so, maybe earlier.
Only issue is, the distro they promote is a bit dodgy.
If someone's paying me to build something and spending that $30 saves me a day, I'm doing it.
Moving your product to an MCU, even when it would support it well (which is not the case for a lot of RPi uses) will usually be a lengthy endeavor. But it's just HN being HN, I guess.
Here's an example. A few years ago I was contracted to build a device that would input some data, do real time signal processing, and output the data in a different format. The quickest and probably cheapest way to get it done was to use a $15 analog chip to do the bulk of the processing. I based that board on an Arduino Nano (clone, of course!).
A year or two later, much faster microcontrollers like ESP32 had arduino support and were trivial to use. A single ESP32 would probably have replaced most of the other components on my board, reduced inventory required, reduced power consumption and a host of other benefits.
But I never bothered because there was no economic pressure to do so. I was selling a $300 device to a single customer who didn't care about the price, and I had better things to do with my time than redesign a board that worked perfectly.
TBH, if I wanted to, I could probably have increased the price of the current board by the same amount that redesigning with an ESP32 would have gained me.
This is one reason I avoid consumer products like the plague. I'd rather work with people to whom there's no effective difference in cost between $300 hardware and $700 hardware because the benefit to them far exceeds what I'm charging.
I guess I'm agreeing with you :-)