vttoth

I am a software developer and author of computer books. I also work on some problems in theoretical physics. For more information, please visit my personal Web site at http://www.vttoth.com/.

Mar 222016
 

Today is a remarkable day. I spent more than the usual amount of time peeking at either CBC Newsworld or CNN, and I have yet to see the face of a certain American real estate magnate turned reality TV show host turned politician; not that I particularly miss the sight of his toupee.

The reason why Mr. Trump didn’t appear on screen is the multitude of other things happening.

For us here in Canada, the most consequential news are the federal budget, the first by Justin Trudeau’s recently formed liberal government. As promised, it’s a budget about spending and spending some more; the projected deficits are huge. The premise of this budget is that deficit spending is necessary in order to help the stagnant economy.

News of the budget were almost dwarfed by news of the death of Toronto’s larger-than-life former major, Rob Ford. Rob Ford was intensely disliked as a politician, but I think few people wished him to die a miserable death from a rare form of cancer. As Ford himself said, his tenure as major, for better or for worse, will be remembered.

Then there is, of course, that terrible series of coordinated attacks in Belgium, with dozens dead. In addition to an impotent, and likely excessive response by inept authorities (I just saw that the airport in Brussels will be shut for three days), it will also likely trigger a new wave of islamophobia, xenophobia. A message that, thankfully, has few followers in Canada, as splendidly evidenced by the negative response in Quebec to French far-right leader Marine Le Pen’s visit, which is coming to its conclusion.

What was supposed to be the big news of the day is the end of another politician’s trip abroad, namely Barack Obama’s historic visit to Cuba… but the CNN anchors broadcasting from Havana are talking mostly about the Brussels attacks and their aftermath.

The other big news of the day was supposed to be the “winner-take-all” Arizona caucus… but with all the other stuff going on, I have not yet heard this mentioned on CNN or CBC Newsworld today. Thus, no Donald Trump on my television screen either.

All this news makes me wonder if The Globe and Mail tomorrow might end up being published with not one but maybe three consecutive cover pages.

 Posted by at 5:00 pm
Mar 202016
 

Recently, it was proudly announced that Canada now has a state-of-the-art emergency preparedness system, with the participation of major telecommunication companies like Bell or Rogers.

The problem… well, here is an example of the problem:

This is what was on my television screen a little earlier this afternoon, in place of CNN, for something like a full minute or so.

And not just in place of CNN. In place of every channel. Even if I was trying to watch a recorded show on the PVR.

What’s wrong with it, you ask? Well, I live in Ottawa. That is more than 400 kilometers from Toronto, and the last time I checked, a 1997 Toyota Camry is not a hypersonic jet aircraft.

But even if the abduction happened next door… I don’t mean to be heartless, but this kind of dramatic alert is something I would expect to see if World War 3 was imminent, or if my city (not Toronto!) was about to be hit by an F5 hurricane. Not in case of a domestic abduction (which, in the vast majority of cases, is just a family member like an estranged father, taking a child without permission.)

The last time this happened, I wrote to the CRTC, who told me that it’s not their responsibility (even though they were the ones who mandated it!) but that of provincial agencies and the telecommunication companies that implement the system.

Today, I wrote to Rogers. I do not expect a meaningful reply*.

As if I didn’t already have enough incentives to cut the cable.


*Update: A day after I sent my e-mail complaint to Rogers, a gentleman by the name of Aaron called me from the “President’s office”. He very patiently listened to me as we discussed not just the emergency alert system but also other issues related to the digital transition, the cost and limited choice of decoder equipment, and other topics. We spent more than 20 minutes on the phone. I still don’t expect anything meaningful to happen, but I appreciated it that my complaint was taken somewhat seriously.

 Posted by at 6:06 pm
Mar 182016
 

Yesterday, I went to see my barber. When I found the shop open, I was delighted that he kept his promise: he planned to retire at the end of last year, but on my last visit, he told me that he’d be keeping the shop open for a while longer. (Yes, it’s been that long since my last haircut. I don’t like haircuts, but when even my wife notices that I am beginning to look like Albert Einstein, I remind myself that you first have to match Einstein’s output as a physicist before you’re allowed to look like him.)

When I entered the shop, I noticed that it was under renovation. But the sign said that it was open! In fact, it was a brand new electronic sign that advertised the business hours. I didn’t see a soul in sight so I hollered, “hello?” and a young, brown-skinned man soon emerged. He assured me that the shop was indeed open for business, so I made the requisite leap in logic and realized that Michel, the old barber, must have retired after all. I asked the young man if he was going to be my new barber.

Soon, I learned a little bit about Paulos the barber. He came to Canada from Ethiopia about five years ago with his brother. Since then, they managed to sponsor several family members. Paulos is a lean, tall 41-year old man, though he looks much younger. He told me that he found the shop advertised on Kijiji and decided to go for it. He told me of his plans to hire 2-3 additional barbers, and create a much more welcoming shop with Wi-Fi and a coffee machine. I took a closer look at his hours: He is keeping the shop open, for now all by himself, from 9 AM until 8 PM every weekday, and until 6 PM on Saturdays.

paulos

Meanwhile, Paulos finished my haircut. When I asked him how much I owe, he told me that it’s whatever I used to pay Michel. So I paid the same amount, with tip, that I used to pay.

As I left the barber shop, I was shaking my head. Damn immigrants, I thought. They have the audacity to come to this country in search of a better life. And the cheek! Never mind making a living, working extra long hours, they actually plan to create jobs! How dare they.

And the cultural rift. It is hard to find a pair of countries more culturally different than Ethiopia and Canada. Yet he has the chutzpah to do this… finding his place in Canadian society, taking over a business from a retiring French Canadian gentleman and daring to be successful.

What a horrible thing that these immigrants are doing. What hubris… instead of being on welfare and being a burden on society, they dare to make this country better, enrich it with their hard work, contribute to its colorful multiculturalism. It is absolutely intolerable. Just what is this place coming to?

 Posted by at 9:50 pm
Mar 122016
 

Yet another chapter from the playbook of the late Weimar Republic: Even as he calls Bernie Sanders a “communist”, Trump now blames his political oppositions, supporters of Sanders and MoveOn.org among them, for the violence, the “planned attack” that erupted in Chicago last night. Which reminds me strongly of how the NSDAP presented itself as the party of law and order that would end the by then rampant violence between NSDAP supporters and communists on the streets of Germany in the early 1930s.

To his credit, Republican candidate Marco Rubio I think understands this.

It was astonishing to watch his body language, his slumped shoulders, as he shook his head when responding to a journalist’s question about his commitment to support Trump if Trump were to win the nomination: “I don’t know. I mean that I already talked about the fact that I think Hillary Clinton would be terrible for the.., for this country. But the fact that you are even asking me that question… er, I still at this moment continue to intend to support the Republican nominee, but… getting harder every day.”

What Rubio said in the minute or two preceding this comment is also worth watching.

 Posted by at 3:13 pm
Mar 092016
 

Our long-serving Member of Parliament, Mauril Bélanger, was the recipient of an unprecedented honor today: He was named honorary Speaker of the House.

Unfortunately, we could not hear Mr. Bélanger speak. That is because he is suffering from ALS, or Lou Gehrig’s disease (its most famous sufferer alive is the physicist Stephen Hawking), which is rapidly progressing; since his initial diagnosis last fall, he lost the ability to speak, so it was his iPad that was speaking for him.

The illness also ended his dream of becoming Speaker of the House, which explains the honor that has been bestowed on him today.

I have a lot of respect for Mr. Bélanger. Over the years, I wrote to him a few times with my concerns, and on more than one occasion I received a personal response, either in the form of a latter or, in one case, in the form of a telephone call. In short, Mr. Bélanger appeared to take the idea of representing his constituents very seriously.

He may have lost the ability to speak but he has not yet lost all his mobility. Although he needed some help, he was able to walk into the Chamber on his own two feet.

It was a moving moment, and I am glad I caught it on the CBC. Thank you, Mr. Bélanger.

 Posted by at 4:30 pm
Mar 062016
 

The other day, I saw this media photo of a SpaceX rocket that was readied for launch:

The photographer’s choice to include the No Photography sign in this picture reminded me of a No Photography sign I saw a few years ago in Budapest, at a construction site in the vicinity of the US embassy:

These signs are ridiculous. You don’t see them often in democracies; they were very frequently encountered in the former Soviet Bloc. Which once made me wonder… all a Western spy had to do was to drive around the country and mark the location of No Photography signs in order to get a fairly accurate map of all the communist regime’s sensitive installations.

In the era of the ubiquitous smartphone with HD camera, not to mention more advanced gadgets like Google’s Glass or even toy drones with HD video, these signs are pitifully pointless.

 Posted by at 11:35 am
Mar 052016
 

I always wondered what it must have been like to live through the rise of fascism in Europe, especially in the early days. Most didn’t recognize the danger. Many applauded. A few were concerned, but they were seen as panicmongerers or worse, maybe as communists, Bolshevik collaborators, traitors.

And now I am beginning to understand what it must have been like to be one of those Cassandra-like souls.

The far right in Europe is applauding. “Si j’étais américain, je voterais Donald TRUMP,” tweets Jean-Marie Le Pen, founder of France’s far right National Front party. “I hope Donald Trump will be the next US President,” chimes in his colleague from Holland, Geert Wilders, who founded the Party of Freedom. People in my country of birth, Hungary, who cheered their prime minister when he erected a razor wire fence along the country’s southern border to keep refugees out, now feel vindicated when they hear Trump talk about a wall along the US Mexico border.

Trump wants to “make America great again” by undermining fundamental constitutional guarantees such as the First Amendment, and by reintroducing torture into America’s arsenal. He is proposing to keep Muslims out and even suggested that Muslims should be registered (just one step short of having them wear visual identification… yellow stars of David, anyone?)

Where will this end? Just how far will the world go this time?

Lest we forget, in the 19th century, Germany was the center of European civilization. The center of culture, music, and science. The country that gave us Gauss, Beethoven, Einstein, Kant or Goethe. Perhaps the most important lesson of Germany is that none of it matters: A horror regime backed by populism and the ideology of fear and hate can arise anywhere.

We have lived mostly in peace since 1945. And those of us lucky enough to have been born in Europe or North America, in unprecedented freedom and prosperity. There are no guarantees that this will last forever. History has not come to an end; we are living it.

And every time I see Trump on CNN, ever time I watch Trump give another election speech, I shudder. Is this it? Is this how Mussolini, Franco, Hitler and others rose to power? Especially Hitler… who, let’s not forget, was Germany’s democratically elected and appointed leader when he assumed the chancellorship on January 30, 1933.

And lest we forget, most of those who supported these horrific regimes denied that they were supporting hate or racism. In fact, they probably rejected any such insinuation indignantly. They weren’t racists… they are trying to defend their nation! Protect its values! They were the smart ones who recognized an existential threat to their culture and way of life; others, who failed to see the coming end of civilization every time they saw a Jewish child were naive fools.

I don’t usually engage in overused comparisons with the Nazis and fascists. But this time, I think the concerns are warranted. Our world is no longer following a path towards greater freedom and more respect for human rights. Walls and fences are being erected everywhere. States once famous for their liberalism are cracking down in the name of fighting terrorism. Europe, which once celebrated the vanishing of internal borders, is in the process of rebuilding them. And the really scary part is… this is what the people want. These measures are popular. Politicians who go against the tide, like Angela Merkel, who promised that Germany would accept as many refugees as it can, are embattled. The nationalist right is rising everywhere. Canada bucked the trend for now, but who knows what happens if Mr. Trudeau loses the next election and the Conservatives return with a vengeance, as the left remains divided.

Know what? I hope I am wrong. I hope I have succumbed to hype and that my views are detached from reality. I hope that Trump doesn’t get elected, or that if he does, he will turn out to be just another crooked and pragmatic politician, one who keeps few of his election promises and one who is more interested in getting re-elected than in plunging the world into some abyss.

Unfortunately, if I am right, it will be too late.

I’ve never been happier that my wife and I were not blessed with children. As we are getting older, we have less and less to worry about. As we have less at stake, we can more and more afford to be just spectators, watching a spectacular train wreck.

It’s not like there’s anything we can do about it.

 Posted by at 11:14 pm
Mar 032016
 

I was watching the news this morning. Including the weather. And then I double-checked my calendar, wondering if I perhaps became delusional: Is this really March, or is it still January?

Then again, tonight supposedly it’ll get even colder.

 Posted by at 8:17 am
Feb 262016
 

As I am watching a speech by Donald Trump, I am beginning to have a whole new appreciation of Adolf Hitler.

Just how powerful is the message of hate!

And with each new public appearance, Trump improves his mastery of it.

Everything he says is about hate.

He tells you to hate illegal immigrants because they murder innocent Americans.

To hate Syrians because you don’t know where they came from, what they want, and where they are.

To hate gun control advocates because they are helping “these animals” who shot up 135 people in Paris.

To hate the Iranians. Common Core. Obama (of course). The (cheating and lying) media. Newspapers. Republican rivals.

Because “the American dream is dead” but Trump will fix things and “make America great again”.

Americans generally are not hateful people. In the past, they resisted the message of hate. During the Great Depression, the message of hope prevailed. During the Cold War, Joe McCarthy’s hateful witch hunt ended in disgrace.

But now… I never thought I’d see it within my lifetime, but the message of hate is back, and it may be more powerful than ever.

And it is bloody scary.

 Posted by at 2:25 pm
Feb 232016
 

Here is a spectacular photograph of the Moon made last night by my good friend David Ada-Winter in light-polluted New Jersey:

David explains: “I took this picture of the Moon using the so-called Sunny 16 rule, the essence of which is the following: On a clear day, with an aperture of 16, the exposition time must be the reciprocal of the ISO value. In the case of this picture, the ISO was 200, so the exposition time was 1/200 with an aperture of 16. In front of my telescopic lens, I also used a doubler that extended the focal length to 800 mm. The picture itself was made with the Canon Rebel t2i camera, which has a crop factor of 1.6, allowing the Moon to appear even larger in the image.”

Apparently, David’s wife disapproves of his pricey hobby. I’m tempted to remind her that other men of David’s age often acquire even pricier hobbies, which usually involve brightly colored sports cars and lightly clad ladies…

 Posted by at 9:46 pm
Feb 212016
 

Take this dystopian science-fiction story, in which a major military power is using machine intelligence to identify potential threats, which it then eliminates using unmanned drones.

The twist of the story is that even a very accurate algorithm can lead to unintended consequences when the actual threat ratio is very low. This is a classic problem known from statistics.

Imagine that out of a population of a hundred million, only 100 people represent a threat, and the algorithm is 99% accurate identifying them.

Which means that out of the 100 threats, it will miss only 1. So far, so good.

Unfortunately, it also means that out of the remaining 99,999,900, it will falsely identify 999,999 as threats even when they aren’t. So out of the 1,000,098 people who are targeted, onl 99 are genuine threats; the remaining 999,999 are innocent.

OK, improve the algorithm. Perhaps at the expense of having more false negatives, say, 50%, increase the accuracy to 99.99% when it comes to false positives. Now you have 50 of the real threats identified, and you’re still targeting 10,000 innocent people.

Now imagine that the military power in question somehow convinces itself that this algorithmic approach to security is still a good idea, and implements it in practice.

And now stop imagining it. Because apparently this is exactly what has been taking place with the targeting of US military drones in Pakistan, with the added twist that the science behind the algorithms might have been botched.

Oh, but a human is still in the loop… rubber-stamping a decision that is made by a machine, and is carried out by other machines, eliminating possibly several thousand innocent human beings.

As I said… welcome to Skynet, the dystopian network of homicidal machine intelligence from the Terminator movies.

Scared yet? Perhaps you should be. We should all be.

 Posted by at 10:21 pm
Feb 212016
 

Last night, when I almost managed to kill my server, I was playing with a service that I just discovered: Weather forecast in ASCII.

Well, almost ASCII. UTF-8 characters, to be precise. (And it was while messing with those xterm settings that I managed to enter a command using the wrong syntax.)

Still, it’s a nicely formatted three-day forecast suitable for text terminals. And it has pretty thorough world coverage.

I just hope the forecast holds up for Tuesday, as I’ll have quite a few errands to run that day and I’d prefer not to get stuck in a snowstorm.

 Posted by at 9:24 am
Feb 212016
 

Here is a message to the citizens of the United States from the “Canada Party”.

What can I say. If Trump becomes president, being way ahead may not be a bad idea.

 Posted by at 8:42 am
Feb 202016
 

OK, my Linux friends… try not to make the mistake that I made earlier tonight.

I was trying to stop a process in the gentlest way possible, buy sending it a hangup signal to its numerical process ID, e.g., 12345. The syntax was supposed to be this:

kill -1 12345

Unfortunately this is not what I typed. Because it was an afterthought that I’d use a hangup signal (instead of the default kill signal) I entered the option after the process ID, like this:

kill 12345 -1

A second or two later, I lost my xterm session. In fact, I lost all my xterm sessions. My mail client disconnected. I could not even telnet into the server anymore. For all practical intents and purposes, it seemed dead as a doorknob.

OK, not completely dead. I was able to log back in through its physical keyboard, only to find out that apart from core processes, nothing was running. No SQL server. No Web server. No SSH demon. No name server. And so on.

What the !#@@#@!& have I done?

I looked at the command long and saw the last command that I typed. I quickly checked the man page of kill and indeed… what I typed instructed kill to terminate process 12345 (using the default kill signal) and then, using the same default kill signal, terminate all processes with a pid greater than 1.

Bravo. What a clever boy. I promise I’ll try not to do that again anytime soon.

Still, I was able to bring everything back to life without rebooting the server. I hate reboots.

 Posted by at 10:49 pm
Feb 162016
 

The other day, I ran across a question on Quora: Can you focus moonlight to start a fire?

The question actually had an answer on xkcd, and it’s a rare case of an incorrect xkcd answer. Or rather, it’s an answer that reaches the correct conclusion but follows invalid reasoning. As a matter of fact, they almost get it right, but miss an essential point.

The xkcd answer tells you that “You can’t use lenses and mirrors to make something hotter than the surface of the light source itself”, which is true, but it neglects the fact that in this case, the light source is not the Moon but the Sun. (OK, they do talk about it but then they ignore it anyway.) The Moon merely acts as a reflector. A rather imperfect reflector to be sure (and this will become important in a moment), but a reflector nonetheless.

But first things first. For our purposes, let’s just take the case when the Moon is full and let’s just model the Moon as a disk for simplicity. A disk with a diameter of \(3,474~{\rm km}\), located \(384,400~{\rm km}\) from the Earth, and bathed in sunlight, some of which it absorbs, some of which it reflects.

The Sun has a radius of \(R_\odot=696,000~{\rm km}\) and a surface temperature of \(T_\odot=5,778~{\rm K}\), and it is a near perfect blackbody. The Stephan-Boltzmann law tells us that its emissive power \(j^\star_\odot=\sigma T_\odot^4\sim 6.32\times 10^7~{\rm W}/{\rm m}^2\) (\(\sigma=5.670373\times 10^{-8}~{\rm W}/{\rm m}^2/{\rm K}^4\) is the Stefan-Boltzmann constant).

The Sun is located \(1~{\rm AU}\) (astronomical unit, \(1.496\times 10^{11}~{\rm m}\)) from the Earth. Multiplying the emissive power by \(R_\odot^2/(1~{\rm AU})^2\) gives the “solar constant”, aka. the irradiance (the terminology really is confusing): approx. \(I_\odot=1368~{\rm W}/{\rm m}^2\), which is the amount of solar power per unit area received here in the vicinity of the Earth.

The Moon has an albedo. The albedo determines the amount of sunshine reflected by a body. For the Moon, it is \(\alpha_\circ=0.12\), which means that 88% of incident sunshine is absorbed, and then re-emitted in the form of heat (thermal infrared radiation). Assuming that the Moon is a perfect infrared emitter, we can easily calculate its surface temperature \(T_\circ\), since the radiation it emits (according to the Stefan-Boltzmann law) must be equal to what it receives:

\[\sigma T_\circ^4=(1-\alpha_\circ)I_\odot,\]

from which we calculate \(T_\circ\sim 382~{\rm K}\) or about 109 degrees Centigrade.

It is indeed impossible to use any arrangement of infrared optics to focus this thermal radiation on an object and make it hotter than 109 degrees Centigrade. That is because the best we can do with optics is to make sure that the object on which the light is focused “sees” the Moon’s surface in all sky directions. At that point, it would end up in thermal equilibrium with the lunar surface. Any other arrangement would leave some of the deep sky exposed, and now our object’s temperature will be determined by the lunar thermal radiation it receives, vs. any thermal radiation it loses to deep space.

But the question was not about lunar thermal infrared radiation. It was about moonlight, which is reflected sunlight. Why can we not focus moonlight? It is, after all, reflected sunlight. And even if it is diminished by 88%… shouldn’t the remaining 12% be enough?

Well, if we can focus sunlight on an object through a filter that reduces the intensity by 88%, the object’s temperature is given by

\[\sigma T^4=\alpha_\circ\sigma T_\odot^4,\]

which is easily solved to give \(T=3401~{\rm K}\), more than hot enough to start a fire.

Suppose the lunar disk was a mirror. Then, we could set up a suitable arrangement of lenses and mirrors to ensure that our object sees the Sun, reflected by the Moon, in all sky directions. So we get the same figure, \(3401~{\rm K}\).

But, and this is where we finally get to the real business of moonlight, the lunar disk is not a mirror. It is not a specular reflector. It is a diffuse reflector. What does this mean?

Well, it means that even if we were to set up our optics such that we see the Moon in all sky directions, most of what we would see (or rather, wouldn’t see) is not reflected sunlight but reflections of deep space. Or, if you wish, our “seeing rays” would go from our eyes to the Moon and then to some random direction in space, with very few of them actually hitting the Sun.

What this means is that even when it comes to reflected sunlight, the Moon acts as a diffuse emitter. Its spectrum will no longer be a pure blackbody spectrum (as it is now a combination of its own blackbody spectrum and that of the Sun) but that’s not really relevant. If we focused moonlight (including diffusely reflected light and absorbed light re-emitted as heat), it’s the same as focusing heat from something that emits heat or light at \(j^\star_\circ=I_\odot\). That something would have an equivalent temperature of \(394~{\rm K}\), and that’s the maximum temperature to which we can heat an object using optics that ensures that it “sees” the Moon in all sky directions.

So then let me ask another question… how specular would the Moon have to be for us to be able to light a fire with moonlight? Many surfaces can be characterized as though they were a combination of a diffuse and a specular reflector. What percentage of sunlight would the Moon have to reflect like a mirror, which we could then collect and focus to produce enough heat, say, to combust paper at the famous \(451~{\rm F}=506~{\rm K}\)? Very little, as it turns out.

If the Moon had a specularity coefficient of only \(\sigma_\circ=0.00031\), with a suitable arrangement of optics (which may require some mighty big mirrors in space, but never mind that, we’re talking about a thought experiment here), we could concentrate reflected sunlight and lunar heat to reach an intensity of

\[I=\alpha_\circ\sigma_\circ j^\star_\odot+(1-\alpha_\circ\sigma_\circ)j^\star_\circ=3719~{\rm W}/{\rm m}^2,\]

which, according to Ray Bradbury, is enough heat to make a piece of paper catch a flame.

So if it turns out that the Moon is not a perfectly diffuse emitter but has a little bit of specularity, it just might be possible to use its light to start a fire.

 Posted by at 4:49 pm
Feb 132016
 

This is what greeted me earlier this morning when I looked at my outdoor thermometer:

Brrrr. And tomorrow it’s supposed to get even colder. Where is that global warming that we were promised?

 Posted by at 11:59 am
Feb 122016
 

I saw a question on Quora about humans and gravitational waves. How would a human experience an event like GW150914 up close?

Forget for a moment that those black holes likely carried nasty accretion disks and whatnot, and that the violent collision of matter outside the black holes’ respective event horizons probably produced deadly heat and radiation. Pretend that these are completely quiescent black holes, and thus the merger event produced only gravitational radiation.

A gravitational wave is like a passing tidal force. It squeezes you in one direction and stretches you in a perpendicular direction. If you are close enough to the source, you might feel this as a force. But the effect of gravitational waves is very weak. For your body to be stretched by one part in a thousand, you’d have to be about 15,000 kilometers from the coalescing black hole. At that distance, the gravitational acceleration would be more than 3.6 million g-s, which is rather unpleasant, to say the least. And even if you were in a freefalling orbit, there would be strong tidal forces, too, not enough to rip your body apart but certainly enough to make you feel very uncomfortable (about 0.25 g-forces over one meter.) So sensing a gravitational wave would be the least of your concerns.

But then… you’d not really be sensing it anyway. You would be hearing it.

Most of the gravitational wave power emitted by GW150914 was in the audio frequency range. A short chip rising in both pitch and amplitude. And the funny thing is… you would hear it, as the gravitational wave passed through your body, stretching every bit a little, including your eardrums.

The power output of GW150914 was stupendous. Its peak power was close to \(10^{56}\) watts, which exceeds the total power output of the entire visible universe by several orders of magnitude. So for a split second, GW150914 was by far the largest loudspeaker in the known universe.

And this is actually a better analogy than I initially thought. Because, arguably, those gravitational waves were a form of sound.

Now wait a cotton-picking minute you ask. Everybody knows that sounds don’t travel in space! Well… true to some extent. In empty space, there is indeed no medium that would carry the kind of mechanical disturbance that we call sound. But for gravitational waves, space is the medium. And in a very real sense, they are a form of mechanical disturbance, just like sound: they compress and stretch space (and time) as they pass by, just as a sound wave compresses and stretches the medium in which it travels.

But wait… isn’t it true that gravitational waves travel at the speed of light? Well, they do. But… so what? For cosmologists, this just means that spacetime might be represented as a “perfect fluid with a stiff equation of state”, i.e., its energy density and pressure would be equal.

Is this a legitimate thing to say? Maybe not, but I don’t know a reason off the top of my head why. It would be unusual, to be sure, but hey, we do ascribe effective equations of state to the cosmological constant and spatial curvature, so why not this? And I find it absolutely fascinating to think of the signal from GW150914 as a cosmic sound wave. Emitted by a speaker so loud that LIGO, our sensitive microphone, could detect it a whopping 1.3 billion light years away.

 Posted by at 11:26 pm
Feb 112016
 

If this discovery withstands the test of time, the plots will be iconic:

The plots depict an event that took place five months ago, on September 14, 2015, when the two observatories of the LIGO experiment simultaneously detected a signal typical of a black hole merger.

The event is attributed to a merger of two black holes, 36 and 29 solar masses in size, respectively, approximately 410 Mpc from the Earth. As the black holes approach each other, their relative velocity approaches the speed of light; after the merger, the resulting object settles down to a rotating Kerr black hole.

When I first heard rumors about this discovery, I was a bit skeptical; black holes of this size (~30 solar masses) have never been observed before. However, I did not realize just how enormous the distance is between us and this event. In such a gigantic volume, it is far less outlandish for such an oddball pair of two very, very massive (but not supermassive!) black holes to exist.

I also didn’t realize just how rapid this event was. I spoke with people previously who were studying the possibility of observing a signal, rising in amplitude and frequency, hours, days, perhaps even weeks before the event. But here, the entire event lasted no more than a quarter of a second. Bang! And something like three solar masses worth of mass-energy are emitted in the form of ripples in spacetime.

The paper is now accepted for publication and every indication is that the group’s work was meticulous. Still, there were some high profile failures recently (OPERA’s faster-than-light neutrinos, BICEP2’s CMB polarization due to gravitational waves) so, as they say, extraordinary claims require extraordinary evidence; let’s see if this detection is followed by more, let’s see what others have to say who reanalyze the data.

But if true, this means that the last great prediction of Einstein is now confirmed through direct observation (indirect observations have been around for about four decades, in the form of the change in the orbital period of close binary pulsars) and also, the last great observational confirmation of the standard model of fundamental physics (the standard model of particle physics plus gravity) is now “in the bag”, so to speak.

All in all, a memorable day.

 Posted by at 12:58 pm
Feb 062016
 

I just came across this gem of an example of bad coding in the C language.

Most C implementations allow arrays as function arguments. What is less evident (unless you actually bothered to read the standard, or at least, your copy of Kernighan and Ritchie from cover to cover) is that array arguments are silently converted to pointers. This can lead to subtle, difficult-to-spot, but deadly programming errors.

Take this simple function, for instance:

void fun(int arr[100])
{
    printf("REPORTED SIZE: %d\n", sizeof(arr));
}

Can you guess what its output will be? Why, arr is declared as an array argument of 100 ints, so the output should be, on most systems, 400 (ints being 4 bytes in length), right?

Not exactly. Let me show you:

int main(int argc, char *argv[])
{
    int theArr[100];

    printf("THE REAL SIZE: %d\n", sizeof(theArr));
    fun(theArr);
    return 0;
}

On a 64-bit Linux box, this program compiles cleanly, and produces the following output:

THE REAL SIZE: 400
REPORTED SIZE: 8

Similarly, on Windows, using a 32-bit version of Microsoft’s C compiler, I once again get a clean compile and the program outputs this:

THE REAL SIZE: 400
REPORTED SIZE: 4

The morale of this story: Array arguments are pure, unadulterated evil. Avoid them when possible. They offer no advantage over pointer arguments, but they can badly mislead even the most experienced programmer. Compilers still allow array arguments, mainly for historical/compatibility reasons I guess, but it is unconscionable that they don’t even provide a warning when this abuse of syntax happens.

 Posted by at 9:45 am
Jan 292016
 

Eons ago, back when dinosaurs still roamed the Earth, George W. Bush was still a first-term president, there were only five Star Wars films and Java applets were still cool, I created an applet that showed what Mars would look like if its surface was covered by oceans.

I liked what I did so I added the capability to use other data sets, including data sets for the Earth.

The applet is worthless now, or almost so. Java applets are no longer supported in Google’s Chrome browser. They were never really supported on mobile platforms. Even in browsers that do still support Java, the user has to go through hoops and add my domain as a security exception (not recommended) to allow my unsigned applet to run; all this a result of vain attempts to address the security risks inherent in Java and its implementations.

Anyhow, the applet still works if you can run it. And this is what the Earth looks like today:

Someone recently asked what our planet would look like if it was devoid of oceans. If sea levels were 5000 meters below the present value, the planet would still have a shallow ocean in place of the Pacific. Otherwise, though, it would be mostly dry land with only some inland seas where the Atlantic and the Indian oceans used to be.  It would be possible to walk from pole to pole without wetting your feet; however, you might get a tad thirsty along the way, and there’d not be much rain either.

Decrease ocean levels by another 1000 meters to 6000 below present sea levels, and the last remaining ocean is gone:

Finally, at 7000 meters, the only open water that remains would be in places of the deepest ocean trenches. (Mind you, even then, some of these seas would still be up to four kilometers deep.)

I was also asked what things would look like if the seas rose. There is a surprising amount of change to coast lines by an increase of a mere 50 meters:

Florida is gone; Western Europe looks noticeably different. Increase the sea level rise to 200 meters, and now the change is rather more dramatic:

earth+0200

India is now an island or almost so (there may be some land bridges connecting it to the Asian continent that are too narrow to be visible at this map’s resolution). Much of Europe, Russia, Australia, South America, and the eastern parts of North America, gone.

Finally, at 1000 meters, only mountain ranges remain:

With this little dry land left, there is not much in the way of storms; like Jupiter with its Great Red Spot, the Earth might also develop long-lived storms that circumnavigate the planet many times before dissipating.

 Posted by at 3:30 pm