Thursday, December 29, 2016

More Evangelism







Quaternions


A segue from Kenneth's atoms' rotations, patterns no doubt studied in Group Theory (not a physical science), would be to Quaternions, a mathematical device used to drive spatial transformations by iteration, much as rotation matrices get used.

A rotation matrix, recall, is an XY array of numbers set to "multiply" (__matmul__ in Python) with another matrix after it.  They don't necessarily commute (switched around, you get a different answer).  That "other matrix" may also be a target vector, where the rotation matrix is "pre-loaded" with just the right numbers to re-point it in a different direction.

A quaternion is a vector on steroids with more moving parts.  They'll multiply, much as complex numbers do in a plane (a flat surface), and thereby "spin" or "rotate" all the ways an avatar would need to, in a computer game.  They'll get the same work done as rotation matrices, but perhaps in a more elegant manner, using fewer lines of code?

These were the early days of the World Wide Web (1990s) and I'm chugging along reading about how game engines get built, and I find out some game-makers are using Quaternions to power their physics engines, and claiming to get faster frame rates, smoother performance, as a consequence.  "That's cool", I'm thinking, "as now I'll have running source code versions."

I like to "make math" not just read about it, and coding languages let me do that. Scott Gray, my future boss, had come to a similar conclusion using Mathematica (or Wolfram Language): some people learn better when they get to "make" or do "hands-on".


In this chapter, when the Web was young, the Java applet, embedded in your browser, run by the Java engine you'd have downloaded, was expected to be the king of the hill on the client side.  JavaScript, in contrast, was hardly taken seriously.  People would monkey around with it waiting for Java to assume its throne, but it never did.  JavaScript ended up taking a lot more responsibility.

The technology is still out there and serviceable though.  Java remains very important, even if the applet genre didn't take off.  Ahead of its time?  Remember a "headless browser" is just another thick client on your platform, and many of your smartphones are JVM devices, the ARM architecture having a native mode for its bytecodes.  I'm glad we have lots of talented coders ready to embrace those skills with open arms.  Python and Java are more synergetic than pitted against one another.

This other essay, which I'd tweeted about earlier, embeds the same Java applet, the quaternions cube, but is really more about the Python code I was then developing, to get on with my work in curriculum writing.  I ended up with a four-part series.


Now remember not to confuse "quaternions" with "quadrays" (same "qua" or "kwah" sound). The "quadays" are the four vectors from (0, 0, 0, 0) with the topology of a methane molecule (a central Carbon and four Hydrogens).  Linear combinations of these four vectors reach (span) all surrounding space with unique, canonical, non-negative four-tuple addresses. Rotation matrices apply. A variant addressing scheme balances negatives with positives in "sum to zero" format.

Monday, December 26, 2016

Design Science



from the mind of Kenneth Snelson

Sunday, December 25, 2016

Rogue One (movie review)

Spoiler alert:  no spoilers.  I'm not even going to talk about the film, much beyond agreeing with Alexia, who confirmed at the Hanukkah party, that it's certainly worth seeing, especially if already invested, time-wise.  Why not, right?

Instead of talking about the film, a great on-ramp if you're just coming into the series, its intent really, in addition to pleasing die-hard fans, I'm going to mount a soap box and make a point.

The point being:  if you want that ostensibly zero-gravity city you keep making movies about, with all these autonomous vehicles moving in every dimension, please reconsider beneath the ocean surface as the more readily accessible habitat for such cities to happen, versus the empty vacuum of space.

Yes, I know the pressures get high and we would worry about catastrophic ruptures, yet outer space, with its space junk and other mishaps, is likewise hostile.  Implosion and explosion are both violent.

With buoyancy compensating weights, moving around under the ocean as an affordable option to orbiting space-stations.  I'm not saying it's either / or, either, just I think humans have a lot more ahead of them on this planet than these landlubber civilizations of today.  Or could have, if they stick around, don't wimp out.

Tuesday, December 20, 2016

Library Science

My title is partly owing to where I'm posting this from: the Multnomah County Library.  Multnomahns are proud of their library system, much as Muscovites are proud of their subway (not that New Yorkers are not also, and Londoners of their tube).

These centrally located, downtown library facilities border on being grand without going over the line to grandiose.

Portland is a Pacific Rim capital at least (taking "capital" to mean "important terminus" or "destination"), so having carvings and sculptures going on is not "over the top".

Just checking the shelves under Computers (in the same room as Military, Social Issues, Crime, Law and Economics) I notice only a few Python titles, many more on PHP.  However that's not a good test of the extent of the collection.  For that information, one would consult the card catalog.

Finding only a few Python books on the shelves could be a sign that most are checked out, by people learning to code.  That's a good sign, not a cause for concern.

I was here yesterday as well, as the company I'm working for knows booking rooms in a public library facility, for meetings, is accepted use.

I checked out three books then:  two on statistics and probability, and one a history of Russians spying in America, given that's a hot topic in the headlines these days. However it focuses on a different, non-21st Century time frame.

The allegations in the news after the 2016 US presidential election are not so much that Russian spies had to come to the homeland to try tipping the election, meeting surreptitiously in parking lots or anything so surreal.  That kind of operation would have been more characteristic of the Reagan Era, per the popular TV show with that premise.  Rather, given Cyberia, the Russians might have given a green light to some mole within the DNC to release secrets to Wikileaks.

However disaffected party insiders might not need any prompting from a foreign power to serve as whistle blowers, so the accusations impress many as circumstantial to say the least.  Then we had those incidents of phishing, which spread well beyond the DNC.

The book I checked out was about spies a long time ago, though published in 2009. I don't have the title in front of me because I was concerned the library detection equipment might not distinguish between checked in and checked out, but of course it does, as I confirmed with the info desk.

One of the co-authors wrote The Haunted Wood, that much I know.  OK, that's enough info to figure it outSpies, the Rise and Fall of the KGB in America (ISBN-13: 978-0300123906).

Over the years, I've spent a lot of time browsing tomes in this Dewey Decimal section, reading books by or about spies.  I wouldn't say it's an obsession, as it maybe gets to be for some people.  One learns a lot from others' experience, understanding in advance these authors often have an agenda and spin their stories to the advantage of this or that team.  Same with movies.

Speaking of Python, a literal python bit me this morning, though it was entirely my fault.  I was handling the python's food and my finger got between me and it.  When there's no confusion, the python lets me handle it without a fight.  I'm way out of its league as potential prey, it's smart enough to know the difference.  My finger however, appears mouse-like.

Given the DNC is not officially part of the US government, extending any government protections to its servers, extreme vetting its personnel etc., would not be a job for the USG.  The USG needs to stay focused on what's properly its purview.  CBS News says the Pentagon needed to upgrade its secondary communications systems recently, and we learned earlier the CIA director might have been using AOL for something. These deficiencies are of the kind most appropriately addressed.

I don't see off hand why the the FBI needs to protect the DNC and/or GOP in some particular way, any more than it protects the Rotary Club or Boy Scouts of America.  In other words, the FBI should focus on protecting the vital organs of government, and then extend advice and training to the general public as a whole.

Saturday, December 17, 2016

Neighborhood Coffee Shop

Winterized

Dog's Life

Thursday, December 15, 2016

Technicalia

py2html

I poured a lot of hours into my free on-line Oregon Curriculum Network resources over the years.

I learned how to configure CGI scripts to run, meaning an URL like:

http://4dsolutions.net/cgi-bin/py2html.cgi?script=/ocn/python/x3dtoyz.py

...actually runs Python on the server.

In this case, py2html.cgi is something I grabbed for free, on-line, authored by Marc-Andre Lemberg of eGenix.com (Public License) and making use of Just van Rossum's PyFontify (Just is GvR's bro).

All this stopped working awhile back.  I wasn't too worried about it, as anyone wanting to see the source code in whatever target file still could.  py2html.cgi simply colorizes Python code while creating HTML, making it pretty to look at, but not what you'd cut and paste.

However it finally got to me that this feature was broken.  I wanted to fix it!

I think I must've tried fixing it before.  The permissions were off, too liberal.  I needed to chmod 711 *.cgi within the ssh shell.  That fixed some other simpler scripts right away, telling me I was on the right track.

But I'd still get a 500 error code from py2html.cgi.  Why?

Fortunately I could run this script directly, on the server, no CGI mode required and from doing that learned I had some Windows line endings corrupting the code -- plus another typo revealed in vim, a wayward backslash. The Linux shell complained of a python^M in the #! (shebang) line.

After the necessary dos2unix repair, which my provider has on tap, everything worked, I'm happy to say.

I pay money to keep these websites alive.  I was hoping to get more traction with the core essentials of Bucky Fuller's Synergetics as I understood them.  I've been on this track for a long time.

Unfortunately for me (and I'd argue for many others besides me), the ambient culture has not expressed much interest in such projects and the Fuller stuff has mostly fallen by the wayside.

A niche subculture keeps it going.

I mostly leave Synergetics on the Web unchanged (I added to the list of dome vendors last night, another adventure in oiling some rusty joints, dusting off old skills).  I think of it as part of the World Game Museum.

Monday, December 12, 2016

ToonTown Revisited

Oregon Historical Society

By "ToonTown" I mean Portland, Oregon. That's a meme in these blogs, many times visited.

In my futuristic mode, more utopian, the American Transcendentalists scattered about town storyboard their technical animations, around such as A & B, T & E and S modules, drawing from work more like my Heuristics for Teachers on Wikieducator.

However yesterday was past-ward looking.

Glenn and I hopped a 14 to the Oregon Historical Society building.  Admission to the three story museum is currently free to Multnomahns, just show some ID. That's to thank us for voting in a special tax to keep them funded, I forget which measure (not 97 obviously, which was defeated).

Gus Frederick has a full time job, however he's been pouring research hours into studying the life and times of Homer Davenport, as well as curating and republishing many of his cartoons, in annotated form.  In 2016, readers won't remember the contextualizing stories, so Gus provides a narrative.

Homer was a native of Silverton, Oregon, where Gus currently resides; he's from Waldo Hills originally, just four miles away. He's currently on the Silverton planning commission, and has a long track record of civic service.

Gus knows me through Wanderers, a group that's been meeting in Linus Pauling's boyhood home. We've taken in earlier versions of his talk, however an OHS presentation, complete with a splendid Comic Book City exhibit, has got to be the peak in some arc.

We enjoyed Dead Guy (the beer) at Rogue Nation (the brewery) afterwards. Gus introduce Mr. Stockton and I to his friend Jim Whitty (a Celtic name).  There's even an apocryphal story suggesting why Homer might actually be the dead guy referenced.

Homer was a darling of Hearst's, eventually, a media mogul with presidential aspirations whom Gus compared to Steve Jobs for his dynamism and ambition.  Homer came to draw for Hearst's papers by a circuitous route which Gus knows in detail.

He'd started out on the left coast, with San Francisco based papers.  In his old age he'd return to the San Diego area for a more retired life amidst theosophists. He brought the horses with him, over his wife's objections at the time (they had separated, she was contesting title).

Prior to retirement, having made a name for himself, a big one, he was able to travel about in the lecture circuit, a peer of Mark Twain's (they shared the same producer).  People avidly consumed lectures in those days, pre-television, pre-movies. Homer would draw as he lectured.

William McKinley was becoming president in an earlier chapter, and Homer, now based in New York City, satirized him as the smaller of two men in an ongoing melodrama. "Dollar Signs Hanna" represented the Trusts (corporations) in the face of the little guy, a polarizing axis around which US politics still turns to this day. Teddy Roosevelt was McKinley's veep.

However the popularity of those mocking cartoons was short lived as McKinley was assassinated in office.  From whitehouse.gov:
"Uncle Joe" Cannon, later Speaker of the House, once said that McKinley kept his ear so close to the ground that it was full of grasshoppers. When McKinley was undecided what to do about Spanish possessions other than Cuba, he toured the country and detected an imperialist sentiment. Thus the United States annexed the Philippines, Guam, and Puerto Rico.
Teddy Roosevelt took over, and although Homer had somewhat ridiculed him early on, for bringing some hunting trophies into the White House (Hearst was an animal lover and didn't like Teddy's ethics on that score), Homer and Teddy ended up getting along famously.  Both were extremely adventurous, which probably helps account for their affinity.

Homer Davenport was a horse fanatic or at least decided to become one when he finally had the acreage, in Morris Plain, New Jersey, and the means plus connections. He asked his friend Teddy for a favor, an introduction to Syrians who might hook him up with Arabian stallions (Syria was then part of the Ottoman Empire).

Having come highly recommended by the White House, Davenport was well received in Aleppo, and his seriousness about the horses ascertained to be sincere.  A caretaker came along with the deal, another story line.

The Davenport breed is still husbanded to this day, and the part of Mr. Ed, the talking horse of TV fame, was played by Bamboo Harvester, who traces directly back to the Arabians on one side.  Yes, like Steve Jobs, Mr. Ed was part Syrian.

I'm just scratching the surface of all of what Gus covered.  Studying history through the lens of political cartoons is informative.

Gus helped organize a whole floor of the museum in order to feature comic talents from this State.  Matt Groening's material (Simpsons etc.) is conspicuous by its absence -- too busy in this iteration.  Bill Plympton, Callahan, Basil Wolveton, Arthur Craven, Carl Barks and others, fill the vista with their works.  I hope this exhibit sparks many like it.  Lots for kids.  Interactive.

In the gift shop I found the Boilerplate literature, which reminds me of the animated fantasy Code Guardian, except that Boilerplate is retroactively placed in the time of Teddy Roosevelt. He's a robot, and a relatively recently invented character.

I'd like to have see Gus's talk on Youtube sometime.  He deserves a grant to pull together a full-fledged documentary.  I've left so much out of this hyper-abbreviated retelling.  Gus's actual talk was two hours worth of material, and richly insightful into what we today call the Gilded Age.

Friday, December 09, 2016

Sampling Python Tutorials

We're not exactly snowed in here, but it's nevertheless a slow day, with lots of melting ice.  Lots of Portlanders are on Facebook today.

I'm on that, and Youtube as well, plus I'm watching a DVD movie, Varian's War, in the living room in segments.  I'm letting that room run cold, and cocooning in other places.

Given my work as a Python teacher, I like to see what other teachers do when covering the same topics I do.  The collections.namedtuple type for example, I use that a lot, for Elements (as in atoms), within vectors (XYZ and quadray).

I also create Dog and Cat subclasses of Mammal, and use Unicode chess and playing card codepoints. I'm only just now getting around to Emoji. The overloading operators video gave me some clues.

Provided you're not struggling to read small type, neither of these are as uphill as say a David Beazely video.  We want a varied diet, sometimes peanuts, sometimes camel curry (just kidding, never tried it).



Printing Emoji on Mac OSX

Wednesday, December 07, 2016

At Berkeley (movie review)

Campus Life

I wasn't sure what to expect when grabbing this DVD, along with the Okinawa one, at Movie Madness. I thought maybe I'd get a trip down memory lane to scenes of student protests in the face of shows of state authority.  There's little if any archival footage of that variety.  The film is tightly focused on the present.

The central theme is the university's mission, to nurture California's public, which includes people from all walks of life, in the face of where the money is coming from to sustain operations.  The State of California has not kept up with Berkeley's explosive growth and no longer provides upwards of 40% of the funds.  The research side of the business has been fueling more of the budget, but comes with its own set of priorities.

The filmmaker's approach is to have students share directly, to each other, in class, and for the camera, regarding public policy, while having administrators do the same, in meetings.  Lets hear the voices of Berkeley as it figures out, as an institution, how best to roll forward.

From the student point of view, tuition has become an increasing chunk of change, with financial aid yielding student loans and scholarships.  Tuition is no longer free to qualified residents, as it is in some developing countries.

In fairness to the State of California, other outlets exist for spreading opportunity outside of funding a state university system.  Professional development, on the job training, as well as re-training, give people a boost, sometimes in a more focused way than do giant universities.

Students do stage a protest / walkout in this film, taking over the library.  This is one of the ways people make change happen, by staging events showcasing the passion and energy behind some cause or demand.  The general public understands "ceding to demands" and so the narrative moves forward.

Watching this back-to-back with Okinawa: The Afterburn was interesting, as a segment of the film focused on vets coming into the university system from the base system.  They come in with higher rank, further ahead than freshmen, and like some other ethnic minorities find themselves under the gun to perform in ways they've not had to before.  The challenge comes down more to the individual than to one's company or battalion.  Some sense an existential threat, others discover community in other vets.

How to make learning life-long, as well as on-line is the challenge of the 21st Century.  We need to see the base system (the military) as an educational endeavor, competing for public funding and attention with public universities, if we wish to see the greater public policy picture.  None of the discourse in this film is that zoomed out.  Base network military socialism, governed by a top-down command structure, is not intended to be democratic, though may coexist with democracies at least in theory (the USA was such an experiment).

Saturday, December 03, 2016

Radical Islam

Many Islamaphobic types (not what they call themselves necessarily) insist we use the word "radical" to describe the unabomber type terrorism-minded, not understanding our wish to keep the positive spin on "radical" we've always had ("wow, that's rad").

Radical Islam, or  √Islam for short, is more connected with Al Jabr (algebra - الجبر) and mosque design, wherein various roots of things express themselves in geometrical patterns.  √Christianity is also a positive.

Fundamentalist Islam is the type that clings to the false (phony) promises of various Imams regarding their own legitimacy and authority.  Christianity has its fundies too.  They tend to take a violent, extremist line, often involving some kind of End Times.

"Radical" is used by "the middle" (as in Middle Way) not just by extreme polarizers.  Accepting a positive spin on "radical" may seem politically incorrect to some ears.  Get used to it?  Do some homework, even a few math problems maybe?

Store Front

Thursday, December 01, 2016

Wonky Wall Street


The Wall Street Journal got a hold of this ancient Dymaxion Car prototype, and panned it.  So much for all that dymaxion crap right?  Don't forget the map.

Norman Foster, on the other hand, is less a cheapskate and built a brand new one from scratch, according to the original conception.  Believe it or not, it handles much better.

We talked about Dymaxion Cars at Wanderers on Tuesday.  I noticed some at the table had no clue what they were talking about -- not unusual in that setting.

Wall Street / LAWCAP has long disparaged Bucky by various memes, as chronicled in these blogs.  These infantile rants tend to postpone a day of reckoning another day our two.

Shareholders carry the burden of their own misguided ignorance.