Live data from Hacker News

Post-Apocalyptic Programming

zserge.com

151–160 of 165 posts

Re: Post-Apocalyptic Programming

#151

Earlier quoted context omitted.

I don't know about you, but I don't normally have the source code lying around on disk for: the compiler and its dependencies Any dynamically linked dependencies and whatever extra compilers they might need Other potentially necessary things like build tools and source control systems

I am not sure if this is still the case, but the FreeBSD (and OpenBSD) CD sets and DVD used to contain the full source code of the base system and it’s easy to rebuild the system from source. BSD also works on relatively modest hardware.

There are also https://bellard.org/tcc/ and https://github.com/jserv/amacc that contain mostly complete C compilers.

Re: Post-Apocalyptic Programming

#152
post #144

Earlier quoted context omitted.

> The United States was founded on libertarian principles It certainly wasn't based on modern libertarian principles, or there would not have been much of a government in the first place. It certainly pays lip service to freedom, but pre-dates the modern libertarian obsession with contract and property law as supreme above all others.

The US government in its first century wasn't the all-powerful government it evolved into. > libertarian obsession with contract and property law as supreme above all others Contracts are always superceded by government laws under libertarianism.

Then you've been talking to different libertarians than I have over the last couple of decades.

Re: Post-Apocalyptic Programming

#153

Earlier quoted context omitted.

So a 6502(C)?

Don't forget the BASIC interpreter. The problem is that making any computer smaller than a big cabinet requires large scale integration microchips, notoriously hard to make, and potentially replace. So it's going to be closer to PDP-7. You can do quite a lot with this sort of machine in an industrial setting.

What's the life expectancy of an integrated circuit? I was thinking make tons of them and the odds are that some percentage of them would still be functional long into the future, assuming you package them up nicely.

Re: Post-Apocalyptic Programming

#154
post #16
post #7

Somewhat related question: a few years back I saw a dedicated "low-power e-paper Wikireader" type of product which could display a text-only backup of Wikipedia. In essence just a niched e-book reader, really, but with the additional effort of putting it all together in a usable format. Does anyone know of a modernized solution that displays images as well?

If you want to go down that rabbit hole, I think you are better-off just relying on the ubiquity of android phones. Instead of preloading an e-reader. Preload a usb-c flash drive with various databases, and an APK with the software to read/copy the databases (and other useful utilities). Flash drives are small, and reasonably cheap. You can stash them in your house, or carry one in your wallet. If there is an apocaly…

https://www.kiwix.org/en/ provides not just a reader, but also complete Wikipedia database dumps.

Re: Post-Apocalyptic Programming

#155

Earlier quoted context omitted.

Saving the source alone hardly solves anything, the comment you're replying to highlights the real problem : The Stack. Everything from the compiler\VM to the OS to the instruction set architecture and everything in between. You have to save and store all of that. You need a format other than text, text is extraordinarily inefficient and lossy at anything that is not declarative factual information. There has to be a…

What you need is a C compiler, an assembler and maybe a basic linker, then you're set. It does not need to be very good either. In a pinch, an interpreter might do. From there, getting an OS running is relatively quick. Remember back when PCs came with nothing but BASIC and machine code? People typed in complex machine code via that interface and ran quite complex apps.

This really only works if the programs you want to preserve are already written in C or can be transformed readily into comprehensible C source, which is not the most elegant or comprehensible language even in the best of times. What if you want to preserve Python ? now you have to type the entirety of Cpython before you even get to write the main preserved program (in python). What if you want to preserve browser JS ? (for a taste of why this might be useful, see the conversation on Flash. You can crticize and hate it till the cows come home, but it's a substantial part of human cultural heritage regardless.), now you need to type in a browser or at least a JS engine on top of the JS program. For a self-hosted compiled implementations of languages like Haskell or Rust, you would type in an irrelevant bootstrapping compiler in C first then type in the self-hosting compiler then type in the program. That's... tedious and unscalable.

The amount of work you would spend to think and implement workarounds for all of this is better spent thinking and implementing language-, OS-, and hardware- independent specifications and VMs that are minimal and long-lasting, to better support a huge variety of the software and media and languages that make up our cultural heritage now, C being just one language among many.

-------

You mention in an aside that a C interpreter would better suit preservation efforts than a heavy-duty overkill like today's optimizing C compilers, that's a good idea, naive interpreters are easy, much more so than complex compilers or runtimes. BUT, C is horrifically full of undefined behaviour and implementation-defined behaviour, and the spec is a natural language document so even if a behaviour is defined it's not really *defined* in the mathematical well-behaved sense, because you know how natural language is, you're always one tricky test case away from a bug. This is important, you never know you're depending on this or that behaviour until the applications fails or runs very strangely when running on another toolchain.

That's why I argue we need formal specifications and VMs, and minimal ones at that. Indeed, we need a hierarchy of such specifications and VMs, becase hierarchies are efficient at compressing an otherwise-exponential amount of data (think of deep neural networks or search trees, why are they so efficient?). A sequence of bootstrapping minimal VMs is better and easier to preserve than one large heavy VM, eggs and baskets and all. Furthermore, designing new VMs and specifications specifically for preservation would force us to think about the framework we use to formalize and talk about them : maybe we can use $HOT_NEW_THING fresh from CS academia, or maybe we can use a natural numbers- or a boolean circuits- based approach, as those things are not fancy and easier to explain when you don't have a lot of shared context, they are - in a sense - the "bare minimum" you need to understand or talk about computers.

Re: Post-Apocalyptic Programming

#156
post #152

Earlier quoted context omitted.

The US government in its first century wasn't the all-powerful government it evolved into. > libertarian obsession with contract and property law as supreme above all others Contracts are always superceded by government laws under libertarianism.

Then you've been talking to different libertarians than I have over the last couple of decades.

I'm glad you're finally talking to an actual one. Many people call themselves one who haven't actually thought much or read much about it.

If you want a book written by another actual libertarian, "Free to Choose" by Milton Friedman is a good start.

The neato thing about libertarianism is it doesn't have to be perfect in order to work. Since nothing about human societies can be perfect, this is fine feature. The more libertarian a country is, the better it runs.

Re: Post-Apocalyptic Programming

#157
post #152

Earlier quoted context omitted.

Then you've been talking to different libertarians than I have over the last couple of decades.

I'm glad you're finally talking to an actual one. Many people call themselves one who haven't actually thought much or read much about it. If you want a book written by another actual libertarian, "Free to Choose" by Milton Friedman is a good start. The neato thing about libertarianism is it doesn't have to be perfect in order to work. Since nothing about human societies can be perfect, this is fine feature. The more…

This is in stark contrast to the example I gave above, of Grafton NH, which demonstrates in microcosm how libertarianism helps things fall apart.

Largely because when given the freedom to contract with whomever they want for garbage disposal, a lot of people just didn't.

Re: Post-Apocalyptic Programming

#158
post #8
post #2

Note: This is fun and all, but beware of taking the “Post-apocalyptic” premise too seriously. Down that road lies only hard drive hoarding and becoming a prepper.

In lieu of the obviously better solution of proactively preventing apocalypse, to what degree of seriousness do you instead suggest we acknowledge the "post-apocalyptic" premise? What else than becoming a prepper would you do?

Nothing? Society as a whole will not collapse. The sole exceptions are if you are in a small country either being invaded or having a civil war. Unless these are likely factors for you, you can safely ignore any apocalyptic ideas.

These ideas are mostly held alive by people who want to be important and relevant. People with too many guns at home want them and their guns to be important, and readily imagine an apocalypse fitting that dream. People with old computers and old programming skills likewise dream of being important, and start things like CollapseOS. People who live in the countryside and have horses imagine themselves to be cowboys in a car-less world. It’s all based on what kind of apocalypse would make a person important and respected again, not on any real sense of what kind of disaster would actually be statistically likely.

I mean, you could be worried about political changes, and act accordingly. You could be worried about the surveillance state to grow steadily, and prepare for that. And various state agencies are always telling people to be prepared for hurricanes, flodding, and other extreme weather events, depending on your region. These would, I believe, be reasonable precautions to take.

Re: Post-Apocalyptic Programming

#159

Earlier quoted context omitted.

So a 6502(C)?

Don't forget the BASIC interpreter. The problem is that making any computer smaller than a big cabinet requires large scale integration microchips, notoriously hard to make, and potentially replace. So it's going to be closer to PDP-7. You can do quite a lot with this sort of machine in an industrial setting.

OP is suggesting premaking such devices in large enough quantities that you'd just rely on them for the foreseeable future to run that legacy code.

Re: Post-Apocalyptic Programming

#160

Earlier quoted context omitted.

It's called a disk snapshot.

I don't know about you, but I don't normally have the source code lying around on disk for: the compiler and its dependencies Any dynamically linked dependencies and whatever extra compilers they might need Other potentially necessary things like build tools and source control systems

It's not hard to arrange these days, if one really cares. I have a local mirror of Debian main + contrib + non-free packages, source + i386 + amd64 for every package. It's 200 Gb - a $20 SD card can handle that. How many copies would you need to make for at least one to last N years?
Post reply on HN