Tuesday, May 23, 2017

Coroutines

I see refugees from Chef World (aka "the kitchen") trying their hand at coding, and thinking they're making a big leap. Yes, they are, in a way, but in other ways a short order cook is a study in workflows, and an algorithm is a semi-numerical recipe.

The key to cooperative concurrency is the wisely chosen yield keyword in Python, which is two way, and a way of handing back control to the caller, voluntarily we might say, before all business is completed.  Queue up a number of such yielding tasks, as promising to deliver in the future, and roll through them, round robin or when the timer dings (ready!) and you've got yourself an event loop.

In a seeming change of subject, I had the C6XTY "buckyball" made of six units, screwed together with eight disks, as a "booth magnet" conversation piece.

Even after understanding our proposal, for a smart router that keeps students on task, schools approved by model families, a Pythonista maybe wanted to linger, chat on other topics.  Hexapents for everyone (HP4E) meets CP4E (Guido himself sauntered by, but chose neither to engage nor inhibit, per Pycon's code).

The connection is this concept of "payload" or "something valuable inside".  When a Python generator returns, raising a StopIteration, a payload might go inside at that point.  Likewise a Future, or class of Task, this this "cooking" or "baking" internal state, which the event loop keeps checking, not blocking for more than a moment if the task is clearly undone.

Once an egg "hatches" and releases the payload, then other design patterns kick in.  Cooked meals get delivered to tables. A waiter / waitress is optimizing in many ways too.

The chef or chefs may be amazing in their seeming ability to multi-task, but lets not forget:  the whole restaurant is made from coroutines.

Nor is such an ecosystem incompatible with the pre-emptive multitasking going on at a deeper level.  The OS knows the CPU is a resource to share.

There's nothing wrong with running "blocking code" or "being a CPU hog" when you've been scheduled for useful work, and when the OS retains the channel changer (the "remote").

That's how CERN and Hubble both work, with a jobs queue.  It's up to the researchers to manage a workflow once their fun in the sun comes around.

Thursday, May 18, 2017

Haim's Challenge


In chapters passed, I tried to dispute Haim's Challenge, which he re-introduced on math-teach again recently:
Thank you for the opportunity to re-introduce "Haim's Challenge",
http://mathforum.org/kb/message.jspa?messageID=6300122&tstart=0
"There are no important open questions in math pedagogy."

(The Challenge is to prove the premise wrong by pointing to even one long-term, ongoing examination of open questions in math pedagogy, by any group of people, anywhere. The context is K-12 mathematics.)
I'd bring up A&B modules, T&E modules, clearly referencing Synergetics for its pedagogical implications.  Of course the K-12 curriculum should be adjusted, here and there!
Of course I do not discuss math pedagogy, for the simple reason that there is nothing to discuss. Or, so I believe.

I believe:
(1) We know everything there is to know about school mathematics (i.e., K-12 math), and
(2) We know everything there is to know about how to teach it.

So, the only really important question is why don't the schools do what we know they should do to most effectively teach math to the most students?

The answer can only be found by exploring the politics of education, not the mechanics of long division or anything like that. We know the mechanics of long division. What is less clear is why the schools don't teach it well, if at all.
I realize now that actions speak louder than words, and Haim well explains many phenomena I observe in the ambient culture.

Whether I agree with Haim's challenge (more like a claim) or not is immaterial.  My sphere of influence is definitely limited.

People treat mathematics as a static aspect of their environment.

Hell would freeze over before "tetravolumes" would rise to the level of attracting the attention of grade school math teachers, let alone prove share-worthy, with coming generations.

I get it.  That's certainly not a decision I'm comfortable with, which accounts for my somewhat non-mainstream ethnicity.

Saturday, May 13, 2017

On Projection

In dime store psychology books for the dummy dumbfuckistanis, you'll learn that "projection" is something you shouldn't do, like picking your nose in public.

With a little training and vigilance, one grows out of this immature practice, and then just sees others doing it, so blind to their own failings.

More upscale psychology, closer to worth the money, will tell you "projection" is all you've got (in the more Plato's Cave sense) and so the game is one of "fine tuning" (presuming you're even grossly in the right ballpark).

If you make projection be your friend, and then spend the time, do the homework, to learn it as a skill, an intentional art, you might wind up with something more like a crystal ball in your own estimation.

Why we diss projection is it leads us astray. We believe our beliefs and that's rarely a good idea.  Were projection to be trusted, like corrected vision, then that'd be a new chapter.

I do like Maurice Nicoll, the intrepid Scotsman, on this topic.  He warns us to not identify with every thought or feeling posing as "one's own".

Many never even get to that first rung of the ladder: of realizing they have a choice, in terms of what inner voices to identify with.

How fast they climb from there, is anyone's guess.

Monday, May 08, 2017

Public Policy: Finding Farm Workers


Although Glenn grew up in a union family, amidst other union families, he came to see the downside of unions as well.  I learned more of his story this afternoon.

His decision to quit the electricians union in Phoenix is what ultimately led to his joining the Navy and enrolling in the Defense Language Institute in Monterey.

The theme of our discussion: the looming agricultural crisis as states scramble to find farm workers.

The clamp down on itinerant field workers is endangering vast resources, from vineyards to asparagus patches.  Picture acres and acres of rotting onions, potatoes, you name it.

Might states start up their own Guest Worker programs independently of the Feds?  What unions might get involved, if any?

Could we use smartphone apps to help workers find opportunities?  The same apps might help farm managers find help.

Given we live near Cesar E. Chavez Avenue, the newer name for SE 39th, it makes some sense we'd be wondering about United Farm Workers and so on.  What's the history at least?

Glenn dove into Wikipedia as a start.

The Institute for Science, Engineering and Public Policy provided the impetus, and meeting place, for Wanderers in the first place.

That some of us would be focused on the impending farm worker shortage certainly stands to reason.

Monday, May 01, 2017

Screen Time

DSCF4101

We spend a lot of time with our screens don't we?  Internet or TV, consuming and/or creating.  Our level of media output has been rising exponentially I'd hazard, along with our ability to store it all.

Will the collective nervous system get too nervous?  We balance on a tightrope, afraid of falling, with so many clamoring for the more violent alternatives.  They want to see it in their lifetimes, whatever it is.

During our meetup tonight, over the wire, like a closed circuit TV show with chat window, I explained more about my own workflows, rendering out graphics that start out with Python code. A lot of my friends will use C and/or C++.

I wasn't a software engineer so much as a philosopher by training, and as a consequence I was on the lookout for patterns we could affordably capture with technology of that day, including data from heart procedures, feeding the medical research.  Statistics matter.

Shifting gears, I've been archiving "Gnome" Chomsky Youtubes to my Facebook profile.  Not a lot of them all at once, just a few. [1][2][3]
Not news: Gnome doesn't think 43 was in the loop on Nine Eleven. Not something I've ever claimed either and in fact I don't think continuing to read the Goat Book was a bad reaction. Stay calm, don't rush around like an idiot, which is what they seem good at in DC, lots of pin-balling betwixt one office and another in some panic. Caveat: this was awhile ago; I have no idea what Gnome's saying today exactly.
I was working through Pan's Labyrinth, on DVD, while taking a break from teacher prep.  That's a dark tale that got me catching up on the Spanish Civil War again.  One thing led to another and it was the Chechen Wars that got my attention.  We didn't start the fire, but nor have we succeeded in putting it out.

A theme in these blogs is the Bucky stuff could make a difference, but probably in back office philosophy and management at this point, the more outward forms coming from more recent generations, sometimes motivated by the American enlightenment, if we want to call it that.

Imperialism long ago alienated Samuel Clemens and William James.  These repeated wars against Asians were avoidable it seems, but for that sense of manifest destiny that drives many ethnicities.  Everyone seems to consider themselves chosen.

On a micro speck of a planet, ethnic differences seem somewhat trivial, to say the least. But upon zooming in, that tale told by an idiot gets taller and taller, becoming a giant soap opera at the other extreme. People need to be heroes. The vanity of the Captain in Pan's Labyrinth only makes him seem more of a monster.

The animations in that movie are pretty good, the faun, the fairies. I've not been able to directly produce anything of that quality. I was reminded of eXistenZ.

Synergetics could be an influence in some future animations.  I laid some groundwork with the "hypertoons" concept.  Check my Synergetics 101 playlist in my Youtube channel maybe?  They link to each other, gradually building up a memeplex worth sharing.

DSCF4606