Tuesday, July 17, 2018

Hebrew Bible Updated to Unicode, XHTML Strict

The Web edition of the Hebrew Bible has been available at Fourmilab since 1998. It originally required a browser extension to support downloadable fonts. When this became obsolete, a second edition was released in 2002 which used the ISO 8859-8 character set, which includes the ASCII Latin character set and Hebrew letters (but no vowel signs). Most Web browsers at the time supported this character set, although some required the installation of a "language pack" or font in order to display it.

At the time, I remarked that when Unicode became widely adopted, all of the complexity of special character sets for each language would evaporate, as we'd have a single character encoding which could handle all commonly-used languages (and many obscure ones, as well). Now, in 2018, we have made our landfall on that happy shore. The vast majority of widely-used operating systems and Web browsers support Unicode and provide at least one font with characters for the major languages.

I have just released a third edition of the Fourmilab Hebrew Bible, in which all documents use Unicode for all text, using the UTF-8 representation which now accounts for more than 90% of traffic on the Web. Any browser which supports Unicode and includes a font providing the Hebrew character set will be able to display these documents without any special configuration required—it should just work.

I have also updated all documents to the XHTML 1.0 Strict standard. I prefer this standard to HTML5 for documents which do not require features of the latter standard (such as embedded audio and video or the canvas element) since, being well-formed XML, XHTML documents can easily be parsed by computer programs which wish to process their content.

You can cite a chapter within a book of the Bible with a URL like:

http://www.fourmilab.ch/etexts/www/hebrew/Bible/?Exodus.html#c10
or an individual verse with:
http://www.fourmilab.ch/etexts/www/hebrew/Bible/?Exodus.html#v5:7

Previous editions of the Hebrew Bible did not require the “c” or “v” before the chapter or chapter:verse; this is a requirement of XHTML, in which the “id=” attribute must not start with a digit. For compatibility with existing citations, the “c” or “v” may be omitted, but in direct URLs citing the book document itself, they must be supplied.

This edition of the Hebrew Bible, like its predecessors, does not rely upon the so-called “Unicode Bidirectional Algorithm”. Instead, characters appear in the source HTML documents in the order they are presented in the page, with Hebrew text being explicitly reversed in order to read from right to left. In my experience, getting involved with automatic bidirectional text handling is the royal road to madness, and programmers who wish to keep what little hair that remains after half a century unscrewing the inscrutable trust their instinct about things to avoid. Hebrew text, which would otherwise automatically be rendered right-to-left by the browser, is explicitly surrounded by HTML tags:

<bdo dir="ltr">ת ישארב</bdo>

to override the default direction based upon the characters, in the example, the first word of Genesis. (You can also override the directionality of text by prefixing the Unicode LRO [&#8237;] or RLO [&#8238;] character and appending a PDF [&#8236;] to the string. I chose to use the XHTML override tag since it makes the intent clearer when processing the document with a program.)

To fully appreciate the insanity that Unicode bidirectional mode can induce in the minds of authors of multilingual documents, consider the following simplified HTML code for a sentence from the Hebrew Bible help file.

One writes:
100 as &#1511;,
101 as &#1488;&#1511;,
110 as &#1497;&#1511;, and
111 as &#1488;&#1497;&#1511;.

Want to guess how the browser renders this? Go ahead, guess. What you get is:

One writes: 100 as ק, 101 as אק, 110 as יק, and 111 as איק.

What? Why?? This way leads to the asylum. If you wrap the Hebrew with:

One writes:
100 as <bdo dir="ltr">&#1511;</bdo>,
101 as <bdo dir="ltr">&#1488;&#1511;</bdo>,
110 as <bdo dir="ltr">&#1497;&#1511;</bdo>, and
111 as <bdo dir="ltr">&#1488;&#1497;&#1511;</bdo>.

you get the desired:

One writes: 100 as ק, 101 as אק, 110 as יק, and 111 as איק.

In these examples, I have used HTML text entities (such as “&#1488;”) in the interest of comprehensibility. If you use actual Unicode characters and edit with a text editor such as Geany which infers text direction from the characters adjacent to the cursor, things get even more bewildering. The Hebrew Bible files contain Unicode characters, not text entities, but I only process them with custom Perl programs, never with a text editor.

In case somebody needs it, the ISO 8859-8 edition remains available.

Posted at 13:53 Permalink

Sunday, July 15, 2018

Recipes: Steak with Roquefort Mushroom Sauce

Here is a meal you can make yourself from all natural ingredients in minimal time with little to clean up afterward. It never fails and requires very little of your time. I use one low-tech gizmo to save time and ensure success, but you can use alternative means at the cost of a bit more fussiness and time.

Start with:

  • A good cut of steak, 250 to 350 grams per person
  • Roquefort cheese, 100 g
  • Sliced mushrooms, 200 g before draining
  • Garlic purée, around a tablespoon (15 ml)
  • Cooking oil (olive, etc.)

We're going to cook the steak in a Tefal Actifry. This device is colloquially called an “air fryer”, but that is misleading: it actually cooks by blowing very hot air onto the food. This creates much the same effect as deep frying, but without a bath of hot oil or tendency to make the food greasy. What I discovered when developing this recipe is that, delightfully, when used on meat, the process triggers the Maillard reaction which makes flame-seared steaks so attractive in appearance and delicious.

Start by drizzling a little oil (about a teaspoon or two, 5–10 ml) in the back part of the Actifry pan, below the hot air input. Now drag the steak through the oil, coating both sides and the edges with a thin film of oil. Ideally, when you're done, there will be hardly any oil left over in the pan. The Actifry stirrer should be removed; the steak will be stationary beneath the air vent (visible at the top of the picture). Close the lid, set the timer for 8 minutes, and press the start button. (There is no temperature setting on the Actifry.)

While the steak is cooking, place the Roquefort cheese, sliced mushrooms (drained), and a squirt of garlic purée in a small saucepan and put on very low heat. You can break the cheese up into chunks with a stirring spoon if you like, but if you don't it will still work fine. As the cheese melts, stir all the ingredients together. Once the cheese is melted and everything is mixed, turn the heat down to the lowest level or off and cover. You don't want to overheat the cheese, which will denature it and make a mess.

When the Actifry beeps at the end of the 8 minutes, open it and turn over the steak, keeping it at the back under the air input. Set the timer for 7 minutes and restart. When it beeps again, the steak is ready. Take it out of the Actifry pan and put it in a bowl. Pour the juice from the pan into the sauce pan and stir it into the sauce, then pour the sauce on top of the steak. You're ready to eat!

While you're enjoying the steak, let's get the Actifry busy making a companion: chips or French fries. Install the stirrer in the pan, and add your desired quantity of store-bought frozen chips. Try to get the kind intended to be prepared by deep-frying, not those made to be cooked in the oven. The latter will work, but may come out oily and less than ideal. Drizzle a very small amount of oil on top of the frozen chips, close the lid, set the timer for 15 minutes and press start. Don't bother cleaning the pan; the remaining juices from the steak will add flavour to the chips
.

When next you hear the beep, dump the chips into a bowl, give them a few sprays of Balsamic vinegar, season with salt and pepper, and bring to the table. Catsup? Catsup! What do you take me for, an American?

After dinner, cleaning up amounts to loading the Actifry pan, stirrer, and filter, the saucepan, and the bowls and silverware into the dishwasher. There's no grill to scrub, charcoal to extinguish and dispose of, frying oil to filter and eventually recycle, or other detritus.

The cooking times given result in a medium rare (à point) steak. If you prefer a different degree of doneness, adjust the time accordingly. This recipe and the Roquefort sauce also work well with boneless chicken breasts. When cooking chicken, you may have to increase the cooking time slightly so the cooked meat isn't pink in the centre—chicken should always be cooked well done to eliminate the risk of Salmonella. The core temperature of cooked chicken should always be at least 75° C.

This recipe is sized for one person. For two, simply double the quantities. Place the two steaks side by side in the back of the Actifry. The cooking times do not change. I have not tried cooking more than two steaks at once in the Actifry; since additional steaks would be farther from the air input, they may not cook as well—you'll have to experiment if you want to do this.

If you consider the sauce a Continental desecration of red meat, don't make it! The steak will be just fine by itself. If you prefer to use fresh mushrooms rather than store-bought prepared ones, start with around 250 g of brown or white mushrooms, cut off and discard the bottoms of the stalks, cut into slices and place in the Actifry pan with the stirrer installed. Drizzle a teaspoon or two of oil on the top and cook for 10 minutes. You can cook the mushrooms first and set aside to add to the sauce while the steak is cooking.

Posted at 20:42 Permalink

Sunday, July 8, 2018

Reading List: Bad Blood

Carreyrou, John. Bad Blood. New York: Alfred A. Knopf, 2018. ISBN 978-1-984833-63-1.
The drawing of blood for laboratory tests is one of my least favourite parts of a routine visit to the doctor's office. Now, I have no fear of needles and hardly notice the stick, but frequently the doctor's assistant who draws the blood (whom I've nicknamed Vampira) has difficulty finding the vein to get a good flow and has to try several times. On one occasion she made an internal puncture which resulted in a huge, ugly bruise that looked like I'd slammed a car door on my arm. I wondered why they need so much blood, and why draw it into so many different containers? (Eventually, I researched this, having been intrigued by the issue during the O. J. Simpson trial; if you're curious, here is the information.) Then, after the blood is drawn, it has to be sent off to the laboratory, which sends back the results days later. If something pops up in the test results, you have to go back for a second visit with the doctor to discuss it.

Wouldn't it be great if they could just stick a fingertip and draw a drop or two of blood, as is done by diabetics to test blood sugar, then run all the tests on it? Further, imagine if, after taking the drop of blood, it could be put into a desktop machine right in the doctor's office which would, in a matter of minutes, produce test results you could discuss immediately with the doctor. And if such a technology existed and followed the history of decline in price with increase in volume which has characterised other high technology products since the 1970s, it might be possible to deploy the machines into the homes of patients being treated with medications so their effects could be monitored and relayed directly to their physicians in case an anomaly was detected. It wouldn't quite be a Star Trek medical tricorder, but it would be one step closer. With the cost of medical care rising steeply, automating diagnostic blood tests and bringing them to the mass market seemed an excellent candidate as the “next big thing” for Silicon Valley to revolutionise.

This was the vision that came to 19 year old Elizabeth Holmes after completing a summer internship at the Genome Institute of Singapore after her freshman year as a chemical engineering major at Stanford. Holmes had decided on a career in entrepreneurship from an early age and, after her first semester told her father, “No, Dad, I'm, not interested in getting a Ph.D. I want to make money.” And Stanford, in the heart of Silicon Valley, was surrounded by companies started by professors and graduates who had turned inventions into vast fortunes. With only one year of college behind her, she was sure she'd found her opportunity. She showed the patent application she'd drafted for an arm patch that would diagnose medical conditions to Channing Robertson, professor of chemical engineering at Stanford, and Shaunak Roy, the Ph.D. student in whose lab she had worked as an assistant during her freshman year. Robertson was enthusiastic, and when Holmes said she intended to leave Stanford and start a company to commercialise the idea, he encouraged her. When the company was incorporated in 2004, Roy, then a newly-minted Ph.D., became its first employee and Robertson joined the board.

From the outset, the company was funded by other people's money. Holmes persuaded a family friend, Tim Draper, a second-generation venture capitalist who had backed, among other companies, Hotmail, to invest US$ 1 million in first round funding. Draper was soon joined by Victor Palmieri, a corporate turnaround artist and friend of Holmes' father. The company was named Theranos, from “therapy” and “diagnosis”. Elizabeth, unlike this scribbler, had a lifelong aversion to needles, and the invention she described in the business plan pitched to investors was informed by this. A skin patch would draw tiny quantities of blood without pain by means of “micro-needles”, the blood would be analysed by micro-miniaturised sensors in the patch and, if needed, medication could be injected. A wireless data link would send results to the doctor.

This concept, and Elizabeth's enthusiasm and high-energy pitch allowed her to recruit additional investors, raising almost US$ 6 million in 2004. But there were some who failed to be persuaded: MedVentures Associates, a firm that specialised in medical technology, turned her down after discovering she had no answers for the technical questions raised in a meeting with the partners, who had in-depth experience with diagnostic technology. This would be a harbinger of the company's fund-raising in the future: in its entire history, not a single venture fund or investor with experience in medical or diagnostic technology would put money into the company.

Shaunak Roy, who, unlike Holmes, actually knew something about chemistry, quickly realised that Elizabeth's concept, while appealing to the uninformed, was science fiction, not science, and no amount of arm-waving about nanotechnology, microfluidics, or laboratories on a chip would suffice to build something which was far beyond the state of the art. This led to a “de-scoping” of the company's ambition—the first of many which would happen over succeeding years. Instead of Elizabeth's magical patch, a small quantity of blood would be drawn from a finger stick and placed into a cartridge around the size of a credit card. The disposable cartridge would then be placed into a desktop “reader” machine, which would, using the blood and reagents stored in the cartridge, perform a series of analyses and report the results. This was originally called Theranos 1.0, but after a series of painful redesigns, was dubbed the “Edison”. This was the prototype Theranos ultimately showed to potential customers and prospective investors.

This was a far cry from the original ambitious concept. The hundreds of laboratory tests doctors can order are divided into four major categories: immunoassays, general chemistry, hæmatology, and DNA amplification. In immunoassay tests, blood plasma is exposed to an antibody that detects the presence of a substance in the plasma. The antibody contains a marker which can be detected by its effect on light passed through the sample. Immunoassays are used in a number of common blood tests, such the 25(OH)D assay used to test for vitamin D deficiency, but cannot perform other frequently ordered tests such as blood sugar and red and white blood cell counts. Edison could only perform what is called “chemiluminescent immunoassays”, and thus could only perform a fraction of the tests regularly ordered. The rationale for installing an Edison in the doctor's office was dramatically reduced if it could only do some tests but still required a venous blood draw be sent off to the laboratory for the balance.

This didn't deter Elizabeth, who combined her formidable salesmanship with arm-waving about the capabilities of the company's products. She was working on a deal to sell four hundred Edisons to the Mexican government to cope with an outbreak of swine flu, which would generate immediate revenue. Money was much on the minds of Theranos' senior management. By the end of 2009, the company had burned through the US$ 47 million raised in its first three rounds of funding and, without a viable product or prospects for sales, would have difficulty keeping the lights on.

But the real bonanza loomed on the horizon in 2010. Drugstore giant Walgreens was interested in expanding their retail business into the “wellness market”: providing in-store health services to their mass market clientèle. Theranos pitched them on offering in-store blood testing. Doctors could send their patients to the local Walgreens to have their blood tested from a simple finger stick and eliminate the need to draw blood in the office or deal with laboratories. With more than 8,000 locations in the U.S., if each were to be equipped with one Edison, the revenue to Theranos (including the single-use testing cartridges) would put them on the map as another Silicon Valley disruptor that went from zero to hundreds of millions in revenue overnight. But here, as well, the Elizabeth effect was in evidence. Of the 192 tests she told Walgreens Theranos could perform, fewer than half were immunoassays the Edisons could run. The rest could be done only on conventional laboratory equipment, and certainly not on a while-you-wait basis.

Walgreens wasn't the only potential saviour on the horizon. Grocery godzilla Safeway, struggling with sales and earnings which seemed to have reached a peak, saw in-store blood testing with Theranos machines as a high-margin profit centre. They loaned Theranos US$ 30 million and began to plan for installation of blood testing clinics in their stores.

But there was a problem, and as the months wore on, this became increasingly apparent to people at both Walgreens and Safeway, although dismissed by those in senior management under the spell of Elizabeth's reality distortion field. Deadlines were missed. Simple requests, such as A/B comparison tests run on the Theranos hardware and at conventional labs were first refused, then postponed, then run but results not disclosed. The list of tests which could be run, how blood for them would be drawn, and how they would be processed seemed to dissolve into fog whenever specific requests were made for this information, which was essential for planning the in-store clinics.

There was, indeed, a problem, and it was pretty severe, especially for a start-up which had burned through US$ 50 million and sold nothing. The product didn't work. Not only could the Edison only run a fraction of the tests its prospective customers had been led by Theranos to believe it could, for those it did run the results were wildly unreliable. The small quantity of blood used in the test introduced random errors due to dilution of the sample; the small tubes in the cartridge were prone to clogging; and capillary blood collected from a finger stick was prone to errors due to “hemolysis”, the rupture of red blood cells, which is minimal in a venous blood draw but so prevalent in finger stick blood it could lead to some tests producing values which indicated the patient was dead.

Meanwhile, people who came to work at Theranos quickly became aware that it was not a normal company, even by the eccentric standards of Silicon Valley. There was an obsession with security, with doors opened by badge readers; logging of employee movement; information restricted to narrow silos prohibiting collaboration between, say, engineering and marketing which is the norm in technological start-ups; monitoring of employee Internet access, E-mail, and social media presence; a security detail of menacing-looking people in black suits and earpieces (which eventually reached a total of twenty); a propensity of people, even senior executives, to “vanish”, Stalin-era purge-like, overnight; and a climate of fear that anybody, employee or former employee, who spoke about the company or its products to an outsider, especially the media, would be pursued, harassed, and bankrupted by lawsuits. There aren't many start-ups whose senior scientists are summarily demoted and subsequently commit suicide. That happened at Theranos. The company held no memorial for him.

Throughout all of this, a curious presence in the company was Ramesh (“Sunny”) Balwani, a Pakistani-born software engineer who had made a fortune of more than US$ 40 million in the dot-com boom and cashed out before the bust. He joined Theranos in late 2009 as Elizabeth's second in command and rapidly became known as a hatchet man, domineering boss, and clueless when it came to the company's key technologies (on one occasion, an engineer mentioned a robotic arm's “end effector”, after which Sunny would frequently speak of its “endofactor”). Unbeknownst to employees and investors, Elizabeth and Sunny had been living together since 2005. Such an arrangement would be a major scandal in a public company, but even in a private firm, concealing such information from the board and investors is a serious breach of trust.

Let's talk about the board, shall we? Elizabeth was not only persuasive, but well-connected. She would parley one connection into another, and before long had recruited many prominent figures including:

  • George Schultz (former U.S. Secretary of State)
  • Henry Kissinger (former U.S. Secretary of State)
  • Bill Frist (former U.S. Senator and medical doctor)
  • James Mattis (General, U.S. Marine Corps)
  • Riley Bechtel (Chairman and former CEO, Bechtel Group)
  • Sam Nunn (former U.S. Senator)
  • Richard Kobacevich (former Wells Fargo chairman and CEO)

Later, super-lawyer David Boies would join the board, and lead its attacks against the company's detractors. It is notable that, as with its investors, not a single board member had experience in medical or diagnostic technology. Bill Frist was an M.D., but his speciality was heart and lung transplants, not laboratory tests.

By 2014, Elizabeth Holmes had come onto the media radar. Photogenic, articulate, and with a story of high-tech disruption of an industry much in the news, she began to be featured as the “female Steve Jobs”, which must have pleased her, since she affected black turtlenecks, kale shakes, and even a car with no license plates to emulate her role model. She appeared on the cover of Fortune in January 2014, made the Forbes list of 400 most wealthy shortly thereafter, was featured in puff pieces in business and general market media, and was named by Time as one of the hundred most influential people in the world. The year 2014 closed with another glowing profile in the New Yorker. This would be the beginning of the end, as it happened to be read by somebody who actually knew something about blood testing.

Adam Clapper, a pathologist in Missouri, spent his spare time writing Pathology Blawg, with a readership of practising pathologists. Clapper read what Elizabeth was claiming to do with a couple of drops of blood from a finger stick and it didn't pass the sniff test. He wrote a sceptical piece on his blog and, as it passed from hand to hand, he became a lightning rod for others dubious of Theranos' claims, including those with direct or indirect experience with the company. Earlier, he had helped a Wall Street Journal reporter comprehend the tangled web of medical laboratory billing, and he decided to pass on the tip to the author of this book.

Thus began the unravelling of one of the greatest scams and scandals in the history of high technology, Silicon Valley, and venture investing. At the peak, privately-held Theranos was valued at around US$ 9 billion, with Elizabeth Holmes holding around half of its common stock, and with one of those innovative capital structures of which Silicon Valley is so fond, 99.7% of the voting rights. Altogether, over its history, the company raised around US$ 900 million from investors (including US$ 125 million from Rupert Murdoch in the US$ 430 million final round of funding). Most of the investors' money was ultimately spent on legal fees as the whole fairy castle crumbled.

The story of the decline and fall is gripping, involving the grandson of a Secretary of State, gumshoes following whistleblowers and reporters, what amounts to legal terrorism by the ever-slimy David Boies, courageous people who stood their ground in the interest of scientific integrity against enormous personal and financial pressure, and the saga of one of the most cunning and naturally talented confidence women ever, equipped with only two semesters of freshman chemical engineering, who managed to raise and blow through almost a billion dollars of other people's money without checking off the first box on the conventional start-up check list: “Build the product”.

I have, in my career, met three world-class con men. Three times, I (just barely) managed to pick up the warning signs and beg my associates to walk away. Each time I was ignored. After reading this book, I am absolutely sure that had Elizabeth Holmes pitched me on Theranos (about which I never heard before the fraud began to be exposed), I would have been taken in. Walker's law is “Absent evidence to the contrary, assume everything is a scam”. A corollary is “No matter how cautious you are, there's always a confidence man (or woman) who can scam you if you don't do your homework.”

Here is Elizabeth Holmes at Stanford in 2013, when Theranos was riding high and she was doing her “female Steve Jobs” act.

Elizabeth Holmes at Stanford: 2013

This is a CNN piece, filmed after the Theranos scam had begun to collapse, in which you can still glimpse the Elizabeth Holmes reality distortion field at full intensity directed at CNN medical correspondent Sanjay Gupta. There are several curious things about this video. The machine that Gupta is shown is the “miniLab”, a prototype second-generation machine which never worked acceptably, not the Edison, which was actually used in the Walgreens and Safeway tests. Gupta's blood is drawn and tested, but the process used to perform the test is never shown. The result reported is a cholesterol test, but the Edison cannot perform such tests. In the plans for the Walgreens and Safeway roll-outs, such tests were performed on purchased Siemens analysers which had been secretly hacked by Theranos to work with blood diluted well below their regulatory-approved specifications (the dilution was required due to the small volume of blood from the finger stick). Since the miniLab never really worked, the odds are that Gupta's blood was tested on one of the Siemens machines, not a Theranos product at all.

CNN: Inside the Theranos Lab (2016)

In a June 2018 interview, author John Carreyrou recounts the story of Theranos and his part in revealing the truth.

John Carreyrou on investigating Theranos (2018)

If you are a connoisseur of the art of the con, here is a masterpiece. After the Wall Street Journal exposé had broken, after retracting tens of thousands of blood tests, and after Theranos had been banned from running a clinical laboratory by its regulators, Holmes got up before an audience of 2500 people at the meeting of the American Association of Clinical Chemistry and turned up the reality distortion field to eleven. Watch a master at work. She comes on the stage at the six minute mark.

Elizabeth Holmes at the American Association of Clinical Chemistry (2016)

Posted at 21:32 Permalink

Tuesday, July 3, 2018

UNUM 3.0: Updated to Unicode 11

Version 3.0 of UNUM is now available for downloading. Version 3.0 incorporates the Unicode 11.0.0 standard, released on June 5th, 2018. The update to Unicode adds support for seven scripts for languages, additional CJK (Chinese, Japanese, and Korean) symbols, 66 new emoji, and assorted symbols such as half-stars for rating systems. There are a total of 137,374 characters in 11.0.0, of which 684 are new since 10.0.0. (UNUM also supports an additional 65 ASCII control characters, which are not assigned graphic code points in the Unicode database.)

This is an incremental update to Unicode. There are no structural changes in how characters are defined in the databases, and other than the presence of the new characters, the operation of UNUM is unchanged.

UNUM also contains a database of HTML named character references (the sequences like “&lt;” you use in HTML source code when you need to represent a character which has a syntactic meaning in HTML or which can't be directly included in a file with the character encoding you're using to write it). There have been no changes to this standard since UNUM 2.2 was released in September 2017, so UNUM 3.0 will behave identically when querying these references except, of course, that numerical references to the new Unicode characters will be interpreted correctly. (Is your browser totally with it? See what it does with “&#129465;” in an HTML document! And here we go…“🦹”.)

UNUM Documentation and Download Page

Posted at 20:00 Permalink

Monday, June 25, 2018

Reading List: La Mort de Staline

Nury, Fabien and Thierry Robin. La Mort de Staline. Paris: Dargaud, [2010, 2012] 2014. ISBN 978-2-205-07351-5.
The 2017 film, The Death of Stalin, was based upon this French bande dessinée (BD, graphic novel, or comic). The story is based around the death of Stalin and the events that ensued: the scheming and struggle for power among the members of his inner circle, the reactions and relationships of his daughter Svetlana and wastrel son Vasily, the conflict between the Red Army and NKVD, the maneuvering over the arrangements for Stalin's funeral, and the all-encompassing fear and suspicion that Stalin's paranoia had infused into the Soviet society. This is a fictional account, grounded in documented historical events, in which the major characters were real people. But the authors are forthright in saying they invented events and dialogue to tell a story which is intended to give one a sense of the «folie furieuse de Staline et de son entourage» rather than provide a historical narrative.

The film adaptation is listed as a comedy and, particularly if you have a taste for black humour, is quite funny. This BD is not explicitly funny, except in an ironic sense, illustrating the pathological behaviour of those surrounding Stalin. Many of the sequences in this work could have been used as storyboards for the movie, but there are significant events here which did make it into the screenplay. The pervasive strong language which earned the film an R rating is little in evidence here.

The principal characters and their positions are introduced by boxes overlaying the graphics, much as was done in the movie. Readers who aren't familiar with the players in Stalin's Soviet Union such as Beria, Zhukov, Molotov, Malenkov, Khrushchev, Mikoyan, and Bulganin, may miss some of the nuances of their behaviour here, which is driven by this back-story. Their names are given using the French transliteration of Russian, which is somewhat different from that used in English (for example, “Krouchtchev” instead of “Khrushchev”). The artwork is intricately drawn in the realistic style, with only a few comic idioms sparsely used to illustrate things like gunshots.

I enjoyed both the movie (which I saw first, not knowing until the end credits that it was based upon this work) and the BD. They're different takes on the same story, and both work on their own terms. This is not the kind of story for which “spoilers” apply, so you'll lose nothing by enjoying both in either order.

The album cited above contains both volumes of the original print edition. The Kindle edition continues to be published in two volumes (Vol. 1, Vol. 2). An English translation of the graphic novel is available. I have not looked at it beyond the few preview pages available on Amazon.

Posted at 21:35 Permalink

Sunday, June 24, 2018

Google Chrome Drops Support for Setting Cookies with "meta http-equiv"

Many Web sites use “HTTP cookies” to follow a user through a session which may involve a series of individual Web pages. While cookies can be used for intrusive tracking and have developed a somewhat dodgy reputation as a result, for some applications such as providing persistent log-ins to a site from a certain computer and browser they are nearly essential.

The Hacker's Diet Online uses cookies to implement its “Remember me” login feature. If this box is checked when the user logs in, a cookie is stored in the browser which contains an opaque credential that allows the user to access the application from the same machine and browser without logging in for the next ninety days. Recently, this feature stopped working for users of the Google Chrome browser who had updated to version 65 or above.

When cookies were originally introduced in the mid 1990s, they were set by a Web server's sending a “Set-CookieHTTP header field in which the cookie name, value, and optional parameters such as expiration date and scope (source domain and document path). Because many Web applications do not have the ability to directly cause the server to emit header fields, they commonly used a HTML meta element with the “http-equiv” attribute, which causes the browser to treat the element's “content” field as if it had been sent by the server as a header field. For example, to set a cookie, one might use:

<meta http-equiv="Set-Cookie" content="session=6be5123e0" />

to remember a user's session number. (In practice, such cookies would usually contain a scope and expiration date, but these complexities are ignored here.)

Another way of setting a cookie is to use the JavaScript document.cookie property. This, of course, requires that the user's browser support JavaScript and that it be enabled.

The Hacker's Diet Online has been carefully designed not to require JavaScript. Some user interface features, such as dynamic updates for abbreviated data entry and plotting chart items as soon as they are entered in a table will not work without JavaScript, but the full functionality of the application remains available. Consequently, the “Remember me” cookie (the only cookie used by the application, and only if the user requests this feature) was set with an HTML meta element.

Then, the pointy-heads at Google Chrome went and took it away. Why? Who knows—the document linked to by the warning message that appears in the browser debug console is a model of opacity, and the document it cites seems like the decision to remove support for a feature widely used on the Web for 23 years was more like a developers' whim rather than a carefully considered design decision.

Still, whatever you think of this browser and the company that develops it, it has, depending on who's measuring, somewhere between a little less than half to 60% of the market and more than that on desktop platforms. The only way to restore the “Remember me” functionality for its users is to eliminate setting the cookie with the meta tag and use JavaScript instead. This has been implemented in Build 5223 of the application. This, of course, means that users whose browsers do not support JavaScript or who have disabled it in the interests of security and privacy will no longer have access to this capability and will have to log in every time they open a new session with the application.

Google is known as a champion of “progressive” values and for being a hotbed of “progressives”. Welcome to “progress”.

Posted at 14:17 Permalink

Thursday, June 14, 2018

Simulated Annealing: The Travelling Salesman Problem

The travelling salesman problem—finding the shortest itinerary to visit each of a number of cities—is a classic of combinatorial optimisation. Finding optimal solutions by brute force is effectively impossible: there are more than 1032 possible paths to visit thirty cities, and if you could test a billion paths a second, it would take 600,000 times the age of the universe to compare them all and choose the shortest.

If you don't require an absolutely optimal solution, but rather one that's within a few percent of the best possible, there are a number of optimisation techniques which will get the job done. A new interactive page, Simulated Annealing: The Travelling Salesman Problem, explores one of the most elegant, simulated annealing. By analogy to creating large scale order by annealing metal, random perturbations to a path, performed according to a schedule where the degree of perturbation (“temperature”) steadily decreases, finds near-optimal solutions to even very large problems. You can experiment with the cost function and observe its effect on the solutions found. A number of standard test cases, some of which have known optimal solutions, are included.

This page runs entirely within your browser using JavaScript and HTML5 canvas graphics. There is no need to download, build, or install any software to use it.

Posted at 13:55 Permalink

Tuesday, June 12, 2018

Reading List: Influx

Suarez, Daniel. Influx. New York: Signet, [2014] 2015. ISBN 978-0-451-46944-1.
Doesn't it sometimes seem that, sometime in the 1960s, the broad march of technology just stopped? Certainly, there has been breathtaking progress in some fields, particularly computation and data communication, but what about clean, abundant fusion power too cheap to meter, opening up the solar system to settlement, prevention and/or effective treatment of all kinds of cancer, anti-aging therapy, artificial general intelligence, anthropomorphic robotics, and the many other wonders we expected to be commonplace by the year 2000?

Decades later, Jon Grady was toiling in his obscure laboratory to make one of those dreams—gravity control— a reality. His lab is invaded by notorious Luddite terrorists who plan to blow up his apparatus and team. The fuse burns down into the charge, and all flashes white, then black. When he awakes, he finds himself, in good condition, in a luxurious office suite in a skyscraper, where he is introduced to the director of the Federal Bureau of Technology Control (BTC). The BTC, which appears in no federal organisation chart or budget, is charged with detecting potentially emerging disruptive technologies, controlling and/or stopping them (including deploying Luddite terrorists, where necessary), co-opting their developers into working in deep secrecy with the BTC, and releasing the technologies only when human nature and social and political institutions were “ready” for them—as determined by the BTC.

But of course those technologies exist within the BTC, and it uses them: unlimited energy, genetically engineered beings, clones, artificial intelligence, and mind control weapons. Grady is offered a devil's bargain: join the BTC and work for them, or suffer the worst they can do to those who resist and see his life's work erased. Grady turns them down.

At first, his fate doesn't seem that bad but then, as the creative and individualistic are wont to do, he resists and discovers the consequences when half a century's suppressed technologies are arrayed against a defiant human mind. How is he to recover his freedom and attack the BTC? Perhaps there are others, equally talented and defiant, in the same predicament? And, perhaps, the BTC, with such great power at its command, is not so monolithic and immune from rivalry, ambition, and power struggles as it would like others to believe. And what about other government agencies, fiercely protective of their own turf and budgets, and jealous of any rivals?

Thus begins a technological thriller very different from the author's earlier Dæmon (August 2010) and Freedom™ (January 2011), but compelling. How does a band of individuals take on an adversary which can literally rain destruction from the sky? What is the truth beneath the public face of the BTC? What does a superhuman operative do upon discovering everything has been a lie? And how can one be sure it never happens again?

With this novel Daniel Suarez reinforces his reputation as an emerging grand master of the techno-thriller. This book won the 2015 Prometheus Award for best libertarian novel.

Posted at 22:24 Permalink

Wednesday, June 6, 2018

Reading List: Enemy of the State

Mills, Kyle. Enemy of the State. New York: Atria Books, 2017. ISBN 978-1-4767-8351-2.
This is the third novel in the Mitch Rapp saga written by Kyle Mills, who took over the franchise after the death of Vince Flynn, its creator. It is the sixteenth novel in the Mitch Rapp series (Flynn's first novel, Term Limits [November 2009], is set in the same world and shares characters with the Mitch Rapp series, but Rapp does not appear in it, so it isn't considered a Rapp novel), Mills continues to develop the Rapp story in new directions, while maintaining the action-packed and detail-rich style which made the series so successful.

When a covert operation tracking the flow of funds to ISIS discovers that a (minor) member of the Saudi royal family is acting as a bagman, the secret deal between the U.S. and Saudi Arabia struck in the days after the 2001 terrorist attacks on the U.S.—the U.S. would hide the ample evidence of Saudi involvement in the plot in return for the Saudis dealing with terrorists and funders of terrorism within the Kingdom—is called into question. The president of the U.S., who might be described in modern jargon as “having an anger management problem” decides the time has come to get to the bottom of what the Saudis are up to: is it a few rogue ne'er-do-wells, or is the leadership up to their old tricks of funding and promoting radical Islamic infiltration and terrorism in the West? And if they are, he wants to make them hurt, so they don't even think about trying it again.

When it comes to putting the hurt on miscreants, the president's go-to-guy is Mitch Rapp, the CIA's barely controlled loose cannon, who has a way of getting the job done even if his superiors don't know, and don't want to know, the details. When the president calls Rapp into his office and says, “I think you need to have a talk … and at the end of that talk I think he needs to be dead” there is little doubt about what will happen after Rapp walks out of the office.

But there is a problem. Saudi Arabia is, nominally at least, an important U.S ally. It keeps the oil flowing and prices down, not only benefitting the world economy, but putting a lid on the revenue of troublemakers such as Russia and Iran. Saudi Arabia is a major customer of U.S. foreign military sales. Saudi Arabia is also a principal target of Islamic revolutionaries, and however bad it is today, one doesn't want to contemplate a post-Saudi regime raising the black flag of ISIS, crying havoc, and letting slip the goats of war. Wet work involving the royal family must not just be deniable but totally firewalled from any involvement by the U.S. government. In accepting the mission Rapp understands that if things blow up, he will not only be on his own but in all likelihood have the U.S. government actively hunting him down.

Rapp hands in his resignation to the CIA, ending a relationship which has existed over all of the previous novels. He meets with his regular mission team and informs them he “need[s] to go somewhere you … can't follow”: involving them would create too many visible ties back to the CIA. If he's going to go rogue, he decides he must truly do so, and sets off assembling a rogues' gallery, composed mostly of former adversaries we've met in previous books. When he recruits his friend Claudia, who previously managed logistics for an assassin Rapp confronted in the past, she says, “So, a criminal enterprise. And only one of the people at this table knows how to be a criminal.”

Assembling this band of dodgy, dangerous, and devious characters at the headquarters of an arms dealer in that paradise which is Juba, South Sudan, Rapp plots an operation to penetrate the security surrounding the Saudi princeling and find out how high the Saudi involvement in funding ISIS goes. What they learn is disturbing in the extreme.

After an operation gone pear-shaped, and with the CIA, FBI, Saudis, and Sudanese factions all chasing him, Rapp and his misfit mob have to improvise and figure out how to break the link between the Saudis and ISIS in way which will allow him to deny everything and get back to whatever is left of his life.

This is a thriller which is full of action, suspense, and characters fans of the series will have met before acting in ways which may be surprising. After a shaky outing in the previous installment, Order to Kill (December 2017), Kyle Mills has regained his stride and, while preserving the essentials of Mitch Rapp, is breaking new ground. It will be interesting to see if the next novel, Red War, expected in September 2018, continues to involve any of the new team. While you can read this as a stand-alone thriller, you'll enjoy it more if you've read the earlier books in which the members of Rapp's team were principal characters.

Posted at 22:30 Permalink

Saturday, June 2, 2018

Reading List: Project Cyclops

Oliver, Bernard M., John Billingham, et al. Project Cyclops. Stanford, CA: Stanford/NASA Ames Research Center, 1971. NASA-CR-114445 N73-18822.
There are few questions in science as simple to state and profound in their implications as “are we alone?”—are humans the only species with a technological civilisation in the galaxy, or in the universe? This has been a matter of speculation by philosophers, theologians, authors of fiction, and innumerable people gazing at the stars since antiquity, but it was only in the years after World War II, which had seen the development of high-power microwave transmitters and low-noise receivers for radar, that it dawned upon a few visionaries that this had now become a question which could be scientifically investigated.

The propagation of radio waves through the atmosphere and the interstellar medium is governed by basic laws of physics, and the advent of radio astronomy demonstrated that many objects in the sky, some very distant, could be detected in the microwave spectrum. But if we were able to detect these natural sources, suppose we connected a powerful transmitter to our radio telescope and sent a signal to a nearby star? It was easy to calculate that, given the technology of the time (around 1960), existing microwave transmitters and radio telescopes could transmit messages across interstellar distances.

But, it's one thing to calculate that intelligent aliens with access to microwave communication technology equal or better than our own could communicate over the void between the stars, and entirely another to listen for those communications. The problems are simple to understand but forbidding to face: where do you point your antenna, and where do you tune your dial? There are on the order of a hundred billion stars in our galaxy. We now know, as early researchers suspected without evidence, that most of these stars have planets, some of which may have conditions suitable for the evolution of intelligent life. Suppose aliens on one of these planets reach a level of technological development where they decide to join the “Galactic Club” and transmit a beacon which simply says “Yo! Anybody out there?” (The beacon would probably announce a signal with more information which would be easy to detect once you knew where to look.) But for the beacon to work, it would have to be aimed at candidate stars where others might be listening (a beacon which broadcasted in all directions—an “omnidirectional beacon”—would require so much energy or be limited to such a short range as to be impractical for civilisations with technology comparable to our own).

Then there's the question of how many technological communicating civilisations there are in the galaxy. Note that it isn't enough that a civilisation have the technology which enables it to establish a beacon: it has to do so. And it is a sobering thought that more than six decades after we had the ability to send such a signal, we haven't yet done so. The galaxy may be full of civilisations with our level of technology and above which have the same funding priorities we do and choose to spend their research budget on intersectional autoethnography of transgender marine frobdobs rather than communicating with nerdy pocket-protector types around other stars who tediously ask Big Questions.

And suppose a civilisation decides it can find the spare change to set up and operate a beacon, inviting others to contact it. How long will it continue to transmit, especially since it's unlikely, given the finite speed of light and the vast distances between the stars, there will be a response in the near term? Before long, scruffy professors will be marching in the streets wearing frobdob hats and rainbow tentacle capes, and funding will be called into question. This is termed the “lifetime” of a communicating civilisation, or L, which is how long that civilisation transmits and listens to establish contact with others. If you make plausible assumptions for the other parameters in the Drake equation (which estimates how many communicating civilisations there are in the galaxy), a numerical coincidence results in the estimate of the number of communicating civilisations in the galaxy being roughly equal to their communicating life in years, L. So, if a typical civilisation is open to communication for, say, 10,000 years before it gives up and diverts its funds to frobdob research, there will be around 10,000 such civilisations in the galaxy. With 100 billion stars (and around as many planets which may be hosts to life), that's a 0.00001% chance that any given star where you point your antenna may be transmitting, and that has to be multiplied by the same probability they are transmitting their beacon in your direction while you happen to be listening. It gets worse. The galaxy is huge—around 150 million light years in diameter, and our technology can only communicate with comparable civilisations out to a tiny fraction of this, say 1000 light years for high-power omnidirectional beacons, maybe ten to a hundred times that for directed beacons, but then you have the constraint that you have to be listening in their direction when they happen to be sending.

It seems hopeless. It may be. But the 1960s were a time very different from our constrained age. Back then, if you had a problem, like going to the Moon in eight years, you said, “Wow! That's a really big nail. How big a hammer do I need to get the job done?” Toward the end of that era when everything seemed possible, NASA convened a summer seminar at Stanford University to investigate what it would take to seriously investigate the question of whether we are alone. The result was Project Cyclops: A Design Study of a System for Detecting Extraterrestrial Intelligent Life, prepared in 1971 and issued as a NASA report (no Library of Congress catalogue number or ISBN was assigned) in 1973; the link will take you to a NASA PDF scan of the original document, which is in the public domain. The project assembled leading experts in all aspects of the technologies involved: antennas, receivers, signal processing and analysis, transmission and control, and system design and costing.

They approached the problem from what might be called the “Apollo perspective”: what will it cost, given the technology we have in hand right now, to address this question and get an answer within a reasonable time? What they came up with was breathtaking, although no more so than Apollo. If you want to listen for beacons from communicating civilisations as distant as 1000 light years and incidental transmissions (“leakage”, like our own television and radar emissions) within 100 light years, you're going to need a really big bucket to collect the signal, so they settled on 1000 dishes, each 100 metres in diameter. Putting this into perspective, 100 metres is about the largest steerable dish anybody envisioned at the time, and they wanted to build a thousand of them, densely packed.

But wait, there's more. These 1000 dishes were not just a huge bucket for radio waves, but a phased array, where signals from all of the dishes (or a subset, used to observe multiple targets) were combined to provide the angular resolution of a single dish the size of the entire array. This required breathtaking precision of electronic design at the time which is commonplace today (although an array of 1000 dishes spread over 16 km would still give most designers pause). The signals that might be received would not be fixed in frequency, but would drift due to Doppler shifts resulting from relative motion of the transmitter and receiver. With today's computing hardware, digging such a signal out of the raw data is something you can do on a laptop or mobile phone, but in 1971 the best solution was an optical data processor involving exposing, developing, and scanning film. It was exquisitely clever, although obsolete only a few years later, but recall the team had agreed to use only technologies which existed at the time of their design. Even more amazing (and today, almost bizarre) was the scheme to use the array as an imaging telescope. Again, with modern computers, this is a simple matter of programming, but in 1971 the designers envisioned a vast hall in which the signals from the antennas would be re-emitted by radio transmitters which would interfere in free space and produce an intensity image on an image surface where it would be measured by an array of receiver antennæ.

What would all of this cost? Lots—depending upon the assumptions used in the design (the cost was mostly driven by the antenna specifications, where extending the search to shorter wavelengths could double the cost, since antennas had to be built to greater precision) total system capital cost was estimated as between 6 and 10 billion dollars (1971). Converting this cost into 2018 dollars gives a cost between 37 and 61 billion dollars. (By comparison, the Apollo project cost around 110 billion 2018 dollars.) But since the search for a signal may “almost certainly take years, perhaps decades and possibly centuries”, that initial investment must be backed by a long-term funding commitment to continue the search, maintain the capital equipment, and upgrade it as technology matures. Given governments' record in sustaining long-term efforts in projects which do not line politicians' or donors' pockets with taxpayer funds, such perseverance is not the way to bet. Perhaps participants in the study should have pondered how to incorporate sufficient opportunities for graft into the project, but even the early 1970s were still an idealistic time when we didn't yet think that way.

This study is the founding document of much of the work in the Search for Extraterrestrial Intelligence (SETI) conducted in subsequent decades. Many researchers first realised that answering this question, “Are we alone?”, was within our technological grasp when chewing through this difficult but inspiring document. (If you have an equation or chart phobia, it's not for you; they figure on the majority of pages.) The study has held up very well over the decades. There are a number of assumptions we might wish to revise today (for example, higher frequencies may be better for interstellar communication than were assumed at the time, and spread spectrum transmissions may be more energy efficient than the extreme narrowband beacons assumed in the Cyclops study).

Despite disposing of wealth, technological capability, and computing power of which authors of the Project Cyclops report never dreamed, we only make little plans today. Most readers of this post, in their lifetimes, have experienced the expansion of their access to knowledge in the transition from being isolated to gaining connectivity to a global, high-bandwidth network. Imagine what it means to make the step from being confined to our single planet of origin to being plugged in to the Galactic Web, exchanging what we've learned with a multitude of others looking at things from entirely different perspectives. Heck, you could retire the entire capital and operating cost of Project Cyclops in the first three years just from advertising revenue on frobdob videos! (Did I mention they have very large eyes which are almost all pupil? Never mind the tentacles.)

This document has been subjected to intense scrutiny over the years. The SETI League maintains a comprehensive errata list for the publication.

Posted at 21:30 Permalink