For the computing history nerds
-
-
Murphy's Law, bring your kid to work day, and the Apollo Program, excerpted from an interview with Ms. Hamilton by The Guardian's Zoë Corbyn:
Often in the evening or at weekends I would bring my young daughter, Lauren, into work with me. One day, she was with me when I was doing a simulation of a mission to the moon. She liked to imitate me – playing astronaut. She started hitting keys and all of a sudden, the simulation started. Then she pressed other keys and the simulation crashed. She had selected a program which was supposed to be run prior to launch – when she was already “on the way” to the moon. The computer had so little space, it had wiped the navigation data taking her to the moon. I thought: my God – this could inadvertently happen in a real mission. I suggested a program change to prevent a prelaunch program being selected during flight. But the higher-ups at MIT and Nasa said the astronauts were too well trained to make such a mistake. Midcourse on the very next mission – Apollo 8 – one of the astronauts on board accidentally did exactly what Lauren had done. The Lauren bug! It created much havoc and required the mission to be reconfigured. After that, they let me put the program change in, all right.
-
If you are a nerd and have a Unix-ish command line (Mac OS, Linux, ...), check this out:
This will compute the greatest common divisor of two numbers.
dc -e '??[dSarLa%d0<a]dsax+p'
Want the infinite stream of prime numbers?
echo '2p3p[dl!d2+s!%0=@l!l^!<#]s#[s/0ds^]s@[p]s&[ddvs^3s!l#x0<&2+l.x]ds.x' | dc
The dc program is one of the oldest tools in the Unix toolbox and the oldest "Unix language" that is still available today. It's a programmable calculator with a rather idiosyncratic but cool syntax.
-
@Klaus said in For the computing history nerds:
If you are a nerd and have a Unix-ish command line (Mac OS, Linux, ...), check this out:
This will compute the greatest common divisor of two numbers.
dc -e '??[dSarLa%d0<a]dsax+p'
Want the infinite stream of prime numbers?
echo '2p3p[dl!d2+s!%0=@l!l^!<#]s#[s/0ds^]s@[p]s&[ddvs^3s!l#x0<&2+l.x]ds.x' | dc
The dc program is one of the oldest tools in the Unix toolbox and the oldest "Unix language" that is still available today. It's a programmable calculator with a rather idiosyncratic but cool syntax.
To the extent that a syntax can be cool—which is to say not at all; that's like saying "this bitchin' thing we got goin' on in the hanging file folder R&D department"—that syntax is about as uncool as Billy Joel.
-
The fact that have no clue what's going on is no indication that the commands and the syntax of dc aren't cool
This is an operational piece of history, which reflects both the engineering considerations and the programming knowledge of its time. You can admire it in the same way one admires, say, the engine of a 1937 Mercedes silver arrow.
-
@Klaus said in For the computing history nerds:
echo '2p3p[dl!d2+s!%0=@l!l^!<#]s#[s/0ds^]s@[p]s&[ddvs^3s!l#x0<&2+l.x]ds.x' | dc
infinite my ass.
-
Oh sure, blame the victim.