Hacker News new | ask | show | jobs
by offtop5 1915 days ago
Technically, couldn't he install a very lightweight Linux distribution.

I have a few Raspberry Pi zeros and I actually enjoy coding within the limitations of said hardware, when you know you only have 500 megs of RAM on the device you have to solve problems differently

5 comments

"Only"... My first Linux system had 3 megabytes of RAM! I was running SLS Linux on a 386SX/20.
The old refrain:

EMACS - Eight Megabytes And Constantly Swapping

:) 16mb on my first computer and that had Win95 (then redhat linux)
I like how cushy we have it when 500Megs are considered 'only'. I appreciate nowadays even tetris runs on 6GB but if the software is written well, 500MB is a lot of memory to use.
Modern hardware has allowed us to ignore bad/inefficient coding. That aside from the need to compute larger data sets is the ONLY reason we keep needing more RAM and CPU with every coming year. If software companies would stop rebuilding everything from scratch as a product model and instead do it only when absolutely necessary and just work on improving the EXISTING software, most things could run on an OS with 2G of ram. There is no good reason for needing to continually upgrade hardware just to browse the internet. The reason it’s needed is because each year developers and designers assume that their userbase has better hardware so they can be wasteful with resources and not optimize.
This would drive down developer costs though wouldn't it?
Depends on the type of developer. With the increase in high level frameworks there are a lot of developers who never learn why the code they are using is bad. Development of anything is rarely involved in the libraries they use. They just import a blob and make it do stuff. A lot of times sites and web apps are scraped together from crap from stack overflow and it just barely works. There have been many cases of core library developers doing something stupid and avoidable that slows all resulting programs down.
My first computer was a Timex 2068.

With 500 MB the world is boundless.

If you want to experiment with constraints get a ESP32.

Why would anyone need more than one 5.25" floppy disk?

It's got 160KB!

Well, compared with 3" microdrive it is a lot! :)
Ha! 3" or Microdrive? They were different things.

The ZX Microdrive was the Sinclair stringy-floppy, released 1983, giving approx. 85-95 kB per cartridge: https://en.wikipedia.org/wiki/ZX_Microdrive

But 3" was a true floppy disk, used in e.g. the Amstrad Spectrum +3, released 1987, where it gave 180 kB per side: https://www.old-computers.com/museum/computer.asp?c=222

I love that people are still making enhancements for these ancient machines. For example, Amstrad promised an add-on disk interface for the cassette-based Spectrum +2, but never shipped one. Now, the nonexistent hardware has been cloned and you can buy a new one!

https://www.8bits4ever.net/product-page/sdi-1

There's an SD-card based replacement mechanism for the original Microdrive:

https://vdrivezx.com/vdrivezx/

I meant the Amstrad Spectrum +3 one.

I was envy of a friend that had one due to CP/M support.

OK. The Spectrum +3 had true floppy disk drives -- Hitachi 3" units. They are not Microdrives, are not compatible with Microdrives, and Microdrives cannot be attached to a +3.

Sinclair's system was much older (4 years, a long time then), and had its own external controller, the Interface 1. Microdrives were like tiny 8-track cassette tapes: an endless loop of tape on a single tiny reel, feeding out from the centre and wound back on the outside via a twist. They cannot be rewound or run backwards, only fast-forwarded, so access was slow.

So, no: not even similar. Different size, technology, OS extensions, interface, capacity, speed... different everything.

I had a Microdrive setup in the early 1980s. Like much Sinclair technology, it was radically cheaper than the competition. 90 kB of storage isn't much but it was twice the total RAM capacity of the host computer, and was 10x or more faster than cassette tapes. A microdrive cartridge could hold dozens of BASIC programs or machine-code snippets.

The Sinclair QL semi-16-bit computer also used Microdrives, with 2 built in, but with a different, incompatible format that got slightly more data storage (maybe 100 kB up to 105-110 kB if you were very lucky).

There were multiple officially-licensed derivatives of the QL, mostly running different incompatible OSes, and they mostly used Microdrives too: the Merlin Tonto, ICL One-Per-Desk, Telecom Australia ComputerPhone and more.

3rd party clones such as the CST Thor replaced the microdrives with floppy disk drives -- more expensive, but much faster and much more reliable.

There is something special about the Pi that makes an “oh well, time to reflash and start again” a non-disaster.

They are great and hacking about with them is fun, even when disaster strikes.

My version control on the Pi is different SD cards, I just copy the stable versions over and rotate. It’s fun :)
What's the best way to backup the actual sd card. I plan to store it on the cloud. I tried using Windisk 32 and it didn't work .
I’ve used Pi Baker on the Mac.

It kind of hurts that the image is the same size as the SD card when the card might be pretty much empty, but it does make recovery easier.

Write zeros to the empty space (many method available- make a big file of zeros or something and delete it) - then your image of the SD card should compress really well.
You can also use fallocate -d if you are in Linux.
Great suggestion.

Actually I think rpi clone can clone down to a smaller sd card

https://github.com/billw2/rpi-clone

You could clone down to like a 4 gig SD card, and then back up that SD card.

For some reason I find "only have 500megs of RAM" very amusing. Many/most modern laptops only have 8-16 times more RAM than that. I'm genuinely curious what problems you're working where that "limitation" is your bottleneck and not the processor speed (which at 1GHz is still pretty speedy for many/most tasks other than pure computation (e.g. machine learning training and processing large datasets for statistics)). I'm also assuming you're treating it as a dedicated tool, and not doing tasks while running a DE and web browser at the same time.
I think if you require users to bring their own computer, you can be insulated enough from hardware costs to not really care about memory usage, and that's mostly fine. I have worked on set top boxes at an ISP. We designed and manufactured the hardware; if we could get away with 512MB of RAM instead of 1GB of RAM, that was basically pure profit for us. So some attention was paid to memory use, because it had a real dollar cost associated with it. (I guess I'll point out that the engineering samples had a gig of RAM, and someone got the idea to write the UI in Dart running inside Chrome instead of the very legacy Java that we had on the previous hardware generation... so the production models did not ship with 512MB of RAM.)

To some extent, being careful about memory usage is not the only way to make the business work -- you could, after all, charge more for the service or make people buy the CPE outright. But, being an ISP mostly involves getting enough people to buy the service to make it worth digging up a neighborhood to run fiber; you don't want to sour the deal by costing more than the competition with less able CPE. Doubling the RAM available to software engineers may improve the user experience by more than 100%, but nobody picks their ISP for the software than runs on their TV box, so it's probably wise to be careful.

My point here is that some programmers do have to care about memory usage. If you include a computer as part of your product, you will someday be looking at the BOM cost of the bundled computer in an attempt to turn cost into profit.

I’ve found that when working on things like this it’s better to make the engineering samples half HALF the RAM instead of double - it encourages minimalism.
Yeah, that's why I mentioned it. It is hard to commit to cost reduction. The hardware engineers don't want to do a bunch of work, just to have their project fail over 512MB of RAM. The software engineers and PMs will always want more features.

I think the devices are still in the field and being issued to new customers 5+ years later, so maybe it was the right decision.

I didn't say that paying attention to memory use wasn't important. I was more just curious about what kind of task 512MB of RAM is limiting for.
Browsing "modern" websites for one
Ram tends to create issues when you're building stuff locally.

I used ram as an off hand example of something which is limited.

I actually did go out and buy a Raspberry Pi 4 8gb since I want to start processing some machine learning, and the 512 on the Zero won't cut it