This is a completely serious question, not trolling one bit. -------------------------------------------------------------------------------- How did we achieve the moon landing with only 4KB memory and 68KB of storage in the Apollo Guidance Computer (AGC)? The AGC also only had 1MHz clock speed. The AGC apparently had an Operating System that did some pretty impressive stuff like your `async`/`await` event loop equivalent and such. It was written in ASM. Then, the actual AGC code https://github.com/chrislgarry/Apollo-11 to power the semi-autopilot system was also written in ASM. That source code is about 760KB. They had a custom assembler for this called YUL. They targeted 16-bit. The chip was custom built by Fairchild (essentially the inventors of Silicon Valley) and used extremely reduced instruction set supporting basic math and some other operations. I wrote some simple ASM code to literally add 2+2 together targeting 16-bit and it came out to like sub 10 bytes before running the linker. How did we actually fit this ASM based OS and ASM based AGC autopilot software assembled using YUL on 68KB of storage? This part is the most perplexing. Just some additional context, the UNIX kernel itself for a 16-bit machine back in the 1980s was a bit under 100KB. A Linux kernel for a 32-bit machine would be around 1-3MB today. Is this hands down the greatest computer science achievement to date and everything after that was a regression? I personally consider Google as the greatest accomplishment in all of computing so far to operate at the insane scale they do and the purpose they serve in the world. Are these people who worked on the AGC software and YUL assembler the greatest computer scientists to ever live? If these people were still working would we have progressed that an insane pace to achieve full AGI, L5 autonomous cars, and autonomous airplanes (including takeoff and landing) by now? Are these people who worked on AGC software way better than all Turing Award winners combined? Even UNIX and GNU projects seem like they were a regression after this based on this achievement. #tech #space #apollo #moonlanding
Geometry and a lot of math.
I dont think this is the answer. Adding those numbers alone can reach 10kb. I believe they dont store any info, it’s more of a calculator than anything else.
The answer is that they had really good programmers, and all of you here who think you are hot shit because you're working at Google probably can't compare.
Please do not add redundant words like "probably" when forming sentence
a sentence* or sentences*
They spent time optimising. That and limiting the features to only stuff that was needed. It’s basically a massive calculator, and nothing more.
Computers are overrated
Weren’t cpus then much simpler? Single-threaded, no protected mode, no memory safety, you can jump to any subroutine from any place in the program. Implementing even basic async-await functionality in such case is relatively simple, ultimately it’s just bunch of priority or fifo queues and as long as people who write subroutines that execute on them are disciplined and don’t write too long handlers, all runs smooth I think this is the answer - it was relatively _simple_, the cpu didn’t have any fancy tricks, there were severe limits of what computer can do. Hardware was built to work with these limits. There was no multi-million pixels gui. No fancy framework, no generics, no exceptions and most importantly no asynchronous network calls What I think made a difference is discipline. Writing Apollo programs required an army of very disciplined programmers and QAs who double and triple checked everything and kept everything dead simple with no clever tricks, no showing off, no fancy frameworks, etc. Just raw simple code that translates mathematical formulas and high level architecture diagrams into programs. If anything it is testament to KISS rule, with disciplined team you can literally land on the moon without any bells and whistles
Thank you for the response. I agree, the CPU was very simple and limited in scope. One question I still can't understand is how did they fit all this ASM code (the AGC OS + AGC autopilot software) assembled in under 68KB? This seems like arguably the greatest accomplishment in all this for the programmers. These programmers seem way smarter and more talented than Turing Award winners like Ken Thompson and Dennis Ritchie who pretty much shaped all the computing we do today.
I was told there's a video of a presentation of one if the programmers explaining some stuff. One thing for example, if I recall correctly, is that they transformed some critical functionality to a pure circuit.
Assembly and extraordinarily good programmers. MIT probably has a class on this, ie programming for satellites.
Why can't we just replicate the same and keep landing on moon again?
We can, but nobody wants to waste billions of dollars on something pointless. Next goal is Mars.
We are? Humans are literally going back to the moon this decade. Test flight already occurred. Certainly none of the challenges are software related. Look up Artemis program.
It was all fake.
Soviets carefully watched us all the at there and back. If it was fake why didn’t they say so?
What makes you think it's fake? Share some knowledge.
I worked with a guy who said there is a massive difference between programmers who have written software for 64kb systems, and those who have not. I used to think it was a joke, until I was on a team where half the engineers coded on Arduino type things in their own time. It's a completely different mindset. They compose a problem beforehand, and write the minimal amount of code to do the job. Versus those who quickly re-use code they grabbed off stackoverflow, without really understanding what it was doing, or why half it wasn't needed. Next thing a Node.js dependency pulls in 400MB more crap and they just shrug their shoulders. It's not a generational thing, either. Completely based on the size of the smallest system you've had to code for. And it's not a "real programmers use hardware" thing, or Intel firmware engineers wouldn't need 20 million lines of x86 firmware code to setup a few registers.
It's also generational. My dad learned his skills in the coast guard in the 70s and his first computer was one he built. Even when using C, he would have to compile it then go into the compiled file and change certain things for his architecture. If you're earliest computer exposure is having to build your own computer then do stuff like this... Your mindset will just be different. Yes, you can get this mindset elsewhere like you've mentioned. I've worked in the space sector now and it's all 30+ year old rad hard components so it's more like this there.
People also underestimate the amount of logic you can fit in 64 KiB. The first microcontroller I worked on only had 32 KiB for code and maybe 16 KiB for data. The one after had 128 KiB total and it felt like a small universe’s worth. It’s especially easy to make good use of the space if you dispense with convenience facilities for console I/O, which the AGC also didn’t have.
Because it didn’t use slack for communication and chrome for showing information
Using react as the app framework
And GCL as the configuration language…