1009 points · by kregasaurusrex · 5y ago · 309 comments
This perspective makes scifi stuff like "smart dust" seem a lot more feasible. Ubiquitous computing, what will it bring us?
Empirically it seems that software simply doesn't scale as well as hardware does. I feel like this overhead would make "smart dust" impractical.
Or I guess I could put it that way: one hand hand you could be impressed that a modern light bulb can run Doom, on the other you could be alarmed that you need a Doom-capable computer to run a modern light bulb.
More seriously, I see this argument all the time: that we are just squandering our advances in hardware by making comparably more inefficient software! Considering that efficiency used to be thought of on the level of minimizing drum rotations and such: the whole point is that we're now working at a much higher level of abstraction, and so we're able to build things that would not have been possible to build before. I for one am extremely grateful that I don't have to think about the speed of a drum rotating, or build web applications as spiders' nests of CGI scripts.
Are there modern websites and applications that are needlessly bloated, slow, and inefficient? Certainly - but even those would have been impossible to build a few decades ago, and I think we shouldn't lose sight of that.
CPUs are getting faster, and yet paradoxically, performance is worse, especially in the world of web browsers.
The original DOOM ran at 30 fps in 320x200, which meant it rendered 1,920,000 pixels per second with only a 33 Mhz CPU. That's less than 18 clock cycles per pixel, and even that's assuming no CPU time spent on game logic. If DOOM were written today with a software renderer written in C#, Python, or JS, I'd be surprised if it could get anywhere near that level of clocks/pixel.
These days, the basic Windows Calculator consumes more RAM than Windows 98, and that's just inexcusable.
> we are just squandering our advances in hardware by making comparably more inefficient software
> we're able to build things that would not have been possible to build before
We get that not only are we able to build things that weren't possible before, but we can build things that are more inefficient than was possible before.
We can expect in the future to see new levels of inefficiencies as hardware developments give us more to waste.
Without something to balance this out, we should expect to see our text editors get more and more bloated in cool and innovative ways in the future.
It makes me think of fuel efficiency standards in cars.
If I could easily upload my code to this smart bulb and leverage it either for creative or practical endeavors then I wouldn't necessarily consider it wasted potential.
But here you have this bloated tech that you can't even easily leverage to your advantage.
I do agree with the general point that the progress we've made over the past few decades is mind blowing, and we shouldn't forget how lucky we are to experience it first hand. We're at a key moment of the evolution of humankind, for better or worse.
The trick is that you probably don't need all, or even most, of that power to run the light. Sure the Zigbee protocol is _probably_ being done via software, and not a dedicated chip, but even then. The big thing is that this chip is most likely so cheap, especially in bulk, that it doesn't make sense to get the "cheaper" variant, even if that was still available. This is kind of supported by the "new" Trådfri having an updated chip, even though the Trådfri line never changed it's capabilities, it was probably cheaper to get the new more powerful chip and/or they could no longer get the old one with a five year supply guarantee.
So the RoI is just different.
An ESP8266 microcontroller can be bought in low quantity for less than a dollar. I means sure any cost reduction at scale is meaningful, but at that point I don't think the silicon is the expensive part at that point. It just doesn't make sense to give WIFI devices anything less than that performance, the gains in silicon space will be meaningless and you'll spend more managing that than anything.
What is the minimal computer you can both compile and run Doom on?
That works both ways though. The highly qualified software devs did indeed squander some of it away.
But I'm a rather bad dev that writes really inefficient code (because it's not my primary concern, I'm not a programmer, I just need custom software that does the things I need done that can't be done by software other people write).
All this overpowered hardware allows my code to work very well.
I've been in situations where I could pick between "learn to program properly and optimize my code" or "throw more hardware at it" and throwing more hardware at it was definitely the faster and more efficient approach in my case.
And yes, I’m aware that there are also those with the chops, who are not permitted by their money masters (or alternately by their master, money) to write performant software.
If you want to know how the world would be like without video game programmers, just like at internal corporate software and how slow it is.
How many other advances are we tossing away because people don’t know how to optimize and code for speed and fun!
Of course, I'm over here with my poky 6 minute mile...
That would be WebGL and Javascript, I presume?
I tried running a Quake port in that vein, but sadly none of the computers I own were able to play it without stuttering.
It was certainly impressive, but it was aso a case of often design having to give way to such hacks, such as the fact that many older first person shooter games had to have their entire level design work around the idea that the engines could not support two walkable surfaces vertically above each other for performance reasons or the famous Duke Nukem 3D “mirror” hack.
"A few" is underselling it somewhat. I would posit that >95% of popular modern websites contain functionality that was not plausible in 1996.
The person operating the console only has to click an option or fill in some text field, same as 20 years ago. But today, with added slowness.
Knowing the amazing advances in hardware in the meantime, this hurts me.
One of my favorite dad jokes is that if Smart Water was so smart, why did it get trapped in a bottle?
That's my prediction.
If the specifications are human-generated, then they're just a form of high-level source code, and your prediction boils down to future programming languages simultaneously improving programmer productivity and reducing resource usage. That's not a controversial prediction.
If I understand you correctly, I think you're correct that over time, we'll see an increase at the abstraction level at which most programming is done. I think the effort put into making compilers better at optimizing will largely follow market demand, which is a bit harder to predict.
One interesting direction is the Halide[0] domain-specific language for image/matrix/tensor transformations. The programs have 2 parts: a high-level description, and a set of program transformations that don't affect results, but make performance tradeoffs to tune the generated code for particular devices. The Halide site has links to some papers on applying machine learning to the tuning and optimization side of things.
I can imagine a more general purpose language along these lines, maybe in the form of a bunch of declarative rules that are semantically (though perhaps not syntactically) Prolog-like, plus a bunch of transformations that are effectively very high-level optimization passes before the compiler ever starts looking at traditional inlining, code motion, etc. optimizations.
At some point, maybe most programmers will just be writing machine learning objective functions, but at present, we don't have good engineering practice for writing safe and reliable objective functions. Given some of the degenerate examples of machine learning generating out-of-the-box solutions with objective functions (throwing pancakes to maximize the time before they hit the ground, tall robots that fall over to get their center of mass moving quickly, etc.), we're a long way from just handing a machine broad objectives and giving it broad leeway to write whatever code it deems best.
I suspect in the medium-term, we'll see a 3-way divergence in programming: (1) safety/security-critical programs generated from proofs (see Curry-Howard correspondence, and how the seL4 microkernel was developed) (2) performance-critical programs that are very intensive in terms of human expert time and (3) lots of cookie-cutter apps and websites being generated via machine learning from vague human-provided (under-)specifications.
There is no reason to optimize the language that programmers work in when such optimizations can better be done on the generated machine code.
Ads, propaganda and surveillance.
The main adversary will be the cookie monster.
https://en.wikipedia.org/wiki/The_Game_(Star_Trek%3A_The_Nex...
(Yes, Discovery season 3 is a thing I know about.)
The only thing more disturbing and sad about this is how much consumer demand there is and will be for deception, misinformation, and manipulation.
Very much to their credit, though, the Trådfri hub doesn't depend on a cloud service just to operate. If that ever happens, thus endeth my foray into smart lighting. I've put my foot down: if it needs Somebody Else's Computer to function, I don't want it.
Ads, obviously.
Mine don't, and I first owned an AtariST with a 68000 CPU.
These are "smart bulbs". We are still in the .com bubble of IoT, so there are going to be a lot of silly things we can run Doom on for a while until it dies down. Lights don't need computers to operate, but that doesn't stop people trying to add "features" to lights with computers.
Such a machine would be nowhere near as efficient as a CISC computer in terms of work per clock cycle, but what if our "silicon" in the future can run an almost arbitrary frequency? We would be able to emulate any instruction set natively in real time. The perfect FPGA.
Ads.
Oh, and spying/tracking.
The future sucks.
These are around 20 MIPS. The Apollo guidence computer had around 1 MIPS.
"If you replace all the parts of a ship is it still the same ship?".
This project is equivalent to "Doom running on 40-MHz Cortex M4 found in Ikea lamps".
Good work nevertheless!
If someone said "I'm playing Doom on my PC" in 1993, they would also have been using an external keyboard, monitor, and speakers. And the game would have shipped on external storage (floppy disks).
Historically a lamp would consist of the wick, oil and holder.
It also doesn't have quite all the features. No music, and no screen wipe effect (I worked on a memory constrained Doom port myself, and that silly little effect is incredibly memory intensive since you need two full copies of the frame buffer)
Still, we say "I'm playing Doom on my playstation".
Edit: It's still a fun and cool project. But more like running Doom on hardware salvaged from an IKEA lamp.
In any case, the argument is that the mini console they built is no longer a lamp, not that you can't play games on a console.
So the OP is not entirely wrong: they ported a game played on a 16.8Mhz system with 256kb of RAM to a 80Mhz with 108Kb of RAM.
The writeup explicitly says «we could trade off some computing power of the 80Mhz Cortex M33 to save memory»
What's left in the world for "DOOM running on ____"?
Here's my idea:
Could we do this with a drone swarm? And have players still control DOOM guy somehow? I'm imagining sitting on the beach at night and someone is playing a level while everyone looks up at the sky at a massive "screen".
DOOM in Game of Life.
DOOM as a Boltzmann brain (might take a while before that's implemented, but I bet it'll happen eventually)
Game of Life is totally Turing Complete though, so it's already proven that you can indeed run Doom on it.
https://www.airlineratings.com/news/art-sky-check-spectacula...
Now, to figure out how to pump in the soundtrack ...
[0] https://datatracker.ietf.org/doc/html/rfc1149
Then they used it to play Tetris on passing clouds.
Supposedly the guy (Palmer) who created the commercial gba version had done a tech demo for gbc, but Carmack decided it was too stripped down and proposed a commander keen port for gbc at the time instead. Gba came out a couple of years later and was powerful enough.
See project Blinkenlights from the early 2000 (not Doom, but still video games). https://en.wikipedia.org/wiki/Project_Blinkenlights
- It can't be about chip/logic, as that's a commodity these days (as this post celebretes).
- It can't be LEDs, because they are dirt cheap too, especially red ones.
- Building the plastic case doesn't seem to warrant such a high price.
- The battery needs very little capacity, magnitudes lower than e.g. that of a phone.
- Is it maybe the charging mechanism through USB? Are there some crazy patent fees?
As for the BOM cost, you’re right that for the board, the highest costs are probably the charge circuit followed by the processor. Battery probably costs the most, but don’t discount the cost of the mould for the plastic, it’s a high up front cost that needs to be replaced more frequently than you’d guess.
In the end, that $20 bike lamp probably costs the shop $7-10 to aquire. And any shop that doesn’t charge at least 2x their average cost for small items will tend to find their profitability eroded by fielding returns and other hassle customers.
As for something like the Ikea bulb in the article, it includes an RF module that isn't that cheap. It costs about $7 per 1000 pieces. Maybe they get it for $5 or $6. Add in the slightly more expensive housing, it look like a halogen bulb but is LED, and then add in the cost of a quality RBG LED and the rest of the components and markup to get $15. Ikea does win out compared to other store for things like this because Ikea is buying the units from themself. The Ikea Sonos speaker is the only thing I've ever seen there that wasn't a pure Ikea product. They really have mastered horizontal and vertical integration.
Actually, I find funny that the traditional solution of light and dynamo is 6€+5€ shipping+taxes...
The software complexity of these protocols is greater than the complexity of a rudimentary 3D game like Doom, so it's expected that whatever chip can run these protocols can also run Doom.
Datasheet of MGM210L for the curious: https://www.silabs.com/documents/public/data-sheets/mgm210l-...
That's unfortunate. Protocols, particularly those used for security should be a simple as possible. I know it's a hard problem and people tend to use what is available rather than solving the hard problem.
The chip is SoC with Arm core, FP, Crypto Acceleration, DSP extensions and FPU unit plus radio parts.
Also, higher clock speed = lower power consumption. It sounds counterintuitive, but getting the job done quickly so you can go back to low power mode sooner actually saves power, even if the instantaneous power draw while processing is higher.
You could probably find exactly the right chip that only has exactly just as many bits of RAM as you need for the lamp's functionality. But that would probably be more expensive to develop and chip than just using standard parts?
Even more radical: I suspect with a bit of cleverness you could probably do everything the lamp needs to do with some relays and transistors. But today, that would be more expensive.
Compare https://www.youtube.com/watch?v=NmGaXEmfTIo for the latter approach.
Interestingly, a friend rented a house in college once that had a system of low voltage light switches that ran back to a cabinet filled with relays that controlled light switches and outlets. No major benefit to the user other than a control panel in the master bedroom that lets you control the exterior and some interior lights. It was a neat system but definitely outdated. I'd imagine a retrofit would be to drop all of the relays for solid state and provide a networked controller to monitor status and provide remote control.
These IKEA smart bulbs cost about $9 so yes, it is cost effective.
https://hackaday.com/2019/04/26/making-a-three-cent-microcon...
Chips that can run Doom, though, are just about at the low end for internet-connected devices. You can't run an IoT stack on that $.03 thing. The chip in the bulb is exactly in the right ballpark for the application. You do need a fairly beefy chip to run multiple network protocols efficiently.
* Cost effective solution for lightbulb would be not having it wireless connection at all instead of having less powerful MCU. So it being IoT already means that target audience doesn't care about the price that much. * It uses of the shelf FCC certfied wireless module with embedded antenna. For product designer it makes sense using a ready module because it avoids need to do RF design and the certification.It also simplifies the design if you run your user application inside the wireless module instead of having an additional MCU communicating with wireless module. Such modules tend to have medium to high end MCUs.
Why do wireless modules need such processing power?
* 2.4 Ghz Antenna has certain size requirements so the size constraints for rest of the system aren't too tight. * Wireless circuitry puts the module in certain price category, it makes sense to have the MCU in similar price category. Wireless certification is a pain, so there will be less product variants for wireless modules compared to something like 8bit micro controller which come in wide variety of memory, size and IO configurations. If you have single product variant better have slightly more powerful MCU part making it suitable for wider range of applications. * The wireless communication part itself has certain amount of memory and computing requirements. Might as well split the resource budget on the same order of magnitude for wireless part and user application. N kB of memory for wireless and N kB for user application instead of N and 0.001N especially if the first part can easily vary by 10% or more due to bugfixes and compiler changes. Similarly there are basic speed requirements for digital logic buffering the bits from the analog RF part and doing the checksums. * Modern silicon manufacturing technologies allow easily running at few tens of MHz so if the SOC has memory in the range of 30-500KB and isn't targeting ultra low power category it is probably capable of running at that speed.
Plus how else will malware people run their stuff?
If you had to design an IoT bulb, this is the ideal setup.
In other words, it does connect to the internet, it also sits on the LAN to give attackers access to all your other devices, AND it sits on Zigbee to give attackers access to those as well.
The current issues are driven by the automotive industry having screwed up and shitcoin miners snatching up GPUs. Neither is going to be a long term issue.
Next level would be finding the cheapest modern mass produced device that can run Doom with no hardware modifications.
This means use whatever I/O the device comes with for controller and display.
Using external display sort of distracts from the coolness.
Second part - it has to be currently in production(like this Ikea lamp). I mean you can find a $10 device/computer from 10 years ago that will run Doom.
That quote reminded me of my first computer: The ZX81, which had 1kb of RAM! About 150 bytes of that was used by system variables, and depending on how you use the screen up to 768 bytes are used by the display buffer.
And yet I managed to write code on it as a kid. :) (Of course nothing like Doom)
The pregnacy-test-kit running Doom was fake? Somehow missed all the front-page retractions on that one.
What now, you might ask. Well, RGB brain implants running Quake, of course.
Nice work!
It has more CPU perf than my first computer, and costs 1000 times less at the same time.
The progress of semiconductor industry is fantastical.
Who's down?
How do I type IDSPISPOPD on this thing?