What does HackerNews think of Apollo-11?

Original Apollo 11 Guidance Computer (AGC) source code for the command and lunar modules.

Language: Assembly

#11 in Hacktoberfest
The source code is available on GitHub along with a virtual version you can play with.

- https://github.com/chrislgarry/Apollo-11

- https://www.ibiblio.org/apollo/

I gotta say, it's pretty cool how nice young people have it these days with what's available in terms of stuff like Hack Club. The whole scene has become WAY more inclusive as a result of things like that, and the acerbic hacker archetype who snaps at you for not knowing things the way they do is so dead as a result - that to me is great, I don't miss those guys and their gatekeeping.

If you want to check out some fun assembly code in a larger program, I suggest checking out the leaked furby source code. [1] The assembly for the lunar landing modules from the 1960s is also pretty wild [2]

[1] https://www.seanriddle.com/furbysource.pdf

[2] https://github.com/chrislgarry/Apollo-11

The level of safety depends on the context the software will be used.

Probably the highest level of safety would pertain to situations like the Apollo 11 mission https://github.com/chrislgarry/Apollo-11

But there are other situations where you don’t need such a high level of software safety. eg when prototyping or exploring different possibilities.

Bit strange thinking of Python as "old" .. anyway, what I suspect happened was that tabs were the "new" innovation - in the post-punchcard era. Punchcards couldn't meaningfully have a tab character, but they could have fixed character positions, and this feature was required by COBOL and FORTRAN in their day. It was still present in the F77 standard.

I think the other thing that got in the way of standardising on TAB was that 8 character indent is too much, but once you let people configure it it's no longer consistent between systems.

> that's some impressively old code to find on GitHub

You may like https://github.com/chrislgarry/Apollo-11

Kind of off topic, but for those interested, this reminded me of the public repo on github which has the original guidance computer source code for the command and lunar modules[0].

[0] https://github.com/chrislgarry/Apollo-11

The source code for the Apollo guidance Computer is available on GitHub.

https://github.com/chrislgarry/Apollo-11

It's funny that the personified user interface is used as the title, because the star of the show is something much more hidden - one of the first multitasking "operating systems" correctly handling, and limiting the impact of, an unforeseen CPU-hungry process in the midst of the first moon landing! The OP's a fascinating read and more technical than the title might imply.

For anyone interested in the process of compiling and loading the code for these systems (available at https://github.com/chrislgarry/Apollo-11/ ) into the "core rope memory" used for program storage in the capsules, here's one of the original spec documents, as well as an image from that document showing what I'd call a "compilation-bureaucracy-pipeline" that's a fascinating glimpse into software deployment practices.

https://www.ibiblio.org/apollo/Documents/HSI-208496.pdf

https://imgur.com/a/wBYt1o6

I also disagree, coding is the easy part. When you are junior not everyone requires from you to be know-it-all person nor providing super-good quality code, especially in your first months of journey in the company codebase. However, almost anyone wants to notice a "fresh air" and a person who shares his/her commitment in various form starting from the day one.

Edit: Hey, it is easy to implement code having bugs (shortly: implement bugs) and do many fixes further. It is hard to understand the problem and write code once, which won't need any bugfix. Think about the Apollo-11 code [0] - one tiny bug and astronauts might be dead.

[0]: https://github.com/chrislgarry/Apollo-11

You can help transcribe the code from the original Apollo Guidance Computer: https://github.com/chrislgarry/Apollo-11
Obviously software was totally different back then, and Apollo 11 was much more than a software project, but FWIW the Apollo guidance computer software was 130416 lines of assembly[1][2], while Facebook is probably at least 100 million lines of code at this point[3]. Also note that Facebook uses languages that are much more expressive than assembly, so "1000x as much code" probably indicates much more than 1000x as much logic being expressed. The reason Facebook and Gmail seem relatively simple is because they're designed to feel simple so they can be used by regular people, but the full implementation details are very, very complex.

[1] https://qz.com/726338/the-code-that-took-america-to-the-moon...

[2] https://github.com/chrislgarry/Apollo-11

[3] https://www.quora.com/How-many-lines-of-code-is-Facebook

The source code of AGC (Apollo Guidance Computer) written by Margaret Hamilton and her team. Clean and obviously it worked well. Comments are also interesting to read. https://github.com/chrislgarry/Apollo-11
1) Title is misleading, should have been "Most popular projects on GitHub are ...".

2) Judging from the top-5 list in the post, between 1/4 and 1/3 of the projects have been miscategorized.

Ex:

- https://github.com/chrislgarry/Apollo-11 -> should have been categorized as "Application", not "Documentation".

- https://github.com/tensorflow/tensorflow -> should have been "Library", not "Tool".

- Electron, Socket.io, Moment, lodash... are "Web libraries", not "Non-web libraries"

and probably more.

I hope the reviewers catch these errors before they publish this in a research journal.

Something that just struck me. There is absolutely no mention of Margaret Hamilton in this article. Didn't she lead the team that wrote the Apollo software?

Her name is the very first one in the original documentation: https://github.com/chrislgarry/Apollo-11

Certainly there's a lot to be suspicious about. No matter how careful the government was, how likely was it that such a complex engineering project worked successfully on the very first try? Even getting there would've been difficult, but then the system can lift off and return to Earth? It does seem incredible. And it's not like you can point a telescope at the moon and see the flags or other evidence.

But I think the evidence is definitely in favor of it actually happening. We've got source code:

https://github.com/chrislgarry/Apollo-11

We've got design documents:

https://www.hq.nasa.gov/alsj/alsj-LMdocs.html

The code and documents don't prove that the moon landings happened, but they do show that NASA couldn't have faked them with a stage without ever intending to go to space. They at least did significant engineering work, and made a system that has no obvious errors and could've gone to space.

And then, after putting in all this engineering work, there is video evidence of a takeoff of an object matching the description. There are independent telescopes that tracked Apollo 11 to the moon. People picked up radio signals from the moon of the transmissions the astronauts were sending.

Not to mention, there were multiple moon landings, which raises the chance of an error being revealed. A con artist wouldn't give you so many chances to catch him. The Russians would've been watching. Nixon was in power during Apollo 11, and you could certainly doubt him and maybe his Republican successor; but why wouldn't the next Democrat President shame his opposition to help get reelected, if it were all fake?

There are moon rocks on display. I know that astronomers are able to tell the chemical composition of far-off space objects. If that technology is newer than the moon landings, and the chemical composition of the moon rocks matches what it says the moon is made of, then there would've been no way for NASA to fake those moon rocks without collecting a real sample(or at least sending older equipment to orbit the moon).

Now, they could've sent unmanned rockets to the Moon, with fake broadcast signals that were carefully scripted being sent back, fake video that was pre-staged being sent back. But, those unmanned rockets would've had to leave the moon and come back, or else they'd be detectable via lasers or such still. And at that point, it's not that much of a stretch to add a manned crew.

I don't know - NASA being able to fake all this evidence in a way that couldn't be revealed by nearly 50 years of technological advancement seems more extraordinary than doing the landings.

Are you arguing that NASA never sent anything to the moon, only sent one-way unmanned rockets, sent two-way unmanned rockets, or sent one-way manned rockets? Only the two-way unmanned seems remotely plausible to me. And are you claiming that all Presidents afterward know it is fake and are lying to the public, or are they too busy or being lied to by NASA?

I can do one better; the source code itself, which has been scanned (https://github.com/chrislgarry/Apollo-11), lists Margaret Hamilton as "COLOSSUS programming leader" - COLOSSUS being the command module software - as of March 28, 1969, reporting to Dan Lickly - Director of Mission Program Development, i.e. in charge of software development at this point, and Richard Battin - Director of Mission Development, who was basically the technical lead of the AGC project at that point. There are also some other senior scientists on the approver list, but those two are the senior software leaders. So Margaret Hamilton was not in charge of the software development team as of March 1969 (she was still in charge of the COLOSSUS module), and in fact not until Dan Lickly left the project, which I think happened around the Apollo 11 flight.

It should be needless to point out that the AGC software was complete and frozen at this point, although bug fixes and some minor features made it in.

This doesn't stop misinformation from appearing all over the place, e.g. Wikipedia says "Details of these programs [LUMINARY and COLOSSUS] were implemented by a team under the direction of Margaret Hamilton", but this is false, as we've seen - LUMINARY, the moon landing software, was frozen while Hamilton was still on the COLOSSUS project. Also, if you root around the history of COLOSSUS itself - which I did at some point - you'll see that Margaret Hamilton became its programming leader in 1968, after COLOSSUS was complete.

.. on room-sized computers. VLSI hadn't been achieved yet, so Apollo flew with a suitcase-sized computer made from discrete gates and core memory programmed in assembler by Margaret Hamilton and others. https://github.com/chrislgarry/Apollo-11

I doubt the satellite bothered with a processor.

>computer languages (C++ especially, but also systems built in C) are too complex for the average mind

I'm not necessarily disagreeing, but have you looked at the source code [1] of the Apollo Guidance computer [2]? This software was shipped to production 50 years ago. It literally implements a "self-driving space rocket." It is staggering that this was completed in such a short time and actually worked.

The code is written entirely in the "Apollo Guidance Computer (AGC) Assembly" language. The hardware that it was written for had to be invented in at the same time, and was the world's first computer to use Integrated Circuits ("chips"). They also implemented a Real-Time Operating System with a multi-task priority scheduler, as well as a virtual machine and assembly interpreter within the software.

This was mission and life safety critical code, the risk involved boggles the mind. And yet the software was incredibly reliable. It was so reliable that it even saved the Apollo 11 crew and mission during the lunar descent by famously recovering from a peripheral hardware bug.

I honestly do not know how this feat was even humanly possible, but I do know that these programmers did not rely on "code completion."

[1] https://github.com/chrislgarry/Apollo-11 [2] https://en.wikipedia.org/wiki/Apollo_Guidance_Computer

It's on GitHub:

https://github.com/chrislgarry/Apollo-11

Reviewing it would be non-trivial, but in terms of absolute code size, it's not much larger than a moderately-popular open-source project today. It's significantly smaller than React, for example:

https://github.com/facebook/react/tree/master/src

Edit: Downloaded both repositories. 'wc' puts the AGC at roughly 60K LOC, while just the 'src' directory in React is 70K.

There's a link to the source code on GitHub[0], is that not the full source though? Just searching for a comment like 'hello there' from the photo[1] doesn't seem to exist in the repo.

[0] https://github.com/chrislgarry/Apollo-11

[1] https://hackadaycom.files.wordpress.com/2016/07/apollo-sourc...