Sunday, September 10, 2006

Lunch on Hawthorne

I met Glenn at Portland Ale House this afternoon, for a pint or two and, for me, the blue plate special, which included an interesting carrot & coconut soup (I'd get it again).

I spoke a lot about Kiyoshi, Fuller's adjuvant on some difficult books, but also a gourmet who helped Philly upgrade its self image, as a place to write home about when it comes to food. He and I ate at The Fork that time.

I showed Glenn a couple notebook sketches of Snakes with __rib__ syntax, a way of helping students remember how we override special methods in Python. D'ya want the plus sign (+) to do something custom? Just write code for __add__ (pronounced "under under add"), likewise for __mul__ if you want to script the multiplication operator (*).

And how 'bout when you make an object "eat" something through its "mouth" i.e. the object is already initialized ("born"), and now you're feeding arguments to a pair of curved parentheses (like lips) and you want some customized behavior: well, that'd be your __call__ special method.

They look kinda like __ribs__ no? -- especially when stacked up and indented, as one must in Python, where indentation is significant -- no "curly braces" for scope, like in Perl, Java, or C#.

overriding special methods
Python 2.5
(click to enlarge)
Here, I'll upload a scan from said notebook:

"Python's __rib__ syntax"
(Kirby's sketch)

Plus I've written about this before.

Glenn knows contracting pretty well, as both acting janitor for the Pauling Complex and senior fellow for ISEPP (he's built an entire home from scratch). Glenn went to Antioch, before becoming a cryptanalyst with the NSA among other things.

Over on edu-sig, I've been horrifying some posters with my radical notion that we oughtn't "script" our first programs, so much as code up some namespaces "like boxes of chocolates" and then just reach in and use the contents at runtime, with no main method in control.

You be the glue: treat the namespace as a library, a utility belt, that neither actively cues nor prompts you, but does spell out its own contents in some detail (well designed .py files should be pretty much self-documenting).

Meanwhile, over on math-teach, I've been diving head first into Supermarket Mathematics with the gnu math teachers (a cyberspace krew), using a new "musings" format, more soft focus than "memos."

I blend a kind of database management perspective (drawing from personal experience), with a more general discussion of the difference between Cardinality and Ordinality. I got some ideas about this from Midhat Gazale's book Number, and here I'm expounding on it more, contrasting the job of these UPC codes (just tell stuff apart) versus the role of Money, which has this strong Ordinality bias (positive money is better).

And finally, on Synergeo, I've been doing my best to explain my "4D/4D++" meme to Planet Tverse (John Brawley), while meanwhile squabbling with Rybo the Robot (my nickname for a guy who calls John "Zachary Smith" -- an allusion to Lost in Space, a 1960s TV show -- and calls me "King Kirb"). Yes, it's an odd namespace we've got going.

Synergeo is a good venue in which to test the relevance of YouTube and/or Google Video content, interspersing my Synergetics teachings with relevant audio-video objects, playable via URL.

Some fun anthropology:

In further researching this Synergeo namespace of twilight zone quasi-irrelevance, I watched this long excerpt of a Lost in Space episode culminating in Will's confronting this Yeti or King Kong or whatever (a Cyclops actually, if you want to get Hellenistic about it), after his male tribal elders had already provoked it unnecessarily (they threw some fire at it, pretty stupid).

So then headstrong Will drops the Monster with a ray gun. That was considered a good way to handle things back in the day, before Star Trek came along with the Prime Directive, which said Away Teams really oughtn't go around shooting the locals that way. We're here to boldly go, not stupidly attack.

The security moms back in the cave are remarkably blasé about the whole incident, are tied to their laundry baskets, see the World of Men through a telescope only, meaning Will must reach escape velocity to join his peers, and prove himself manly against the Giant.

greedy snake swallows
pregnant sheep,
pays a price