QZ qz thoughts
a blog from Eli the Bearded
Page 2 of 134

Solar Opposites (Hulu)

This is a show from Justin Roiland, famous for Rick and Morty. In some ways it's just another way for Roiland to voice his frustration with the dumb things he sees in the world. Rick, the grandfather in Rick and Morty, and Korvo, the father-figure in Solar Opposites, are both science minded characters who rail against the stupidity around them. Neither is very good at empathy, and both have trouble with social conventions.

This story is much more sitcom-esque than Rick and Morty, and feels less radical. There's a basic story line of aliens trying to fit in on Earth with different levels how much they care about fitting in and different priorities. This story doesn't have much in the way to continuity between episodes. But there is a subplot involving Yumyulack's collection of shrunken people he keeps in his ant-farm-like terrarium bedroom wall; called "The Wall" by the people inside it.

(I say "he" for Yumyulack because that's the gender the character choose to emulate on Earth. The aliens, although clearly written to have human genders, are apparently supposed to biologically genderless.)

The Wall makes direct references to Escape from New York, and has a very 1970s or early 1980s future dystopia quality to it. There is a very definite story arc to these segments, and unlike the rest of the episode, seeing them out of order would be confusing.

To me, The Wall is the best part of Solar Opposites and I was very pleased with episode seven being almost entirely Wall story, with the titular story ("Terry and Korvo Steal a Bear") told wordlessly through what can be seen out of the windows of the terrarium prison. The rest of the show for the season is rather hit-or-miss.

Five of eight levels in The Wall.

Solar Opposites at IMDB
Rick and Morty at IMDB
Escape from New York at IMDB

Succession (HBO)

This is the story of a Rupert Murdoch-type media owner and the family of his that wants to take over the business. I've watched Season One of this show, there are two seasons released so far.

Second born son, although first from second marriage, Kendall Roy starts the season in a good place in the company, but is quickly sidelined by his father, Logan Roy, who has reconsiderd the C-level appointment for Ken. Only daughter Siobhan gets engaged, with a marrige ending the season; cousin (nephew to Logan) Greg gets fired from a terrible job at the company and then uses family connections to try to get a better job. First and third born sons Connor and Roman try to find themselves, one from outside the company and one inside. Third wife to Logan, Marcia, tries to establish herself and her son (from a previous marriage) to the discomfort of Logan's children.

The general premise is that Logan is a very shrewd and hardball media businessman who has never had time for his kids yet has high expectations of them. Now, at 80, he is finding that they are neither shrewd nor good at hardball business. Except that the show follows the kids' stories more than the old man's, helping to reenforce the notion that Logan is evil. (Okay, Logan is evil, but if told from his point of view, the kids are just incompetent evil to his masterful evil.)

The kids meanwhile, want to break out and do things on their own, but question their dad's continued competance in his old age. Except Greg. He is largely an outsider to the family drama and oscillates between oblivious and shrewd, with his eye set on the much more reasonable goal of staying in a cushy job.

Logan Roy and Roman Roy are the only two actors in this series I recognize from other roles. Logan is played by Brian Cox, who I most vividly remember as ex-spy Big John from L.I.E. I can almost see Logan and Big John as the same character: forceful characters used to getting their own way and good at reading other people. Roman is played by Kieran Culkin, who I remember (although not well) from Igby Goes Down, about a rich kid dissatisfied with family. The family here is also rich, but the dissatisfaction is much different.

Eight voting board members out of full twelve.

Succession at IMDB

Covid-19, Day 170

Latest numbers: New York State has 389,900 reported cases and 30,700 deaths, 292 of those in week ending June 14th. California has 159,200 cases and 5,200 deaths, 432 on June 14th week. US overall 2,158,500 cases and 117,200 deaths, 5,175 deaths that same week. World wide deaths stand at 444,500 and infections at at 8,270,000. It is widely believed US numbers (and some world numbers) are undercounts due to testing shortages and delays. Looking at graphs, some parts of the US have seeminly recovered, while others are staying flat or getting worse. New York looks like it is long past the worst; California looks flat; Nebraska, Georgia, Arkansas all seem to be getting worse and worse. But don't worry — "If we stop testing right now, we'd have very few cases, if any" President Trump told us on the 15th.

Today I had my first dentist appointment in covid-times. The dental office called earlier in the week to reschedule the time of visit. Apparently the one hour appointments are now staggered throughout the hour so that there is less overlap in waiting room use. I did not sit down at all in the waiting room, since I was a little late for the appointment. This week also saw alternate side parking enforcement begin again in San Francisco, and I had trouble finding a space.

In the waiting room I had my temperature taken with touchless forehead scan and a health survey taken. In the room with the dental chair, I was given hand sanitizer and s special mouthwash. The chair had disposable plastic sheath. The old style rectangular bib with a neck chain was gone. Instead a large bib with a shape like the x-ray blankets was just balanced on me. Hygienists and doctor wore both face masks (cloth over nose and mouth) and face shields (clear plastic over whole face).

The cleaning was mostly the same. There was a new suction tool, which the hygienist called a "leaf". It was a flat bulb with preforations on one side to create a distributed zone of suction. The leaf was used during ultrasonic scaling and polishing. The old style suction straw was still in use for other parts of the cleaning and exam. (During polishing both suction tools were used.) In response to my questions, the hygienist said they they had not been using the ultrasonic scaler or the polisher before they had the leaf. It's supposed to reduce the aerosols from those activities, but I still saw the spray of mist.

Besides street sweeping enforcement beginning again this week, bars and restaurants in San Francisco have also begun limited reopening. Places with outdoor seating can now use that. It's somewhat controversial in that it puts a burden on waitstaff to be extra cautious handling stuff and often puts diners in close contact with non-dining public (eg sidewalk seating). I was never one to eat out much, and have not availed myself of this new opportunity.

Immediately after the dental cleaning I went to a bagel shop for breakfast and coffee. No one was using their outdoor tables. I got my food and left to eat it at home.

Web Log Tools

As in tools for web server logs, not the web logs commonly called "blogs".

In the early 2000s, I was doing a lot of very specific log analysis. At the time I was "webmaster" for a site with ads. To justify ad sales, the company paid for a web server log audit service. This provided the main log reports looked at by the company, but sometimes I'd be called on to explain things. So I had to dive into the logs and examine them myself.

Enter logprint. Today this tool is not going to be widely useful, instead people will use an ELK stack and define a grok rule in the logstash part of ELK. But initial release of logstash was 2010, long after I wrote logprint.

What logprint does is parse log files of various formats — I defined four that I've had to work with, adding more is an excerise regular expression writing, same as with grok — into columns. Some of those columns can be sub-parsed. For example, the Apache request line column can be broken down into a method ("GET", "POST", "HEAD", etc), a URI (the actual requested resource) and an optional protocol (not present for HTTP 0.9 or present as "HTTP/1.0" or "HTTP/1.1"). After parsing the line, it can be filtered: only consider requests that succeeded (2xx), and were over 200,000 bytes; then selectively print some of the columns for that entry, say date, referer, URI.

# Apache "combined" has referer as a column ("common" does not)
# status >= 200 and status <= 299 is any 2xx response
# @uri will only be the local file name, discarding a full hostname
#      on the request line and CGI parameters
logprint -f combined \
	-F 'status>=200' -F 'status<=299' -F 'bytes>200000' \
	-c date,referer,@uri

Things like parsing the file part into URI when you get a request with the full URL on the GET line is an unusual need, but I needed it then and it is still useful now. The same parsing rules for a full URL there are also available for parsing Referer: headers, which was once useful for pulling out search terms used from referring search engines.

So logprint is a very handy slice and dice tool for web logs. It can be combined with another tool I wrote, adder which aims to be a full featured "add values up" tool. You can feed in columns of numbers and get columns of sums. You can feed in columns of numbers and get a sum per line. You can feed in value and keyword and get sums per keyword. That last one is rather useful in combination with logprint.

# using Apache "common" format, find lines with status 200,
# print bytes used and the first directory component of the URI file part
#   pipe that to adder,
#       suppress column headers, 
#	use column 0 as value to add,
#	 and column 1 as label
logprint -f common --filter status=200 -c bytes,file:@path1 $log |
    adder -n -b 1 -r 0

That gets output like this (although this was sorted):

/u      14415354750
/favicon.ico    3311323662
/i      655750249
/qz     272329622
/apple-touch-icon.png   218913277
/index.html     62583501
/jpeg   49580565
/qz.css 38188009

So simple to see where the bytes are coming from. Looking at that, I decied I really should better compress the "apple-touch-icon.png". I'm not sure I can get "faveicon.ico" smaller, at least not with the features it has now. And the CSS and other icons in /i/ also got some compression.

Then I looked at bytes per day to see if adding a sitemap helped. It does, but the difference is slight, easy to lose in the weekly cycle. Usage really picked up in April, didn't it?

bytes per day graph
$ cat by-day-usage
if [ ! -f "$log" ] ; then echo "$0: usage by-day-usage LOGFILE[.gz]"; exit 2 ; fi
logprint -f common --filter status=200 -c bytes,date $log $@ |
    adder -n -b 1 -r 0

And graphed with gnuplot

So I'm publishing these log tool scripts for anyone interested in similar simple log slicing and dicing. It's not awstats or webalizer but it's not trying to be either.