Gmail eats Python

Marko Rauhamaa marko at pacujo.net
Sun Jul 26 12:31:44 CEST 2015


Chris Angelico <rosuav at gmail.com>:

> On Sun, Jul 26, 2015 at 7:51 PM, Marko Rauhamaa <marko at pacujo.net> wrote:
>>> - What everyone calls head (of a list) emacs calls Car (Toyota?)
>>
>> Now you're inventing things.
>
> No, but it's LISP rather than Emacs that calls it that.

You'd have to get into programming lisp before you encountered "car" in
emacs. It's much easier to grasp than "class" in Python.

Python still retains "lambda", BTW. And what are "strings", "floats",
"braces" and "sockets"? Only "bubblegum" and "ducktape" are missing
(however, "ducktype" is included).

> And it dates back to an assembly language opcode. Why that got
> perpetuated in a high level language, I don't know - it'd be like
> building a language today and using "interrupt" as the name of its
> call mechanism, because it's built on the Intel INT opcode.

It is funny, that's for sure. It comes from the time when the mechanics
of a computer inspired much more awe with the theorists than it does
nowadays.

The separation between layers of abstraction is a never-ending challenge
in our profession.

An anecdote:

Back in the late 80's I had to deal with the GSM MAP protocol. In
protocol layers, you would find MAP on top of the protocol stack as
follows (go go gadget M-x picture-mode):

        +-------+
        | MAP   | application
        +-------+
        | ASN.1 | presentation
        +-------+
        | TCAP  | transaction
        +-------+
        | SCCP  | session
        +-------+
        | MTP3  | network
        +-------+
        | MTP2  | link
        +-------+
        | T1/E1 | wire
        +-------+

Now you express MAP data abstractly using ASN.1's abstract notation.
Phone numbers are defined (somewhat less abstractly) as hexstrings. If
the phone number is

   1234567

you express that in MAP as

   '214365F7'H

Huh?

I wondered that aloud to Nokia Network's GSM specialist. He thought
about it for a while and then said, "Well, that way the phone number
bits go out on the wire in the right order."

In telephony protocols, the least significant bit is transmitted first
on the serial wire. So, if you want the first digit (1) to go out first,
you have to place it in the lower nibble of the first octet (in the BER
encoding of ASN.1).

I was left speechless.


Marko


More information about the Python-list mailing list