Photospheres Away!

Photographers are notorious gear-heads. Everybody has a favorite lens, camera or tripod and, no matter how much gear we have, more is always better! Hey, somebody has to stimulate the moribund Obama economy. Gear lust is not entirely irrational. Good cameras really do take “technically” better pictures than mediocre or poor cameras but here’s the infuriating thing. Technical merit does not make the image!

Image quality depends of many things and changes over time. If you doubt this imagine you have an old locket that frames a Daguerreotype of your great-great-grandmother. I’d bet that every single portrait on your shiny new iPhone is “technically” superior to that old Daguerreotype but I’d also bet you’d chuck your iPhone before giving up that old Daguerreotype.  An image’s quality goes far beyond MTF curves and pixel counts.  Photography and geometry are both bereft of royal roads.

In the early days of photography gear was a serious constraint. Getting a good picture was a technical and artistic struggle. Imagine shooting a panorama using large glass plates covered with a home-brewed ASA 0.5, (you read that right ASA 0.5), blue light-sensitive emulsion. Despite such limitations early photographers managed to create some great images. Imagination and gumption have always been the most important photographic tools with good lenses as a distant third.  Well, the 150 year reign of the lens has ended, software has displaced the lens as the primary modern photographic tool and Google’s Photosphere cell phone application neatly demonstrates this technological shift.

A photosphere is a panorama on steroids. It’s a complete 360 degree look around image. The Google photosphere app derives from Google Maps street view. Street views are shot with special multi-lens cameras that look everywhere at once but some bright spark in Google realized that you could get roughly the same result from a single lens if the photographer was willing to endure a vertigo inducing dance. Shooting a photosphere takes at least three twirling 360 degree passes. You have to shoot the ground, horizon and sky.  It takes about twenty frames to build a photosphere.

There is nothing new about multi-frame panoramas. Photographers started shooting multi-frame panoramas shortly after the camera’s invention. I shot them when I was teenager. Panorama software isn’t new either; it’s been around for decades. Two “new” developments make photospheres possible: photosphere viewers and cameras (cell phones) that are more software than camera.

gert-driveway

I shot this panorama in the 1960’s. I rotated in my grandfather’s driveway shooting an entire roll of film with my Instamatic camera. Many years later I scanned the prints and used panorama software to stitch the images together. Click on the image for more panoramas.

The sphere cannot be mapped onto the plane without distortion. This mathematical fact limits how wide-angle your wide-angle shots can be before they are unnaturally distorted. A flattened 360 degree view of common rectilinear subjects looks wonderfully, or horribly, weird: straight lines become curves and areas lose proportionality. Many natural vistas can tolerate such torments but average street views cannot.  Photosphere viewers fix this problem by simulating how we look around.  Every time you browse a Google street view you are running a photosphere viewer.

Shooting panoramas and photospheres is like any other type of photography. It takes lots of practice! It was hard to “practice” shooting such images before cell phones could run stitching and viewing software because you couldn’t see what you had until you took your twenty frames back to the “lab” and tediously put them together.  Ten years ago panorama software required a lot of manual intervention. I spent hours putting three or four frames together. I didn’t put a twenty frame panorama together until I snapped my first iPhone Photosphere.

The iPhone lens is a pretty crappy short focal length lens. Any decent camera lens easily outclasses it yet I cannot shoot photospheres with my expensive Nikon’s while my cruddy little cell phone can.  What’s the difference?  Software!

iPhone Google photospheres are fun but they’re flaw ridden. You can easily see stitching errors, blending artifacts, ghost people, and other blemishes. Now that we can shoot photospheres the race is on to shoot quality photospheres! Software will dominate but hardware has to catch up to make this happen.  Before long you will be able to buy a special multi-lens photosphere ball camera that you can literally throw into the air. This ought to fix the viewpoint problem for people with good pitching arms and the rest of us can drop the little sucker from a drone. Photospheres away!

Panono Ball Camera

The Panono ball camera is a small multi-lens camera that shoots 360 photospheres by simultaneously capturing images from all its lens and stitching the result together. It is designed to be thrown into the air. Photosphere baseball is going to be huge!

Pandora’s Star: a Grand Sprawling Entertainment

pandoras-starIn my fevered youth I was an avid fan of science fiction but as I crossed the Rubicon of middle age I read less and less of the genre. For years I preferred nonfiction: mostly science with a smattering of history and biography. Then, about five years ago, I started reading science fiction again.

What kept me away? Most of the authors of my youth had died: Heinlein, Clarke, Asimov, Bradbury, Anderson, Herbert and Dick – all gone! I had to find new – to me – authors. I knew and loved Neal Stephenson, the author of Cryptonomicon, Diamond Age, Snow Crash, and Anathem, but after four or five thousand pages of Neal it was time to move on. My first post Stephenson, new to me, author was Iain M. Banks.

Banks specialized in what’s often called alien infested space opera. His universes are overflowing with life. Aliens are everywhere, inhabiting niches that most biologists would poo-poo as impossible. I prefer more empty and serene universes but Banks’ books like The Algebraist, Surface Detail, and Consider Phelbas whet my appetite for his crowded milieus. I was looking forward to following Banks for years but it wasn’t to be. Iain M. Banks died of cancer, at the ridiculously premature age of 59, leaving fans all over the word wanting. There is no greater outrage than mortality!

After Banks’ death I looked around for other operatic authors; it didn’t take me long to find Peter F. Hamilton and Pandora’s Star. Pandora’s Star is a huge, highly entertaining, example of what I call restrained science fiction.

Restraint is what separates science fiction from fantasy. Fantasy tolerates an anything goes mishmash of logical inconsistencies. Literature has a term for this: Deus ex machina. Modern fantasy is a veritable high-tech Deux ex machina factory churning out beta-male vampires that take implausible romantic interests in their food, prepubescent wizards jerking off in boarding school, (Oh it happened), fireproof maximum babes with pet dragons, and armies of oxymoronic brain-dead brain eating zombies. Only scripture piles on more logical nonsense than fantasy.

I enjoy fantasy as much as the next nerd but it’s not science fiction. Proper restrained science fiction admits a small number of “magic suppositions” but otherwise rigorously adheres to what we know about physical reality. You need some damn science in your science fiction people. The universe of Pandora’s Star presumes a few impossibilities; it assumes wormholes and faster than light (FTL) travel. FTL is a standard plot enabling device. Civilizations spanning thousands of light years simply cannot exist, on human time scales, without it. Pandora’s Star makes three more “impossible” assumptions which I will not divulge because ruining good books should be a capital crime. Aside from these allowed departures from reality the universe of Pandora’s Star sticks to scientific bricks and unfolds with lovely consistency.

Most science fiction writers make impossible assumptions but great ones take them in unexpected directions. Consider wormholes. Wormholes have been a staple of science fiction forever. Three, not entirely restrained, TV series had contemporary soldiers marching through them every week for years. They’ve popped up in every two-bit tale that needed quick point A to B plumbing. Wormholes are a cliché and their presence often signals unimaginative hackery. If you’re going to confront me with wormholes you better damn well show me something new or I’m outta your lame book. The opening chapter of Pandora’s Star is one of the most humorous and imaginative use of wormholes in science fiction. A few pages later Hamilton sends trains through wormholes. It’s Sheldon Cooper’s wet dream: trains in space. I had to smile and keep on reading. Pandora’s Star is a big book, almost one thousand pages, but like all great sprawling books it’s too damn short. Fortunately, there’s a second book, Judas Unchained,  that keeps the story rolling. I haven’t had this much fun with a science fiction since Dune. It’s that good.

 

There will never be a Literature of Reality

The first job of the myth maker is to shrink the universe. The shrinkage occurs along all dimensions: time, space and mind. You see this everywhere. Immortal vampires and wizards are, at most, a few thousand years old: younger than many real trees. Grand science fiction star empires seldom span a single galaxy in a universe of hundreds of billions. Time travelers never set their machines to zero or infinity; they have no interest in creation or ultimate ends. The demigods, super AI’s, and other transcendent beings brood unproductively, without original ideas, for millennia. Remember when Elrond reminisced about “being there” when Sauron was struck down three thousand Middle Earth years ago. In all that time the great, wise, and nearly immortal, elves of Middle Earth did not move beyond simple swords. How quickly the battle for Gondor would have gone with a few dozen Abrams tanks and a couple squadrons of Warthogs.

It’s hard to fault human authors for shrinking the universe. The real universe, the utterly vast and ancient universe slowly discovered by modern science, is beyond all human scales. Imagine a book that devoted one word to every star in the observable universe. The number of stars in the observable universe is a unit that has a name. It’s called a Sagan in honor of Carl Sagan. The Sagan is currently estimated to be around 7 x 1022.  Assuming there are one thousand words per page our book would have 7 x 1019 pages.

If we read nonstop at a rate of one hundred pages per hour it would take about 80 billion years, or six times the estimated age of the universe, to read this book. Yet, vast as this book is, it leaves out pretty much everything. There’s no mention of the Earth or other planets: so many pages and not even a Hitchhiker’s Guide to the Galaxy’s “mostly harmless.” Reality overwhelms imagination. The magic of Harry Potter is piffle compared to cosmic inflation. Haldane was right. The universe is probably queerer than we can imagine and certainly deeper than we can grasp. Our meager fictions must float in serene little bubbles lest they overrun our short impatient lives. There will never be a literature of reality.

Parsing the Bitcoin Genesis Block with J

The genesis block is the first block on the Bitcoin blockchain. Satoshi Nakamoto, the mysterious entity that created Bitcoin, mined the genesis block on January 3, 2009. It’s been five years since the genesis block’s birth and Satoshi is still unknown, Bitcoin is bigger than ever, and the blockchain is longer than 300,000 blocks and growing.

One of the most important features of the blockchain is its immutability. After the Bitcoin network accepts a block and adds it to the blockchain it can never be altered. This makes Bitcoin blocks rare durable binary artifacts. The cryptographic hash algorithms that underpin the Bitcoin protocol enforce block immutability. If someone decides to tinker with a block, say maliciously flip a single bit, the block’s hash will change and the network will reject it. This is what makes it almost impossible to counterfeit Bitcoins. Bitcoins have been lost and stolen but they have never been successfully counterfeited. This sharply contrasts with funny money like the US dollar that is so routinely and brazenly counterfeited that many suspect the US government turns a blind eye.

The exceptional durability of Bitcoin blocks, coupled with the mysterious origins of Bitcoin, makes the genesis block one of the most intriguing and important byte runs in the world. This post was inspired by the now defunct post 285 bytes that changed the world. I would love to give you a link but this post has vanished. A secondary, but excellent reference is John Ratcliff’s How to Parse the Bitcoin BlockChain. I am adapting John’s nomenclature in what follows.

When programmers start exploring Bitcoin they often cut their teeth on parsing the genesis block. If you Google “blockchain parsing” you’ll find examples in dozens of programming languages. The most popular are C, C++, Java, PHP, C#, JavaScript, and the rest of the mainstream suspects. What you will not find, until now, are J examples.

So what does J bring to the table that makes yet another genesis block parser worth a look? Let’s take a look at Bitcoin addresses. The following is the Bitcoin address of this blog’s tip jar. Feel free to send as many Satoshis and full Bitcoins as you like to this address.

   tip=. '17MfYvFqSyeZcy7nKMbFrStFmmvaJ143fA'

There is nothing deep or mysterious about this funny string of letters; it’s just a plain old number in Bitcoin base 58 clothing. So, what is this number in standard format? Here’s how it’s calculated with J.

   BASE58=. '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
 
   dfb58=. 58x #. BASE58 i. ]
 
   dfb58 tip
 1709618896654985460726422911112500711652231559804656492485

The second line that defines dfb58, (decimal from base 58), is the complete J program! That’s it folks. You can troll the internet for days looking at base 58 to big integer converters and it’s unlikely you will find a shorter or more elegant conversion program. Not only is the J version short and sweet it’s also fast and versatile. Suppose you wanted to convert ten thousand Bitcoin addresses. The following converts ten thousand copies of tip.

   dfb58 10000 # ,: tip
 1709618896654985460726422911112500711652231559804656492485 17096188966549854607264...

At this point fanboys of mainstream programming languages typically pipe up with something like, “changing number encodings is inherently trivial; what about something more demanding like going the other way, say converting Bitcoin public keys to the base 58 address format?”

The public key in the genesis block is encoded in what many call the “challenge script.” Here is the genesis block’s challenge script in hex.

41 04 67 8A FD B0 FE 55 48 27 19 67 F1 A6 71 30 B7 10 5C D6 
A8 28 E0 39 09 A6 79 62 E0 EA 1F 61 DE B6 49 F6 BC 3F 4C EF 
38 C4 F3 55 04 E5 1E C1 12 DE 5C 38 4D F7 BA 0B 8D 57 8A 4C 
70 2B 6B F1 1D 5F AC

Public keys take a number of forms in the blockchain. John Ratcliff’s post summarizes the many forms you will run into. The genesis block uses the 65 byte ECDSA form. Converting this form to base 58 requires taking SHA-256 and RIPEMD-160 hashes. These hashes are available in OpenSSL which is conveniently distributed with J 8.02 JQT. Here’s how to convert the genesis block’s public key to base 58 with J.

   load 'c:/bitjd/scripts/sslhash.ijs'

   Base58frKey65=:3 : 0

   NB.*Base58frKey65 v-- 65 byte public Bitcoin key bytes to base 58.
   NB.
   NB. monad:  clB58 =. Base58frKey65 clBytes

   ekey=. (0{a.) , sr160 s256 y
   csum=. 4 {. s256 s256 ekey
   Base58Check ekey,csum
   )

   Base58frKey65 }. }: ChallengeScript
 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa

The ChallengeScript noun holds the bytes given in hex above. The verbs sr150, s256 and Base58Check are available in the J scripts sslhash and ParseGenesisBlock that I have put in the jacks repository on GitHub.

The following J verb ParseGenesisBlock reads the first full node Bitcoin block file and then extracts and checks the genesis block. ParseGenesisBlock tests the various verbs, (functions), it employs. As a side effect it clearly describes the layout of the genesis block and provides test data for anyone that’s interested.

If this post peeks your curiosity about J a good place to start learning about the language is the recently released New Dictionary of J. You can download a version of J for Windows, Linux, OS/X, IOS, and Android at Jsoftware’s main site.

ParseGenesisBlock=:3 : 0

NB.*ParseGenesisBlock v-- parse and check Bitcoin genesis block.
NB.
NB. monad:  clMsg =. ParseGenesisBlock clBlockFile
NB.
NB.   file=. 'c:/bitjd/blocks/blk00000.dat'
NB.   ParseGenesisBlock file

NB. fetch genesis block data
dat=. read y

NB. first 4 bytes are "sort of" block delimiters
MagicID=: (i. offset=. 4) { dat
'MagicID mismatch' assert 'F9BEB4D9' -: ,hfd a. i. MagicID

NB. next 4 bytes gives following block length
offset=. offset + 4 [ BlockLength=: _2 ic (offset + i. 4) { dat
'BlockLength mismatch' assert 285 = BlockLength

NB. next 4 bytes block format version - has changed
offset=. offset + 4 [ VersionNumber=: _2 ic (offset + i. 4) { dat

NB. next 32 bytes is previous block hash - genesis block
NB. has no previous hash and all bytes are set to 0
offset=. offset + 32 [ PreviousBlockHash=: (offset + i. 32) { dat
'PreviousBlockHash mismatch' assert (32#0) -: a. i. PreviousBlockHash

NB. next 32 bytes is the Merkle tree root hash
offset=. offset + 32 [ MerkleRoot=: (offset + i. 32) { dat
grh=. '3BA3EDFD7A7B12B27AC72C3E67768F617FC81BC3888A51323A9FB8AA4B1E5E4A'
'MerkleRoot mismatch' assert grh -: ,hfd a. i. MerkleRoot

NB. next 4 bytes is a unix epoch timestamp - rolls over 7th feb 2106
NB. there is no timezone information - it is interpreted as utc
offset=. offset + 4 [ TimeStamp=: _2 ic (offset + i. 4) { dat
'TimeStamp mismatch' assert 2009 1 3 18 15 5 -: ,tsfrunixsecs TimeStamp

NB. next 4 bytes represents block target difficulty
offset=. offset + 4 [ TargetDifficulty=: _2 ic (offset + i. 4) { dat
'TargetDifficulty mismatch' assert 486604799 = TargetDifficulty

NB. next 4 bytes is a random number nonce
offset=. offset + 4 [ Nonce=: (offset + i. 4) { dat
'Nonce mismatch' assert '1DAC2B7C' -: ,hfd a. i. Nonce

NB. next 1 to 9 bytes is the transaction count stored as a variable length integer
NB. see:  https://en.bitcoin.it/wiki/Protocol_specification#Variable_length_integer
offset=. offset + vlen [ 'vlen TransactionCount'=: vint (offset + i. 9) { dat
'TransactionCount mismatch' assert TransactionCount = 1  NB. (*)=. vlen

NB. next 4 bytes transaction version number
offset=. offset + 4 [ TransactionVersionNumber=: _2 ic (offset + i.4) { dat
'TransactionVersionNumber mismatch' assert 1 = TransactionVersionNumber

NB. next 1 to 9 bytes is the number of transaction inputs
offset=. offset + vlen [ 'vlen TransactionInputNumber'=: vint (offset + i. 9) { dat

NB. next 32 bytes is the hash of the input transaction
offset=. offset + 32 [ TransactionHash=: (offset + i. 32) { dat
'TransactionHash mismatch' assert (32#0) -: a. i. TransactionHash

NB. next 4 bytes is the input transaction index
offset=. offset + 4 [ TransactionIndex=: _2 ic (offset + i. 4) { dat
'TransactionIndex mismatch' assert _1 = TransactionIndex

NB. input script length is next
offset=. offset + vlen [ 'vlen InputScriptLength'=: vint (offset + i. 9) { dat
'InputScriptLength mismatch' assert 77 = InputScriptLength

NB. script data
offset=. offset + InputScriptLength [ InputScript=: (offset + i. InputScriptLength) { dat

NB. sequence number 4 bytes
offset=. offset + 4 [ SequenceNumber=: ,hfd a. i. (offset + i. 4) { dat
'SequenceNumber mismatch' assert 'FFFFFFFF' -: SequenceNumber

NB. output count 1 to 9 bytes
offset=. offset + vlen [ 'vlen OutputCount'=: vint (offset + i.9) { dat

NB. output value - number of satoshis sent
offset=. offset + 8 [ OutputSatoshis=: (offset + i.8) { dat  NB. 64 bit unsigned integer
'OutputSatoshis mismatch' assert '00F2052A01000000' -: ,hfd a. i. OutputSatoshis
OutputSatoshis=: ]`(_3&ic)@.IF64 OutputSatoshis

NB. challenge script length
offset=. offset + vlen [ 'vlen ChallengeScriptLength'=: vint (offset + i.9) { dat
'ChallengeScriptLength mismatch' assert 67 = ChallengeScriptLength

NB. challenge script - contains elliptic curve signatures
offset=. offset + ChallengeScriptLength [ ChallengeScript=: (offset + i. ChallengeScriptLength) { dat
'ChallengeScript mismatch' assert GenesisBlockChallengeScript -: ,hfd a. i. ChallengeScript

NB. challenge script is 67 bytes drop first and last byte to
NB. compute the familiar Bitcoin base 58 address - compare with block explorer
NB. http://blockexplorer.com/block/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
OutputAddress=: Base58frKey65 }. }: ChallengeScript
'Genesis Block address mismatch' assert GenesisBlockOutputAddress -: OutputAddress

NB. last 4 bytes lock time
TransactionLockTime=: (offset + i.4) { dat
'TransactionLockTime mismatch' assert 0 0 0 0 -: a. i. TransactionLockTime

'Genesis Block Parsed and Checked'
)

JOD Update: J 8.02 QT/JHS/64 bit Systems

JOD LogoI have pushed out a JOD update that makes it possible to run the addon on J 8.02 systems. In the last eight months a QT based J IDE has been developed that runs on Linux, Windows and Mac platforms. To maintain JOD’s compatibility across all versions of J from 6.02 on I had to tweak a few verbs.

The only significant changes are how JOD interacts with various J system editors.  I have tested the system on Windows  J 6.02, J 7.01, J 8.02, and Mac J 7.01 systems. I expect it will behave on 32 and 64 bit Linux systems from J 7.01 on, but I have yet to test these setups. My hardware budget limits my ability to run common variants of Windows, Linux and Mac systems.

JOD is still not complete; that’s why the version number has not been bumped past 1.0.0. The missing features are noted in the table of contents of jod.pdf, (also available in the joddocument addon), with the suffix “NIMP,” which means “not implemented.”  I will fill in these blanks as I need them. Most of the time JOD meets my needs so don’t hold your breath.

If you want to make your own additions to JOD the program and documentation source is available on GitHub. Just follow the links and enjoy.

As a last note: I will be at the J Conference in Toronto (July 24 and 25, 2014) where I will be giving a short presentation and handing out a few hardcopy versions of the JOD manual to one or two JOD fans.

Your Bitcoins are Now Welcome!

Recently Coinbase introduced payment pages. Here’s my page. Payment pages simplify the process of paying with Bitcoins. In the last six months more and more businesses have started accepting Bitcoins. Once people get cryptocurrencies they inevitably start questioning the legitimacy of national currencies. This is all good. National currencies are part of the past.  It’s embarrassing to trade debased presidents or unnecessary queens for goods.

I now pay online fees with Bitcoins when I can. I am doing this for three reasons.

  1. Bitcoin payments are orders of magnitude more secure than credit cards, PayPal or other online payment methods. When you pay with Bitcoins you don’t spread personal information around. Bitcoin is a nightmare for identity thieves.
  2. I want to encourage the widespread adoption of Bitcoin as a payment technology. The entire parasitic financial class must be reformed or destroyed. A good way to kill something is to cut off its air supply. When you use credit cards a big cut goes to banks. Why enrich what you hate? Bitcoin, and its brethren, will help suffocate traditional banks and their despicable government cronies.
  3. The era of government backed legal tender is drawing to an end. Money is way to important to allow governments to control it. Abominations like the Federal Reserve are as obsolete and morally repugnant as slavery.

To help bring about the glorious day when shitheads in government no longer create money out of thin fucking nothing and give it to their bum buddies I am encouraging all of you to start using cryptocurrencies. You can start by tipping moi!

Review: Finding Vivian Maier

I suffer from SLAM (Spouse that Likes Art-house Movies).  I’m sure you’re familiar with this common affliction. It strikes when you want to see Spider-Man 2 but, because you dearly love your spouse, you settle on some “uplifting work of art” that can only be seen in a cramped, look around the pretentious fathead ahead in front of you, dingy art-house cinema. SLAM suffers get a break in St. Louis; there are only two art-house cinemas and their usual yard-sale like fare is dull even by art-house standards. But, as any yard-sale addict will tell you, there are diamonds in the debris and Finding Vivian Maier is a gem.

vivian-maier-small

Vivian Maier 1956. Vivian enjoyed self-portraits and mirrors. This is not vanity. All photographers fall prey to self-reflections. I am certainly guilty.

Finding Vivian Maier is a documentary about a great street photographer, Vivian Maier (1926 –2009) that you have probably never heard of. I had never heard of her and I’m a keen amateur photographer with a nagging interest in the history and technology of photography. I’ve read all three of Ansel Adams classic camera books, plowed through many giant histories of photography, and endured as many Photoshop and image restoration tomes as I can stomach.  I’m not an artist; I’m a technisté! A technisté is someone who has technical artistic skills but is not phony enough to be an artiste. Vivian Maier is an anti-technisté. She’s a true photographic artist that showed astonishingly low levels of interest in the craft and technology of photography.

Her story, as one lady in the film noted, is more interesting than her work. Nobody had heard of Vivian before 2007. She isn’t mentioned in giant histories of photography published before 2007 so it’s not surprising I missed her. She worked most of her life as a nanny. She didn’t hang around with other photographers and she apparently never made a serious effort to show her photographs. Even stranger, she rarely printed her pictures and shot thousands of frames that she never developed. She must have been content to look at her negatives if even that. This astounds me!  I cannot tell if I have a good shot until I “develop” it.  For most of her long life she snapped away in the background and it’s likely that her astonishing body of work would have vanished if John Maloof hadn’t bought a lot of her negatives at an auction in 2007.

For Vivian the act of capture sufficed and what wonderful captures they are. Her work is being exhibited around the world. I will certainly be looking out for the next show coming my way. You can see some of her pictures here and, for those of you that care, Finding Vivian Maier is much better than Spider-Man 2.

Marcus Aurelius tunes my RSS Feeds

emperors-handbookThe Emperor’s Handbook is a new translation of Marcus Aurelius’ classic The Meditations. Marcus Aurelius was a second century Roman emperor and stoic philosopher. You probably know him as the old guy (Richard Harris) that chose Maximus (Russell Crowe) as his successor in Gladiator.  Marcus is counted among the “five good Roman emperors” [1] and his Meditations has been hailed as the single best book ever written by a major ruler. Nowadays every semi-literate hack that’s held office dumps memoirs. The more vacuous excrete before holding office! While political autobiography is usually the vilest form of pornography and begs the question; is book burning all bad?  There are exceptions and The Meditations is a magnificent example.

The Emperors Handbook is a sequence of short notes. Some are sentences like:

Not knowing what other people are thinking is not the cause of much human misery, but failing to understand the workings of one’s own mind is bound to lead to unhappiness

How shameful and absurd it is for the spirit to surrender when the body is able to fight on!

What is useless for the hive is of no use to bee.

Others take a page or two. It’s not clear that Marcus intended to “publish” his notes and this may partly account for their frank and honest elegance. I don’t read ancient Greek, the language Marcus used to compose his notes, so I cannot judge his original style but the Hicks brother’s English translation is an absolute delight.  I often found myself rereading passages aloud to fully savior Marcus’s phrases; they ring like poetry and tell like prose.  This guy would crush modern Internet trolls!

The most striking thing about Marcus’s passages is their stark modernity. If you ignore the allusions to multiple gods and references to 2nd century contemporaries many of Marcus’s 1,800 year old notes might have been composed yesterday. The following would not be out-of-place in the preamble of any modern mathematical logic text.

Reason and logic are governed by their own laws and employ their own methods. They launch themselves at will, and they head straight for their target. This is why we call actions that seem to us reasonable and logical “right,” because they are right on target.

Of course the real measure of any work is: does it change the way you think and act? A lot of Marcus’s stoic advice will be hard for us. He repeatedly stresses the importance of playing your part in the greater scheme of things. In his view the universe is either meaningless atoms smashing together or it’s arranged by providence. If the first case holds then we should play our part because we are social beings and need the cooperation and support of others to fully prosper. If the second holds then we should strive to find our designated purpose and execute it to the best of our abilities. Either way we should do our duty without whining.  A stoic man’s “got to do what a man’s got to do.”

I’m more of a skeptic than Marcus, and I have the benefit of 1,800 more years of history and science to drawn on, so until there is overwhelming, ultra-hard, fully repeatable, and independently verified scientific evidence to the contrary, it’s almost certain that life is meaningless and random! The “atoms” that smash together in the 21st century have a richer taxonomy than their hypothetical 2nd century antecedents but they are just as meaningless. The notion that we have a duty or purpose is ludicrous. We are, as Richard Dawkins wrote in the Selfish Gene long ago, robots evolved to propagate genes. And, as many have noted, it’s not clear that “intelligent robots” are ideal for gene propagation: bacteria and ants are doing a better job. I cannot accept the unsubstantiated notion of duty so I will not play my alleged part. The greater scheme will have to manage without me.

Though I reject “duty” I still find much of use in The Meditations. Of great value is Marcus’s long view.

Camillus, Caeso, Volesus, Dentatus and to a lesser degree Scipio and Cato, and yes, even Augustus, Hadrian and Antoninus are less spoken of now than they were in their own days. For all things fade away, become the stuff of legend, and are soon buried by oblivion. Mind you, this is true only for those who blazed once like bright stars in the firmament, but for the rest, as soon a few clods of earth cover their corpses, they are “out of sight, out of mind.”

That pretty much sums up my approach to the Obama administration. Marcus also has sound advice on Internet filtering.

Bear in mind that the measure of a man is the worth of the things he cares about.

If you find something predictable and shrill do a quick calculation. Does the signal justify enduring the noise?  I went through my long list of Feedly RSS feeds and deleted two prominent sources of noise:  The Raw Story and Breitbart. These sites are loud practitioners of look at this idiot journalism. One side is predictably far left-wing and the other is predictably far right-wing. Occasionally they cough up something worth a look but usually their articles, and attending moronic troll infested commentary, is a complete waste of time. Is such drivel worthy of my gaze? Applying Marcus’s rule I had to cut them loose. Thank you Marcus for pruning my RSS feeds.

[1] Most Roman emperors were brutal corrupt monsters.

What’s the opposite of Transcendence?

johnny-depp-transcendenceSerious science fiction is a demanding cinematic genre; that’s why you see so little of it!  Most of what passes for science fiction is out-and-out comic fantasy. In the last year only three marginally serious science fiction films made it to wide release:  Catching Fire, Divergent and Transcendence.  Sadly, they’re all pretty awful and Transcendence is the biggest letdown of the three. Here’s why.

Transcendence is another riff on real AI.  Even though we live in a world of talking cell phones and computer Jeopardy champions a sizeable cohort of AI deniers claim machines will never think.  The best answer I’ve heard to this came from a young woman who noted that, “I am a machine and I think.”  Well I am thinking machine too and until there are serious scientific or mathematical arguments demonstrating that minds cannot, even in principle, be simulated by computations, assuming intelligence is algorithmic remains our best working hypothesis. Transcendence gets all this right. None of the characters in Transcendence go on about whether real AI is possible. Even the fearful anti-AI faction takes it as a given; it’s what they are afraid of.

If intelligence is algorithmic then it follows that we are nothing more than programs trapped in messy hardware. Separating hardware and software is one of the glories of our age.  We take it for granted that if we change the software we change the machine. The other day I killed off my old WinXP laptop and then resurrected it as a Mint Linux device. The hardware is the same but the machine is very different. We cannot do this with brains — yet.  The software that makes you, you, is regrettably entwined with the hardware that runs you. Nature has evolved better intellectual property protection than a division of parasitic IP lawyers. One of the great challenges of our age is breaking down nature’s intellectual property protection and reading out the software in brains. Transcendence also gets all this right. The best part of the film involves uploading a dying Will Caster, (Johnny Depp), into a bank of quantum computers. [1]

Up until Will goes live on his quantum cores Transcendence is a fine film. I kept pinching myself thinking: they’re not screwing it up or dumbing it down. This might be great.  Then my hopes were crushed. Before Will went all quantum supercomputery he gave a TED’ish talk pointing out that when real AI arrives it will have more raw intellectual capacity than all human brains combined.  When transcendent beings emerge in stories the plot often goes straight to pot. This is not a new artistic problem. It’s so common in science fiction that I even have a name for it: the superior being problem.

Depicting superior beings poses fundamental problems for feeble brained naked ape authors. Look at what a moron God is in the first few books of the Bible. Scores of fine science fiction novels have been trashed by trying to imagine what truly superior beings would think and do. The only approach that works is oblique. You can suggest the workings of superior minds. 2001: A Space Odyssey is a classic example of doing this right, but for reasons that escape me, many authors take on the inner life of superior minds only to show their own rather mediocre ones. Transcendence didn’t even make an honest effort to deal with the superior being problem: what a disappointment. Instead of enjoying new ideas I spent the rest of Transcendence wondering why our transcendent protagonist was such a dolt. Not really the transcendent experience I was looking for.

[1] The jury is out on the feasibility of practical quantum computers. If quantum computers can be made to work they will solve certain classes of problems faster than conventional machines but, and this is a big but, they will not expand the notion of what’s computable. It’s rather amazing that what’s computable has not expanded since Turning’s great theorems of the 1930’s.