Python was designed (was Re: Multi-threading in Python vs Java)

Chris Angelico rosuav at gmail.com
Thu Oct 17 11:00:20 EDT 2013


On Fri, Oct 18, 2013 at 1:49 AM, Mark Janssen <dreamingforward at gmail.com> wrote:
> It's like this.  No matter how you cut it, you're going to get back to
> the computers where you load instructions with switches.  At that
> point, I'll be very much looking in anticipation to your binary-digit
> lexer.

Even when computers were primarily programmed in high level languages,
boot code could still be toggled in with manual switches. There's a
story around someplace of a guy who did that _over the phone_ and, if
I recall correctly, without a reference manual - which would mean he
had the entire boot code for that computer memorized. So, yeah,
loading instructions with switches isn't incompatible with lexing,
though I don't know if that term existed at the time.

Ultimately, computers work with data, which can be represented (and
inputted) with binary states like switches, and can itself represent
text. To parse text, a computer performs analysis on binary data.
Someone could today build a computer that takes input on punched cards
or switches or a Navajo saying A'la'ih and Do'neh'lini [1], and then
parse the corresponding text as (say) C code. The two are completely
orthogonal.

ChrisA

[1] if http://xkcd.com/257/ is correct



More information about the Python-list mailing list