Link from Trac to GitHub using changeset links

Posted by on 30 Sep 2020 | Tagged as: robobait, software engineering, web technology

There is an elegant way to link from the wiki and bug tracker called Trac to GitHub by means of changeset links. Unfortunately, Trac’s documentation on WikiFormatting and on TracLinks does not currently describe this. But one project which I use, MacPorts, uses Trac to track MacPorts bugs and to host wiki documentation. They prefer that contributors use these changeset links rather than URLs when referring to MacPorts on GitHub. So, this is the documentation for these changeset links, in a form which I wish was in the main Trac documentation. It is here to remind me. Maybe it will also help others searching for how to do this.

Continue Reading »

PostScript code converting UTF-8 to UTF-16

Posted by on 31 Aug 2020 | Tagged as: robobait, software engineering, Unicode

This is a little bit of code which was fun and nostalgic to write, even though the motivating project fell through. I wrote PostScript language functions to convert strings with UTF-8 contents, into strings with UTF-16 contents. This was intended to be part of a batch tool to convert PDF documents to PDF/A format, but that did not work out. However, the code works, and here it is.

Continue Reading »

Concise Time Machine logs on macOS 10.13 High Sierra

Posted by on 31 Jul 2020 | Tagged as: mac, robobait

I’m concerned that Time Machine is taking so long to back up my laptop to my file server, that it may be the sign of a problem with my file server. The first step in investigating a problem like this is to get data. I think I have found a way to get useful log data about Time Machine backups, using the log show command or the Consolation3 application. I’d like to share how I do it.

Continue Reading »

Resolving “log archive metadata is missing” and “error number 65”

Posted by on 30 Jun 2020 | Tagged as: robobait

On macOS 10.13 High Sierra, one way to diagnose Time Machine slowdowns and other problems is to use the log shell command. Unfortunately, on my system I sometimes get an error:

% log show --last 2s --style syslog
log: warning: The log archive contains partial or missing metadata
log: cannot use --last when archive metadata is missing

This appears to prevent me from using the --last option to limit output to the most recent time interval. The failed log command returns an exit status of 65, which we can see using echo $? :

% echo $?
65

For the benefit of web searchers, here is what I have found out about how to resolve this error message. Warning: it won’t be a fix, but I do have workaround.

Continue Reading »

Recording “To Shiver the Sky”

Posted by on 31 May 2020 | Tagged as: aviation, culture, music, personal, travel

The conductor beat out a measure. A rich orchestra sound flowed from 80 headphones into 80 heads. With a sound like an earthquake’s rumble overlaid with angelic choirs, 80 voices sang out: “Una Volta che Avrai…“. And I was sitting 10 metres in front of them. Wow.

Continue Reading »

FFmpeg’s fps filter, documented

Posted by on 30 Apr 2020 | Tagged as: FFmpeg, robobait, software engineering, web technology

The FFmpeg media editing software is a valuable tool, but its documentation is only barely adequate. It certainly does not answer all the questions I have, as a user trying to understand why FFmpeg is not doing what I want it to do.

Fortunately, FFmpeg is open source, so when the documentation fails, one can read the source. I wanted to learn about presentation time stamps and time bases. The fps video filter source code, in file libavfilter/vf_fps.c, was an instructive read.

I took what I learned from reading that source, and did a complete rewrite of the fps filter documentation. It is longer than the original fps filter documentation (as archived in April 2020 — you can check if the present documentation is any better). I believe the rewrite is more complete and more accurate. I contributed the rewrite to the FFmpeg project. I submitted it as a patch to the ffmpeg developers list. Discussion continues. I don’t know if this contribution will ultimately get accepted.

So, for the benefit of FFmpeg users who are web-searching for answers, here is my documentation of FFmpeg’s fps video filter.

Continue Reading »

Two musicians, violating social distancing

Posted by on 31 Mar 2020 | Tagged as: community, music

I was annoyed! Today I caught two musicians together. They were violating social distancing. I heard them counting: one was saying “1 2 3, 1 2 3,”…; the other, “1 2 3 4 5, 1 2 3 4 5,”… Actually, their “1”s landed together, so it sounded more like “ONE two twothree fourthree five ONE…”. Anyhow, we all need to be virus police these days, so I confronted them — from a safe distance, of course. “Hey!”, I said, “There’s a pandemic. Don’t be so close together! It’s unsafe.” “No worries”, the musicians replied, “we have two meters between us.”

Happy new decade, yes, 2020 not 2021

Posted by on 31 Jan 2020 | Tagged as: culture, robobait, time

Happy new decade, everyone! This month, January 2020, marks the start of a new decade, the 2020’s. And for those of you who are saying, “no, strictly speaking the decade doesn’t begin until 2021”, you are wrong. Or, at least, all of us who say that decades and centuries start on round numbers are just as “strictly speaking” right as you. Here is why.

I think we all agree that a “decade” generally means a 10-year time span, and a “century” means a 100-year time span. In everyday usage, the word “decade” means a time interval which starts on a year ending in “0”, and ends on a year ending in “9”. Thus we have just finished the “2010’s” (10 years from the start of 2010 to the end of 2019), and are entering the “2020’s” (2020–2029). By the same token, every-day use of the time unit “century” means a time interval which starts on a year ending in “00” and ends on a year ending in “99”. The previous century is known as the “1900’s”, and also as the “20th century”.

And all of the above only applies to English usage of North America, when using the current standard Gregorian Calendar. It is also limited to year 1 onwards — the Common Era (earlier labelled as Anno Domini or A.D. by Bede back in the 600’s and 700’s).
The pedants will point to the first year of the Common Era, which is year 1 rather than year 0. They argue that the first decade must begin with year 1 and be 10 years long, so it must end on year 10. Count forward in 10-year increments, and the 2020’s must start with the year 2021 and end with the year 2030. Similarly, the pedants argue that the first century must begin with year 1 and be 100 years long, so it must end on year 100. Note that the entire foundation of their pedantry is that the time unit “decade” must always and only be 10 years long, and “century” must always and only be 100 years long.

I believe that where the pedants go astray is to prize a constant length over a convenient starting point for “decade” and “century”.

Decades, and calendars, are social constructs. They don’t have to abide by strict mathematics, and they don’t. There is a value to having a calendar which matches the earth’s rotation around the sun. There is value to having a calendar which adjusts to seasonal changes in sunrise and sunset. And, there is value to having a calendar which matches common and convenient language usage.

Consider the day: normally it is 24 hours long. But when “springing forward” from Standard to Daylight Saving Time, there is a day which is 23 hours long. Later in the year, when “falling back” to Standard Time, there is a day which is 25 hours long. I have had to write software which handled this variation. A day is normally 24 hours, but can be 23 or 25 hours.

Consider the minute: normally it is 60 seconds long. But when a leap second is necessary — to keep the highly-accurate Coordinated Universal Time (UTC) in sync with the Earth’s variable orbital duration, and to keep the March equinox close to March 20 — the minute containing the leap second is 61 seconds long.

Some years are 365 days long, others are 366 days long, because of leap years.

Britain officially started its civil year on 25 March, until as late as 1751. Only in 1752 did it finally change the start of the civil year to 1 January. Common usage was ahead of civil rules in adopting 1 January as the beginning of the year, leading dates from 1 January to 24 March to be written with two alternative years: “30 January 1648/1649”.  Even more interestingly, September 1752 was 19 days long in England, instead of 30 days as in other years. This was to bring the calendar back in sync with the solar year, or in other words, to move March 20 back to the day of the March equinox.

All these calendar shenanigans are about deciding to allow social (and astronomical) considerations take precedence over strictly consistent numerical duration. “Strictly speaking”, a calendar balances all these considerations. And rightly so.

Given that, I think it is perfectly reasonable to declare: decades are normally 10 years long, but the first decade of the Common Era was 9 years long: 1 to 9 CE. 10 CE began the second decade. Centuries are normally 100 years long, but the first century CD was 99 years long: 1 to 99 CE.

Thus, 1 Jan 2020 CE also began a decade. Pedants, I see where you are coming from, but if you are willing to use a calendar with 25-hour days, and a 19-day September back in the day, I claim you cannot justify denying the 9-year decade and the 99-year century.

I am tempted to find a time machine, go back to northeast England in the 7th or 8th centuries CE, and persuade Bede to define his Anno Domini year numbers at 0, instead of 1. It would sidestep this whole decade and century problem. The only problem is, that in Bede’s time, Europe would not learn of the zero for another 3-5 centuries (where “centuries” are not strict 100-year time durations).

Happy new decade, starting January 2020!

Impressions of Italian grocery stores

Posted by on 31 Oct 2019 | Tagged as: culture, personal, travel

For the last six weeks, I’ve been shopping at grocery stores in Venice, Naples, Rome, and Florence. My Carissima and I are self-catering during an extended trip through Italy. My grocery store sample is limited and unrepresentative, but even so, the experience makes me appreciate the treasures at these Italian groceries. And, it helps me appreciate by contrast what they grocery stores back home in B.C. do well. Continue Reading »

In which Jim and Ducky appear in the Venice Biennale

Posted by on 30 Sep 2019 | Tagged as: culture, music, travel

A most extraordinary thing happened last Saturday: Ducky Sherwood and I appeared in the Venice Biennale! We were a (tiny) part of Sun & Sea [Marina], an “opera-performance” by RugilÄ— BarzdžiukaitÄ—, Vaiva GrainytÄ—, and Lina LapelytÄ—, at the Lithuania Pavilion. This work won them the Golden Lion award for Best National Participation. I have been a devoted amateur opera singer for nearly 25 years. I am delighted to join in this performance, in my little comprimario role. It is an unlikely addition to my résumé. Continue Reading »

« Prev - Next »