Monday, October 24, 2016

Revisiting Lambda Calc

Technical readers may consider my version of the "lambda calculus" watered down, much as the Python "little lambda", in being just the one expression, is but a pale shadow of the Great Lambda worshiped further to the north of Python Nation, were such nations to geographically exist.

OK, I've likely lost the rest of you too, so never mind.

But you've heard of "functional programming" yes?

There's this wish to say

UI = visualization (immutability )


subjectivity = interpretation (objectivity) 

-- or something like that.  The context may be as mundane as "functional CSS".

The goal is to straightforwardly image some model's state.  Take a picture of the world, or some small part of it.  Keep the model and its rendering separate, with the rendering pipeline consisting of deterministic components.

My story, in defending my use of "lambda calculus" is I'm keeping memes that belong together, together, so what's the fuss?  I'm contrasting it with "delta calculus" as a way to get traction with my would be end users.

What end users?

As you'll recall, where I'm taking my "lambda calculus" is in the Sesame Street direction (some might suggest we call it that) towards any-school's interpretation of some "computer math" pre-college.

Even oldsters as old as me, and older, will feel somewhat duty-bound to keep sharing, with other teachers if not directly with their students, about how to maybe summarize what's happening behind the scenes, succinctly and concisely.

This "computer math" includes the basics of Group and Number Theory, with a practical application in RSA, the public key cryptographic algorithm.  That's an outline of your curriculum right there, minus the spatial geometry component, the global data (big data, round data).

No, I've got nothing against Diffie-Hellman (what Ian featured at the Chicago Pycon) and I don't dictate a choice of computer language.  Use Ruby if you prefer. Try a bunch.  JavaScript is improving.

I just so happen to share about the RSA algorithm using Python, making use of the binascii.hexlify() and unhexlify functions to turn a sample phrase into a number ready to raise to a power, then raise again to get it back. My goal is to keep it simple.

In modulo arithmetic, operations tend to be circular and in RSA we keep secret what pairs with some N to make an encrypted message come back around again.  The genius is the secret never needed to leave Alice's computer for Bob to be able to send her encrypted (private) stuff.

I'm not diving into RSA in a spirit of high dudgeon, though I'm plenty aware that governments might have preferred a world wherein "we the people" did not include every little mom & pop shop.

The only reason we have a modicum of transactional security, including to some degree around cyber-monies like bitcoin, is because "computer math" is commercially oriented, not just some military secret, a weapon, as it might have been. I understand the need to protect this civilian heritage.

However I'm coming mainly from a pragmatic impulse to share a "how things work" approach to everyday tech.  If our people are to reason about the world they're in, then understanding about Bob and Alice, and "evil Eve" (to whom we owe so much as a penetration expert) is just a part of the package.

We'll also want to keep talking about tcp / ip more generally, and not just DNS (much in the news lately).  What's the issue with IPv6?  Is there a road block of some kind?

We want the journalism to stay technical, and we want to stay savvy enough to follow it.

Lets start building the necessary reading skills pretty early, using cartoons and puppets if that helps.

In many cases, we simply want to be able to follow our own stories to their logical conclusions, and not get lost in the woods because we've forgotten our lambda calculus.  How can we keep playing glass bead games if we're missing too many marbles?  Keep the puzzle pieces on the table, so that random individuals have a fighting chance of figuring stuff out.

I'm not saying every high school kid needs to tackle the Y-combinator pattern, but why not get to within striking distance?

You may still opt for the usual "delta calculus" of Newton and Leibniz, of Cauchy and Weierstrass, perhaps exclusively, perhaps in addition.  Nowadays we have this other math, this lambda calculus stuff for you too.  We offer choices.