Slide 1

Slide 1 text

ARISTOTLE’S TOPICS @JORENDORFF PYTENNESSEE 2020 MARCH 7

Slide 2

Slide 2 text

This is a picture of Erin Rose Glass, who is a librarian and activist. This picture is from six days ago. Erin was giving a talk to programmers, an inspiring and harrowing talk, the point of which I think was, how about we take a look at where we are and what we’re building.

Slide 3

Slide 3 text

She had this slide, it says, “lost computing futures”. The idea is, if you look at the past, and try to forget what you know about the present—the omnipresent surveillance, the erosion of society, the propaganda, how annoying everybody is on twitter—if you look back, you can recover a feeling that it didn’t have to be this way. And—she brought some examples.

Slide 4

Slide 4 text

Here is one of those lost futures. This is simple Computer-Assisted Instruction software from 1979. In case you can’t read this, imagine you’re sitting in front of a green screen and the computer is like, “I hear you’re writing a paper, what’s it about” and you say,

Slide 5

Slide 5 text

“FEAR OF DEATH” and the computer replies, “HOLY ELECTRONICS! THAT’S WEIRD. I USED TO DATE A COMPUTER INTERESTED IN FEAR OF DEATH.” Friends. I learned about this program six days ago. I must run this program.

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

Erin very kindly helped me track down Hugh Burns’ thesis. Originally published in 1979.

Slide 8

Slide 8 text

So I guess what happened here is, in 1981—coincidentally the same year I got a Commodore 64—a librarian somewhere took photographs of this dissertation and put it on microfiche and archived it, and then something something now it’s on the Web as a PDF? So, OK, I get the PDF.

Slide 9

Slide 9 text

And tucked away in Appendix A it’s got all the flow charts for the program. And guess what’s in Appendix B? Place your bets now.

Slide 10

Slide 10 text

Full source listing. In BASIC. If you don’t know BASIC, it has um… non-Unicode strings, and a PRINT statement. It’s basically Python 2.

Slide 11

Slide 11 text

So let’s copy this from the PDF into a text editor…

Slide 12

Slide 12 text

This is what you get. So again, if you don’t know BASIC, it might not be obvious, but this is garbage.

Slide 13

Slide 13 text

KLEOU.TEUSE COTO 7?40 YOURMNHIE.MT(EGTATION.E"VS as010 PRINT 'WOW DOES '35' CMANGCE INTO 50WETMNG ELSE.' 3S966 PRINT *ELABORATE.* 61940 GOTO 7940 iqlw GOT1 7104
 21462 OINT *NOW G0E0 '55' INTERACT 4IVT FORCES ARCUNO' 2500 POINT "ITSELF?" a4,4. PRINT 'WOW COULD '33m C4ANNE 30 TWky 400E P!OPLE ? abo1g PRINT 'WOUL SELEVE, ACCEPT, OR jUNOERSTAND EXPLAIN.. 603a Z(27161 34aa GCTO 7oss 6416 P0I4T 'maw I3 '55' LIKE A COAIN REACTION? OfSCQI9E.' Jbobe GOTO 70148 10le PRINT *po is 'S3' LIKE AN OCEAN TIDE? IEAC'q 26846 PRIM? 'OF4 IT, *41sw1' 246o SOTO 7046 361ai *m 444 'FIELD0 PEISPECTIVE . P6118 PRINT 'ON TW1S PLANET. MOM IS 'S1' 01ST3ISUTEO?'
 Ab1la PaNT 'OESCRISE.
 016130 COTO ?Was
 .1%140 PRINT *IS 'S3' WOUN0 AMONG ALL PEOPLES, ALL 4A0I0NSW 361b6 SOTO :,679 9OINT 701a This is what you get if you paste right into your slides instead. Also very garbage.

Slide 14

Slide 14 text

So, that was a setback. But I was prepared for this by COMPUTE! magazine, which was a paper publication that had long printouts of BASIC programs that you could type into your computer and run. I’m not making this up.

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

And yeah, I did it. It was just 18 pages of a PDF. Took a few hours. I had CAPS LOCK on. It was weird.

Slide 17

Slide 17 text

Sometimes it’s not easy. Like, what is THAT? Or for that matter any character on this page. Is that a K or an X? (Note: these are load-bearing integers, so a mistake is a big deal. If I get this digit wrong, it’s not like we get three thousand of something when it was supposed to be three thousand and sixty. It’s a line number. So we jump to the wrong statement in the program. The behavior becomes super strange.)

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

But Jason, how does Python enter into this?

Slide 20

Slide 20 text

Well, I told you I was going to run this program, right? So I started with a regular expression to break BASIC code down into tokens. The part with the quotes, for example, matches a single BASIC string.

Slide 21

Slide 21 text

I made a class for every single thing that can appear in a BASIC program. Like, BASIC programs can have numbers in them, so there’s a Number class. With methods for executing a number — it just returns the value of the number.

Slide 22

Slide 22 text

BASIC has GOTO statements, so I have a Goto statement class.

Slide 23

Slide 23 text

I can’t show you all the code, but I needed something to take the raw text and turn it into the objects, so I wrote a little parser. The nice thing about BASIC is there is no high-level structure to your code, no functions, no blocks, nothing. So if you can parse one line of BASIC, you can parse BASIC.

Slide 24

Slide 24 text

And here’s the main interpreter loop. I’m not going to win any prizes for self-documenting code here, but basically, big WHILE loop, WHILE the status is “run”, run the current line of code. And that’s basically it. Wanna see it run? (DEMO)

Slide 25

Slide 25 text

I want to leave you with this picture, because I think it’s beautiful. Somewhere along the line this code got converted from digital to analog and back to digital one too many times, and it came apart. Maybe: a computing future is never really lost until we first lose the computing past.

Slide 26

Slide 26 text

github.com/jorendorff/topoi