Archive for January 3, 2023

Tuesday, January 3, 2023

Inline AppleScript Documentation

Daniel Jalkut:

I used a relatively little-known trick for examining the raw source code of a scripting dictionary. Simply click and drag from Script Editor’s document proxy icon, into a text editor such as TextEdit, Xcode, or BBEdit[…] It’s a quick-and-dirty way to learn how specific outcomes are achieved, and how you might incorporate similar features in your own app’s scripting definition file.

Another tip along these lines is that you can open the AppleScript dictionary of the current app from Script Debugger’s Dock menu.

In this case, I discovered a new (to me) “documentation” element in the file[…] “A documentation element may contain any number of html elements, which contain text that will be displayed at that point in the dictionary.”

Layers of UI Inconsistencies in Windows 11

NTDEV (via Hacker News):

Windows 11 brought in a new design language, putting an emphasis on rounded corners and gradients and a new transparent background called Mica, which aims to replace the old Acrylic design.


Unfortunately, we still have plenty of Windows 8 elements throughout the OS, like the Autorun prompt or the error that appears when one runs an incompatible program.


The Remote Desktop Connection program is still exactly the same as it was 14 years ago, complete with Aero icons and skeuomorphic common controls.


Just like with Windows 10, the driver copy screen hasn’t been updated, so it still has the Windows XP icons.


And last, but certainly not least, in the ODBC Data Sources utility there is a Windows 3.1-styled folder selection window!

Is there a similar article for macOS or iOS?


jq and XmlStarlet


jq is like sed for JSON data - you can use it to slice and filter and map and transform structured data with the same ease that sed, awk, grep and friends let you play with text.


jq can mangle the data format that you have into the one that you want with very little effort, and the program to do so is often shorter and simpler than you’d expect.


XMLStarlet is a set of command line utilities (tools) which can be used to transform, query, validate, and edit XML documents and files using simple set of shell commands in similar way it is done for plain text files using UNIX grep, sed, awk, diff, patch, join, etc commands.

Via Helge Heß:

Handy if you have to read and modify XML files from within shell scripts in a reliable way (i.e. w/o a regex mess 🙃).

Update (2023-01-05): doekman:

Did you know there is also an xq? Not as feature rich as XmlStarlet, but I find it much more approachable (assuming you know xpath)

Privacy Is OK

Reid Blackman (Hacker News):

Like Messages on your iPhone, Facebook Messenger and WhatsApp, Signal uses end-to-end encryption, making it impossible for the company to read the contents of user messages. But unlike those other companies, Signal also refrains from collecting metadata about its users. The company doesn’t know the identity of users, which users are talking to one another or who is in a group message. It also allows users to set timers that automatically delete messages from the sender’s and receiver’s accounts.


This level of privacy can be beneficial on a number of fronts. For instance, Signal is used by journalists to communicate with confidential sources. But it is no coincidence that criminals have also used this government-evading technology.


What’s more, the company’s proposition that if anyone has access to data, then many unauthorized people probably will have access to that data is false. This response reflects a lack of faith in good governance, which is essential to any well-functioning organization or community seeking to keep its members and society at large safe from bad actors.

Meredith Whittaker (via Hacker News):

OK! let’s talk about That Op-ed. The one that insisted not only that privacy is dangerous, but that not affirmatively building surveillance into communication tools is a radical ideological position.


The op-ed works to create the appearance of a “debate” on more or less settled issues. This is a powerful function, bolstered by the NYT imprimatur, which allows it serve as a “Potemkin citation” -- a seemingly credible reference in support of bad privacy laws and platforms.

Tim Bray:

I’m sorry to be the bearer of of bad news, but it’s simply not possible to address the downside without completely shattering the upside. Here are three reasons why[…]


Privacy is a good thing, one of the benefits of being a member of a civilization. People want it and are justified in wanting it. Now they can have it. There have been no credible proposals for taking privacy away just from the bad people, and I’ll be astonished if there ever are.

Nick Heer:

Blackman does not present any evidence for how Signal — or any comparable application — would be able to turn the binary question of whether something is end-to-end encrypted into a gradient of access levels. In fact, this whole piece feels very much like a slippery slope argument itself: if you use Signal, you are a “witting or unwitting” proponent for adding barriers to prosecuting criminals.

This all feels very familiar. One would think prestige newspapers would stop publishing such well-worn ideas without further development of their arguments but, well, here we are.