Archive for January 18, 2021

Monday, January 18, 2021 [Tweets] [Favorites]

Switching to Windows and Linux

Don Melton (tweet):

Most of you probably don’t know this but a little over five years ago I built my own gaming PC.


While I certainly gamed my ass off with that homemade machine for awhile, it didn’t really become an essential device for me until I started using it to experiment with hardware video encoders.


Eventually, it became a pain in the ass to keep switching back and forth between my iMac and the Windows PC. So I started browsing the Web, reading and writing email, collaborating in Slack, Discord and Skype, all within Windows.

Orta Therox (tweet):

It’s somewhat nebulous, but during the announcements of Apple’s new macOS 11 this year, I felt like a line had been crossed in my mind: The Mac isn’t really the right OS for me anymore.


The bit that’s tricky for me is that I don’t use a phone, and I want my computer to be more like a truck than a car.


The move towards a more app-store focused, sandboxed OS means that whole genres of apps aren’t possible anymore. I’m particularly sad about what happened to Safari extensions over the last few years. I don’t want to put my time into a platform where the people starting today have a smaller domain than I did when I started.


The Mac software ecosystem was like a street of local shops run by people in the community, and then post-iPhone all the big shops moved in because they just wanted to make sure they were represented in the area. Modern desktop environments now feel quite same-y, but this also trivialized OS switching costs.


Update (2021-01-19): Mark Frauenfelder (via Chuan):

I’ve been happily using Macs ever since. But a little over a month ago, a representative for Gateway computers asked me if I’d like to try one of its new laptops. I was planning to say no thank you, but my 17-year-old daughter convinced me to give it a try. She’s a gamer and programmer and switched from a Mac to a Windows machine when she was 14 or 15. She insisted I was giving Windows short shrift. So I emailed the representative and said OK. A few days later, I received a Creator Series 15.6" Notebook (Model: GWTN156-2).

The first thing I noticed was the full-size keyboard with a numerical keypad. Mac laptops don’t come with them.


I think I’m going to keep using Windows from now on. I do feel weird about it; it feels like switching political parties. I’ve been a loyal Mac user for almost 20 years. But in that time span, Windows has evolved into an excellent operating system. This, and the fact that Windows computers are much less expensive than Apple computers, is enough to put me in the Windows camp.

Update (2021-02-05): Lukas Mathis:

Around 2015, I started to realize that I was no longer part of Apple’s target audience. I’ve since found that Windows, and the devices available on the Windows side, from gaming laptops to convertibles to custom-built PCs, are just a better match for my requirements.

At this point, I have only one piece of Apple hardware still in active use: a 17-inch MacBook Pro that runs Coda and EagleFiler.

Since a lot of people seem to be making the switch now, maybe it’s helpful to talk about some things I’m doing to make Windows more amenable to my Mac habits.

Jacob Ziv Honored

Joanna Goodrich (via Hacker News):

IEEE Life Fellow Jacob Ziv will receive this year’s IEEE Medal of Honor “for fundamental contributions to information theory and data compression technology, and for distinguished research leadership.”

Ziv and Abraham Lempel developed two lossless data compression algorithms: Lempel-Ziv 77 in 1977 and LZ78 the following year. The two procedures enable perfect data reconstruction from compressed data and are more efficient than previous algorithms. They allowed for the development of GIFs, PNG, and ZIP files.

Here are the papers for LZ77 and LZ78.


In the second of the two papers that introduced these algorithms they are analyzed as encoders defined by finite-state machines. A measure analogous to information entropy is developed for individual sequences (as opposed to probabilistic ensembles). This measure gives a bound on the data compression ratio that can be achieved. It is then shown that there exist finite lossless encoders for every sequence that achieve this bound as the length of the sequence grows to infinity. In this sense an algorithm based on this scheme produces asymptotically optimal encodings.

Is the Finder Wobbly in Big Sur?

Howard Oakley:

I’ve had some strange events in which my main working SSD sometimes vanishes from the Finder, although that external drive remains mounted normally.


The first time that it happened, I assumed that the external SSD had somehow unmounted then remounted, although neither I nor any running software appeared to have done so. There are no notifications about such an event either. It appeared that the Finder had simply lost its place, lost my working folder from Favourites, and carried on without it.

Storing the Time Zone With a Date

Harshil Shah (tweet):

Going back to how Date works, it doesn’t model the actual clock time but rather a fixed point in time that can be interpreted in any time zone. And so what’s happening here is that the data is being interpreted as if it happened in my current time zone, which is the default time zone that Calendar and DateFormatter use.

And as such, a Date alone isn’t sufficient for modelling historical data, or at least personal historical data: You need time zone information too.

HealthKit acknowledges this too. You do have the ability to specify a time zone when constructing the appropriate HKSample subclass for the health data you’re modelling. It just so happens that while you are required to submit the start and end dates for any sample, the time zone information is entirely optional and buried within a metadata dictionary, that you can even omit entirely.

All of the step data shown in the screenshot was captured by the Health app right on my phone, stored in HealthKit, and displayed by the Health app. Somewhere in this pipeline, the time zone information was ignored or discarded.

Nick Lockwood:

I was just talking about this a few minutes ago, specifically the bad decision Apple made of having a default locale/timezone in most of their date-related APIs, which helps to perpetuate the misconception that a Date object is a self-contained representation of a calendar date.


User-defined Order in SQL

Joe Nelson (via Hacker News):

The most natural first attempt is to add an auto-incrementing integer column to track each item’s position[…] It requires updating a bunch of rows to insert one between others.


What if we store the position of each row using float or numeric values rather than int or bigint? This would allow squeezing new elements between others, rather than shifting items forward to make room. […] However floating point numbers have limited precision.


Non-negative fractions actually form a binary tree, with every fraction (in lowest terms) appearing at a unique node. […] The terms of these fractions are expressed in lowest terms and grow slowly at each insertion. For instance you can see from the tree diagram earlier that inserting between 1 and 0 toward 0 generates 1/2, 1/3, 1/4 … which can go a very long time because numerators and denominators in pg_rational each get 32 bits of storage.

Other approaches:

Ordered relationships in Core Data seem to use the basic integer approach. I’ve not used this feature much because it’s always seemed risky to rely on it. For many years it was buggy, NSOrderedSet still isn’t available in Swift, and CloudKit doesn’t support ordered relationships.