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/.

Sep 242021
 

Yes, you got that right. The title of this blog entry is not a mistake. And no, I didn’t suddenly turn into a relic Cold Warrior from the 1950s.

It is how I characterize Xi Jinping’s commie regime tonight.

It may be a “kinder, gentler” version of communism compared to Mao’s or Stalin’s (at least so long as you are not an Uyghur from Xinjiang province, enjoying your vacation in a concentration, oh, pardon me, re-education camp), but it is nonetheless a regime that does not refrain from the most despicable, criminal acts, including the taking of hostages.

In case anyone had any doubts on the matter…

Within hours after the United States dropped its extradition request and thus Meng Wanzhou of Huawei was released from house arrest in Canada (to her credit, she actually thanked Canada for upholding the rule of law), two Canadians, Michael Kovrig and Michael Spavor, have reportedly been released by China, finally allowed to leave after three years of captivity, despite the bogus allegations of spying against them.

How else can I describe such a regime other than hostage-taking commie bastards without resorting to obscenities?

Oh, I got it.

Rotten hostage-taking commie bastards.

 Posted by at 10:00 pm
Sep 192021
 

A little over 50 years ago, we were all excited in the city of my birth, Budapest. This fine city, home of the old continent’s first subway line (and the world’s first that was built from the onset as an all-electric system), was about to get a modern “metro”. Using Soviet technology, the M2 line was opened to great fanfare, providing a rapid connection from the center of town towards the eastern suburbs on the Pest side. The line was soon extended under the Danube, reaching the Buda side’s main railway station in 1972.

Why do I mention this in a blog entry about Ottawa’s LRT? Simple. This 50-year old system, using technology from the former USSR, has operated reliably ever since. I know from experience: for a while, I used to take it daily, back in the 1970s and the early 1980s. The expectation of urban travelers is that barring rare, major emergencies, the system should work like clockwork; and when an emergency disrupts system operations, service is restored within a matter of hours. This expectation was, in my experience, always met by the M2 line. The most serious accident on the line happened in 2016, when a train rear-ended another, injuring ten passengers. Even in the wake of this accident, service was rapidly restored, albeit with a speed reduction at the accident location while the ongoing investigation tried to determine the cause.

Fast forward to 2021, to the proud capital of Canada, a G7 nation, supposedly one of the most advanced economies in the world, certainly one of the richest, wealthiest nations. Ottawa used to have an extensive streetcar system. Like similar systems in so many cities around the world, this system was dismantled, wantonly destroyed in the late 1950s, when urban planners looked at streetcars as unwanted relics from the past.

Finally, in the 2010s the decision was made that Ottawa needs urban rail transport after all, and the Confederation Line was built. It was opened to the public after many delays in September, 2019. The initial, 13-station segment cost approximately 2.1 billion dollars.

And… well, until now I refrained from commenting because, you know, be patient, good people know what they are doing, sometimes a system has more kinks than anticipated, all that… but no longer. This 2.1 billion dollar system is a piece of crap.

It has had trouble when the weather was too warm. Define too warm? Well, 30 degrees Centigrade. It has had trouble when the weather was too cold. Never mind that Ottawa is one of the coldest capital cities in the world; a little bit of wintry weather below freezing was enough to cause  problems. It has had trouble with train doors, trouble with the rails, trouble with axles and who knows what else. And it now experienced its second derailment.

And no, don’t expect them to rapidly restore service, repairing the affected track and perhaps as a precaution, instituting a temporary speed reduction. No, we are told, the entire system will be shut down again for at least a whole week!

And I cannot decide (I don’t have enough information) if this is gross incompetence or tacit acknowledgment that the system has severe systemic problems, and that the derailment (second in two months!) was not so much a random accident but a result of a badly built track, unsafe trains, or some such cause.

In light of this, I wish they had just imported 50-year old Soviet technology. The darn things may not be pretty (they don’t actually look bad, mind you), may be a tad noisy, but they work. And work. And 50 years later, still work.

As opposed to this piece of… stuff.

And it’s not like railway technology is a new invention. Budapest’s old, 1896 line celebrated its 125th anniversary this year. London’s Underground is even older. And that’s just urban underground systems. So it’s not like some exotic new technology that still has issues. It’s just… I don’t know. Corruption? Incompetence? Just sheer bad luck? Whatever it is, I think the residents of our city deserve better. And those responsible should be held to account, if necessary, even criminally.

 Posted by at 7:11 pm
Sep 122021
 

I get it. Our standards change. Live and let live. We abhor racism and embrace differences. We recognize the crimes of the past.

But when the National Archives of the United States of America marks the country’s own Constitution as containing “potentially harmful language”, that’s so far beyond anything I would even remotely consider sane, I don’t even know how to describe it.

This is so far beyond insane, I have no words.

All I can say is that if the goal is to drive as many undecided people as possible into the camp of Trump voters, they found a singularly efficient way to accomplish that ignoble task.

Edit: And yes, I recognize that this is a blanket statement that applies to all Archive searches. Even so, I find it disturbing that this notice appears even for documents such as the US Constitution. The capability clearly exists not to show the notice for certain pages, as it is not present on explanatory pages of the Archives. Displaying this disclaimer so prominently on top of historical documents just sends the wrong message and provides unnecessary propaganda fodder. What’s wrong with a more discreet notice at the bottom? Or simply presenting, like so many sites do, a “terms and conditions” page when a user first connects, which could include this disclaimer? Showing it on every page, prominently over documents of great legal and historical significance is just… dumb. It reeks of “cancel culture”.

 Posted by at 1:21 am
Sep 112021
 

A few hours from now, it will be exactly 20 years since that fateful morning when, instead of going to bed after working through the night (I was very much a night owl in those days), I ended up spending the day glued to the television window on my old PC, running Windows XP and cable TV in a window, courtesy of a long obsolete ATI All-in-Wonder video card combining graphics with an analog TV tuner.

I had no doubt that the events of the day would change the world that we live in. What was not clear was how.

The good news: America’s “war on terror” by and large has to be considered a success. There have been no large-scale terrorist acts on US soil by militant Islamists since 9/11. But that’s pretty much where the good news end.

The bad news: Where should I begin?

First, the misguided occupation of Afghanistan. Yes, I know, hindsight is 20/20 and all that, but it was pretty obvious even back then that it is not possible to do an occupation on the cheap. There is one way to occupy a hostile country: put a sizable garrison in every town and a guardpost at every intersection, maintain order, and respond ruthlessly to attacks on your forces. Now the thing is, not even the USSR was willing to make this level of effort, which is why their Afghanistan venture was a fiasco. As for America, whoever came up with the idea that you can bomb a country into democracy need to get their heads examined.

Second, the criminally insane war on Saddam Hussein’s Iraq. No, Hussein was not a nice fellow. But removing him created a regional power vacuum that the theocracy in Iran was all too eager to fill. The one good outcome of this is that it created a previously unimaginable rapport between Iran’s enemies, namely Israel and the Gulf states. Otherwise, all the Iraqi venture accomplished is a destabilization of the region, the consequences of which we still reap.

And speaking of places like the Gulf states, this is another one of the unpleasant consequences of 9/11: Perhaps more than ever, the “land of the free”, the United States, loves cozying up with despots and dictators. This was especially prevalent during the Trump era, as Trump seemed unnervingly comfortable with the likes of Putin or MBS, even as he denounced democratically elected leaders committed to the values of liberal democracy.

Thankfully, the misguided military ventures are over. Chaotic last few days notwithstanding, US troops are finally out of Afghanistan. There are very few things for which Trump deserves praise, but his decision to pull out of Afghanistan, his reluctance to start new wars, are commendable.

If only the United States could overcome its internal partisan division, it could again resume its role as “leader of the free world”, a free world that now faces the dual threat of rising authoritarianism in many Western democracies, and the rise of a leader more authoritarian than anyone since Mao in a China that is now an undisputed economic superpower.

But for that, millions of Americans would first have to abandon scary conspiracy theories about a stolen election or a COVID vaccine that is an attack on their rights and freedoms; and other millions of Americans would have to abandon their commitment to impose their increasingly intolerant “woke” values, their “cancel culture” on their neighbors. And their lessons would have to be repeated elsewhere, throughout the Western world. In short, we have to somehow relearn some basic ideas of a liberal democracy, such as the notion that our neighbors whose political priorities differ from ours are not inherently evil, they are not the enemy. Can this happen? Will this happen in an era of social media bubbles, bubbles often controlled by foreign adversaries and their divisive propaganda, turning us against each other?

But before I get too pessimistic, I look at the long term trends. Here we are, in 2021, 76 years after one of the most devastating wars in human history ended with the use of two atomic bombs. When I was a child in the late 1960s, early 1970s, no sane person in the world would have predicted that we would live to see 2021 without another great war, without nuclear Armageddon. Yet here we are, worrying not about mushroom clouds but about climate change, not about Orwell’s totalitarian nightmare but about microplastics hampering efforts to clean up rivers and wetlands, not about famines and “Soylent Green” but about lithium or rare earth production for our batteries and high tech gadgets, not about hostile AI running our lives but about semiconductor shortages hampering the automobile industry.

Still I have to wonder, was 9/11 a wasted opportunity? Could the US and the world have responded better? Undoubtedly, I think.

 Posted by at 1:12 am
Aug 242021
 

I value StackExchange. I often come across technical answers that I could not find elsewhere. Yet I contribute only rarely, and I am always hesitant. StackExchange’s quick-to-punish culture does not encourage contributions.

Case in question: I recently searched for a particular solution in SQL. A Google search led me to a StackExchange page with a closely related question and some good answers. Also a bad one.

Except that this bad answer was nonetheless marked as the “accepted” answer by the question author.

And as a result, it garnered as many as 41 (!!!) downvotes. I’m sure there are some, but I’ve never before seen a StackExchange answer with this many downvotes.

Of course there are bad answers, which sometimes end up in negative territory (that alone is a huge turnoff for many potential contributors.) Usually they end up at the bottom of the page, often not even shown.

Not in this case. Because the answer was marked as “accepted”, it remains on top and continues to garner downvotes. Presumably, folks react to it being the accepted answer, but the one they’re punishing is the person who offered the answer in the first place.

It’s sad, really. The answer is technically incorrect but it is not nonsense, and was obviously offered in good faith. To no avail; when StackExchange punishes you, your intentions matter little.

Oh, but you can vote for moderators…

 Posted by at 8:23 pm
Aug 152021
 

I promised myself not to blog much about politics, but this one deserves an entry.

In my all time favorite movie, Cloud Atlas, while reading some decades-old letters, a protagonist remarks: “Just trying to understand why we keep making the same mistakes… over and over.”

I was wondering the same thing moments ago when I came across the cover page of tomorrow’s edition of USA Today:

The editors of USA Today of course knew exactly what they were doing when they elected to use a picture that is almost like a copy of another iconic photo, this one from 1975:

Many think that it is a mistake for the US to exit Afghanistan. I respectfully disagree. The mistake was starting an unwinnable war. Compounded by the mistake of staying there for 20 years, perpetuating a conflict, causing many more deaths. Wasn’t Vietnam a good enough lesson? Didn’t the collapse of the Saigon government teach the US that military occupation cannot build a nation? Was there nothing to learn from the USSR’s failure to pacify Afghanistan? Or for that matter, their failure to suppress the Baltics and the nations of Eastern Europe, which chose to escape the Soviet Bloc at the first opportunity, with their domestic politics often resuming exactly where it left off decades earlier when it was interrupted by the arrival of Soviet troops?

So here we are, 46 years after Saigon, and yet another helicopter departs yet another roof with some of the last lucky few who can thus escape an uncertain future, possibly death, in a besieged city.

 Posted by at 9:52 pm
Aug 142021
 

I am not happy admitting it, but it’s true: There have been a few occasions in my life when I reacted just like this XKCD cartoon character when I first encountered specific areas of research.

 Posted by at 11:48 am
Aug 132021
 

I was so busy yesterday, it was only after midnight that I realized the significance of the date.

It was exactly 40 years ago yesterday, on August 12, 1981, that IBM introduced this thing to the world:

Yes, the IBM Model 5150 personal computer, better known simply as the IBM PC.

Little did we know that this machine would change the world. In 1981, it was just one of many competing architectures, each unique, each incompatible with the rest. A program written for the Apple II could not possibly run on a Commodore VIC 20. The Sinclair ZX81 even used a different microprocessor. Between different processors, different graphics chips, different methods of sound generation, different external interfaces, each machine created its own software ecosystem. Programs that were made available for multiple architectures were essentially redeveloped from scratch, with little, if any, shared code between versions (especially since larger, more complex applications were invariably written in machine language for efficient execution).

The PC changed all that but it took a few years for that change to become evident. There were multiple factors that made this possible.

First and foremost among them, it was IBM’s decision to create a well-documented, open hardware architecture that was not protected by layers and layers of patents. The level of documentation provided by IBM was truly unprecedented in the world of personal computers. An entire series of books were offered, in traditional binders characteristic of technical documentation of the era:

As to what’s in these volumes, here’s a random page from the XT technical reference manual:

This level of detail made it possible, easy even for a hardware ecosystem to emerge: first, companies that manufactured novel extension boards for the PC and eventually, “clone” makers who built “IBM compatible” computers using “clean room” functional equivalents, developed by companies like Phoenix Technologies, of the machine’s basic software component, the BIOS (Basic Input Output System).

But the other deciding factor was the fateful decision to allow Microsoft to market their own version of the PC’s operating system, DOS. IBM’s computers came with the IBM branded version called “PC-DOS”, but Microsoft was free to sell their own, “MS-DOS”.

Thus, starting in 1984 or so, the market of IBM compatible computers was born, and it rapidly eclipsed IBM’s own market share.

And amazingly, the architecture that they created 40 years ago is still fundamentally the same architecture that we use today. OK, you may not be able to boot an MS-DOS floppy on a new machine with UEFI Secure Boot enabled, but if the BIOS permits you to turn it off, and you actually have a working floppy drive (or, more likely, a CD-ROM drive with a bootable CD image of the old operating system) you just might be in luck and boot that machine using MS-DOS 2.1, so that you can then run an early version of Lotus 1-2-3 or WordPerfect. (Of course you can run all of that in a DOSBox, but DOSBox is a software emulation of the IBM PC, so that does not really count.)

And while 64-bit versions of Windows no longer run really old 16-bit software without tools such as virtual machines or the aforementioned DOSBox, to their credit Microsoft still makes an effort to maintain robust backward compatibility: This is how I end up using a 24-year old accounting program to keep track of my personal finances, or Microsoft’s 25-year old “Bookshelf” product with an excellent, easy-to-use version of the American Heritage Dictionary. (No, I am not adverse to change or the use of newer software. But it so happens that these packages work flawlessly, do exactly what I need them to do, and so far I have not come across any replacement that delivers the functionality I need, even if I ignore all the unnecessary bloat.)

So here we are: 40 years. It’s insane. Perhaps it is worth mentioning the original, baseline specifications of the IBM 5150 Personal Computer. It has a 16-bit processor running at 0.00477 GHz. It had approximately 0.000015 gigabytes of RAM. The baseline configuration had no permanent storage, only a cassette tape interface for storing BASIC programs. The version capable of running PC-DOS had four times as much RAM, 0.000061 gigabytes, and external storage in the form of a single-sided, single-density 5.25″ floppy disk drive capable of storing 0.00034 gigabytes of data on a single disk. (Be grateful that I did not use terabytes to describe its capacity.) The computer had no real-time clock (when PC-DOS started, it asked for the time and date). Its monochrome display adapter was text only, capable of showing 25 lines by 80 characters each. Alternatively the user could opt to purchase a machine equipped with a CGA (color graphics adapter), capable of showing a whopping 16 colors at the resolution of 160 by 100 pixels, or a high resolution monochrome image at 640 by 200 pixels. Sound was provided through a simple beeper, controlled entirely by software. Optional external interfaces included RS-232 serial and IEEE 1284 parallel ports.

Compare that to the specifications of a cheap smartphone today, 40 years later.

 Posted by at 4:24 pm
Aug 122021
 

Fergus was a cat. A beautiful, beautiful gray cat, who belonged to my cousin and her husband.

This is Fergus, just a few days ago.

This photo shows just what a beautiful creature Fergus was. Yet perhaps it also reveals that he was not well. Though he still enjoyed the late morning sun in the backyard, he was already very unwell, sickened by leukemia.

Fergus departed this world Tuesday evening, euthanized by the same mobile vet who euthanized our long-haired cat Fluffy six years ago.

Even though I did not know Fergus well, I am deeply saddened by his passing. I am rather fond of cats. Every time I look a cat in the eye, I sense a miracle as I contemplate how those little eyeballs see this magnificent universe in which we live. And whenever a cat leaves us and walks away into the great unknown, the world that they leave behind feels like a much duller place in their absence.

 Posted by at 12:38 am
Jul 302021
 

On my eighth birthday, I received a gift from a nice couple, friends of my Mom.

It was a Hungarian-language book bearing the title, “Wonders of the World,” in Hungarian, translated from the German original that was written by German-Jewish authors Artur Fürst and Alexander Moszkowski.

It was an old book, published in the 1930s. A dark green hardcover, with the etched image of a skyscraper for illustration on the cover. Its dust jacket, if it ever had one, was long gone.

But never mind that, it’s the content on these yellowed pages that matters.

It was from this book that I first learned about statistical fallacies, for instance. What is the probability that when you leave your home, the first 200 people you encounter are all males? Astronomically small, you might conclude. 2−200 ~ 6.223 × 10−61 to be a bit more precise, assuming half the population is male. A probability this small is firmly in the category of never happens. Until one morning, you step outside and the first thing you see is an all-male battalion of soldiers marching down the street…

I was reminded of this book today as I was reading about recent pronouncements of “breakthrough” infections among the vaccinated, and the reminder by experts that in a population that has a high vaccination rate, such cases are to be expected. It does not mean that the vaccine is worthless. It simply means that as the virus runs out of unvaccinated victims, to the extent it can still cause damage, increasingly it will be among the vaccinated folks. Which should make sense, except, as we well know, roughly 90% of statistical fallacies are committed by right-handed people…

Anyhow, much to my surprise, this book I love so much, from which I learned so much as a pre-teen, remains well-known in the country where it was originally published under the title Das Buch der 1000 Wunder. So well-known, in fact, that current German-language editions are readily available on Amazon, nearly a century after its initial publication. So I guess I am not the only person who finds the insights and information presented in this unassuming volume immensely valuable, especially for a child.

So let this serve as my notice of gratitude across time and space to “uncle Sandor and aunt Eva,” as they inscribed their names in the book along with their birthday wishes, for what I can now truly call a gift of a lifetime.

 Posted by at 11:32 pm
Jul 242021
 

Can you guess the author with the most physics books on what I call my “primary” bookshelf, the shelf right over my desk where I keep the books that I use the most often?

It would be Steven Weinberg. His 1972 Gravitation and Cosmology remains one of the best books ever on relativity theory, working out details in ways no other book does. His 2010 Cosmology remains a reasonably up-to-date textbook on modern cosmology. And then there is of course the 3-volume Quantum Theory of Fields.

Alas, Weinberg is no longer with us. He passed away yesterday, July 23, at the age of 88.

He will be missed.

 Posted by at 6:27 pm
Jul 232021
 

I just came across an account describing an AI chatbot that I found deeply disturbing.

You see… the chatbot turned out to be a simulation of a young woman, someone’s girlfriend, who passed away years ago at a tragically young age, while waiting for a liver transplant.

Except that she came back to live, in a manner of speaking, as the disembodied personality of an AI chatbot.

Yes, this is an old science-fiction trope. Except that it is not science-fiction anymore. This is our real world, here in the year 2021.

When I say I find the story deeply disturbing, I don’t necessarily mean it disapprovingly. AI is, after all, the future. For all I know, in the distant future AI may be the only way our civilization will survive, long after flesh-and-blood humans are gone.

Even so, this story raises so many questions. The impact on the grieving. The rights of the deceased. And last but not least, at what point does AI become more than just a clever algorithm that can string words together? At what time do we have to begin to worry about the rights of the thinking machines we create?

Hello, all. Welcome to the future.

 Posted by at 4:11 pm
Jul 152021
 

I wrote an answer today on Quora that, I realized, belongs in my blog.

The question was about once significant medieval towns in Europe that have since faded into obscurity.

And I had the perfect answer, on account of having lived there back in the 1970s: The town of Visegrád in northern Hungary (known these days on account of the Visegrad Four, the informal alliance of the Czech Republic, Hungary, Poland and Slovakia which began with a summit in this town held in 1991).

Once the capital of the Kingdom of Hungary, and also home of the Summer Palace of King Matthias Corvinus during the heyday of said kingdom, today the town (really, a village; it gained the legal status of town only because of its historical significance, not on account of its population, which numbers less than 2,000) is just a minor settlement at the Danube Bend, where where the river Danube makes a 90-degree turn towards Budapest.

I used to live in a building just at the base of the stocky Salamon tower near the center of this image. Image from Wikipedia.

Visegrád is a fascinating town, full of history. Unfortunately, because of said history, most of it is in the form of barely recognizable ruins. Ruins of a citadel at the top of Castle Hill, its last functioning remains blown up by the victorious Austrians after the failed struggle for Hungarian independence in the early 18th century. Ruins of the sprawling Summer Palace complex, used by locals as a source of building material for centuries until very little of the original buildings remained. Ruins of the tower of Salamon, part of the lower castle, rebuilt decades ago using modern materials and housing a museum, but badly in need of repairs. And more ruins, ruins going back to Roman times, everywhere.

The name of the town itself is of Slavic origin (literally means high castle I believe) but many of the town’s present-day inhabitants are of German descent. I recall names of classmates like Gerstmayer or Fröhlich, and it was not uncommon to hear family members talking to each other in German on the streets of the town when I lived there as a child.

I have fond memories of the place; I attended school there from grades 6 to 8 before moving back to Budapest. I still visit Visegrád from time to time when I am in Hungary, albeit only as a tourist, as I no longer really know anybody there. It is, to be sure, a very popular tourist destination: the Danube Bend is spectacular, and the hills surrounding the area are crisscrossed by well-marked, well-maintained tourist trails. And, well, ruins or no ruins, the history of the place is absolutely fascinating.

But looking at the tiny village, its single church, small school, its sole tiny movie theatre, the few narrow streets with mostly single-story buildings, you’d never guess the rich history of the town.

Church of St. John the Baptist, in the center of Visegrád. Lovely clock. Google Street View image.

 Posted by at 11:53 pm
Jul 142021
 

The other day, someone asked a question: Can the itensor package in Maxima calculate the Laplace-Beltrami operator applied to a scalar field in the presence of torsion?

Well, it can. But I was very happy to get this question because it allowed me to uncover some long-standing, subtle bugs in the package that prevented some essential simplifications and in some cases, even produced nonsensical results.

With these fixes, Maxima now produces a beautiful result, as evidenced by this nice newly created demo, which I am about to add to the package:

(%i1) if get('itensor,'version) = false then load(itensor)
(%i2) "First, we set up the basic properties of the system"
(%i3) imetric(g)
(%i4) "Demo is faster in 3D but works for other values of dim, too" 
(%i5) dim:3
(%i6) "We declare symmetries of the metric and other symbols"
(%i7) decsym(g,2,0,[sym(all)],[])
(%i8) decsym(g,0,2,[],[sym(all)])
(%i9) components(g([a],[b]),kdelta([a],[b]))
(%i10) decsym(levi_civita,0,dim,[],[anti(all)])
(%i11) decsym(itr,2,1,[anti(all)],[])
(%i12) "It is useful to set icounter to avoid indexing conflicts"
(%i13) icounter:100
(%i14) "We choose the appropriate convention for exterior algebra"
(%i15) igeowedge_flag:true
(%i16) "Now let us calculate the Laplacian of a scalar field and simplify"
(%i17) canform(hodge(extdiff(hodge(extdiff(f([],[]))))))
(%i18) contract(expand(lc2kdt(%)))
(%i19) ev(%,kdelta)
(%i20) D1:ishow(canform(%))
                  %1 %2  %3 %4                 %1 %2            %1 %2
(%t20)   (- f    g      g      g     ) + f    g      + f       g
             ,%4  ,%3           %1 %2     ,%2  ,%1      ,%1 %2
(%i21) "We can re-express the result using Christoffel symbols, too"
(%i22) ishow(canform(conmetderiv(D1,g)))
               %1 %4  %2 %5      %3                   %1 %2      %3
(%t22) 2 f    g      g      ichr2      g      - f    g      ichr2
          ,%5                    %1 %2  %3 %4    ,%3             %1 %2
                                              %1 %3      %2               %1 %2
                                      - f    g      ichr2      + f       g
                                         ,%3             %1 %2    ,%1 %2
(%i23) "Nice. Now let us repeat the same calculation with torsion"
(%i24) itorsion_flag:true
(%i25) canform(hodge(extdiff(hodge(extdiff(f([],[]))))))
(%i26) "Additional simplifications are now needed"
(%i27) contract(expand(lc2kdt(%th(2))))
(%i28) ev(%,kdelta)
(%i29) canform(%)
(%i30) ev(%,ichr2)
(%i31) ev(%,ikt2)
(%i32) ev(%,ikt1)
(%i33) ev(%,g)
(%i34) ev(%,ichr1)
(%i35) contract(rename(expand(canform(%))))
(%i36) flipflag:not flipflag
(%i37) D2:ishow(canform(%th(2)))
                %1 %2  %3 %4                 %1 %2    %3            %1 %2
(%t37) (- f    g      g      g     ) + f    g      itr      + f    g
           ,%1         ,%2    %3 %4     ,%1           %2 %3    ,%1  ,%2
                                                                          %1 %2
                                                               + f       g
                                                                  ,%1 %2
(%i38) "Another clean result; can also be expressed using Christoffel symbols"
(%i39) ishow(canform(conmetderiv(D2,g)))
               %1 %2  %3 %4      %5                   %1 %2    %3
(%t39) 2 f    g      g      ichr2      g      + f    g      itr
          ,%1                    %2 %3  %4 %5    ,%1           %2 %3
                     %1 %2      %3            %2 %3      %1               %1 %2
             - f    g      ichr2      - f    g      ichr2      + f       g
                ,%1             %2 %3    ,%1             %2 %3    ,%1 %2
(%i40) "Finally, we see that the two results differ only by torsion"
(%i41) ishow(canform(D2-D1))
                                   %1 %2    %3
(%t41)                       f    g      itr
                              ,%1           %2 %3
(%i42) "Last but not least, d^2 is not nilpotent in the presence of torsion"
(%i43) extdiff(extdiff(f([],[])))
(%i44) ev(%,icc2,ikt2,ikt1)
(%i45) canform(%)
(%i46) ev(%,g)
(%i47) ishow(contract(%))
                                       %3
(%t47)                         f    itr
                                ,%3    %275 %277
(%i48) "Reminder: when dim = 2n, the Laplacian is -1 times these results."

The learning curve is steep and there are many pitfalls, but itensor remains an immensely powerful package.

 Posted by at 3:51 pm
Jul 142021
 

I was looking for something else in my blog when I came across this post of mine from last May, putting my rusty R programming skills to use and producing some maps representing COVID-19 statistics.

Needless to say, the situation is quite different today, but in some ways at least, the more things change the more they remain the same.

The number of cases per million people is up, way up of course.

However, the trend remains the same: the worst numbers come from Europe and the Americas. I still cannot decide if this is a characteristic of COVID-19 or simply a result of more thorough testing and more transparent reporting in liberal democracies.

The death statistic is also similar:

The reddest areas are again the Americas and Europe, including Russia, but also Iran. The encouraging news is that the death rate per million didn’t rise quite as fast as the number of cases per million population. This may indicate that we have become more successful treating people (of course a more sinister possibility is that the most vulnerable, such as the elderly in homes, died first, pushing up last year’s death statistic.)

To see this more clearly, here is the mortality rate, that is, the percentage of deaths per cases:

Last year, North America and Europe, along with China, led the pack. This year, it’s quite different: both North America and Western Europe have fallen behind, which is to say, fewer people who catch COVID-19 actually die.

Another difference of course is that we can now protect ourselves and others around us by getting vaccinated. So please, do not hesitate, do not buy into insane conspiracy theories. Vaccines carry a tiny risk, but so does stepping outside to do your shopping, because you never know when a wayward car might jump the curb and kill you. But vaccines also protect you from a debilitating illness that often cripples even its survivors with lasting health effects. And no, vaccines are not an evil plot by Gates or Soros to get you microchipped; the technology just doesn’t work that way. Similarly, no, 5G cellular technology, which is mostly about using radio waves more efficiently, often with less power than current networks, has nothing to do with biology. Last but not least, whether the virus came from bats or a lab (there is little doubt in the literature that it is of natural origin, but that does not exclude the possibility that it was released from a lab by accident — such accidents are known to have happened even in high biosafety labs around the world) makes no difference: in the end, it can kill or maim you just the same, and the best way to protect yourself and your loved ones is through vaccination and responsible behavior (masks, distancing). In short (and with apologies for preaching): it’s not politics, people. It’s epidemiology.

 Posted by at 1:30 pm
Jun 302021
 

Yesterday, I saw an image of a beautiful altarpiece, Dutch painter Rogier van der Weyden’s Santa Columba triptych from 1455.

It was described as the biggest spoiler in history. Look at the center panel depicting the classic Nativity scene. Now look more closely at the center column:

Oops.

And then, I saw another image, a 1958 photo from Pál Berkó, courtesy of the Hungarian Fortepan photo archive, depicting the crowd greeting Khrushchov on account of his visit to Budapest. Greeting him with… smartphones in hand, taking selfies?

Not exactly. Those are actually mirrors that many used to be able to see over the crowd. But the resemblance is…

I guess it’s true: The more we change, the more we remain the same.

 Posted by at 8:03 pm
Jun 292021
 

Temperatures like this just do not exist in Canada.

When you hear that the temperature was within a hair’s breadth of 50 degrees centigrade (well over 120 F) you’d think I am talking about a spot in the Sahara Desert. Or maybe the Australian Outback. Or Death Valley.

But no, this temperature was measured earlier today in Lytton, British Columbia, Canada.

It is surreal. Scary. And deadly: apparently, dozen’s of mostly older people succumbed to this heat wave in BC.

 Posted by at 10:33 pm
Jun 262021
 

Recently, it felt at times almost like a fad: Questioning the legacy of past celebrities, removing statues, renaming institutions.

Often, it seemed like these denounced heroes of the past are held to an impossible standard: Not living up to the changing values of the present.

I questioned the motivation: Was it true concern that we worship the wrong heroes, or just a cheap attempt at “virtue signaling”? I questioned the outcome: Exactly how does renaming a high school or removing a statue from a public park help an Indigenous community get safe drinking water, better jobs, better health care?

But more importantly, I questioned the wisdom of judging the past by the standards of the present. Standards that evolve and (thankfully!) improve, but which, for that very reason, would have been impossible for our past heroes to live up to, as those standards did not yet exist.

Faced with the discovery of the unmarked graves of many hundreds of Canadian children that is reopening the wounds of the despicable residential school system, I was wondering the same thing. Were these schools really the manifestations of evil? Or were they perhaps no different from other residential schools for the poor, for the children of immigrants, for other disadvantaged members of a society that, let’s face it, was quite bigoted by present-day standards?

But now I have my answer. What took place in those schools a century ago was not normal, not acceptable. It was criminal, even by the standards of early-1900s Canada. It’s just that nobody cared.

How do I know? From the accounts of someone who was in a unique position to critique the system: Peter Henderson Bryce, who at one point served as Canada’s Chief Medical Officer at the Department of Immigration.

For many years, Bryce studied the health of Canada’s Indigenous population, specifically the conditions at the residential schools. He was appalled by what he saw as an underfunded system of unsanitary, crowded facilities with shockingly high mortality rates. His report was suppressed and he was instead eventually pushed out of the Civil Service. Refusing to be silenced, he published his report himself.

The title says it all:

A National Crime

So there we have it. We are not misapplying our much improved, enlightened standards of 2021 to judge people and institutions that existed a century ago. What they did back then, how they treated the Indigenous population of Canada was A National Crime even by the standards of a contemporary member of the establishment, a dedicated civil servant who was already a teenager when the Dominion of Canada was established in 1867.

Dr. Peter Bryce, M. D., who passed away in 1932 at the age of 78, is buried not far from our home, right here in Ottawa, in the famed Beechwood Cemetery.

 Posted by at 7:56 pm
Jun 262021
 

My beautiful wife and I both received our second jabs today.

Our first dose was AstraZeneca, but it is now recommended to choose an mRNA vaccine for the second dose. My remaining concern is whether this mixed shot is good enough to enter other countries, the United States in particular, where the AZ vaccine never received emergency FDA approval. We shall see… worst case, I guess, is that we will need a third dose.

 Posted by at 1:37 pm
Jun 082021
 

I am reacting with horror to the killing of a Muslim family in London, Ontario, by a deranged lunatic who mowed them down with his vehicle.

Yumna Afzaal (15), Madiha Salman (44), Talat Afzaal (74) and Salman Afzaal (46).

What drives a man to massacre an entire family, including children, as they are waiting to cross the street at an intersection?

And how do we fix this?

It is very easy to ascribe the attack to racism or “white grievance” (his race was not publicized but one press image surfaced that shows him to be of European descent) and chances are, it would not be the wrong conclusion. But if we stop there, we have solved nothing. The problems will persist, more people will die, and our society will become more polarized over time.

That is not to suggest that I know how to solve this problem. But I know what not to do. This is best illustrated by a quote that is often wrongly attributed to Nelson Mandela (it actually comes from a human rights activist named Mohamad Safa):

Our world is not divided by race, color, gender or religion. Our world is divided into wise people and fools. And fools divide themselves by race, color, gender, or religion.

I agree with the sentiment, but I ask a question that, in my opinion, is really the key to it all: How do we convince wise people (or people who think of themselves as wise) not to divide us into wise people and fools?

 Posted by at 6:04 pm