Wargames: hacker’s delight

I recently saw a Quora thread about movies that have real hacker scenes in them. Wargames came up once or twice, but it was not very well explained why it’s such a great hacker movie, and the answers supporting it were all lower-voted than The Matrix Reloaded, for its scene of Trinity using nmap and an SSH exploit. Granted, that’s cool, but I think those people need to step back and analyse which movie deserves the most hack cred.

In The Matrix: Reloaded, Trinity does one real-life non-sexy hack. She uses a legitimate tool to exploit a known vulnerability. Cool. Also, there are a lot of computers and source code vision and religious symbolism. So that’s one point for the Matrix: Reloaded.

In WarGames, there are at least half a dozen distinct real hacking techniques.

Early in the movie, Mathew Broderick goes into his school’s office, and when no one is looking, he checks a sticky note with a password written on it (1). This is a prime example of social engineering to get access to data a person isn’t supposed to have — he then uses the password to manipulate data in the system to his advantage.

Not long after, he starts up a war dialer to search for phone lines that he can connect his computer to (2) — he’s basically port-scanning the telephone system. He starts the scan and then leaves, openly acknowledging that the scan is going to be running for days, and is really pretty boring.

When he finds a system, he immediately starts guessing some common and related passwords (3). He tries a blank login. Real, legitimate, boring hacker stuff is going on right there on the screen.

When he can’t guess the password to the system, he goes to the library and starts researching the person who made it (4). He learns all about Professor Falken’s life, and he goes to greater experts whom he can ask for help, just to make more informed guesses at the user’s password. At one point in the movie he starts dumpster diving (sort of 1 again) to find sensitive information! Real, boring, unglamorous things that can get you access to a system.

Then he gets access, by guessing Professor Falken’s son’s name. He starts playing games used to train the system he’s gotten into, and nearly triggers a real war (hence the title). Not long after, he realizes that he needs to get into the military complex to try to stop things before they get truly out of hand.

He uses social engineering and pretending-you-fit (5) to get into (and later, out of) the Mount Cheyenne military complex. While inside, he hardwires an electrical system to unlock a door (6) and uses social engineering to convince people to do things for him or to leave him alone.

Then, once he’s out, he does a little phone phreaking (7) to make a free phone call to his girlfriend, and shortly after uses the airplane tickets he got during a much earlier hack.

Wargames is full of real hacking techniques — not just technical, but non-technical. What’s most impressive is that the movie came out in 1983. It was one of the first computer movies that ever came out, and it more frankly and realistically addressed computer security than pretty much any movie afterward. Almost every plot point in the film revolves around some kind of systems hacking, and it never resorts to absurd special effects that have no relation to real life things.

The best part is the final scenes of the film. Warning, we’re entering real spoiler territory here (after 20 years, just go watch it!). This one is a different sort of hack. The final, major plot point of the film is how they manage to get the computer to stop the impending war.

They hack an AI. They train the system (hello, neural networks!) by providing a small, simplified training dataset (tic-tac-toe) for the AI to learn off of. They show the AI that tic-tac-toe is un-winnable if every player makes the right moves. The AI learns from this that there is no winning move — if you don’t want a draw, you’d better not play.

That segues perfectly to the movie’s political result. Falken’s AI decides to run every possible simulation in the thermonuclear war game. It concludes that there is no winning move. Just like tic-tac-toe, if everyone does the right thing, it’s a draw. Everyone loses. They have taught the computer what they couldn’t understand: nuclear war is insane, and the only winning move is not to play.

They hacked the AI by making it smarter(8). They showed themselves the most logical path: peaceful coexistence. Do not play Themonuclear war.

In summary,

  1. Find passwords that people have written down and left lying about
  2. Scan open networks for computers you can connect to.
  3. Guess common passwords.
  4. Research your target to make educated guesses.
  5. Pretend you belong / Just ask for access / Fake a reason
  6. Bypass auth — by manually connecting a wire.
  7. Tone box to get a phone call.
  8. Spam malicious (or virtuous, in this case) training data to convince a neural network to take the action you want it to take.

Truly a great hacking movie. And who doesn’t love watching Mathew Broderick?

edit: in an earlier version of this post, “Falken” was written “Faulkner”, because literature.

Notes Dump

I found a bunch of notes I’d taken during one of my last semesters at school. There’s a lot, but it looks worth reading. I want to get it out of the system it’s in, and into something else, so this is where it’s going to live. Caution: this is about 6,000 words of material.

  • Philosophy: A Medieval Rope of Sand
    • All readings are from the book “Philosophy in the middle ages”
      • Readings from Augustine
        • The Teacher 29-34
        • On Free Choice of the Will 34-60
        • Reconsiderations 61-63
        • Confessions 72-81
    • great phrase, “calendrically challenged”
    • Day One
      • History? Maybe – it would take a long long time, so instead, features of the period. These things are important to Augustine, so they’re important to everyone /after/ Augustine
        • After a suggestion not to take notes, just gonna “sit back and listen”
    • Day Two
      • Tonight: religion background, early christianity
      • Remember, we’ll be keeping more on the philosophical than the religious, but the religious is necessary as context
      • Inward!
        • 90: Rome is kicking Greek philosophers out
        • 150: Blatantly killing Christians
        • 600ish: Justinian shutting down the academy
      • Hellenistic – Roman Thought
        • Not /just/ these thoughts, but (323 BC is the start of Hellenistic culture) these are the biggest schools
        • ‘the good life’, ‘the proper life’ comes up regularly; is tied into the notion of salvation. Each of these thinkers is motivated by a concern for salvation, but salvation is a fluid idea, changing for each thinker.
          • good being ‘happy’ and ‘virtuous’
          • eudaimonia “you DA monEY ah” – greek word for happiness – or ‘woo’ instead of you, a bit
          • Socrates was stopped by his ‘daimon’, which guided him to lead a ‘good life’
          • this is across epicureans, stoics, and skeptics
          • the good life is not troubled. It’s a peacefulness of the soul, ‘ataraxy’, your soul is not disturbed (‘ataraxia’ – Ater axeEE ya)
          • the world is a terrible, hideous, troubled place, and you have to step back from it to not be troubled or upset
        • Plato’s Academy
          • General
            • Remained strong from its founding in 384-385, until closed by justinian in 529
            • The Academy was massive, just enormous – UofT size-ish
            • Neither philosophical nor religious
          • Circles of Thought
            • ‘circles’ of thought, inner circle and ‘outer circle’ – a more or less secret teaching, less popular thought at the time
            • Tubingen School
              • H-J Kramer
              • ‘Unwritten doctrine of plato’
                • Read ‘between the lines’ and you can ‘see the truth’
              • Talks about religious meaning or spiritual doctrine
            • We end up saying that these informed platonic doctrine, and leave it at that.
          • Scholarchs
            • Plato died, and Speusippus takes over as head of the Academy, he was a cousin or nephew or something to Plato.
              • Changes the platonic doctrine a bit
              • neopythagorean
              • has to do with the doctrine of the forms, as the pythagoreans have the view that anything which exists can be formulated as a number or equation
              • Speusippus claimed that Plato was pythagorean and was actually teaching this; it became the standard teaching for decades – maybe more – Pythagorean thought occurs all through ancient thought, and it keeps coming up. Even Augustine is pythagorean, in some ways.
              • Synocrates is next, he claims the same thing
            • About 40 years after the founding of the Academy, another school is founded
          • Middle Academy 300-100BC
            • Adopt skepticism from pythagoreanism
            • Second and Third Academy
            • Fourth Academy becomes Eclectic, during the period of neoplatonism proper, returns to Pythagorean notions of plato again, but focuses on ethics.
            • Tries to be more publicly appealing, becomes again overtly pythagorean. Becomes “the school of athens”, adopts some of Plotinus’ thought
          • Late Academy
        • Epicureanism – Augustine refers to it explicitly a few times
          • Democritus
            • Democritean materialists; say “the senses will tell us everything”, joke about “the census will tell us everything”, ba-dum PSH
            • presocratic, 460-something
            • talked about atoms
            • epicureans take this thought
            • ‘soul’ or ‘mind’ atoms are distinct from ‘body’ atoms, center in your chest – they say the soul is not immortal. Augustine challenges this
        • Stoicism
          • more important for christianity and for augustine
          • cicero is a stoic, and a skeptic, but primarily a stoic
            • greek slave, enslaved in Rome
            • eventually becomes a philosopher
            • gets kicked out in 90 BC with all the other philosophers
          • epictetus is concerned with ‘the good life’
            • says to live in accordance with your reason, which god has put in you; it’s in each one of us but it’s universal. Details are fuzzy, but this is pretty much what is up
            • Divine reason is also the cause of the entire cosmos – they are the reason for ‘the order’, reason is ‘the order within the cosmos’, it is the principle order of the cosmos. By using your reason, you see the reason of the cosmos, and hence become one with the universe.
            • Platonic view, but central to stoicism
            • epictetus claims that immortality is possible; not a given, but that if you can achieve ataraxia, your soul can survive death, and so, by using your reason, you can achieve immortality. Has to do with the power of your vitality.
              • imperturbability
            • arete pronounced “arretez”; it means virtue
            • Q: How do you know if you’re reasonable
              • Good question — the stoics recognize causality
              • SIDE ROAD: Epicureans were deterministic, stoics said that things were deterministic but that free will exists, that you become free through rationality, super enlightened thought about recognizing the causes and becoming complicit. So cool.
              • So cool.
              • Cosmopolitan – ‘citizen of the cosmos’, one ‘living within the order of things’, would be such an enlightened, truly rational soul.
              • logos is the guiding principle of the rationality of the cosmos; you have to live with the guiding principle of the cosmos. If you look within yourself and see the order, you have to act within the way of the cosmos. That is right, that is reason.
              • Prosopon ‘prowso pawn’, ‘face’ or ‘mask’, every one of us is only a prosopon; just an actor on a stage. A notion that we have ‘a role alotted to us, and a responsibility to play it’. If you do it consciously, if you’re aware of what you’re doing, that’s ataraxia. Seeing to what extent laws bind you, to what extent you’re free, that’s it
              • Stoics gave us the ‘the ability to see what I have the power to change and the strength to see what I cannot’ or similar; central to both stoic and christian thought
              • Stoics are pretty fun.
              • Marcus Aurelius and Epictetus are big time Stoics
            • A whole bunch of stoicism was just dragged /right/ into Christianity
            • The senses+reason, stress on reason, tell us truths
        • Skepticism
          • Someone did a PhD thesis on skepticism years ago, and .. well, it’s hard to write a thesis on skepticism. There was a professor who encouraged many of them into doing this, and none of them finished. He gained a reputation as someone who killed off PhDs, and eventually, one person ran into enough difficulty that she did, you know, go a little mad. No more supervising for that prof.
          • Often see stoicism and skepticism combined
          • Montaigne is a stoic and a skeptic, Descartes challenges Montaigne just the same way Augustine challenged the skeptics and the stoics long previously
          • Meant something different to the ancients than it does to us. Just meant to look into, examine, or scrutinize something.
          • Always a position resulting from sustained critical inquiry. It is serious investigation of everything, constantly. Skeptical inquiry will never end, and it eventually leads to a realization that no knowledge can really be certain, which is where modern notions of it came from.
          • Ataraxia, in order to lead teh good life, you have to know which criteria are good and true. Non-skeptic schools of thought just kind of laid out some criteria, and ran with them.
            • criteria from ‘kritein’ meaning ‘to judge’
          • Develop notion of tropes; skeptical arguments against knowledge claims. Argue against senses and against reason. Since every argument has an equally compelling and opposing argument, we should suspend judgement. If we make judgements, and the criteria are not reliable, we are going to make mistakes. If we make mistakes we’ll be unhappy.
          • skepticism => “turtles all the way down”
          • Augustine just goes to town on skepticism, great man, great mind
          • There are a lot of logical issues here, but it’s neat. Augustine spent some time of his life on skepticism, very attracted to it for .. about a year and a half.
      • Early Christianity
        • Heavily influenced by the Essenes, a school of hebrew thought
        • Obviously started as jews, but often thought of as ‘bad jews’, as jesus was not held by judaism to be the messiah. They eventually broke off from the jews, three front war: against judaism, against rome, and against themselves.
          • Two forms, this is where Elaine Pagels comes in, Orthodox versus Gnostic
            • ‘gnossos’ is a kind of special knowledge, a personal knowledge, kind of a mystical knowledge
          • Orthodox recognize the need for a central authority to protect their religion. They felt that they needed that authority would be a mediator
            • orthodox ‘one doxo’, ‘one belief’
          • Gnostics stressed individuality; no authority. Every individual is in direct relationship with god, and doesn’t need a mediator
          • Both Orthodox and Gnostic theology rely on Hebrew thought. There are theologians who maintain that christian theology is too dependent upon greek philosophy.
          • But then, you couldn’t have ‘christian theology’ without greek philosophy
          • Old Testament contains 39 ‘books’, we don’t know when it was written, some of them as early as 800BC, some of it may be as late as 200BC, was translated into Greek in around 250BC in Alexandria, this translation was known as the Septuagint
          • New Testament contains 27 books including the 4 gospels, between 60 and 110 AD, not only these were written. When the orthodox christians decided that there had to be a standard authority; they decided that they needed to had a political face
          • Organized a tripartite structure; bishop, priest, and deacon, gets refined so that you have an archbishop, then many bishops, and finally a pope, very early, in the early 100’s AD
          • Has to have authority derived from something, must have texts, so you get the book, the bible – there were many scriptures and gospels around at this time. The authorities had to choose some particular texts, and had to choose which texts should stay and which should go, they chose which ones would stay and then literally everything else went. Around 365 AD. Destroyed nearly every copy of these heretical texts.
          • Pared everything down, declared ‘these are the texts’, arbitrary, but declared that their decision was authoritative because they were divinely inspired.
          • This is about when Augustine came around, he shows up and explains it.
          • Dead Sea Scrolls can be a good paper topic; the ownership has become a political issue. It’s a volatile thing for both Christians and Jews – it changes the way we look at Judaism just before and after Jesus; it’s sort of threatening. They still aren’t public domain. ..An ongoing problem in contemporary scholarship.
          • Some are christian, some jewish, some philosophical, all sorts of cool stuff.
          • ‘en arche en ho logos, kai ho logos on pros ton thean kai theos en
          • ‘in the beginning was the word, and the word was with .. and god was the word’, ‘arche’ does not mean beginning. It means ‘principle’, it’s sort of like a ‘first principle’, not a ‘first thing to happen’; and ‘logos’ doesn’t translate as ‘word’. ‘logos’ is bigger than word, it’s bigger than word; it’s the cosmic guiding principle to everything. So really, the “beginning principle was with god, and god was that principle.” ASK ABOUT THIS GET THIS CLEARED UP YO
            • in faust, the devil appears when faust is translating this line, because this line can’t be properly translated
            • This was rewritten in 90-100BC perhaps, edited
            • Same issues in german
            • these first people were so well informed that they were trying to couch Christianity in rational greek thought; but if christianity is rational, then what’s up with this spiritual truth stuff? It mixes things up a bit
        • Augustine combines Essenic thought with a bunch of stuff, uses the language of philosophy against philosophy in the formulation of new christian thought
        • Starts out just as any other religious cult that was becoming popular. Cults became /really/ popular during the hellenistic-roman period
          • Alexander had conquered /everything/, and he left behind a general in a city, often called ‘Alexandria’. Often that person would be accompanied by advisors, who were people from Aristotles school
        • Spread in a way no other had, secured itself in a way no other had
        • To what extent were christians like the members of the other cults — well, they weren’t, or really, that’s not true either
          • SIDE ROAD WOOO
          • The Gnostic Gospels by Elaine Pagels, a high energy physicist
          • We will come back to this.
        • Most cults had as their center some sort of ‘theurgy’
          • theurgic rites
          • theos & ergon
          • A set of rituals or practices intended to evoke spirits; usually friendly ones,
          • Some of the crazier eastern cults had some very, very secret rituals they undertook.
          • Christianity may have had this initially; had more but may have just started with this. We do have similar things, even in contemporary christianity; we have theurgical things now, for example the eucharist
        • The Scattered Legacy
          • we’ll get BACK TO PLATONISM HERE YO
        • Armand Maurer, ‘Medieval Philosophy’, second volume of something from the University of ..Toronto, I think he aid. Read him for more detail.
        • Life and times of Augustine
          • Born in 354, Tegas, in Souk-Ahras, nowadays Algeria, goes to school from 6 until 14-15, at 16 pursues higher studies in Carthage, says that through peer pressure he became ‘ashamed not to be shameless’; he was corrupted while being a student
          • Around this time he learns Punic. It was still being spoken in the 5th century, but only there (he’s in Carthage around 370 AD)
          • Discovers cicero here
          • Now he’s 19, he commits himself to studying philosophy. Becomes familiar with the teachings of Mani, (‘manicheanism’, born around 216) – Mani was a religious leader, said that there were 2 principles, a principle of good and a principle of evil, same time as Plotinus in Rome.
          • Good is the origin of the spirit or the soul, and evil is the origin of matter. Temptation of the soul by the body; but in Manichean thought, the soul is not perfectly pure, even it is sort of tenuous. Augustus finds this appealing, explains this in his confessions.
          • 10 years later, he’s 29, maturing intellectually – gets beyond Mani, starts reading some other authors from Athens, turns towards the teachings of the New Academy, still a little Eclectic, becoming Neopythagorean.
          • Around this time Plutarch of Athens (there is more than one Plutarch) is a representative of what’s going on in the academy in Athens, and Augustine is paying attention
          • Rhetoric was the subject at the time; it’s ‘the art of speaking’, includes grammar and literary studying. Sort of an early version of philology. Hears of St. Ambrose, one of the Christian fathers, travels around and preaches – Augustine goes and hears him preach – sort of a free lecture kind of thing, and really likes St. Ambrose.
          • Gets interested, likes moderate skepticism, and picks up a lot of interest in neoplatonists. Reads some Plotinus; it hits him about 2 years later that Mani is not the way of things, remembers Ambrose, decides that’s the way of things, and converts to Christianity. Still a big fan of Plotinus.
          • Begins writing! First book: Contra Academicos. Says that the neoplatonists have the idea of christianity; recants this much later. Remains a platonic (or neoplatonic) thinker
          • Next year he goes to Rome
          • Year after that he returns home (to North Africa), sells everything and turns to the monastic life – becomes a Priest. He’s 34. He’s Ordained officially 3 years later, rises to be a Bishop (cobishop, one of the ones there 4 years later), then the other one dies and he becomes the only bishop. For the next 44 years, he stays there and he writes.
          • Unlike other authors; there is something amazing about him. Often you really have to pay attention to the historical context to understand what’s going on, but a lot of Augustine you can read and understand.
            • Two ways to make authors come alive:
              • 1. Take what they are doing and make it into a modern problem, reinterpret it
              • 2. Read the text and just try to figure out what the problem is, y’know, “What’s the issue here, Augustine?” – and you can usually figure out exactly what he’s going for. This is unusual.
              • Once you get used to all the ‘praising god’, it’s not that hard of a read.
          • Died in 430, at 76.
        • Themes in Augustine
          • Goal of Life
            • God gave us the intellect/our reason
            • God gave us will
              • we are finite in our body, in our reason, but our will can be as god’s will, it can be infinite
              • Descartes takes from him almost word for word on our will
              • Can’t control the will with your body, or with reason, only through faith.
                • what’s faith?
                  • Join the church. They’ll tell you how to act; they’re the ones who know how to understand the scripture – they’re the ones who are trained, your intellect doesn’t get what they do.
                  • Q: Notion of heaven at this time?
                    • /Way different/
                    • City of God; being spiritually attentive, properly nurturing the soul, it isn’t heaven on earth — but it’s the nucleus of heaven. It’s the same idea of ‘the good life’ from before.
                    • The ‘population of heaven’, with hierarchies and whatnot, doesn’t start until much later in the middle ages – it eventually becomes part of the canonical view, but for this time, it’s not the same.
                  • Q: What is the conception of how to attain salvation? Is it all jesus, or…?
                    • Oh it’s always all jesus, but it’s also in this sense of if you’re being sufficiently attentive to your soul.
                    • If you’re more concerned with the ‘city of the world’, of acquisition and greed and worldly things, you should turn away from it and toward the City of God, that’s how to attain salvation
            • God gave us our body, our purpose is to be citizens of the City of God
            • hamartano – ‘to miss the mark’, as in archery, it is the greek word for sin. You let your sin draw you off of your mark.
          • Faith and Reason
            • After he hears Ambrose, even reading the neoplatonists, their arguments seem to buttress Ambrose. He sees their arguments as backing up what he thinks, of supporting his idea of Faith – the Christians supply a criteria to get out of skepticism, and it is Faith.
            • Faith is not always Belief; these aren’t equivalent terms. To have faith isn’t just ‘to believe’. Faith gives you a form of knowledge
            • Belief can be turned into knowledge, by means of reason, sometimes you can’t do it
            • The greeks had reason; they had philosophy, but for the Christian they could never reach salvation, because they did not have faith. They thought you could get to knowledge of the good just through reason; faith and reason have a hierarchy, and faith is going to be higher.
            • Doctrine of the double truth, sometimes called the twofold truth. Two kinds of truth; one is accessible to reason, one is accessible to faith, some are accessible to reason AND faith
            • Augustine criticizes Cicero
              • Says that there are disjunctions that are undeniably true; there is one world or many – this is obviously true to Augustine, so what would the skeptics say?
                • If many, the number is finite or infinite
                • The world had a beginning in time, or it did not.
                • Augustine will maintain that “the senses don’t lie, they report accurately”, “the census don’t lie; they report accurately” – hahahahahahahaha I am soo clever oh goodness
          • Certitude
            • Attain certainty; have certitude.
            • The judgement of truth is found in the intellect.
            • Talks about the senses and the hierarchy of the senses.
          • The Soul
            • These thinkers are not clear on the soul and we still aren’t clear on it today. Augustine wasn’t clear. No one has ever /been/ clear. But he’s going to try to be platonic.
            • The soul is essentially rational, and the soul uses the body like a tool. The mortal body is just the material for teh expression of the soul – very platonic
            • The soul animates the body, ‘is animo’ literally ‘animates the body’, makes the body move, brings life to the body.
            • Doesn’t (immediately at least) address the question of /how/ the body is animated by the soul. For Augustine, he’s pretty much just happy knowing that the soul brings life to the body.
            • Excerpt about the immortality of the soul.
              • _____
          • Knowledge
            • sensation is active; augustine is unfortunately not fully clear – the ideas are still new; not just to him; but passive/active sensation is a difficult claim, normally the body is regarded as passive;
            • passion “to be acted upon”, emotion is “pathos” to have something act upon you, ‘pathein’
            • perception is the interpretation of sensation
            • sensation is receiving the data
            • perception is different; it’s interpretation, what do you draw from sensation?
            • Descartes distinguishes; Augustine /seems/ to have this distinction in mind, kind of goes back and forth on this – it’s a key tension even in Augustine himself.
            • Key thing is not sensation/perception – it’s reason, and how it is capable by divine illumination. Not so much worried about the origin of images and ideas, more about how we can achieve certainty in our salvation; how can we get certain knowledge? It’s divine illumination. It’s god.
          • God
            • God illuminates all people to varying degrees
            • Some people are better than others at everything – including at being saved.
            • A world of intelligible truth, this is platonic, reason can only know that truth if it is illuminated; and god provides that illumination – not all minds can do this
            • Plotinus doesn’t like this, he talks about ‘The One’, the Being and the Intellect become embodied in the World-Soul, and become manifested in the Created World — a hierarchy where the One is the godhead, the first order of ______, then you have this combination of ideas being the intellect, and so on outward.
            • He distinguishes those degrees as different orders of manifestation of god, and Augustine doesn’t do that. He says there’s just the Father, who is one with the Logos (the verberen), the spirit, all equal, the same thing, and from that you have the world. He took Plotinus, and said “oh no no, he just doesn’t have the faith to see the incarnation, the trinity – of the one in three, the three in one”
            • World-Soul imposes form on matter, does so out of necessities. It’s driven by the one through the intellect to impose itself on matter
            • For Augustine that’s not the case; God creates freedom. God creates matter – there’s no precreated matter. God creates everything. You see this come up in the confessions; it’s a neat puzzle about there not being time or existence before things existed..
            • For plotinus, there was always something there. Something always existed, but not for Augustine. Augustine is worried about what a beginning means — and he says that there /is/ a beginning. A beginning of time and space and that was the divine act of creation; the created world had a beginning of time.
            • After Augustine, it became essentially dogma, it was doctrine for sure; not questioned for centuries, until the rediscovery of Aristotle
          • Creation
            • (see above)
        • By his day, Christianity is finally entrenched. This is the last period of antiquity, almost between antiquity and the middle ages.
        • Everyone afterward understands things in terms of Augustine
        • Free Choice & Will
        • Doctrine of Divine Illumination as part of Epistemology
          • Criticism of Plato, a bit of Plotinus
      • A Complicated Novel
        • Athens, Rome, Alexandria
        • Philosophers move back and forth between these, and it’s complex and interwoven. Like a fabric of monkeys. Playing hopscotch.
    • Day Three
      • Readings
        • Boethius (Reading for next week)
          • The Consolation of Philosophy 103-37
          • Contra Eutychen 138-139
          • On the Trinity 139-140
        • Reading from John Scottus Eriugena:
          • On the Division of nature 147-155
          • Irish, writing in a weird time. Some regard him as a pantheist; he thinks of himself as a Christian.
      • Basic Augustine points:
        • Doctrine of illumination
        • 10.33; 29a: Therefore, a sign is learned when the thing is known, rather than the thing being learned when the sign is given.
          • Signs and signification is very dense and complex; he’s basically giving us a theory of language. A basic semantic theory. We write down words – prepositions, proper nouns, etc, and the meanings are somehow buried in the sound of the word. What it actually does is evoke something in us; forces us to recall something which we already know.
          • Signification does not convey meaning; it triggers within us a recognition of something which we already know. So what’s left is to determine how we know what we already know.
          • He’s saying that words trigger a certain response; they cause recognition of something we already know. The thing which made us know is God.
          • But we don’t learn things by signs – so for example, when reading, words aren’t teaching us things. Again, they are just triggering the response.
          • The Teacher here is Jesus Christ. God is the source of Truth, but god “in the flesh” is Jesus Christ, who is within us. The teacher within us is the same as Jesus Christ. It is Christ.
        • 10.34; 29b; As I have stated, we learn the meaning of a word — that is, the signification hidden in the sound — once the thing signified is itself known, rather than our perceiving it by means of such signification.
          • Words aren’t vehicles for transmission of knowledge, instead are there for triggering knowledge.
          • Words tell us how to look within ourselves; remind us to look within
        • 11.36; 29b; To give them as much credit as possible, words have force only to the extent that they remind us to look for things; they don’t display them for us to know.
          • Philosophical/Religious schools were all dogmatic; Skepticism, Epicureanism etc, have dogma or fundamental beliefs. That fundamental set of beliefs could be written down and codified to be shown as a set of principles. You could compare two books and evaluate their relative worth or truth.
          • Augustine is challenging the thought that is held within the schools; that words and books awaken the truth or tell you how to find it, and that after that point you can throw them away; the work is done.
          • We grow accustomed to believing that thought takes place in language. Plato says that thought is the dialogue with the soul. Nowadays, we think in language – to the point that it has been argued that we can’t think without language. That animals don’t think because they don’t have language.
        • 11.36; 30a; This is a truthful and solid argument: when words are spoken we either know what they signify or we don’t; if we know, then it’s reminding rather than learning; bit if we don’t know, it isn’t even reminding, though perhaps we recollect that we should inquire.
        • 11.38; 30b-31a; Regarding each of the things we understand, however… to the extent that we have the ability to make them out.
        • 12.39; 31a: Everything we perceive, we perceive either by one of the bodily senses or by the mind. We name the former sensible
          • Passage from Corinthians, ‘For the jews ask for signs, and the Greeks look for wisdom, but we, for our part, preach a crucified Christ — to the Jews indeed a stumbling block and to the Gentiles foolishness, but to those who are called, both Jews and Greeks, the power of God and the wisdom of God.
          • The point of the Christians is that the Christian faith is not a natural faith. You don’t look to nature, to find a miracle. You can’t just look to texts. That isn’t the Christian message; you can only come to knowledge of god by virtue of turning to Jesus Christ. You couldn’t have done this before Christ; god has given us the ability to see his truth by being put into the flesh, and that is the Christ. That’s always been the case, but we know that now because Christ has been here, to tell us. Only after him can we see that this is the truth and it’s always been there.
          • That’s why Christianity is /the/ religion, because no other religion could have given us this.
        • Augustine seems almost to argue against the institutionalized, hegemonical power structure. The authority is Christ. Christ speaks through the fathers of the Church and in the doctrine and such, and while it may come from authority figures, it is /ultimately/ Christ.
    • Admin Stuff
      • Some arbitrary section
        • The Teacher (28-34) – St. Augustine I think (awe gustin’ -emph on gust)
        • On Free Choice of the Will (34-60)
        • Reconsiderations (61-63)
        • Confessions [Book 11] (72-81)
      • Another Section
        • course outline, etc.
        • features of the medieval period 300-1400
          • 300-1400 isn’t really it, more 300-1300, but we’re extending it
          • renaissance is right after it
        • history
          • Presocratic thinkers
            • ?-600
            • 600-400
          • Plato & Aristotle
            • 428-348 & 384-322
          • Early Christianity
            • AD 50-350
      • Section the third, titled ‘Early Christianity’
        • A. Philosophical Context
          • Pythagoras, Stoicism, Skepticism…
        • B. Religious / Scriptural context
          • Jesus
          • Paul and New Testament Gospel authors
          • the Bible
          • The Fathers of the Church
          • Aristolic & Apologist
      • Hard Talk: We don’t have much of a presence in this period
        • because it gets thoroughly trashed
        • it gets thought of as “a religious period”, not a philosophical period only as a period of theology, theologians talking about god
        • Our teacher is basically Clint Eastwood in ‘Gran Torino’. That is exactly his pattern of speech, /aside/ from the swearing.
      • Interesting – think about the tension between religion and philosophy /prior/ to jesus
        • I have seriously never thought about that
        • this religious dimension is philosophically investigated through a very personal style
        • they are not just all talking about proving god
      • These authors are difficult. The logic is demanding. Be prepared to devote several hours a week to the readings; you cannot zip through this. It is conceptually demanding.
  • Compilers
    • Day 1
      • Intro
        • Questions
          • 315 or 312? (outline says 315, he said 312)
          • moodle enrollment key: university
          • When do we receive the specification for the assignment?
          • When do we receive the specification for the project?
            • What language? C/C++ or Java being used to make either C- or minipascal
        • Mack 307, fsong@uoguelph.ca, moodle, key is tiger2011
        • emphasis on implementation: 55% on assignment and the project
        • expectations: strong programming skills, familiarity with architecture issues, experience making large projects
        • arch comes in when converting intermediate representations into machine code, programming for developing your parser and your abstract syntax tree
        • Work incrementally. Do not plan huge swaths of time, just work in small steps regularly.
          • Warm-up assignment: 10%
          • Project (three checkpoints): 45% (3×15%)
          • Midterm: 15%
          • Final: 30%
          • Attendance is important, as the textbook and notes can’t replace in-depth discussion and question answering. Self-learning /can/ be fine, but if you aren’t VERY good at it, you just won’t get as much out.
          • Late policy: 1 day: 10%, 2 day: 25%, 3 day: 50%. Weekends and weekdays are counted the same.
        • The project
          • Build a working compiler: 45%
            • Scanner (using Lex/Flex/JFlex) and Parser(Yacc/CUP)
            • Symbol table and type checking
            • Code generation
          • Groups of 1 or 2 people at your option, but need instructor-approval
          • Three checkpoints of 15%, in the form of a demo and a written report, summarizing what you learned during that part and as a useful piece of documentation for maintenance and regular operation of that code.
          • More accurate early implementation will make for better later implementation
      • Lecture Notes
        • A Translator
          • A compiler is ultimately a translator, which allows a programmer to ignore machine-specific details. It is the principal tool that we use to manage complexity. It translates source code into a target, eg. machine code or java bytecode
          • It also acts as a validator.
          • First a validator, second a translator, third an optimizer
        • History
          • 1940s: stored program
            • direct machine language (numeric codes)
          • 1950s: assembly language
            • symbolic forms of machine instructions
          • mid-1950s: first compiled language
            • Fortran 1 officially released in April 57
            • ‘formula translator’
          • 50s-60s: Chomsky hierarchy
            • classes of languages and grammars (regex, CFG, recursive)
            • formalism laid the foundations of computer science
          • 60s-70s: Parsing problem
            • tools for recognizing regexes and CFGs came about
        • Advantages
          • Efficiency
            • Producing efficient object code (otpimization)
          • Convenience
            • Reducing low-level complexity
          • Object-orientation
            • Encapsulations, inheritance, and C++ templates
              • … :/ that is so not what OO is about
                • ,, well, maybe encapsulation a bit
                • but COME ON man, MESSAGE PASSING
              • ‘three critical mechanisms of OO’
                • 1. Encapsulation
                • 2. Inheritance
                • 3. Polymorphism
              • Inheritance isn’t what it’s all about, but, okay cool.
          • Retargetability
            • Single source language -> multiple target languages
        • Language Paradigms
          • Imperative
            • Sequential and explicit execution (C and Pascal)
          • Functional
            • Functions calling other functions (e.g. Lisp)
          • Logical
            • Rules in no specific order and built-in backtracking (e.g. Prolog)
          • Object-oriented
            • Typically extended from imperative languages (e.g. C++, Java)
            • but can come from any
          • Learning AI stuff kind of forces you to switch paradigms regularly
    • Day 2
      • Showed up a little bit late, may have missed a bit.
      • Two systems of implementation
        • Compiled code
          • ‘compile once, execute many times’
          • can be a lot of effort to port code
          • very fast execution
          • slow translation from source to machine code
        • Interpretation
          • Small translation cost
          • Slow(er) execution
          • Highly portable
        • There are also hybrids
          • Medium translation
          • Medium execution
          • still portable
      • Overview of the Compilation Process
        • Front End Analysis
          • Source code goes
            • makes Tokens
          • Tokens go through Parser
            • makes a Syntax Tree
          • Syntax Tree processed by Semantic Analyzer
            • makes an Annotated Tree (a Symbol Table also)
          • The Annotated Tree & Symbol Table goes through the Intermediate Code Generator
            • makes Intermediate Code
        • Back End Synthesis
          • Intermediate Code fed into a Liveness Analyzer
            • makes an Interference Graph
          • Interference Graph used with Register Allocator
            • makes Register Assignments
          • Register Assignments fed into Code Generator
            • makes Assembly Code
          • Assembly Code fed into Target Code Optimizer
            • makes Optimized Assembly
          • Assembly is put through the Linker & Loader
            • makes Machine Code
          • Machine Code runs.
            • Wootsauce.
          • We’ll be skipping Liveness Analysis and combining the Intermediate Code Generator and the Code Generator, producing Assembly directly.
      • Major Steps
        • Scanning and Parsing
          • Scanning / Lexical Analysis
          • Parsing / Syntactic Analysis
        • Semantic Analysis
          • Attach meanings to phrases
          • Relate symbols to definitions
          • Type Checking
          • Produces an annotated tree; AST with type info etc.
        • Intermediate Code Generation
          • Layout the stack frames
            • Variables and parameters in different scopes or activation records
          • Produce intermediate code
            • Abstract Syntax Tree may still be complex
            • Need a linear representation to accommodate code generation
          • Intermediate code optimization
        • Intermediate Code Optimizer
          • Can convert a three-address code into a simplified expression
        • Code Generator
          • Convert intermediate code into target assembly/machine code
          • Can further apply some optimizations
    • Day 3
      • Compilation versus Interpretation
        • Compilation
          • Advantages
            • you can optimize this more
            • better error reporting / debugging
            • because compile time “doesn’t matter”, can have a very complex, rich syntax
          • Disadvantages
            • Not very portable
        • Interpretation
          • Advantages
            • Very portable
            • REPL (read eval print loop) is easy
            • good for exploratory programming; can begin running a freshly written program without compiling
          • Disadvantages
            • The compilation process is being done while running the program, every time. Lots of additional processing done.
            • Can’t discover certain kinds of errors until you are deep in the program.
      • Front end versus Back End
        • Front End
          • Linear Representation into a Tree
          • Scanning and Lexical Analysis
            • Scanner
              • Stream of Characters turned into a Stream of Tokens
              • Unrecognized tokens must be reported as syntax errors
            • What’s a token?
              • A minimal sequence of characters representing a unit of information.
              • Not /everything/ is a token. For example, comments, preprocessor directives, blanks, tabs, newlines — are usually ignored by the compiler.
                • Notable exception: Python
        • Tree into a Linear Representation
  • Game Development
    • 1 Build World
      • populate the 3D array of ints that’s roughly 100x100x50
      • perlin noise to make mountains
    • 2 Add day/night cycle
      • calculate the path
      • half circle – just send a thing through the sky
      • going to have to track the location of the sun and the moon
    • 3 Clouds
      • don’t overwrite stuff with the clouds
      • going to have to keep track of the shape of the cloud
    • 4 Timing
      • How to update the moving object in the scene
      • OpenGL responds to events – that’s good for purely interactive things, but not for combined interactive and moving things.
      • So we’ll have to create animation events
      • idle() function
      • need to use real time to determine updates
        • check to see if enough time has passed, then update things if it has
  • Seminar

NaNoWriMo prep

I’m planning to write a novel. I don’t know what about, yet!

“But Wyatt,” you say, “you may lack the ability to write a novel!”

Indeed, I may. So I’m doing a lot of preparation. My prep work follows a pattern similar to that laid out in the 100 pushup training regime. For five days, I wrote a 250 word short story each day. I have just written my second 500 word story, and will continue for 3 more days. Then 1000 words for five days. Then I’ll try a 5,000 word story in 3 days. I’ll do that twice. Then I’ll do 10,000 words in 5 days over and over until it’s November.

This should get me used to writing about 2,000 words of slightly edited prose per day, which is what’s required to hit 50,000 words across the month of November.

Some things I’d like.

I would like to be able to record my thoughts and experiences easily and passively. At any time I want to be able to start or stop recording my vision (or an analog), my speech and what I can hear, my keystrokes, or other sorts of data, directly into some kind of system where it can be organized, queried, and shared.

I would like to be able to instantly query and access and share those things while I’m mobile, or sitting at my desk, or disconnected from all large-scale communication infrastructure like the cellular network.

I would like to be able to master the glue. Which is to say, I would like to be able to quickly take data in format X and transform it into format Y, without having to write a program to do it. So much work seems to be getting information from one system into another system, which requires slight formatting, order, value-type changes, or perhaps just simply stripping data out or doing some basic analysis like taking a sum or an average. I would like to be able to take a pile of data and restructure it at a whim. To read from whatever format I have access to, transform it on the fly, and write to whatever format I might like.

I would like to have my ideas and thoughts floating around me at all times, organized organically or at the push of a button — they’re just data. I want to be able to divide and order them, place them in piles, see them floating in the air and walk among them.

I would like to offload my thought-state and allow mental processes to complete. To resume that state whenever I want, update little bits or check in on the progress of things, and then toss it back away again.

I would like to be in constant contact with my loved ones and friends, whenever I want to be — not solely by reading their words on a screen, but by hearing, by seeing them, by sensing them. I want the distinction between voice and text and vision and thought to disappear.

I would like to be able to ask the world any question, and get an answer.

Despite some of that above — I would like to retain the freedom to be alone. The freedom to come and go as I please. The freedom to think and say as I please, even if another person finds it to be offensive, wrong, or destructive. I would still like to retain the freedom to communicate without having that communication eavesdropped upon. I would like the freedom to access any visible information I’m interested to learn. I would like the freedom to act without fear of retribution from a fickle overlord. I would like the freedom to assemble and protest, and remove from a position of power those who seek to remove my freedoms.

I may be misguided, I may be wrong, and I’m definitely all over the place, but I know what I want, for now. I would like to start building, seeing, and using things that make computers extend our minds and souls — without giving up our personalities or falling under something oppressive.

I wonder how hard it is to make these things happen, and how wrong I am, or how stupid I sound? Time will tell.

when git can’t checkout a remote branch

Problem

Coworker has a workflow of:

  1. work on branch
  2. push branch and make PR of it
  3. delete local branch, checkout remote so that local is tracking remote
  4. carry on

except here’s what happened in the checkout stage:

user@host repo-name (master)$ git checkout issue-XXXXX-dummy-name-for-blogpost
 error: pathspec 'issue-XXXXX-dummy-name-for-blogpost' did not match any file(s) known to git.

It’s an old branch he’s trying to check out, but he just did the deletion step in this a few minutes ago. He does this all the time and he’s very experienced, so this was a bit of a pickle. I turned my rubber duckie over in my hands. We ran through some possibilities: doing a git fetch, trying it in a clean git clone (it worked fine), trying git-gc in the clone to see if it would break it, etc. Eventually, we turned to google.

Research

My search, yielded two stack overflow hits, and he told me about another.
They suggested checking git show-ref, and it we decided to diff the good and bad repo’s refs. The SO responses also turned up an explicit way to tell git to check out a remote branch locally and track it:

git fetch origin
git checkout -b test origin/test

His refs had something like the following in them:

bad repo:

user@host bad-repo-name (master)$ git show-ref
ddc955...0f61cb refs/remotes/experiment/issue-XXXXX-dummy-name-for-blogpost
86b183...ac388f refs/remotes/origin/issue-XXXXX-dummy-name-for-blogpost

good repo:

user@host good-repo-name (master)$ git show-ref
86b18399ad7cb01eeea74f5577c0a5dfe1ac388f refs/remotes/origin/issue-20198-remove-easy-cloud-accounting-copy

Solution

This led him to the realization that git must be doing some name-matching and hitting the first instance of the branch name. That ref line tells us that commit ddc955…0f61cb is ref’d as a branch with our name on a remote named ‘experiment’. The other line says that there is a different commit ref’d as a branch with our name on a remote named ‘origin’, which is what we want to check out.

Here’s the problem, and it was the aha moment: the ‘experiment’ remote no longer exists — this commit is old enough to have been used on a nascent form of this repo, when it was an experiment, moved from an existing svn repository. The issue is that the ‘experiment’ commit can’t be checked out, and git (reasonably) gives up at that point.

So he deleted the experiment branch and used the explicit form for checking out a branch from origin to track the remote. Problem solved.

Takeaway

For the future:

  • testing with a clean clone is really useful for determining if your problem is in your repo or everywhere
  • git show-refs is a reallllly useful tool for telling you all the things