<?xml version='1.0' encoding='UTF-8' ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Things Of Interest</title>
    <link>http://qntm.org/</link>
    <atom:link
      href="http://qntm.org/rss.php"
      rel="self"
      type="application/rss+xml"
    />
    <description>the personal website of Sam Hughes</description>
    <item>
      <guid>http://qntm.org/call</guid>
      <title>The difference between call-by-value and call-by-reference</title>
      <link>http://qntm.org/call</link>
      <description><![CDATA[<b><a href="http://qntm.org/call">Code</a> »</b> The difference between call-by-value and call-by-reference is most easily explained using the following pseudocode.


function modify(input) {
	input = "red"
}

x = "blue"
modify(x)
print(x) // "blue" if call-by-value
         // "red" if call-by-reference


Hint: most popular programming languages call by value. This includes C, Java and Python. The most notable exception is Perl.

Look out!

Confusingly, many call-by-value programming languages pass an object reference as their value.
Use this pseudocode to test this behaviour.


function modify(input) {
	input.colour = "red"
}

x = new Object
x.colour = "blue"
modify(x)
print(x.colour) // "blue" if call-by-value and value is whole object
                // "red" if call-by-value and value is reference to object
                // "red" if call-by-reference


Hint: most popular call-by-value programming languages use a reference to the object as their value. The most notable exception is PHP.

That'...]]></description>
      <pubDate>Mon, 17 Jun 2013 19:18:17 +0100</pubDate>
    </item><item>
      <guid>http://qntm.org/vii</guid>
      <title>Review: Star Wars Episode VII</title>
      <link>http://qntm.org/vii</link>
      <description><![CDATA[<b><a href="http://qntm.org/vii">Blog</a> »</b> It's difficult to put together a cogent response to this film because of how heavily the media/merchandising storm in front of it distorted my preconceptions. I live under a rock and have a mild allergy to advertisements and I couldn't get away from it. But it seems fitting to me that the significance of the film would feel small compared to the significance of everything around it. Episode VII would feel like that even if it had been released into a vacuum, because it isn't a significant moment in cinema. It isn't even a significant moment in Star Wars. This isn't the resurrection that Doctor Who had. The franchise wasn't dead, the franchise never died.
The truth about Episode VII is that it's just another Star Wars film. Despite marking the beginning of a new trilogy -- indeed, very probably a trilogy of trilogies, extending decades into the future of both the Star Wars universe and our own -- it feels like business as usual.
Episode VII begins during the events of A New Hope, with...]]></description>
      <pubDate>Fri, 14 Jun 2013 23:04:07 +0100</pubDate>
    </item><item>
      <guid>http://qntm.org/quantum</guid>
      <title>Redeeming Quantum of Solace</title>
      <link>http://qntm.org/quantum</link>
      <description><![CDATA[<b><a href="http://qntm.org/quantum">Blog</a> »</b> First, watch Casino Royale and Quantum of Solace back-to-back.
...
Wasn't that an improvement? I think they make a solid double-bill. The join between the two is seamless; Casino Royale is by far the better-received film and Quantum can coast on that good feeling for a good percentage of its running length. Casino Royale was always a little bloated with that fourth act, whereas Quantum of Solace is well-understood to be very rushed both in production and the final product. Knocking out the wall between the two evens things out.
Now let's go one step further and see if we can completely fix this thing: move the fourth act of Casino Royale to the start of Quantum of Solace.
What we have are two new films:

Casino Roya—

In his first outing as 007, James Bond tracks down and matches wits with a man named Le Chiffre, "private banker to the world's terrorists". Bond defeats the man at poker, ruining him and leaving him with nowhere to run but into the arms of MI6. Le Chiffre captu...]]></description>
      <pubDate>Wed, 12 Jun 2013 19:10:52 +0100</pubDate>
    </item><item>
      <guid>http://qntm.org/finder</guid>
      <title>Java class finder</title>
      <link>http://qntm.org/finder</link>
      <description><![CDATA[<b><a href="http://qntm.org/finder">Code</a> »</b> "Agh I know that that class is in one of these two hundred JARs, just tell me which one for crying out loud"


import os, sys, zipfile

top = sys.argv[1]
# e.g. "C:\\Program Files (x86)"

classname = sys.argv[2]
# e.g. "javax.wsdl.factory.WSDLFactory"

member = "/".join(classname.split(".")) + ".class"
# e.g. "javax/wsdl/factory/WSDLFactory.class"

for dirpath, _, filenames in os.walk(top):
	for filename in filenames:
		if not filename.endswith(".jar"):
			continue
		filename = os.path.join(dirpath, filename)

		with zipfile.ZipFile(filename) as jar:
			if member in jar.namelist():
				print(filename)
...]]></description>
      <pubDate>Tue, 11 Jun 2013 22:56:26 +0100</pubDate>
    </item><item>
      <guid>http://qntm.org/people</guid>
      <title>Hatt's People</title>
      <link>http://qntm.org/people</link>
      <description><![CDATA[<b><a href="http://qntm.org/people">Ra</a> »</b> Previously

Rajesh Vidyasagar has begun to decelerate.
He takes the lift to Hatt's floor, which is normal for visitors to Hatt's floor given what floor Hatt's is, but then when he reaches the ante-room where Sally works he leans on the chair for support as he lowers himself into it. He politely refuses Sally's offer of tea. When it's time for the meeting, he leans on the chair again to get up. He politely refuses Sally's offer of assistance.
He's losing weight. He leans for support on the door handle to Hatt's office.
"Hi. Have a seat."
Ed Hatt knows Vidyasagar far better. He stays behind his desk, and lets Vidyasagar seat himself.
"I don't come up here very often," Vidyasagar smiles.
"I should have come to you," Hatt says apologetically. He knows the walk from Vidyasagar's office to this one is long and lengthening. "How are you? How's the family?"
"How's the view?" Vidyasagar asks, nodding at the window behind Hatt.
Hatt keeps the blinds permanently closed. "It's crap," he ...]]></description>
      <pubDate>Sun, 09 Jun 2013 23:40:41 +0100</pubDate>
    </item><item>
      <guid>http://qntm.org/schema</guid>
      <title>A technical question about the qntm.org URL schema</title>
      <link>http://qntm.org/schema</link>
      <description><![CDATA[<b><a href="http://qntm.org/schema">Blog</a> »</b> Hey everybody.
So, you may or may not have known that I designed qntm.org to have extremely terse, human-readable, human-memorable URLs. The full rationale behind this design decision can be found in my article from a few years ago, On short URLs.
One of the reasons given for this scheme is:

Because each page has a short, unique "slug" (e.g. in "http://qntm.org/destroy", the slug is "destroy"), each page has a unique URL. There is no redundancy in my URL schema - i.e., it is not possible to reach the same resource via multiple URLs. This keeps my site's complexity to a minimum and I'm told it's also good for SEO, although I honestly pay very little attention to the latter.

Here's what happens, then, when you try to load various URLs:

http://qntm.org/schema - 200 OK
http://qntm.org/schema? - 404 Not Found
http://qntm.org/schema?key - 404 Not Found
http://qntm.org/schema?key=value - 404 Not Found
etc.

Now, new content on qntm.org is made available via an RSS feed which ...]]></description>
      <pubDate>Fri, 03 May 2013 20:39:00 +0100</pubDate>
    </item><item>
      <guid>http://qntm.org/quiz</guid>
      <title>QUIZ: Could you destroy the Earth?</title>
      <link>http://qntm.org/quiz</link>
      <description><![CDATA[<b><a href="http://qntm.org/quiz">Geocide</a> »</b> Geocide is a lot more complicated than just pressing a big red button. It takes decades of hard work - and a lot more besides (as the book will indicate in much greater detail). Cast your eyes over the following questionnaire to see if you have what it takes.
Which of these best describes your childhood?

Many a happy day spent building sandcastles at the beach
Whenever I saw a giant pyramid of cans in a supermarket, I had an irresistible desire to pull out the bottom can
I generally worked on plans to destroy the Earth

What level of scientific education do you possess?

I dropped out of school and believe iPods run on magic smoke
I have a bachelor's degree in engineering; I read Scientific American and build bridges out of stationery for entertainment
I won the Nobel Prize for Physics at the age of eleven, with the help of my future self

How much money do you have?

None or less
I earn an honest wage and put most of it towards my pension
All of it; all legal currenc...]]></description>
      <pubDate>Mon, 29 Apr 2013 23:14:31 +0100</pubDate>
    </item><item>
      <guid>http://qntm.org/oblivion</guid>
      <title>Review: Oblivion</title>
      <link>http://qntm.org/oblivion</link>
      <description><![CDATA[<b><a href="http://qntm.org/oblivion">Blog</a> »</b> I'm one of Tron: Legacy's biggest apologists. I saw the movie as a feature-length music video. I think its soundtrack is the best work that Daft Punk have ever done. The visuals are sharp and pretty enough to keep the eye amused, and the storyline was largely incidental. Sure, it didn't have a single memorable line of dialogue. Sure, Michael Sheen was clearly acting in a completely different movie from everybody else in the production. And any kind of serious science fiction statement it was ever trying to make - the grand themes of science, medicine and religion promised in the trailer - was clearly quelled by Disney for fear of being remotely controversial, which is to say, thought-provoking. And yet every movie is the work of many hands, and it's statistically improbable that none of those hands will have any skill. Tron: Legacy clearly had a lot of love put into it. My particular highlight is the computer interfaces seen in the real world, used by Cillian Murphy's character to stop...]]></description>
      <pubDate>Thu, 25 Apr 2013 19:28:41 +0100</pubDate>
    </item><item>
      <guid>http://qntm.org/bare</guid>
      <title>Bare Metal</title>
      <link>http://qntm.org/bare</link>
      <description><![CDATA[<b><a href="http://qntm.org/bare">Ra</a> »</b> Previously
"Rajesh is a fucking idiot," Ed Hatt explains.
"That seems--" Martin Garrett begins, but then the toll barrier flips up and Hatt floors it, which means that for the next two or three seconds Garrett is squelched back into his seat by acceleration, and unable to respond. On the other side of the Dartford booth is a wide apron where exiting traffic condenses from twenty-four lanes down to three and resumes its course south around the rim of Greater London. At peak periods, there are close to a hundred vehicles jostling for position here, but it's not peak period. If anything, it's valley period: pitch dark, three fifteen on a chilly and wholly unremarkable weekday morning in the spring of 1986.
"That seems harsh," Garrett concludes, once he recovers the ability to speak.
"'Seems harsh'," Ed Hatt echoes. "He doesn't get it. If have to go through one more call with the man where I have straighten out his priorities, I may well have him retired."
"That seems a brutal way to ...]]></description>
      <pubDate>Sat, 20 Apr 2013 18:39:18 +0100</pubDate>
    </item><item>
      <guid>http://qntm.org/aum</guid>
      <title>ॐ</title>
      <link>http://qntm.org/aum</link>
      <description><![CDATA[<b><a href="http://qntm.org/aum">Ra</a> »</b> Previously
The heat in Calcutta is pulverising. Ed Hatt finds it almost impossible to think clearly about anything other than shade and cold water. His Bengali is good enough to direct a taxi driver to a place and count out the cash afterwards, but outside of vehicles, the only way to get anywhere in India is to traipse, or possibly to slog. Wandering, ambling and strolling simply aren't appropriate gaits for an Englishman in such a climate. The sky is unbroken blue, and standing in direct sunlight hurts.
It's 1974 and Hatt is a newly-minted adult, fresh out of Oxford and adrift eastward, looking for whatever, or whatever. Real life has been on hold all the way through his MEng, and is still on hold. He knows that, some months from now, it will reassert itself. At that point, he will be grudgingly forced to find a job. He hopes that he can find something worth becoming excited about by then. He hopes for some kind of epiphany. Or, failing all of that, he hopes to bore himself and tir...]]></description>
      <pubDate>Wed, 03 Apr 2013 19:58:18 +0100</pubDate>
    </item><item>
      <guid>http://qntm.org/variadic</guid>
      <title>Variadic fixed point combinators</title>
      <link>http://qntm.org/variadic</link>
      <description><![CDATA[<b><a href="http://qntm.org/variadic">Code</a> »</b> The procedure for creating a function which is recursive (self-calling) despite also being anonymous (i.e. having no name by which to call itself) is well-understood and straightforward. In a nutshell, the solution is to use a fixed point combinator.
Unfortunately, this procedure is only effective for constructing anonymous functions which directly call themselves, such as:

fibonacci = lambda n: \
	0 if n == 0 else \
	1 if n == 1 else \
	fibonacci(n-1) + fibonacci(n-2)

print(fibonacci(17)) # "1597"

Now imagine you want to construct a pair of anonymous functions, such that each one potentially calls itself and/or the other, such as:

even = lambda n: \
	True if n == 0 else odd(n-1)
odd = lambda n: \
	False if n == 0 else even(n-1)

print(even(6)) # "True"

In this situation, a mere Y combinator isn't sufficient. We need a variadic fixed point combinator which can resolve the fixed points of multiple mutually referential functions simultaneously.
Read on.

Conten...]]></description>
      <pubDate>Sun, 24 Mar 2013 20:20:05 +0000</pubDate>
    </item><item>
      <guid>http://qntm.org/zero</guid>
      <title>Zero Day</title>
      <link>http://qntm.org/zero</link>
      <description><![CDATA[<b><a href="http://qntm.org/zero">Ra</a> »</b> Previously
After the second resurrection, Exa's in free fall. This time he reacts quickly enough to yell a few magic words that crank his kara up to full power before impact. He lands in a field and bounces high enough to die a fourth time just from the bounce, but now his body is being rewritten from "damaged" to "optimal" on a nanosecond-by-nanosecond basis, making him effectively invincible. He lands on his feet after the second bounce, and looks up. The boy is way overhead and dropping hard, a fist raised and coming down. But that can't be it.
Exa calls out, "Show invisibles." Now he sees the orange force field wireframe with which the boy is clothed, a polygonal network making up a mechanical soldier figure easily fifty metres tall. That must be what hit him the first time. He was slapped into the middle distance by an invisible robotic fist. Looking closer, Exa sees that the sword/weapon is already harvesting and transmuting air molecules to build the machine in reality, starti...]]></description>
      <pubDate>Sun, 03 Mar 2013 16:11:12 +0000</pubDate>
    </item><item>
      <guid>http://qntm.org/death</guid>
      <title>Death Surrounds This Machine</title>
      <link>http://qntm.org/death</link>
      <description><![CDATA[<b><a href="http://qntm.org/death">Ra</a> »</b> Previously

Exa comes back to life a split second before hitting the containment shield from the inside at ninety metres per second. It's not enough time to react. He breaks his neck, and dies again.
&nbsp;
Next: Zero Day...]]></description>
      <pubDate>Sun, 03 Mar 2013 01:16:07 +0000</pubDate>
    </item><item>
      <guid>http://qntm.org/abstract</guid>
      <title>Abstract Weapon</title>
      <link>http://qntm.org/abstract</link>
      <description><![CDATA[<b><a href="http://qntm.org/abstract">Ra</a> »</b> Previously
Like an engineer deeply in tune with his machine, Exa feels the world's component error deep in his bones, fractionally before anything has literally gone wrong. The world runs according to rhythms and tidal patterns, networks of sine waves layered on top of one other. The perturbation is subtle enough to be missable by any baseline human, particularly one on the other side of the world from the malfunctioning, invading component. But it's as clear to Exa as a high-pitched sound system whine is to a child not yet old enough to start losing his or her hearing.
He lunges for his phone and crams it to his ear just as it turns completely bright red and gives off its ear-splitting bleep. It's the first alert since he got the new phone, and the "ringtone" is like being kicked in the head.
"Short horizon," says the duty controller. "We need you now."
"Yeah yeah yeah I'm on my way in," Exa says. He falls most of the way out of bed and grabs his discarded suit trousers. It's almo...]]></description>
      <pubDate>Tue, 19 Feb 2013 22:18:25 +0000</pubDate>
    </item><item>
      <guid>http://qntm.org/commentary</guid>
      <title>Primer fan commentary</title>
      <link>http://qntm.org/commentary</link>
      <description><![CDATA[<b><a href="http://qntm.org/commentary">Blog</a> »</b> Since Shane Carruth's second film, Upstream Color, is coming out very shortly, interest in his first film, Primer, is on an uptick right now. I've written two articles about this movie before, but now seemed like a good moment to revisit the movie.
Here is my commentary track. Start the commentary first, then start the movie when you're told to. Apologies in advance for my silly accent, occasional mispronunciations, creaky office chair and low-quality borrowed microphone....]]></description>
      <pubDate>Fri, 15 Feb 2013 19:26:39 +0000</pubDate>
    </item><item>
      <guid>http://qntm.org/rsss</guid>
      <title>New RSS shenanigans</title>
      <link>http://qntm.org/rsss</link>
      <description><![CDATA[<b><a href="http://qntm.org/rsss">Blog</a> »</b> Some housekeeping: I recently discovered that loads of the page http://qntm.org/rss.php were taking an inordinate amount of time, and routinely timing out. On closer inspection it looks like that particular page, due to incompetent coding on my behalf some years ago, causes the entire qntm.org page database to be loaded at once.
I've replaced this with a new system whereby RSS entries are stored in a dedicated table rather than being loaded dynamically, and I can push updates to that table whenever I create or modify a page. From your perspective, there should be no perceivable change other than improved loading time. Obviously, defects go in comments. Defects that are preventing you from commenting should be posted to me or something....]]></description>
      <pubDate>Thu, 07 Feb 2013 00:16:12 +0000</pubDate>
    </item><item>
      <guid>http://qntm.org/twelve</guid>
      <title>Time travel in Twelve Monkeys</title>
      <link>http://qntm.org/twelve</link>
      <description><![CDATA[<b><a href="http://qntm.org/twelve">Blog</a> »</b> The simplest and by far the most consistent explanation for everything that happens in Twelve Monkeys is that there is exactly one timeline which cannot be altered.
Naturally, explaining everything in chronological order doesn't make for the most comprehensible explanation any more than it (ever!) makes for the most compelling story. There's also no point in reciting the story from Cole's perspective because the movie (and, for example, Wikipedia's plot summary) follows this very closely. So for the sake of novelty I will take a different perspective, that of the heroes of the story: the scientists.
*
In winter 1996/1997 a virus was distributed across the world. The virus soon mutated, no cure could be found, and some five billion people - 99% of the human species - died. The survivors retreated underground. It's now about thirty years later, and the scientist/rulers of the world are working to take back the surface of the planet. To do this, they need to gather a sample of the viru...]]></description>
      <pubDate>Sat, 02 Feb 2013 20:17:26 +0000</pubDate>
    </item><item>
      <guid>http://qntm.org/y</guid>
      <title>Y</title>
      <link>http://qntm.org/y</link>
      <description><![CDATA[<b><a href="http://qntm.org/y">Code</a> »</b> How can a subroutine call itself without it knowing its own name?
Contents
					Problem
				
					Fix #1: Symbolic references
				
					Fix #2: strictness
				
					Fix #3: Anonymity
				
					Fix #4: Fixed-point combinators
				
					Fix #5: That was all a complete waste of time
				
Problem
This is Perl.
In reality, my recursive subroutine was one designed to find the differences between two XML documents, but I don't have space for that, so instead I'll use, ugh, Fibonacci numbers:

sub fib {
	my $n = shift;
	return $n == 0 ? 0 :
	       $n == 1 ? 1 :
	       fib($n-1) + fib($n-2);
}

print fib(17); # "1597"


One day I renamed the subroutine and forgot to refactor all of the calls to it, resulting in a runtime error:


sub fibonacci {
	my $n = shift;
	return $n == 0 ? 0 :
	       $n == 1 ? 1 :
	       fib($n-1) + fib($n-2);
}

print fibonacci(17); # "Undefined subroutine &amp;main::fib called at asdf.pl line 3"


This is a trivial defect to spot in this...]]></description>
      <pubDate>Sat, 26 Jan 2013 12:35:02 +0000</pubDate>
    </item><item>
      <guid>http://qntm.org/smashthestate</guid>
      <title>Password security in Deus Ex</title>
      <link>http://qntm.org/smashthestate</link>
      <description><![CDATA[<b><a href="http://qntm.org/smashthestate">Blog</a> »</b> Deus Ex (every time you mention it, someone reinstalls it) takes place in a 2050s future world at the tipping point between dystopia and flat-out chaos. It's also a game world filled to the brim the computer terminals and numeric keypads, roughly half of which must be used to advance through the game. While it's possible to hack terminals and use multitools to bypass keypads, hacking is time-consuming and risky while multitools are in finite supply, which means you end up collecting usernames and passwords from dozens of different sources. Because so many of these logins and codes appear in the game, some interesting patterns emerge.

As is true in every aspect of videogames, making a game which is realistic is a goal totally opposed with making a game which is enjoyable to play. Player character JC Denton is improbably difficult to see or hear, even when crouching in the peripheral vision of a guard in a brightly-lit corridor. Buildings have navigable ventilation shafts; security ca...]]></description>
      <pubDate>Fri, 04 Jan 2013 00:24:53 +0000</pubDate>
    </item><item>
      <guid>http://qntm.org/invisibility</guid>
      <title>Invisibility theory</title>
      <link>http://qntm.org/invisibility</link>
      <description><![CDATA[<b><a href="http://qntm.org/invisibility">Blog</a> »</b> As part of Ra I realised that I needed a character to become invisible. Since this requirement is coming up quite soon I decided to sit down and work out how this cloak of invisibility would work. I ran into some interesting problems. It turns out that becoming invisible is less than half of the problem.
I haven't written any more of Ra yet, so the cloak might not come into the story in the next chapter, or even at all. Even if it does appear, the cloak might not function as described below, and even if that's the case I probably won't spend a huge amount of time laboriously explaining the full mechanism behind it in the story. So, other than the fact that an invisibility cloak might appear in Ra in the future, this article contains no spoilers.
What you should already know
Here are two things that have already been established in the story. The chapter What You Don't Know covers this in detail.
Firstly, there is a special kind of mana called "chi" (the Greek letter &Chi;) which is...]]></description>
      <pubDate>Wed, 26 Dec 2012 23:31:17 +0000</pubDate>
    </item><item>
      <guid>http://qntm.org/daemons</guid>
      <title>Daemons</title>
      <link>http://qntm.org/daemons</link>
      <description><![CDATA[<b><a href="http://qntm.org/daemons">Ra</a> »</b> Previously
Nick Laughon teaches now. He's brand new at it, only a month into the job and still full of momentum. It's the first job he's had which uses any meaningful fraction of his energy each day. It's the first time he's ever gone to bed tired without serious exercise. It also means that he gets home earlier than most. Today, Laura is waiting for him.
"Hello," he says, stacking a crate of unmarked red exercise books in the flat's nominal hallway and dumping a weighty rucksack on top of them. Laura's sitting in the living room, positioned to face the door directly. Between them on the coffee table is a glass filled with a colourless, effervescent liquid which Nick assumes to be gin and tonic. Basic signals given off by Laura suggest a relatively high gin-to-tonic ratio. The drink, however, is full. Laura sits behind it, not drinking it. Deliberately and purposefully not getting drunk. She is deeply unhappy.
Nick last saw Laura more than twenty-four hours ago. Work has demanded th...]]></description>
      <pubDate>Fri, 21 Dec 2012 16:17:42 +0000</pubDate>
    </item><item>
      <guid>http://qntm.org/yantra</guid>
      <title>The Seventh Impossible Thing</title>
      <link>http://qntm.org/yantra</link>
      <description><![CDATA[<b><a href="http://qntm.org/yantra">Ra</a> »</b> Previously
Meditation is part of the workload of a professional mage. No employer wants to pay for its people to spend ten percent of the working day dozing off in the lotus position in quiet, well-lit, boringly-painted rooms which could be better used for office space; nor, despite appearances, is "dozing off" what happens in there. Meditation is mental exercise: heavily structured, exhausting, time-consuming, headache-inducing even under perfect circumstances and one hundred percent necessary. A mage whose brain is not properly aligned with the work is a mage unable to work.
Laura is one of fifteen in Meditation 1 at Hatt Group that Monday morning, and has been sat down for barely two minutes when she has the revelation.
It's a bad thing for a mage to have revelations while meditating. This is not a religious pursuit, and the achievement of enlightenment is not the aim of the game. Unbidden, distracting thoughts are a sign of a wandering mind, which is the exact opposite of what's...]]></description>
      <pubDate>Sun, 11 Nov 2012 19:27:59 +0000</pubDate>
    </item><item>
      <guid>http://qntm.org/looper</guid>
      <title>Time travel in Looper</title>
      <link>http://qntm.org/looper</link>
      <description><![CDATA[<b><a href="http://qntm.org/looper">Blog</a> »</b> "Every second that passes is bad."
Let's talk about Looper.
It's rare that I've seen a time travel movie which is so serious about its subject matter and serious in its subject matter while simultaneously being so unclear in its mechanics. At one end of that spectrum is Primer, which has hardcore (albeit fictitious) scientific principles behind it and which builds its story almost entirely on the logical consequences of those principles. At the other end we have Doctor Who in which time obeys whatever wibbly wobbly rules it needs to obey "today" in order to make today's stories work, but which gets away with that, because its stories and premise are as essentially "light" in tone as the "science". In Primer, you have to think very hard about how time travel works just to decode what you're seeing, let alone to grasp the emotional story. In Doctor Who, the harder you think about it, the more you're going to suffer and the less fun you're going to have.
Looper, in the middle, is unusu...]]></description>
      <pubDate>Sat, 06 Oct 2012 02:04:57 +0100</pubDate>
    </item><item>
      <guid>http://qntm.org/space</guid>
      <title>Space Magic</title>
      <link>http://qntm.org/space</link>
      <description><![CDATA[<b><a href="http://qntm.org/space">Ra</a> »</b> Previously
Rachel Ferno's burning mana so fast to stay in the air that it feels like it's doing physical and mental damage to her, as if she were consuming body parts and organs and memories as reaction mass, as if whatever it is that's finally going to match velocities with the plummeting orbiter won't be even be a human being anymore but a spent propellant tank. Autokinetic effects must, on pain of burst retinas and crushing death, be applied uniformly across the whole body. She pulls what would be lethal gees to keep up with the machine's chaotic tumble, desperately fighting to stay out of its smoke trail where she can still eyeball her interception trajectory.
Virtual instruments spread out in front of her like playing cards show her relative position and velocity, her airspeed and orientation, her oxygen levels, mana levels, and her degree of concentration, but the more closely she monitors the flashing values, the closer she edges towards completely losing it, breaking the spel...]]></description>
      <pubDate>Mon, 17 Sep 2012 22:47:00 +0100</pubDate>
    </item><item>
      <guid>http://qntm.org/perl</guid>
      <title>Learn Perl in about 2 hours 30 minutes</title>
      <link>http://qntm.org/perl</link>
      <description><![CDATA[<b><a href="http://qntm.org/perl">Code</a> »</b> A bunch of new people started at work and we use a lot of Perl in our department. So I put together some information about Perl and I thought it might be worth sharing so here it is.

 Perl in about 2 hours 30 minutes
 Japanese translation by ktat

This was originally dispensed in the form of a presentation and about a dozen Perl scripts and half a dozen modules, which I've consolidated into one fairly readable file. If you find something that has been omitted from the file, this is probably either because it isn't used very frequently in my department, because it's trivial to look up, or because it just wouldn't fit due to time constraints.
It turns out that two and a half hours is barely enough to rattle through the essentials of Perl. The biggest example of this is use, a critical core feature which requires knowledge of packages, modules (which are different from packages), BEGIN blocks and class methods (i.e. object-oriented Perl) in order to fully explain....]]></description>
      <pubDate>Tue, 11 Sep 2012 11:57:47 +0100</pubDate>
    </item><item>
      <guid>http://qntm.org/teaching</guid>
      <title>Teaching Perl</title>
      <link>http://qntm.org/teaching</link>
      <description><![CDATA[<b><a href="http://qntm.org/teaching">Blog</a> »</b> I've taught Perl to a grand total of about fifty people at work now, in various sizes of group. These are, generally, newcomers to an office where a lot of Perl is used. Most of these newcomers are fresh out of university and if they have any programming experience it's usually Java from their CS courses. These people need to learn Perl to do their jobs, and my task is to show them how to do this work and how to find their way after the lessons are over. Here are some things I've discovered.
Right out of the gate, there's an unavoidable culture shock which comes from learning Java and then learning Perl. Perl, by its very nature, encourages behaviours which Java, by its nature, strongly discourages or even makes impossible. For example: stern, protective type safety is not only missing from Perl but actually not even considered particularly desirable. Perl is relaxed. The reaction from students is, naturally: "Isn't this a huge obstacle to getting anything done?" Obviously the answer ...]]></description>
      <pubDate>Sun, 02 Sep 2012 00:06:13 +0100</pubDate>
    </item><item>
      <guid>http://qntm.org/shuffle</guid>
      <title>Perform bit shuffling operations in Python</title>
      <link>http://qntm.org/shuffle</link>
      <description><![CDATA[<b><a href="http://qntm.org/shuffle">Code</a> »</b> Here's another one from the "uncertain if anybody has any use for a thing like this" department.
Let's say you were trying to decode a four-byte UTF-8 character to its Unicode code point, as a 32-bit integer. You might express that conversion in the form of a neat, short string as follows:

11110aaa 10bbbbbb 10cccccc 10dddddd -&gt; 00000000 000aaabb bbbbcccc ccdddddd

But manual bit-shuffling is tedious at the best of times. shuffle.py is a Python 3 script which takes this exact string as input and returns you some sample bit-shuffling code as output.


C:\>python shuffle.py "11110aaa 10bbbbbb 10cccccc 10dddddd -&gt; 00000000 000aaabb bbbbcccc ccdddddd"

def shuffle(input, index):
        '''
                11110aaa 10bbbbbb 10cccccc 10dddddd
                ->
                00000000 000aaabb bbbbcccc ccdddddd
        '''
        assert index + 4  4,
                (input[index + 1] & 0b00001111) > 2,
                (input[index + 2] & 0b00000011) ...]]></description>
      <pubDate>Tue, 07 Aug 2012 22:27:38 +0100</pubDate>
    </item><item>
      <guid>http://qntm.org/axiom</guid>
      <title>Python lacks the Axiom of Choice</title>
      <link>http://qntm.org/axiom</link>
      <description><![CDATA[<b><a href="http://qntm.org/axiom">Code</a> »</b> Python has sets, but lacks the axiom of choice.
If I have a set object or a frozenset object then that object may or may not have members.
If a set has a single member, then I can get that member using set.pop():

chars = {"a", "b", "c"}

if len(chars) == 1:
    print(chars.pop())
else:
    print("[" + "".join(escape(char) for char in sorted(chars)) + "]")

But this has two drawbacks. Firstly, it's destructive: chars is now empty after following the first code path.
Secondly, it doesn't work on frozensets, because you can't modify a frozenset. The only option available to me is:

chars = frozenset({"a", "b", "c"})

if len(chars) == 1:
    print([char for char in chars][0])
else:
    print("[" + "".join(escape(char) for char in sorted(chars)) + "]")

which is just disgusting. Wouldn't it be much prettier if Python simply supported the axiom of choice?

chars = frozenset({"a", "b", "c"})

if len(chars) == 1:
    print(chars.choose())
else:
    print("[" + "".j...]]></description>
      <pubDate>Thu, 02 Aug 2012 14:40:30 +0100</pubDate>
    </item><item>
      <guid>http://qntm.org/fsm</guid>
      <title>Finite state machines in Python</title>
      <link>http://qntm.org/fsm</link>
      <description><![CDATA[<b><a href="http://qntm.org/fsm">Code</a> »</b> 
 fsm.py which is on GitHub now

This is a library for the creation and manipulating of deterministic finite state machines in Python 3. I realise that this has been done before in basically every language under the sun, Python included, but doing it for myself was incredibly good fun and highly educational.
fsm class overview
This contains the basic fsm class. This allows you to create a deterministic finite-state machine (I guess "automaton" is a more correct term but never mind, if that bothers you too much you can do a find-and-replace).
You can use the fsm.accepts() method to pass a string to the FSM and retrieve True or False. The fsm class also implements __str__() which means you can print an FSM using print(fsm).
Finally and most importantly, if you also have my companion lego.py module, you can call fsm.lego() to convert the FSM into an object representing a regular expression with exactly equivalent matching power to the original FSM. This process uses this algorithm ...]]></description>
      <pubDate>Wed, 01 Aug 2012 20:04:22 +0100</pubDate>
    </item><item>
      <guid>http://qntm.org/jesus</guid>
      <title>The Jesus Machine</title>
      <link>http://qntm.org/jesus</link>
      <description><![CDATA[<b><a href="http://qntm.org/jesus">Ra</a> »</b> Previously
Grey has just put the last of the pieces together in his head when he hears the first scream from outside the shaft. The timing is uncanny. He has spent a week and a half taking photographs and drawing schematics and dispatching hesitant mana pings into likely-looking receptors in the surface of the artifact. He has observed the series of inexplicable and then unnerving and then mind-wrenching real-world effects of powering the thing up. He has spent that time patiently avoiding leaping to the conclusion. He has tested every step and ruled out every alternative. And he has, after ten-and-a-half days, for one moment, permitted himself to entertain the possibility that what he's looking at is what he feared at first glance he was looking at, and at that instant he hears what sounds like the world above being Cleaned, and it's almost a relief.
Magic is a science. It's a science as advanced as any other, as quantum field theory or general relativity, and there have been outlan...]]></description>
      <pubDate>Sat, 14 Jul 2012 15:47:59 +0100</pubDate>
    </item><item>
      <guid>http://qntm.org/crystal3</guid>
      <title>Crystal Maze Pub Crawl route v2.0</title>
      <link>http://qntm.org/crystal3</link>
      <description><![CDATA[<b><a href="http://qntm.org/crystal3">Blog</a> »</b> The Crystal Maze Pub Crawl is a pub crawl in London based on the classic game show The Crystal Maze. Inspired by the format, it consists of:


	3 pubs in the Industrial Zone (Battersea)
	3 pubs in the Mediaeval Zone (City of London)
	3 pubs in the Oceanic Zone (Maritime Greenwich)
	3 pubs in the Futuristic Zone (Docklands)
	1 pub overlooking the Crystal (Millennium) Dome.


History

This crawl was designed as a lighter, more pleasant alternative to the ambitious and ill-fated Alphabet Pub Crawl. This crawl includes only 13 pubs as opposed to the 26 of the ABC or the Monopoly Pub Crawl. However, the pubs have been chosen carefully for high quality (rather than just their initial letter or location). The additional time will hopefully provide time for sightseeing, leisurely food-eating and photography. It also takes us through some nice areas of London.

Pub recommendations came from friends, CAMRA's Good Beer Guide 2010 and the AA Pub Guide 2011.

This is the second vers...]]></description>
      <pubDate>Mon, 09 Jul 2012 22:06:38 +0100</pubDate>
    </item><item>
      <guid>http://qntm.org/screenplays</guid>
      <title>Abandoned screenplay ideas</title>
      <link>http://qntm.org/screenplays</link>
      <description><![CDATA[<b><a href="http://qntm.org/screenplays">Blog</a> »</b> "Centurion"
Based on and named after the drinking game "Centurion", in which you drink one shot of beer per minute for 100 minutes. This movie takes place in real time and focuses on a group of university students who gather together in somebody's room to play the game. Each is drinking a different beverage.
The movie would be talking heads, driven by compelling Tarantino-style dialogue between interesting characters with a year or two of shared history behind them. The dialogue would probably eventually have to stop being about nothing in particular and start moving forward with some sort of actual story. Perhaps terrible revelations occur or the whole dynamic of the friends changes at this pivotal moment in some way. The drinking does not stop - some succeed in the game, some become weary or ill and drop out. The minute-by-minute pace of drinking provides a background, a rhythm, perhaps breaking up the whole movie into one hundred 60-second skits.
I never really nailed any of this...]]></description>
      <pubDate>Wed, 13 Jun 2012 21:37:12 +0100</pubDate>
    </item><item>
      <guid>http://qntm.org/thaumonuclear</guid>
      <title>Thaumonuclear</title>
      <link>http://qntm.org/thaumonuclear</link>
      <description><![CDATA[<b><a href="http://qntm.org/thaumonuclear">Ra</a> »</b> Previously
The citadel is as tall as a thirty-storey building and featureless as a brick. Nat walks around it once, looking for windows and gates. Finding none, she tries imagining herself inside and then "stepping into" the mental image, which is how things usually work here. It doesn't work. Abandoning subtlety, she makes one hand gluey and uses it to pull a black stone as big as a refrigerator right out of the wall. She flings it away over her shoulder. That leaves a large rectangular slot, with just enough room for her to clamber into the dark place inside.
The wall is a metre and a half thick, with nothing behind it but a half-metre gap and an identical wall. Natalie shuffles sideways along the narrow alley until she reaches the corner, where both walls turn ninety degrees. She looks up, and can't see a lot, but there's definitely clear space above her head. She concludes that what she's looking at is a second, slightly smaller citadel inside the first one.
Everything goes dark...]]></description>
      <pubDate>Wed, 06 Jun 2012 22:20:54 +0100</pubDate>
    </item><item>
      <guid>http://qntm.org/broken</guid>
      <title>Broken 'Verse</title>
      <link>http://qntm.org/broken</link>
      <description><![CDATA[<b><a href="http://qntm.org/broken">Ra</a> »</b> Previously

Laura and Natalie Ferno are engulfed in hellish red light underneath what might as well be a million tonnes of magma. Their world is barely larger than a pair of coffins. The noise the magma makes is strange, more of a creaking than a rumbling. The noise is pervasive and unpleasant.
Their shared multiplied force shield fizzes under load as it races through Laura's mana reserves to maintain its structural integrity. The shield only lets visible light through, which is the only reason that they haven't both been incinerated by radiant heat. They're running out of air.
About eight breaths each.
"Laura," Nat hisses. Her voice rebounds strangely inside the tiny enclosed space. "You've got to do this. I've no mana left and you're running out. You've got to do this now."
"I can't-- I don't know any spells that can get us out of here." Laura wonders why Natalie is talking so quietly. She realises it's to conserve oxygen. They must have used half of it up already. The orange-r...]]></description>
      <pubDate>Tue, 29 May 2012 19:05:09 +0100</pubDate>
    </item><item>
      <guid>http://qntm.org/ragdoll</guid>
      <title>Ragdoll Physicist</title>
      <link>http://qntm.org/ragdoll</link>
      <description><![CDATA[<b><a href="http://qntm.org/ragdoll">Ra</a> »</b> Previously
"Interesting" is the term geologists use to describe Iceland, and geologically interesting places are worth paying attention to in the same way that warzones and brand new nuclear powers are. Entire cubic kilometres of lava are seen emerging from  the place. Sometimes it grows new islands. Sometimes its volcanic fissures eject so much sulphur dioxide into the atmosphere that the global temperature drops significantly, crops fail across the Northern Hemisphere and millions die from famine. Iceland is the place you go to remind yourself that planet Earth is a machine: very large, continuously operating, working on a time scale too long to easily observe, towards a highly uncertain end; and to remind yourself that all the organic life that has ever existed amounts to a greasy film that has survived on the exterior of that machine thanks to furious improvisation rather than any specific dispensation.
Iceland is also one of the few places on Earth, other than on people's skin, ...]]></description>
      <pubDate>Fri, 04 May 2012 21:43:28 +0100</pubDate>
    </item><item>
      <guid>http://qntm.org/streetmentioner</guid>
      <title>Time travel grammar</title>
      <link>http://qntm.org/streetmentioner</link>
      <description><![CDATA[<b><a href="http://qntm.org/streetmentioner">Blog</a> »</b> 
	"Dude, are you hungry? I haven't eaten since later this afternoon."


It is often held that time travel is difficult to talk about because of shortfalls in the English language. In his science fiction book The Restaurant At The End Of The Universe, Douglas Adams introduces a fictional author "Dr. Dan Streetmentioner" whose own Time-Traveller's Handbook Of 1001 Tense Formations explains at great and convoluted length how to describe events in your past but another person's future, events averted through time travel, events which you are, while speaking, travelling through time to avoid, and many more. This involves the introduction of many new verb tenses and convoluted verb conjugation rules for these tenses.
In fact, existing grammatical rules are already perfectly well-suited to talking about time travel. All we need to do is obey some conventions.

Part one: fixed history
There are multiple distinct models of time travel which a universe may obey. In the simplest model, ti...]]></description>
      <pubDate>Mon, 26 Mar 2012 13:20:13 +0100</pubDate>
    </item> 
  </channel>
</rss>