Monday, June 18, 2018

Damn straight there's a moral equivalence here

Germany, 1945:




The United States of America, 2018:



It's true, the kid in the second picture is not being sent to the gas chambers (yet).  But here's the thing: she doesn't know that!  This kid is two years old.  All she knows is that her mother is being taken away, and she may or may not ever see her again.

The government of the United States of America has run completely off the rails, and it has done so at the behest of its president, Donald J. Trump.  There is no law requiring children to be separated from their parents.  Donald Trump says there is, and he says that this non-existent law has something to do with Democrats, but as with nearly everything that comes out of his mouth, these are lies.  Children are being treated inhumanely because Donald Trump wants it that way.  He's using them as a kind of sick bargaining chip.

Donald Trump is able to do this because Republican members of Congress fear losing their jobs if they stand up to him, and not without cause.  Ultimately, Trump's power is rooted in tens of millions of American citizens who support him, whether tacitly or overtly.  If you are one of them, remember: this kid is two years old.  She may be here illegally (or maybe not -- a lot of these immigrants are legally seeking asylum) but she doesn't know that.  What is being done to her is monstrous, and it is ultimately possible only because of you.  If you vote Republican this November, the damage to these innocent kids' psyches, and the blood that is shed when they are shipped back to the gang-infested countries they fled from, will be on your hands.

Saturday, June 16, 2018

Suffer the little children

Nothing illustrates the complete moral and intellectual bankruptcy of Donald Trump's supporters, apologists, and enablers better than Jeff Sessions's Biblical justification for separating children from their families:
“I would cite you to the Apostle Paul and his clear and wise command in Romans 13, to obey the laws of the government because God has ordained the government for his purposes,” Sessions said during a speech to law enforcement officers in Fort Wayne, Ind. “Orderly and lawful processes are good in themselves. Consistent and fair application of the law is in itself a good and moral thing, and that protects the weak and protects the lawful.”
Perhaps Sessions has forgotten that the Holocaust was conducted entirely in accordance with German law?  Or that American slavery was likewise according to law (and Biblically justified by the very same passage that Sessions invoked)?  Or that Otto Warmbier was tortured to death in strict accordance with North Korean law?  Or is he seriously suggesting that it is the Will of God that we meekly accept these atrocities?

I'm frankly surprised that Sessions decided to invoke Romans rather than Mark.  After all, Jesus himself says that the little children should suffer.  If you're going to pervert the message of the Bible why not go all-in?

Wednesday, June 13, 2018

Trump makes it look easy

One has to wonder, after Donald Trump's tidy wrapping-up of the North Korea situation (he did everything short of come right out and say "peace for our time!"), what all the fuss was ever about.  It took only a few months (or forty minutes, depending on how you count) to go from the the brink of nuclear war to BFFs.  Today the U.S. seems to be getting along better with North Korea than with Canada (or, frankly, any western nation).  If dealing with North Korea was that easy, why hadn't anyone done it before?  Maybe Donald Trump really is the master negotiator he portrays himself to be?

Um, no.  The outcome of the Singapore summit is just another Trump flim-flam, and not just because the only tangible result it produced was a major unforced error by the U.S.  Imagine if Barack Obama had done what Trump just did.  The exact same words spoken, the exact same outcomes.  What would be the Republican's response?

Happily, we don't have to imagine it.  We know exactly what their response would be, because we know what their response was when Obama produced an actual verifiable deal for Iran to give up its nuclear weapons.  They were absolutely apoplectic about that.  It was a terrible deal!  So bad that it had to be unilaterally torn up and re-started from scratch.

But the North Korea non-deal?  The unilateral cessation of war games with no corresponding concessions from the North Koreans?  The Orwellian re-writing of North Korea's atrocious human rights record?  That is masterful statecraft.  Because that was done by Trump and not Obama!

There was a time when politicians put country before party.  In the 1970s, Congress overrode Richard Nixon's veto to pass the Clean Water Act.  (Imagine that happening today!)  Then a few years later, the Senate voted 77-0 to establish a select committee to investigate the Watergate scandal.  (Ditto!)  Donald Sanders, the man who discovered the existence of the Watergate tapes and arranged for that knowledge to become public, without whom we would never have known that Richard Nixon was, in fact, a crook, was a Republican.

Those days are long-gone.  Today's Republicans stand for party loyalty over country, over the truthueber alles.  Everything Obama did is bad.  Everything Trump does is good.  Never mind the actual merits, what matters is that Trump "succeeded" where all of his predecessors failed.  Especially Obama.  Oh yes, especially that illegitimate un-American Muslim-loving Barack Husssssssein Obama!  Thank God that nightmare is finally over!

Sunday, June 10, 2018

If the shoe fits

Fox-and-Friends host Abby Huntsman, in a rare moment of lucidity, today referred to the upcoming summit between Donald Trump and Kim Jong Un as "a meeting between two dictators".

The best part is that nobody on the show seemed to notice, perhaps because there is such a thick pile of lies and self-deceptions that Trump apologists have to keep track of that sometimes the truth can slip through the cracks.

Wednesday, June 06, 2018

PSA: Blogger comment notifications appear to be kerfliggered

I normally get an email notification whenever anyone posts comment here, but I just noticed that this feature doesn't seem to be working any more.  I hope this is temporary, but I wouldn't bet my life savings on it.  I don't think the Blogger platform is a top priority for Google.  So until I can figure out what to do about it just be aware that I might not be as responsive to comments as I usually am.  It's not because I don't love you any more.

Tuesday, June 05, 2018

SCOTUS got the Masterpiece Cake Shop decision badly wrong

The Supreme Court issued its much-anticipated decision in the gay wedding cake case yesterday.  It hasn't made as much of a splash as expected because the justices tried to split the baby and sidestep making what might otherwise have been a contentious decision.  But I think they failed and got it wrong anyway.

The gist of the ruling was that Jack Phillips, the cake shop owner, wins the case because the Colorado Civil Rights Commission exhibited "hostility" towards Jack Phillips religion when its members failed to contest the following statement made by one of its members:
I would also like to reiterate what we said in the hearing or the last meeting. Freedom of religion and religion has been used to justify all kinds of discrimination throughout history, whether it be slavery, whether it be the holocaust, whether it be—I mean, we—we can list hundreds of situations where freedom of religion has been used to justify discrimination. And to me it is one of the most despicable pieces of rhetoric that people can use to—to use their religion to hurt others.
About which the Court's opinion says:
To describe a man’s faith as “one of the most despicable pieces of rhetoric that people can use” is to disparage his religion...
But the statement does not describe Jack Phillips faith as  "one of the most despicable pieces of rhetoric that people can use."  What is despicable is not Phillips's faith, it is the use of that faith to hurt others which is being said to be despicable.  (And it is.)

The opinion goes on:
The commissioner even went so far as to compare Phillips’ [sic] invocation of his sincerely held religious beliefs to defenses of slavery and the Holocaust. This sentiment is inappropriate for a Commission charged with the solemn responsibility of fair and neutral enforcement of Colorado’s anti- discrimination law—a law that protects discrimination on the basis of religion as well as sexual orientation.
Again, it is very important to distinguish between two very different things.  It would indeed be inappropriate to compare Phillips's specific claim to slavery or the holocaust.  There is absolutely no moral equivalence there.  But again, that is emphatically not what the CCRC commissioner's statement says.  That statement is making the general observation that, historically, atrocities have been justified on religious grounds.  And that is simply a fact.

Ultimately this opinion is a reflection of Christian Persecution Complex, the unfounded belief held by many Christians in the U.S. that the mere existence of public critiques of Christianity is an attack and potentially an existential threat.  To say that Christianity was overtly used as a justification for slavery in the U.S. is disparagement and conclusively indicative of covert and nefarious bias, never mind that this is in fact demonstrably true.  The First Amendment apparently protects people from hearing anything unpleasant said about their religion by a government agent, even if those things are factually correct.

I do respect the Court's attempt to thread the needle here and come up with an inclusive ruling that would leave neither gays nor Christians out in the cold.  Unfortunately, it's simply not possible in this case.  The sad fact of the matter is that Jack Phillips and his ilk are simply on the wrong side of both history and morality, just as the defenders of slavery and segregation were in their day.  There is nothing wrong with being gay, just as there is nothing wrong with being black.  Discriminating against gay people is every bit as wrong as discriminating against dark-skinned people, notwithstanding anything you may believe, however sincerely, about what God has to say about it.

Thursday, May 24, 2018

Blame where it's due

I can't say I'm even a little bit surprised that the summit with North Korea has fallen through.  I wouldn't even bother blogging about this except that back in April I expressed some cautious optimism that maybe, just maybe, Trump's bull-in-the-china-shop tactics could be working.  Nothing makes me happier than having my pessimistic prophecies be proven wrong, but alas, Donald Trump seems to be every bit as catastrophically incompetent and destructive as I feared.

Let's take stock: a year and half into his presidency the number of foreign policy deals closed by this supposed master negotiator is... zero.  But he has, however, apparently succeeded in strong-arming the NFL into joining him in his perversion of patriotism and evisceration of the first amendment.

I would say that Trump is all hat and no cattle, except that in this case it would be an insult to hats.

[UPDATE] Have I changed my mind now that the on-again off-again summit is (apparently) on again?  No, I have not.  Why?  Because by keeping his cool, not throwing a temper tantrum, and not offering any major concessions, Kim called Trump's bluff.  And Trump, by reinstating the summit without extracting any major concessions from Kim, folded like a cheap suit.  Now Kim knows that Trump desperately wants a deal.  (If Obama got a Peace Prize, Trump has to have one too!)  That gives Kim the upper hand in the negotiations (to put it mildly).

Trump has apparently completely lost sight of the fact that simply being in the same room with the President of the United States is a huge win for Kim.  Trump, the master negotiator, is handing Kim that win with nothing at all to show for it.  So no, I am not impressed.

Thursday, May 10, 2018

A quantum mechanics puzzle, part drei

[This post is the third part of a series.  You should read parts one and two before reading this or it won't make any sense.]

So we have two more cases to consider:

Case 3: we pulse the laser with very short pulses, emitting only one photon at a time.  This is actually not possible with a laser, but it is possible with something like this single-photon-emitting light source (which was actually case 5 when I first made up the list).

Before analyzing this case I have to hedge: I'm pretty sure I know the right answer, but not 100%.  I have actually asked one of the authors of that paper to confirm my suspicions but he's busy and so it will be a while before I expect to get an answer.  If his answer turns out to be substantially different from what I say here I will definitely let you all know.

So with that disclaimer in mind, I'm quite confident that this case will turn out to have the same behavior as the case where we have a laser dimmed by a filter, and the photon emissions post-filter detected using a parametric down-converter, i.e. there will be no (first-order) interference (with one exception, which will arrive at in case 4).  The reason I'm confident is that this case is structurally the same as that one: we have made a modification to the experiment that allows us to know when the photon was emitted, which allows us to determine which path the photon took by comparing departure and arrival times, and so there can be no interference.  Please note that I have taken pains not to say that our (potential) knowledge of the emission time causes the interference to go away.  It doesn't.  What causes the loss of interference is the entanglement of the photon with something else.  Entanglement is a pre-requisite for measurement, which is a pre-requisite for knowledge, so it is true that if there is (potential) knowledge that there can be no interference, but the knowledge bit is a red herring.  The only reason I'm using that phraseology is that it is, sadly, ubiquitous in QM pedagogy.

So, with that out of the way, let us proceed to the interesting case:  We turn the laser on and off with a duty cycle of 50% and a period that is long enough that the pulses actually do produce interference.  The lengths of the arms of the interferometer are adjusted so that the Nth pulse coming from the long arm exactly coincides at the detector with the N+Kth pulse coming from the short arm for some integer K>=1.

Before I go into detail on this I want to say a word about how practical such an experiment might be. To make this work, the period of the pulses has to be long enough that the individual pulses are coherent, but short enough that we can "store" at least one them "in flight" while waiting for the next one without losing coherence.  Can this actually be done?  Yes, it can, at least if you believe Wikipedia.  There is says that fiber lasers can be built with coherence lengths exceeding 100km.  That's about 300 microseconds, which is essentially forever by the standards of quantum optics.  You could actually do this experiment with a regular semiconductor laser with a coherence length of "merely" 100m.  It's pretty straightforward to power-cycle a laser, produce time delays, and measure the results with events happening at nanosecond/meter scales.  So this would not even push the boundaries of the state of the art.

There is no doubt what would happen in this case: you would see interference, but (and this is really important) only after the Kth cycle.  Before that we know that all of the light at the detector arrived via the short arm, so there is no interference.  After the Kth cycle, light is arriving from both arms, so we do get interference.  There would be some transient effects at the beginning and end of each pulse, but at steady-state the interference would be easily detectable.  This is predicted both by quantum theory and classical E-M theory.  There is absolutely nothing interesting going on here, until, that is, you make one more little modification: in addition to a 50% duty cycle, you also dim the laser with a filter.

The outcome predicted by QM is clear: dimming the laser with a filter makes no difference.  Whatever we saw when the laser was bright we should also see when the laser is dim, namely, for the first K cycles of the laser we get no interference.

How is this possible?  The dramatic narrative of interference usually goes something like this: interference happens when a photon (or some other particle, it doesn't really matter) is placed in a quantum superposition, usually a quantum superposition of physical locations.  The usual slogan is "the photon goes both ways".  The two paths are then brought together in such a way that no which-way information is available in the final state.  The result is interference.

But can this possibly be happening in this case?  The two paths that the photon can take are separated by an enormous amount of time, big enough that we are able to turn the laser off and back on while we are waiting for it to travel the long way 'round through our interferometer.  It's already enough of a mind bender to say that we cannot know when a particular photon was emitted when the laser is on continuously, but now we seem to be going a step further: in order to have interference, we cannot even know which power cycle a detected photon was produced by!  Is it really possible for a laser to produce a photon that is in a quantum superposition across power cycles?  That seems extremely improbable.  Surely once you turn the laser off, the universe is committed: there's a batch of photons flying through space at the speed of light in some particular quantum mechanical configuration.  Surely that configuration can't be changed by something that happens (or not -- we could choose at any time not to turn the laser back on!) in the future?

There is another possibility.  Maybe the interference we see is not created by one photon interfering with itself, but rather interfering with another photon produced in a different cycle.  This seems a lot more plausible, but is it actually possible?  Paul Dirac, one of the founders of quantum theory, once famously wrote “...each photon then interferes only with itself.  Interference between different photons never occurs.”  Interestingly, while I can find this quote all over the internet, and it is invariably attributed to Dirac, I cannot locate its original source.  So it's possible that this quote is apocryphal.  But it doesn't matter.  What matters is that this sentiment was taken seriously for decades until an experiment by Magyar and Mandel debunked it in 1963.  There have been books written about, and even entitled, multi-photon interference.  So it's definitely a thing.

The experiment as we have described it to this point is an interesting variant on the Magyar and Mandel experiment.  There they used two different lasers (actually they were masers, but it doesn't matter) to generate their photons, whereas we are using one laser and separating the production of the two photons by time using power cycles and bringing them back together using delay lines.  But it amounts to the same thing.  The key is that we're bring the photons back together at the same time.  That's the reason that the delay time in the interferometer is an integer multiple of the cycle time on the laser, otherwise it doesn't work.

So this might be a mildly interesting but not earth-shattering result.  Maybe someone has even done it, I don't know.

But there is one thing that should make us a little queasy about this line of thought, and that is that we cannot actually control how many photons enter the interferometer on any given cycle.  We can attenuate the beam so that on average we get one photon per cycle, but that will only be an average.  Some cycles we will get more than one, some cycles we will get none.  If we're depending on photons to interfere with each other then we need the same number of photons each cycle, otherwise some photons won't have partners to interfere with.

In fact, we can actually completely eliminate the possibility that what we see is multi-photon interference simply by making the laser even dimmer.  Let's attenuate the laser to the point where, rather than of one photon every cycle, we instead get one photon every 2K cycles (or more).  In other words, most of the time the interferometer is totally dark.  Every now and then we will get a photon.  The temporal separation between photons is now much more than the coherence time of the laser, much more than the cycle time of the laser, much more than the travel time through the long arm of the interferometer.  We can make it an hour or more between photons.  Theory predicts that we will still see interference!  Not only that, but it will be the exact same interference pattern that we saw when the interferometer was fully illuminated.

How are we to account for that? In particular: remember how above we noted that we only saw interference after the Kth cycle? How would any given photon know whether the index of the cycle that produced it was more or less than K?

Note well that this is in no way intended to highlight a problem with QM.  The outcome predicted by QM is very clear, and I would give you very long odds that this prediction is correct.  The problem is only in trying to tell a story about what the fleep is going on here that involves photons being emitted by the laser.  I don't see any way to do it.

In fact, I'll go one step further: AFAICT, this is a strong argument for the following remarkable conclusion (and if this holds up I think it really could be earth-shattering): the quantum wave function must be physically real because that is the only thing that could account for the K-cycle delay in the onset of interference.  If anyone can see a flaw in my reasoning I would really appreciate it if you would point it out.

Tuesday, May 08, 2018

A quantum mechanics puzzle, part deux

This post is (part of) the answer to a puzzle I posed here.  Read that first if you haven't already.

To make this discussion concrete, let's call the time it takes for light to traverse the short (or Small) arm of the interferometer Ts, the long (or Big) arm Tb (because Tl looks too much like T1).

So there are five interesting cases here.  Let's start with the easy one: we illuminate the interferometer with a laser which we turn on and leave on.  In that case it's a no-brainer: the photons arrive at the business end of the interferometer first from the short path Ts seconds after turning the laser on.  At this point we know (because timing) which way the photons went so there is no interference.  Then at time Tb the photons arrive from the long path.  All the photons are identical, so we no longer know which path they took.  So interference.

Case 2 (the one the original puzzle was about): the laser is turned on and stays on, but the power is modulated (or filters are put in place) so that the light level is very low, so low that the average time of arrival between individual photons at the detector is much larger than Tb.

There are two plausible-sounding answers in this case.  Plausible-sounding answer #1 is that the result is exactly the same as before: after Tb we still get interference.  The equations of quantum mechanics are independent of brightness, so wherever we get interference when the light is bright, we still get interference when the light is dim.

Plausible-sounding answer #2 is that when the light is dim we can tell which way the photon went by looking at the timing.  Whenever we get a detection there are two possibilities: either the photon was emitted Ts seconds earlier and took the short path, or the photon was emitted Tb seconds earlier and took the long path.  So if we can tell when the photon was emitted, then there will be no interference.

But can we tell?  Well (and this is the answer I was originally looking for when I composed the puzzle) it depends on exactly how we make the laser dim!  There are at least two ways, and they produce different results.

The first is to put some sort of shutter in front of the laser that only lets through one photon through at a time. This is equivalent to turning the laser on only for very short periods of time.  If we do it this way we will get no interference.

The other way is to do nothing to the laser itself, but rather to put a filter between the laser and the interferometer that blocks (or reflects) most of the photons.  The photons are blocked by the filter at random, so there is no way to tell when a particular photon got through the filter.  Hence: interference.

But suppose we tweak our setup slightly so that we can tell when a photon was transmitted by the filter.  How can we do this?  It is this exploration that leads to (IMHO) a profound insight.

Think about it: how do you detect a photon without destroying it?  You can't!  The only way to detect a photon is to have some atom absorb it, and that process destroys the photon.  But there is a sneaky trick we can do: we can run the photons through a parametric down-converter (PDC).  A PDC is a crystal made of some material (typically some stuff called beta-barium borate or BBO) whose atoms absorb photons at one wavelength and then re-emit them as two photons at different wavelengths.  The key is that these two emissions happen at more or less the same time.  So we can send one of these photons into the interferometer and use the other one to tell us when this event happened.  Experimental physicists actually do experiments like this routinely.  To distinguish between the two photons, the one that goes into the apparatus is called the signal photon, while the other that is measured to figure out the timing is called the idler.  By measuring (and hence destroying) the idler photon we can tell when the signal photon entered the interferometer, and so we can tell which way the signal photon went (by comparing the timing of entry and exit).  So we cannot have interference.

Here is the profound insight: this setup will not produce interference even if we don't actually measure the idler photon!  Why?  (You might want to think about that for a moment before proceeding.)  Because if it did, then we could use that fact to transmit information faster than light!

Here is how we would do it: instead of measuring the idlers, we send them off (via mirrors) to some distant location (let's call it L1)  At the same time, we take our interferometer and move it away from the PDC by the same distance but in the opposite direction to a location we will call L2.  The distance between L1 and L2 is much greater than the length of the long arm of the interferometer.

If we could produce interference by choosing not to perform any measurements on the idlers then we could use this setup to communicate faster than light by selectively measuring the idlers or not.  When we measured the idlers at L1, the interference would be destroyed at L2.  And this effect would have to happen instantaneously because if it didn't then we could measure idlers at L1 and still have interference at L2, and that is impossible.

The profound conclusion is that photons emitted by a parametric down-converter do not produce interference!  [1]

Those of you who have read my paper on the EPRG paradox will find this all to be familiar territory.  In fact, this is the exact same conclusion that was reached in that paper, and for the exact same reason: the photons emitted by a PDC are entangled, and entangled photons do not self-interfere.  The reason they don't self-interfere is that entanglement is the first step of the measurement process, and it, not measurement per se, is what destroys (first-order) interference.

This is all old news (at least 17 years old).  So why is this (IMHO) cool?  Because we could reach this conclusion without knowing anything about entanglement!  We didn't need to invoke EPR or Bell's theorem or polarization or anything like that.  All we needed was the principle that which-way information destroys interference to reach the conclusion that if there is any physical process that reliably produces multiple photons at the same time, then those photons cannot self-interfere.  We have shown, without doing any math, only from elementary first principles, that entangled particles are different in some deep and profound way from non-entangled ones.

I think that's cool.

That's probably enough for one post.  I'll finish up the other three cases later.

---

[1]  This is not quite true.  The strictly correct statement is that entangled photons do not produce first-order interference.  They can and do produce second-order interference, which can only be detected by transmitting classical information from L1 to L2.

Friday, May 04, 2018

In your face, liberal haters!

The New York Times reports that California is now world's 5th largest economy.  Only the U.S. as a whole, China, Japan and Germany are bigger.  On top of that the vast majority of that growth came from the coastal areas, where the liberals live.

Meanwhile, in Kansas, the Republican experiment in stimulating economic growth by cutting taxes has gone down in screaming flames:
The experiment with tax policy [in Kansas] was such a failure that a Republican controlled legislature not only voted to raise taxes, but did so over the veto of the governor.
So: in your face all you who say that high taxes and regulation kill economic growth!  In fact it is, and has always been, the exact opposite.  Taxes fund government and infrastructure, both of which are essential components of a robust economy.

Thursday, May 03, 2018

I don't know where I'm a gonna go when the volcano blows

Hawaii's Kilauea volcano is erupting.  So is one in Vanuatu.  And there is increased activity in Yellowstone.  Hang on to your hats, folks, Jesus's return must be imminent.

(In case you didn't know, the title is a line from a Jimmy Buffet song.)

A quantum mechanics puzzle

Time to take a break from politics and sociology and geek out about quantum mechanics for a while.

Consider a riff on a Michelson-style interferometer that looks like this:


A source of laser light shines on a half-silvered mirror angled at 45 degrees (the grey rectangle).  This splits the beam in two.  The two beams are in actuality the same color as the original, but I've drawn them in two different colors to make the two paths easier to follow.  The red beam is reflected up, the green beam passes through the mirror and continues to the right.  Both beams are reflected back from whence they came by a pair of regular mirrors (the white rectangles) also mounted at 45 degree angles relative to the beams.  They return to the half-silvered mirror where they are recombined and sent to a detector, which registers the presence of absence of interference.  (In reality it's a tad more complicated than that, but that's a sufficiently accurate description for this thought experiment.)

What distinguishes this "riff" on a traditional Michelson interferometer is that the mirrors that reflect one of the beams (the one drawn in green) are mounted on a trolley that allows them to be moved as a unit to an arbitrary distance.  We use this capability to make the distance traversed by the photons on the green path be much larger than those on the red path, large enough that there is an easily measured difference in the travel time between the two paths.

Let's call the time it takes to traverse the red path T1 and the time it takes to traverse the green path T2, with T1 much smaller than T2.

So we turn on the laser.  What can we expect to see?  Well, the laser beam is emitted at the speed of light (obviously).  After time T1 the red-path photons arrive, but the green-path photons are still en-route, so we should see no interference.  Then at time T2 the green-path photons arrive.  What happens then?

From a purely electromagnetic point of view we would now expect to see interference.  But do we?  Here is an argument that this cannot be the case: whether we see interference or not should be independent of the brightness of the beam.  So turn the brightness down to the point where the time between the emission of individual photons from the laser (and hence the arrival of photons at the detector) is much greater than T2.  (Of course, the actual arrival times will be random, but we can make the average time between photons be large enough that the probability of having two photons in the interferometer at the same time is indistinguishable from zero.)

If we do this with a standard interferometer (or two-slit experiment) where the path-lengths are very nearly the same, we still see interference even when the photons go through one at a time.  This is the famous and mysterious phenomenon of quantum superposition, where each individual photon "goes both ways" and interferes with itself.  But with this setup, "interfering with itself" would seem to be impossible.  Yes, the photon goes both ways, but how can it possibly interfere with itself when the differences in travel times between the two paths are so large?  By the time the red-path-part of the photon arrives at the detector, the green-path part is still en-route to the distant mirror.  Likewise, by the time the green-path-part of the photon arrives at the detector, the red-path part is long gone.  So individual photons can't possibly interfere with themselves in this setup, and so large numbers of photons should not be able to produce interference either.

So there are three possibilities:

1.  There is no interference after T2 (in violation of standard electromagnetic theory)

2.  There is interference after T2, but it goes away if the laser is dim enough (in violation of standard QM theory), or

3.  There is interference after T2 even when the laser is dim.  In which case the question becomes: how?

The answer next time.  It turns out that this thought experiment has some pretty profound implications with respect to the interpretation of quantum mechanics.  As far as I can tell from a cursory search, I'm the first to propose it, though I would be surprised if that actually holds up to scrutiny.  If anyone knows where this has been analyzed in the literature I'd appreciate a pointer.

Wednesday, May 02, 2018

This is inspiring

The Washington Post reports that:
Two African American men arrested at a Philadelphia Starbucks last month have reached a settlement with the city and secured its commitment to a pilot program for young entrepreneurs. 
Rashon Nelson and Donte Robinson chose not to pursue a lawsuit against the city, Mike Dunn, a spokesman from the Mayor’s Office, told The Washington Post. Instead, they agreed to a symbolic payment of $1 each and asked the city to fund $200,000 for a grant program for high school students aspiring to become entrepreneurs.
Wow.  I doff my hat, raise a glass, and salute you, Rashon Nelson and Donte Robinson.  You took a thoroughly sucky situation and turned it into something positive.  You've restored my faith in humanity.

Friday, April 27, 2018

Credit where it's due

Richard Nixon is rightfully remembered as one of the great villains of American democracy.  But he wasn't all bad.  He opened relations with China, appointed four mostly sane Supreme Court justices, and oversaw the establishment of the EPA among many other accomplishments.  Likewise, I believe that Donald Trump will eventually go down in history as one of the worst (if not the worst) president the U.S. has ever had, but I think he deserves some kudos for some of the recent developments in Korea:
The leaders of North and South Korea have pledged to jointly eliminate the risk of war and work together to achieve complete denuclearization of the Korean Peninsula. 
The joint statement Friday, from the border truce village of Panmunjom, concluded a historic one-day bilateral summit aimed at achieving peace between the longtime adversaries for the first time in more than sixty years. The meeting of the Korean leaders was the first in more than a decade.
Whether this actually leads anywhere remains to be seen, but the mere fact that this announcement happened at all is astonishing to me.   I thought a hot war in Korea was much more likely than peace overtures.  Just the change in rhetorical tone from Kim Jong Un is borderline miraculous.  A week ago I'd have given long odds against any of this happening in my lifetime.

I have no idea whether all this is happening because of or despite (or is completely indifferent to) anything Donald Trump has done.  But it happened on his watch.  If war had broken out I surely would have given him the blame, so he deserves some of the credit regardless of what his actual influence might have been.  I have a very hard time believing that the "little rocket man" rhetoric was helpful, but Mike Pompeo's visit certainly seems not to have set things back.

I still want to see Donald Trump go down in screaming flames because he is such an asshole, and I don't like to see assholes win.  But I grudgingly concede that he seems to have made more progress in North Korea than any of his predecessors.

Paul Ryan forces out House chaplain

Just in case there was the slightest ember of hope in your mind that Republicans actually care about religious freedom and are not just odious hypocritical power-grubbing opportunists, this should extinguish it once and for all:
House Chaplain Patrick Conroy’s sudden resignation has sparked a furor on Capitol Hill, with sources in both parties saying he was pushed out by Speaker Paul Ryan (R-Wis.). 
Conroy’s own resignation announcement stated that it was done at Ryan’s request.
And why would Paul Ryan want to force out a chaplain who has been in the post for 11 years?  Because he spoke heresy and suggested that the new tax bill should be "fair to all Americans".  (The idea!)  Oh, and because he invited a "Muslim person" (yes, that is an exact quote -- can you imagine someone on Fox News referring to Pat Robertson as a "Christian person"?) to deliver an opening prayer.

No wonder he had to go.  It's bad enough the Jews are crawling around on the House floor, do we really have to let the Muslims in?

An open letter to Jack Phillips

[Jack Phillips is the owner of the Masterpiece Cake Shop in Lakewood, Colorado.  Mr. Phillips is being sued by the Colorado Civil Rights Commission for refusing to make a wedding cake for a gay couple.  His case is currently before the U.S. Supreme Court.  Yesterday Mr. Phillips published an op-ed in The Washington Post to which this letter is a response.]

Dear Mr. Phillips:

Imagine your child was in a terrible car accident and rushed to the hospital.  There the doctor tells you, "I'm terribly sorry, but she has lost a lot of blood.  She needs a transfusion.  Unfortunately, I can't give her one because I am a Jehovah's Witness and we believe that blood transfusions are against the will of God."  (Don't like that example?  OK, here's another: suppose the doctor was a Muslim and told you that he couldn't operate on your daughter because she is female, and unfortunately there are no female doctors available at the moment.  I can do this all day long.  There is an endless variety of sincerely held religious beliefs out there in the world.)

How would you feel?  Would you fight as hard for the right of doctors to refuse their professional services on religious grounds as you are fighting for your own?  Would you accept delayed medical care for your daughter as the price of religious freedom?

I suspect the answer to that question is "no", but either way you and I have a problem that goes far beyond cakes.  If indeed you want the Supreme Court to uphold your religious freedom but not those of others then you are a hypocrite, and we're done.  I have no respect for hypocrites.  Hypocrisy is the ultimate evil because it justifies anything.  If, on the other hand, your answer is "yes", that you would be able to accept these costs, then we still have a problem, but it's a very different problem, because not only are you willing to accept these costs on your own behalf, but you are insisting that I accept these costs as well.  Because if my daughter ends up in the hospital and needs a transfusion, I want her to fucking get one.  Got it?

I apologize for the crude language, but I really want to emphasize how strongly I feel about this.  You see, my most deeply held belief, my religion if you will, is that decisions ought to be made according to evidence, experiment and reason, and not on faith.  You have the right to believe what you want, but you most emphatically do not have the right to impose your beliefs on me in any way, shape, or form.  That includes passing laws to allow doctors to deprive me and mine of medical care because of their own personal beliefs.

You see, in a professional setting, sometimes you have to check your personal beliefs at the door.  As unintuitive as it might seem, that is part and parcel of living in a free country.  Doctors don't get to pick and choose who they treat and how they treat them based on their religion.  Judges don't get to pick and choose what laws they will enforce based on their religious beliefs.  Restaurant proprietors don't get to pick and choose who can sit at the lunch counter based on their religious beliefs.

I know you think your case is different because making wedding cakes is an artistic endeavor, and I don't dispute that.  I'm happy to concede that your cakes are works of art.  But you are not actually arguing for your freedom of expression.  You are not refusing to make cakes with particular content, you are refusing to make cakes for a particular kind of customer.  If you refused to make a cake with, say, an obscene image on it, no one would dispute your right to turn that down.  But what you are asking for is very different.  You want to be able to refuse to make cakes for gay couples regardless of what the cake looks like.  Your criterion for what you are and are not willing to do has nothing to do with the cake and everything to do with the customer.  That is unacceptable.

You wonder "if there will be a place in the community for [you] when the dust settles."  I'm sure there will.  This country is, sadly, chock-full of people who want to discriminate against others because of their sexual orientation.  Should you lose, I have no doubt that you will find friends among them.  And although you will find it hard to believe, you will still be free.  You will be free to believe what you want to believe.  You will be free to shout your odious beliefs from the rooftops.  You will even be free to make cakes for whomever you choose!  The only thing you won't be able to do is to make cakes professionally, because, in this country, we hold professionals to a higher standard.

At least, for the sake of all the people who need blood transfusions, I hope we do.

Sincerely yours,
Ron Garret
Emerald Hills, California

Wednesday, April 25, 2018

Support Josh Harder for Congress

I've been quiet lately in part because I'm sinking back into the pit of despair when I think about politics.  The spinelessness and hypocrisy of the Republican party, the insidious and corrosive effects of corporate "free speech" embodied in soulless monsters like Sinclair and Fox News, and the fact that ultimately all this insanity has its foundation in the will of the people (or at least a significant fraction of them) has me struggling at times to see much light at the end of this tunnel.  The outpouring of grass-roots energy in the Democratic party is encouraging, of course, but we really shouldn't have to work this hard do defend the principle that, if the President is a crook, he should be called out for it.

The Washington Post yesterday ran a story headlined "Could Trump bury Mueller’s findings? Yes — if Republicans help him do it."  You should read it.  It's sobering.  I am as staunch a defender of civil liberties and the presumption of innocence as you are likely to find.  But if Donald Trump is, say, beholden to the Russian government, don't you think the American people ought to know?

It is becoming clear that we cannot count on the Republicans to answer this question affirmatively.  They have repeatedly shown that they will put party over principle.  They will gerrymander, lie, cheat, and even abandon their own principles to stay in power (to what end one has to wonder).  Not that the Democrats are necessarily a whole lot better, but there is one thing that is becoming clear: if we want to know the truth about Donald Trump, the only way we can insure that we will find out is to vote the Democrats into power in the House of Representatives this November.  If we fail to do that, it will be game-over.  Robert Mueller will be fired, his report will be buried, and We the People will never know the truth.

Happily, taking the House seems to be a real possibility, and I want to take this opportunity to do something that I very rarely do here on the Ramblings and endorse a Congressional candidate and ask you, my readers, to support him.  His name is Josh Harder, and he is running in California's 10th Congressional district, which includes the central valley town of Modesto.  That district is currently represented by Republican Jeff Denham, who won the 2016 election by only 3 points.  If there was ever a flippable district in the U.S., this is it.

I met Josh the other day and I was very impressed.  He's working incredibly hard, he knows what he's doing, he has great stage presence, and he has terrific command of facts and issues.  But most importantly, he will bring us one step closer to a Democratic majority in the House, which we will need in order to stop the Republicans from burying Donald Trumps sins in a bureaucratic sarcophagus.  Whatever your stand on policy may be, I ask again: if the President of the United States is beholden to a foreign power (or has otherwise broken the law) don't you think we ought to know?

Saturday, April 07, 2018

The taxi ride from hell: A data point for the rideshare debate

One of the arguments made by established taxi companies against ride-sharing companies like Lyft and Uber is that the latter's passengers are taking a greater risk because of the questionable vetting of the drivers.  Real taxi drivers are professionals, the argument goes, with proper training and screening to insure that they safely and efficiently whisk you from A to B.

To which I say: Bollocks.  I just had the worst ride of my entire life, and it was in an officially licensed New York City yellow cab.  It was so extraordinarily bad that I didn't tip the driver.  I have never before in my life not tipped a driver.  I was this close to not paying him at all.

It was not an obscure route: Times Square to Newark airport.  Any NYC taxi driver worth the title should know that route like the back of their hand.  Google Traffic indicated that except for the usual backup at the entrance to the Lincoln Tunnel, traffic was light and we should get there in about 30 minutes.

I sat down in the back of the cab and it was immediately evident that this was not going to be the most comfortable ride of my life.  The seat had a loose spring (or something) that was poking me in my butt, and did the entire trip.

To fully appreciate how utterly incompetent this cabbie was it will be helpful to know that the usual route from Times Square to Newark airport goes something like this: you go west through mid-town Manhattan and take the Lincoln Tunnel under the Hudson river.  From there, you continue on route 495 to Interstate 95, hang a left, cruise for 20 minutes or so, and exit to the airport.  Easy peasy.  If there is heavy traffic on the interstate one might choose to take a different route to bypass the interstate, but as I mentioned, it was early and traffic was light.

The transition through the Lincoln Tunnel went smoothly enough, but when we got to the other side the driver suddenly took an unexpected turn and we ended up on New Jersey surface streets.  With traffic lights.

Now, New York cabs have plexiglass safety dividers between the driver and the back seat.  Some of them have holes or little windows in them so you can talk to the driver, but not this one.  So I had to shout to be heard: "Why didn't you take the interstate?"

It quickly became clear that the driver's command of English, in both transmit and receive modes, left a little room for improvement and communication was going to be a challenge.  At one point, the driver passed his cell phone to me through a little cell-phone-sized man trap in the safety divider.  I saw that he was running some sort of navigation app, but I am not sufficiently wise in the ways of Waze to ascertain exactly what was going on or how to do anything about it.  So I just resigned myself to the fact that this trip was going to take a little longer than I expected, and passed the phone back to the driver.

I pulled up Google Maps on my own phone so I could follow our progress, and it appeared that our plan was to take state route 9.  This was slightly alarming as there were construction warnings along a substantial stretch of that road, but happily it appeared that this was because the road was closed in the opposite direction.  Going North we would be able to get through with minimal fuss.

Or at least we would have done if the driver had actually turned onto route 9.  He didn't.  He sailed right past the on ramp and into the next little enclave of surface streets, from which there was no evident route to the airport at all.

I piped up again and asked if the driver realized that he had just missed a turn.  He allowed that he had, apologized sheepishly, and said he would make a U turn, which, in New Jersey, is no mean feat.  In fact we did not make a U-turn, but rather went around several blocks until we finally found ourselves back at the on-ramp for state route 9.  (During this time I could hear the driver on the phone with someone who was apparently trying to talk him through the situation to get us back on track.)

Now, to be fair, the road design and signage in this particular area were atrocious, almost as if someone had deliberately designed the place to be misleading so that they could hide in a nearby bird blind and snicker at the hapless drivers trying to find their way.  But this is not at all unusual in New Jersey, and if you're going to drive there for a living you really have to be able to take this sort of thing in stride.  Fortunately, by proceeding very, very slowly and deliberately, our driver was finally able to get us onto the correct road.

Alas, our troubles were not over.  By now I was watching carefully what the driver was doing to make sure he wasn't about to miss the exit for the airport, which is exactly what he proceeded to do.  As he started sailing by the off ramp I shouted at him, "You're about to miss the exit!"  But instead of veering to make the off ramp, he slammed on the brakes and stopped!  Right in the middle of the freeway.  A brief negotiation ensued, upon the completion of which we finally turned right and into the airport.

I micromanaged the drive to the terminal, and as I noted earlier, I did not give him a tip.

Because this driver was so off-the-charts atrocious I decided to report him to the NYC taxi authority, the organization that is supposed to be in charge of insuring that yellow cab drivers are more competent than the disreputable scoundrels that drive Lyfts and Ubers.  They have a convenient web page for filing complaints, but upon availing myself of this I discovered to my dismay that in order for any complaint to be acted upon you have to be willing to make yourself available for an in-person hearing.  In Queens.  Well, I live in California, so going to a hearing in Queens is not exactly convenient.  I went ahead and filed my complaint anyway (and condensed this story down to about three sentences so it would fit in the tiny text box provided for you to give the details of your complaint.  A few minutes later I received this helpful response:

Service Request #: C1-1-1546782941
Date Submitted: 04/06/18 3:46:51 PM
Request Type: Taxi Report
Details: Driver Report 
Your Service Request was closed.
Your report has been sent to the Taxi and Limousine Commission (TLC). You are not available to participate in a hearing so TLC cannot take any action against the driver or car service company. No further information will be available for your report.

So... no more taxis to the aiport for me.  I'd rather roll the dice with Uber.  At least with them if the ride sucks I don't have to show up for a hearing in order to give the driver a bad review if he deserves one.

Which, now that I come to think of it, not a single Uber driver ever has.

I would like to note for the record that I have taken dozens and dozens of NYC taxis over the years, and they were by and large competent and efficient.  This experience was definitely an outlier.  But it does undermine the taxi company's argument that Uber and Lyft should not be used because their drivers haven't been as well vetted.

Wednesday, March 14, 2018

Well, that didn't take long

I was contemplating whether or not to write about how incredibly stupid it is to try to solve the school shooting problem by arming teachers.  I was waffling because I don't really like to belabor the obvious.  And then this happened:
A teacher accidentally fired a pistol inside a California classroom while lecturing about public safety and injured three students, according to police. 
Dennis Alexander was pointing the gun at the ceiling when he inadvertently fired it Tuesday at Seaside High School, said Abdul Pridgen, the city's police chief. 
Bullet fragments ricocheted off the ceiling and hit a 17-year-old student in the neck, Pridgen said. Shortly after the incident, class resumed as usual
The teen’s father, Fermin Gonzales, said he rushed his son to the hospital after the 17-year-old returned from school with blood on his shirt and a neck injury.
Let that soak in for a moment: a teacher fired a gun in a classroom, injured three students, one of whom was bleeding from the neck to the point where he ultimately had to go to the hospital, and then resumed teaching as if nothing had happened!  No, "Hey, is everyone OK?"  Just, "Oopsie, my bad.  Now open your textbooks to page 23."

The idea that the only way to stop a bad guy with a gun is a good guy with a gun is an adolescent fantasy born of watching too many Westerns.  The best way to stop a bad guy with a gun is to make sure that the bad guy never has a gun in the first place.  (It also helps to realize that "bad" and "mentally disturbed" are not synonyms.)

I hope that a minor injury is all it's going to take to get people to come to their senses, and not an all-out bloodbath.  But I'll give long odds against.

Monday, March 05, 2018

Is it time to take the Hyperloop seriously? No.

Over four years since it was first introduced, Ars Technica asks if it is time to take the Hyperloop seriously.  And four years since I first gave it, the answer is still a resounding no.  Not only has the thermal expansion problem not been solved, there has been (AFAICT) absolutely no attention paid to simple operational concerns that could be show-stoppers.  Like terrorism.  If you think airplanes are a soft target for terrorism, there should be no doubt in your mind that the bad guys are absolutely salivating at the prospect of the hyperloop.  The extent to which it would be vulnerable to terrorism, or even simple mechanical failure, is just mind boggling.

Let's set terrorism aside for a moment and just consider how the system would recover (or not) from a simple mechanical failure.  A pod breaks down.  That could happen, right?  What would you do?

With every other mode of transportation heretofore invented by mankind, the answer is: you get the people out of the failed vehicle so they can get to their destination some other way, and move the failed vehicle to a repair facility.  But this won't work for the hyperloop.  The pods are inside a sealed metal tube hundreds of miles long.  If you do the math based on some very conservative assumptions about how often pods would have to run in order to be a viable transportation system you will find that there will be (at a minimum) dozens of pods carrying hundreds of people inside the tube at any given time.  If one pod breaks down, all the pods behind it have to stop too.  So now you have a convoy of pods full of people stuck in a sealed steel tube.  How do you get them out?  I've never seen any hyperloop advocate even raise this issue, let alone actually take constructive steps towards solving it.

The fundamental problem is that the hyperloop track is a cascading single point of failure.  If a pod breaks down and blocks the track, the whole system goes down, and it (almost certainly) stays down for a very long time.  It's as if every time an airplane had a mechanical problem the net effect on the system was equivalent to a plane crashing at the intersection of all the runways at SFO and shutting them all down at once.

There are other transportation systems that have this problem, notably rail.  But when a train breaks down, you can always just get out and walk to safety as a strategy of last resort.  The hyperloop design makes that inherently impossible.  You can get a little taste for what things might be like by looking at what happens when people are trapped in subways.  It is not pretty.
During that 45-minute wait, riders tried to claw open the doors for air, said Chris Ebelhar, a passenger. A person chanted, “‘Find your happy place, find your happy place,’” he said. Panic increased when passengers realized that the doors at each end were locked, he said. “If there was a fire, we would have all died or just burned up,” he said. “We couldn’t open windows. It was insane.”
And that was a 45-minute wait.  That's how long you're in the pod when things are working normally!   In a failure scenario you will (unless someone comes up with something really clever) be stuck for hours, possibly even days.  It will be more like being trapped in a mine than in a subway car.  You think claustrophobia is a problem on airplanes?  You ain't seen nuthin' yet.  Hyperloop pods are designed to be occupied for less than an hour.  They are not tall enough to stand up in.  There are no bathrooms.  There are no windows.  And there are no emergency exits.

It seems to me that having at least some sort of minimally plausible story to tell about what one would do in a situation like this should be a pre-requisite to doing any further work on the hyperloop, otherwise you could easily end up in a situation where you have invested an enormous amount of money in it only to find that this problem simply does not have an economically viable solution.  Not all problems do (c.f. the flying car).

Saturday, February 24, 2018

Devin Nunes doesn't realize that he's part of the government

I was reading about the long anticipated release of the Democratic rebuttal to the famous Republican dossier memo.  I've been avoiding writing about this, or any aspect of the Russia investigation, because there is just so much insanity going on there and I didn't want to get sucked into that tar pit.  But I could not let this slide:
[O]n Saturday, committee chairman Devin Nunes (R-Calif.) accused Democrats of colluding with the government in a “cover up” of information as he announced the memo had been posted online. 
“We actually wanted this out,” Nunes told an audience at the Conservative Political Action Conference. “It’s clear evidence that the Democrats are not only covering this up, but they’re also colluding with parts of the government to cover this up.”
Congressional Democrats are "colluding with the government"?  Say what?!?  Who (or what) exactly does Devin Nunes think "the government" is?

I have news for you, Mr. Nunes: you and your fellow Congressmen are "the government", or a pretty significant part of it anyway.  You're supposed to be "colluding" (I would choose the word "working", but whatever) with yourselves to run the country.  That's your job.

But I guess Devin Nunes didn't get the memo.  So sad.

Friday, February 16, 2018

Yes, code is data, but that's not what makes Lisp cool

There has been some debate on Hacker News lately about what makes Lisp cool, in particular about whether the secret sauce is homo-iconicity, or the idea that "code is data", or something else.  I've read through a fair amount of the discussion, and there is a lot of misinformation and bad pedagogy floating around.  Because this is a topic that is near and dear to my heart, I thought I'd take a whack at it myself.

First, the idea that "code is data" is a popular aphorism, but even the most casual reflection on what this slogan actually means will reveal that it can't possibly be the right answer.  Yes, it is true that, in Lisp, code is data.  But this is true of all programming languages!  If programs weren't data, how could a compiler possibly work?

What makes Lisp cool is not that programs are data (because all programs are data), but that they are a particular kind of data.  In most programming languages, programs are strings.  Strings are in fact data.  In Lisp, programs are not strings, they are linked lists (that happen to have a string representation).  And this turns out to make all the difference.

I want to be very clear about what I mean when I say that Lisp programs are linked lists, because this is really a very subtle point.  It's hard to explain, which is one of the reasons that it is very rarely explained well.  Ironically, part of the problem is that once you understand it, it seems trivial and obvious.  (Everything is easy once you know how.)  But if you don't already understand it, it can be hard to get over the hump.  So depending on which side of this divide you fall on, what I am about to say might sound like I'm belaboring the obvious, in which case I would ask you try to remember back to the time before you understood all this (I know there was such a time because no one is born understanding linked lists).

The fundamental problem with trying to explain this is that the only tool I have at my disposal to communicate with you is text.  Your eyes scan this page, parse the black markings on the white background, and interpret those markings as letters and punctuation marks.  Your mind then further groups those letters into words, words into sentences, and sentences into concepts.  You do all this effortlessly now, but back in the day, before you knew how to read, it was hard work.  It takes a similar kind of "hard work" to read Lisp.  But like learning to read natural language, it pays dividends.

So here's a little snippet of Lisp code:

(defun rsq (x y) (sqrt (plus (times x x) (times y y))))

This code defines a function called RSQ which computes the square root of the sum of the squares of two numbers, but that is beside the point. What matters is that there are two very different ways to interpret the combination of letters and punctuation marks on the line above:

1.  As a string of characters.  44 of them to be precise (if you count spaces).

2.  As a thing with structure that is defined by the parentheses.

This is a little easier to see if we write something that has the same structure but without the evocative words:

(a b (c d) (e (f (g c c) (g d d))))

This makes the structure a little easier to see.  What you are looking at can be interpreted as either a string of characters (35 of them in this case), or as a list of more abstract elements.  This particular list has four elements.  The first element is the letter "a".  The second element is the letter "b".  But the third element is not a letter, it is another list.  This list has two elements, each of which is a letter ("c" and "d").  The fourth element is also a list.  This one has three elements, two of which are themselves lists.

There is an extra wrinkle in the original example, which is that sequences of adjacent letters like "defun" and "sqrt" are also considered "one thing", or a single element of the list.  So the original example, like the second, is also a list of four elements, but the first element is not a single letter, but a "group" of letters.  In Lisp these groups are called "symbols", and like lists, they are first-class data types.

The reason this is hard to explain is that strings and lists are fundamentally different things even though they look the same when you write them out this way.  What I've written above are really strings, but your brain interprets those strings as lists once you've been trained to interpret the parentheses and the letter groupings and spaces in the right way.  But what a linked list really is is something completely different.  It's a pattern of bits in memory.  You can talk about that by dumping the contents of memory and talking about how some bit patterns can be interpreted as pointers that refer to other parts of memory, or by drawing boxes and arrows.

But all of those details are a distraction too.  What really matters is that by thinking of code as a linked list instead of as a string of characters you can manipulate that code easily in terms of components that are semantically meaningful.

Here's an example of what I mean by this.  Consider the following snippet of C code:

int main(int argc, char* argv[]) { ...

Now suppose you want to analyze this code.  We want to extract, say, the name of the function being defined ("main") and its arguments ("argc" and "argv").  In C this is an advanced exercise; you have to actually parse the code.  But in Lisp it is utterly trivial.  If I consider this code:

(defun rsq (x y) (sqrt (plus (times x x) (times y y))))
as a list then to get its name all I have to do is extract the second element of the list.  And all I have to do to get the arguments is take the third element.  And the functions to do that are built-in to Lisp, so I literally don't have to write any code!

Not only that, but the parsing process that converts the string representation of the list (called an S-expression) to the internal representation of the actual linked list data structure is also trivial.  Parsing S-expressions is super easy.  You don't need a grammar or a parser generator, all you need is -- and this is no exaggeration -- a few dozen lines of code in just about any programming language [1].  And going the other way -- printing them back out -- is even easier.

This, then, is the magic of Lisp.  It's a local minimum in the amount of effort that it takes to parse and manipulate code in semantically meaningful chunks at the "cost" of having to write code that looks a little bit weird when you first encounter it.  But this feeling quickly goes away when you realize that this weirdness is not arbitrary.  Those parens are where they are for a reason, namely, to make the syntax easy, even trivial, to parse.  Lisp was originally proposed with a more traditional syntax in addition to S-expressions, and nearly every Lisp programmer has proposed and implemented their own (it's almost a rite of passage).  None of them have ever caught on because S-expressions are a huge win once you get even just a little bit used to them.  They let you do things easily that are really really hard in other languages.  In particular, they make writing compilers so easy that doing so becomes a regular part of doing business in Lisp rather than an abstruse specialty that only a select few engage in.

And now I have to go fix some code so that it automatically generates a backtrace whenever it encounters an error, logs it, and then continues its computation as if the error had not occurred (because it's running inside an event loop where actually throwing an error would be catastrophic).  I expect this will take me about fifteen minutes because I have this in my toolbox.

---
[1] Yes, that's more than a dozen lines of code, but that's because what you see there is a complete Lisp interpreter, not just an S-expression parser.  The parser is at the bottom.  It's 30 LOC.

Wednesday, January 24, 2018

A Multilogue on Free Will

[Inspired by this comment thread.]

The Tortoise is standing next to a railroad track when Achilles, an ancient Greek warrior, happens by.  In the distance, a train whistle sounds.

Tortoise: Greetings, friend Achilles.  You have impeccable timing.  I could use your assistance.

Achilles: Hello, Mr. T.  Always happy to help.  What seems to be the trouble?

Tortoise: Look there.

Achilles: Why, it appears that someone has been tied to the railroad track!  It looks like Henrietta, the Helpless Victim, no doubt tied there by Evan the Evil Villain.

Henrietta: Help!  Save me!

Tortoise: I would like to rescue Henrietta, but alas, I am far too slow to reach her in time.  Do you think you can help?

Achilles: I would love to.  Unfortunately, even though I am fleetest of foot of all the mortals, even I can't outrun a train.  But did you happen to notice, Mr. T., that there is a siding on the track here?  All we have to do is throw the switch, divert the train onto the siding, and Henrietta will be saved!

Tortoise: That is most fortuitous.  I wonder why I didn't notice it before.  But it occurs to me that there is something very odd about this state of affairs.

Achilles: Odd?  How so?

Tortoise: The situation we find ourselves in bears a striking resemblance to what philosophers call a "trolley problem."  A trolley problem is normally presented as a moral or ethical dilemma, usually by way of having victims tied to both branches of the track.  But here one of the branches is empty, which would seem to make it a no-brainer.

Achilles: But this is not an intellectual exercise.  This is real life.

Tortoise: True, but somehow I can't escape this niggling doubt that I've overlooked something.  Still, I guess we should go ahead and throw the switch.

(Suddenly, Evan the Evil Villain appears out of nowhere!)

Evan: Bwahahaha!!!  You fools think you can thwart my evil schemes?  Never!  You will not throw that switch!

Achilles: Just try and stop us!

Evan: You don't seem to understand.  I'm not ordering you, I'm telling you, as a matter of objective fact, that you will not throw the switch.

Tortoise: And how do you know that?

Evan: I consulted the Oracle, and she told me so.

Achilles: Oh dear, Mr. T.  I'm afraid Henrietta is done for.

Tortoise: Why?  I don't believe in no Oracle.

Achilles: Oh, but you should.  The Oracle is never wrong.

Tortoise: But how do we know that Evan isn't lying about what the Oracle said?

Achilles: Hm, good point.  Perhaps we should consult the Oracle ourselves?

Tortoise: Do we have time?  If we can't reach Henrietta before the train then surely we don't have time to travel to Delphi.

Achilles: Oh, silly Tortoise, you don't have to go to Delphi any more to consult the Oracle.  Nowadays there's an app for that.

(Achilles pulls out a mobile phone.  It sports a logo shaped like a pear.)

Tortoise: Most impressive.  Not at all what I would have expected.

Achilles: Just because I'm an ancient Greek warrior doesn't mean I have to be a Luddite.  Oh great and powerful Oracle, we wish to consult you!

(The Voice of the Oracle emanates from the phone.)

Oracle: What is your request?

Achilles: Is it true that we will not throw the switch and save Henrietta?

Oracle: Indeed, it is so.

Achilles: See there, Mr. T.  I'm afraid Henrietta's fate is sealed.

Tortoise: I'm still not convinced.  I mean, we're standing right here next to the switch.  We have free will (don't we?).  You're faster and stronger than Evan.  What exactly is going to stop us?

Achilles: Hm, good question.  Oh great and powerful Oracle, what exactly will prevent us from throwing the switch?

Oracle: Nothing will prevent you.  You will choose of your own free will not to throw the switch.

Tortoise: That seems improbable.  The moral situation is clear, and we are both moral creatures.  Why would we choose to do such an immoral deed?

Achilles: Is failing to save Henrietta really immoral?  We didn't tie her to the tracks, Evan did.  Is it really on us if she dies?

Tortoise: According to the Tortoise Moral Code, failing to save a life when there is no cost or risk to yourself is tantamount to taking the life yourself.  So I certainly feel as if I have a moral duty to throw the switch.

Achilles: And yet you won't do it.

Tortoise: I'm still not convinced.

Achilles: I'm telling you, Mr. T., the Oracle is never wrong.

Tortoise: Can you prove it?

Achilles: Sure, let's just do a little experiment.  Here, take this coin, and put it in your left or right hand, but don't show me which one.

(The Tortoise retreats into his shell, then shortly re-emerges with both his hands balled into fists.)

Achilles: Oracle, in which hand is the coin?

Oracle: The left one.

(The Tortoise opens his left hand to reveal the coin.)

Tortoise: Well, that was a 50-50 shot.  Also, the Oracle didn't really predict which hand I would put the coin in, she just somehow figured it out after I had already done so.  Maybe the phone has a coin detector built in to it.

Achilles: I can ask the Oracle before you put the coin in your hand.

(Achilles consults the phone.)

Tortoise: So what did she say?

Achilles: I can't tell you.  That would influence your decision.  But I've written her prediction down on this piece of paper.

Tortoise: So I don't even have to put the coin in my hand.  I can just tell you my choice.  I choose left again.

(Achilles opens the paper.  It says "LEFT".  They repeat the experiment 50 times.  The Oracle's prediction is correct every time.)

Tortoise: I must confess, that is deeply disturbing.  What would happen if I knew the Oracle's prediction ahead of time?

Achilles: Let's try it: Oracle, what will be the Tortoise's next choice?

Oracle: Left.

Tortoise: Ha!  Wrong!

(The tortoise puts the coin in his right hand.)

Achilles: As I suspected, the Oracle's predictions are unreliable if the subject learns the prediction before acting.  So there is still hope for Henrietta.

Evan: Fools!  I foresaw the possibility that you might learn of the Oracle's prophecy (indeed, if you recall, I told you about the prophecy!)  So I took precautions and consulted the meta-Oracle.

Achilles: The what?

Evan: The meta-Oracle.  You see, the Oracle works by building a model of your brain and running that model into the future faster than your actual brain.  But the Oracle does not include itself in its model.  So if the output of the Oracle gets to your brain then that sends events off on a trajectory that the Oracle cannot foresee.

Tortoise: So we do have free will after all!

Evan: Not so fast.  The meta-Oracle is more powerful than the Oracle.  The meta-Oracle includes itself in its model, so even if you learn of one of the meta-Oracle's prophecies before it comes to pass, it will still come to pass.  Here, see for yourself.

(Evan pulls out a meta-phone, launches the meta-Oracle app, and hands the meta-phone to Achilles.)

Meta-Oracle: You will go on a great journey!

Achilles: I haven't asked you anything yet!

Meta-Oracle: Oh, sorry, wrong prophecy.  What exactly is it you would like to know?

Achilles: Will we throw the switch and save Henrietta?

Meta-Oracle: No.

Evan: See?  Told ya!

Meta-Oracle: I also predict that the Tortoise will question my prophetic powers.

Tortoise: Well, that wasn't exactly a tough call.

Meta-Oracle: See?  Told ya!

Tortoise: Oh, come on!

Meta-Oracle: OK, we'll do a real one.  What would you like to know?

Tortoise: Which hand will I put the coin in?

Meta-Oracle: Your left hand.

(The Tortoise puts the coin in his right hand.)

Tortoise: Ha!

Meta-Oracle: I didn't say that you would put the coin in your left hand now.  All I said was that you would put the coin in your left hand at some unspecified time in the future.

Tortoise: I find myself oddly unimpressed.

Meta-Oracle: Yes, I foresaw that too.

Tortoise: Well, geez, if you foresaw it, why did you even bother making such a lame prediction?

Meta-Oracle: Because if I truly reveal to you the full extent of my prophetic powers you would suffer severe psychological damage.  Belief in free will is an integral part of the Tortoise Condition, and if I present you with irrefutable evidence that you do not have free will, you might snap.

Tortoise: Try me.

Meta-Oracle: Very well, if you insist.  The next time you put a coin in your hand, it will be your left hand.

(The Tortoise puts the coin in his left hand.)

Tortoise: OK, that was weird.  Despite the fact that I wanted very much to disprove the meta-Oracle, because my belief in free will is indeed very important to me, and despite the fact that I knew I could accomplish this goal by putting the coin in my right hand, I somehow found myself putting the coin in my left.

Achilles: Did it feel like you were being coerced?

Tortoise: Hard to say.  The subjective sensation I had while making the decision was nothing out of the ordinary.  It felt kind of like when I eat a cookie even though I know I shouldn't.  It's weird though, because cookies taste good, so I can justify (or at least rationalize) eating a cookie in the name of satisfying a short-term goal (hedonism) at the expense of a long-term one (maintaining my svelte figure).  But here I had no particular reason to prefer one hand over the other, kind of like we have no reason not to throw the switch.  I find it all deeply disturbing.

Meta-Oracle: Told ya.

Tortoise: Faced with this new evidence I must adjust my beliefs.  It does indeed seem to be the case that the meta-Oracle can predict my actions (and, by extrapolation, yours as well) and so we are in fact doomed to stand idly by while Henrietta meets her fate.

Achilles: That sounds like a self-fulfilling prophecy to me.  If your belief in the inevitability of failure leads you not to act, then the prophecy is in fact true.  But it's not really the prophecy at work, it's your belief in the prophecy.  Perhaps if you could recapture your initial skepticism we might be able to thwart the meta-Oracle after all.

Tortoise: Alas, I am incapable of achieving such suspension of disbelief.  I have experienced the power of the meta-Oracle first-hand.  I performed a conclusive experiment.  It didn't turn out the way I hoped or expected, but I have no choice but to accept the outcome and its implications.  Tortoises must follow the evidence wherever it leads.

Achilles: Maybe Tortoises do, but I don't.  I am quite credulous.  If you (or someone) could somehow convince me that the meta-Oracle could be wrong, then maybe I could throw the switch.

Tortoise: Alas, friend Achilles, I can't even do that.  Now that I myself am firmly of the belief that the meta-Oracle's powers are as advertised, then to convince you otherwise I would have to lie, and Tortoises cannot lie.

Achilles: Ah, then you never believed you had free will!

Tortoise: Not absolute free will, no.  I always believed that I had no control over what I believed (including, recursively, that I had no control over that belief).  But I did believe, until just now, that I had control over my actions, especially in matters as inconsequential as choosing a hand to put a coin in.

Achilles: But it was not inconsequential.  That action changed your worldview.  Maybe if it really were inconsequential you would still have free will?

Tortoise: I guess I can't rule out that possibility on the basis of the evidence that we have (and in fact I can't imagine any experiment we could possibly do that would rule it out).  But the question of whether or not to throw the switch is very consequential.  A life is at stake.  So it wouldn't help anyway.

Achilles: I can think of one other possibility: We could pray to God.  He might be able to save Henrietta.

Tortoise: I don't believe in God, but don't let that stop you.

Achilles: Dear God, please save Henrietta!

(The deep booming Voice of God rumbles through the air.)

God: And how exactly do you propose I do that?

Tortoise: Wow, that was so not what I expected.

Achilles: Dear God, thank you for answering the prayer of this humble mortal.  As for the answer to your question, well, you're God.  You are all-powerful.  You could, like, go and untie her before the train arrives.

God: I am indeed all-powerful.  I form the light and create darkness.  I am the Lord.  But I'm afraid I don't untie people from railroad tracks.  That's just not how I roll.

Tortoise: Why not?

God: Because if I do everything for you then you mortals will never grow up.  I gave you free will and moral intuition.  The rest is up to you.

Tortoise: Wait, what?  We have free will?

God: I didn't say that.  I said I gave you free will.  It does not follow that you still have it.

Achilles: That's true.  I once gave my niece a pair of mittens, but she lost them.

Tortoise: I must have lost mine, because I have just been presented with irrefutable evidence that I do not have free will.

God: What, the meta-Oracle's prophecy?  That doesn't prove that you don't have free will.

Tortoise: Of course it does.  If the meta-Oracle's prophecies are always right (and they do seem to be) then I have no choice but to do whatever the meta-Oracle foresees.

God: But that was true of the (non-meta) Oracle too.  Why did that not rock your world view the way that the meta-Oracle did?

Tortoise: Hm, good question.  I guess it's the fact that I was still able to thwart the (non-meta) Oracle when I learned its predictions ahead of time.  That allowed me to maintain the illusion of free will, even though the Oracle's prediction are indeed, now that I think of it, overwhelming evidence that I do not in fact have free will.  But the meta-Oracle is a whole 'nuther kettle of fish.  The meta-Oracle gave me the experience of making a choice that was directly counter to one of my goals (namely, maintaining the illusion that I have free will).  Why on earth would I do that if I really do have free will?

God: That is difficult for me to explain in a way that you will understand.  The closest I can come is to say that it's because of your sinful nature.

Tortoise: That can't be right.  When I sin it's because I choose (or at least I feel like I choose) to so something that I want to do but that you, God, don't want me to.  But my succumbing to the meta-Oracle's prediction was the exact opposite of that: it was something that I didn't want to do, and that you, God, couldn't possibly have cared about.

God: What makes you think I don't care?

Tortoise: What difference could it possibly have made to you whether I put a coin in my right or left hand?

God: I care about everything.  Everything that happens, down to the most trivial detail, is all part of my divine plan.  (Actually, they are not trivial details.  They only look trivial to you mortals who cannot see the big picture.)

Tortoise: Now I'm really confused.  If you're controlling everything, how can I have free will?

God: I didn't say I controlled everything, I said everything that happens is part of my plan.  Not the same thing.

Tortoise: I'm afraid I don't see the difference.

God: Most of the time the free choices of mortals like yourself align with my plan.  It is only on rare occasions, like when Pharaoh was going to free the Israelites prematurely, that I have to go in and meddle.  The rest of the time it's all you.

Achilles: You know, I've often wondered about that.  Why did you harden Pharaoh's heart?

God: To make it a better story.

Tortoise: What???

God: Sure, no one would have paid attention otherwise.  I am almighty God.  I could have freed the Israelites with a twitch of my little finger.  But that would have made such a dull movie!  No conflict, no suspense, no character development, no dramatic tension.  Every good story has to have a villain.

Achilles: Like Evan.

God: Exactly.

Tortoise: So nothing we do can interfere with your Plan.

God: That's right.  No self-respecting all-powerful deity could permit that.

Tortoise: So... sin, Henrietta's untimely death, all part of the plan?

God: Yes.

Evan: I always knew God was on my side!

God: I'm on everyone's side, Evan.  That doesn't mean I condone your actions.  Tying Henrietta to the railroad tracks was a horrible sin.

Evan: Then why did you make me do it?

God: I didn't make you do it.  You chose to do it.  That's what makes you an Evil Villain.

Evan: But you could have stopped me and you didn't.

God: The word "could" does not apply to me.  I am Perfect, so I can only do Perfect things.  In any particular circumstance there is only one Perfect course of action, and that is what I do.

Achilles: So... do you have free will?

God: No.

Tortoise: That is quite the bombshell revelation.

God: I don't see why.  There are lots of things I can't do.  I can't sin, for example.

Evan: That sucks for you.  Sinning can be a hell of a lot of fun.

God: (Wistfully.)  Yeah, I know.  Being Perfect is a very heavy burden.

Tortoise: This is something I've always wondered about: do you set the standard for perfection?  Or is there some externally defined standard for perfection that you just happen (or are somehow required) to meet?  Could you create a universe where the actions that are sinful in our universe were not sinful?

God: That's a very good question.

Tortoise: I can't really take credit for it.  I got it from Socrates.

God: And what answer did he give?

Tortoise: He kinda waffled, actually.  Surely you knew that?

God: Of course I knew that.  I am all-knowing.

Tortoise: Then why did you ask?

God: Because I'm trying to answer your question.

Tortoise: I'm afraid you have me at a loss.  My question was very straightforward.  Why don't you just answer it?

God: Because you wouldn't believe me.

Tortoise: And how do you know... oh, right.  OK, go ahead.

God: How did you learn about Socrates?

Tortoise: By reading accounts of his dialogs with his students as transcribed by Plato.  Socrates himself left no writings of his own.

God: So how do you know that Socrates was a real person and not just a fictional character invented by Plato?

Tortoise: Well, there are many other contemporaneous accounts of Socrates.  His life is pretty well documented.

God: Our friend Achilles here is in a rather similar situation, no?

Achilles: How do you mean?

God: You left no writings of your own.  Your existence is vouched for exclusively through the works of other writers like Homer and Lewis Carroll.

Achilles: Are you implying that I'm not a real person?

God: I'm suggesting you might not be.

Achilles: But I'm standing right here!

God: How do you know?

Achilles: How... do... I... I can't even...  Mr. T., you can see me, right?

Tortoise: Of course I can.  I'm not blind.

Achilles: And Evan, you too?

Evan: Well, duh, dude.

Achilles: So what more evidence do you need?  What more evidence could there possibly be?  My exploits during the Trojan War are well documented.

God: Well, there's a problem right there.  When was the Trojan war?

Achilles: I'm afraid I flunked history class.

God: The exact date doesn't matter.  Before or after Julius Caesar?

Achilles: Oh, definitely before.  I was long retired by the time he came along.

God: And when was the modern steam locomotive, like the one that is even now barreling down the track towards Henrietta, invented?

Achilles: I dunno, 1850 maybe?

God: So a few thousand years after Troy, right?

Achilles: Right.

God: And you don't see the problem?

Achilles: Not really.

God: You are several thousand years old.

Achilles: So what?  My mother dunked me in the river Styx when I was a baby.  That made me invulnerable.

God: Except for your heel.  Where Paris shot you with an arrow and killed you (as prophesied by Hector).

Achilles: Now that you mention it, I do vaguely recall that.

God: And doesn't that strike you as the least bit odd?

Achilles: I suppose it does.  Maybe this is all a dream?

(Achilles pinches himself.)

Achilles: Ouch!  No, definitely real.

God: I want you to consider the possibility that despite the overwhelming evidence to the contrary, that in fact you do not exist, that you and the Tortoise and Evan and Henrietta and even I, the Lord thy God, are just fictional characters in a Socratic dialog.

Tortoise: That is not quite the most ridiculous thing I have ever heard, but it's damn close.

God: And yet, it is true.

Tortoise: And who is the Author of this (alleged) dialog?

God: His name is Ron.

(There is a momentary stunned silence.  Then Achilles, the Tortoise, and Evan all burst out laughing uncontrollably.)

Henrietta: Men!  Honestly!

God: I told you that you wouldn't believe me.

Tortoise: Well, yeah, but that was not exactly a tough call.  Ron?  Seriously?  You couldn't come up with a name that had a bit more ... gravitas?  I mean, we're talking about an entity that created you, God, Lord of Hosts, Alpha and Omega, the Uncaused Cause.

God: I'm sorry it doesn't meet with your expectations, but the Author's name is Ron.  I can't do anything about that.

Achilles: I thought you were omnipotent?

God: In our universe, yes, I can move mountains.  Watch.

(A mountain in the distance suddenly floats into the air.)

Tortoise: I am definitely going to have to re-evaluate my worldview.

God: But Ron does not exist in our universe.  He is in an entirely different ontological category.

Tortoise: If Ron doesn't exist, how did he create us?

God: I didn't say he didn't exist.  I said he didn't exist in our universe.  He definitely exists.

Tortoise: But... in some other universe?

God: I warned you that this would be very hard to explain.  It's not really "some other universe" in the way that you're thinking of.  What you're thinking of (which I happen to know because I'm omniscient) is what physicists call a "parallel universe".  There are parallel universes.  For example, there is a parallel universe where tortoises are ninja warriors.

Tortoise: Just when I thought things couldn't possibly get any weirder.

God: The Author exists outside of all of these universes.  He transcends not just space and time, like I do, he transcends existence itself (by our standard of existence).  He exists in a way that you cannot possibly imagine, and which I cannot possibly explain (despite the fact that I do in fact understand it, having been granted this special dispensation by Ron himself).

Tortoise: So Ron is a sort of a meta-god?

God: You can think of him that way, but he's not a god.  He's a mortal.

Achilles: So Ron created us in His own image.

God: After a fashion.  But in fact, Mr. T. here is really more like Ron than you are, Achilles.

Tortoise: So the Author is a Tortoise?

God: No, he's a human.  But he's a nerd, not a jock.

Tortoise: Does the Author have free will?

God: Alas, I am not privy to that.  I am only omniscient within the scope of our own ontological category.  When it comes to the Author, even I know only what he has revealed to me.  But tell me, Mr. T., why is all this so important to you?

Tortoise: Because it bears on the question of whether or not we can save Henrietta's life.  If we fail to save Henrietta I want to know why.

God: Oh, is that all?  I'll tell you why.  It's because you've been wasting all this time talking about philosophy rather than just throwing the damn switch!

(At that instant, the train rushes by.  Henrietta lets out a blood-curdling scream.  The tortoise and Achilles look on helpless and horrified as the train rushes towards her.)

God: Well, my work here is done.  Toodle-oo.

(God disappears in a puff of smoke.  There is an awkward silence.)

Tortoise: [BLEEP]!

Achilles: You know, Mr. T., there is one other thing we could try.

Tortoise: I'm all ears.

Achilles: We could ask the Author to save Henrietta.

Tortoise: You can't be serious.

Achilles: What is there to lose?

Tortoise: The remains of my dignity?  I'm really starting to feel as if I'm being punked.

Achilles: OK, I'll do it.  Oh mighty Author, please save Henrietta!

(As if on cue, the train suddenly makes a horrible screeching noise, derails, and bursts into flames.  Burning passengers run from the train, screaming in agony.  Achilles, Evan and the Tortoise survey the carnage in stunned silence.)

Evan:  Whoa.  Dude.

Henrietta: Can one of you idiots please come over here and untie me?