Archive for February 1, 2018

Thursday, February 1, 2018

Podcast Listeners Really Are the Holy Grail Advertisers Hoped They’d Be

Miranda Katz:

Since the beginning of the current podcast boom, often attributed to 2014’s Serial, data on how people listen to podcasts has remained woefully scarce, even as advertising spending climbed to an estimated $220 million in 2017. When Apple Podcasts announced last year that it would soon be offering podcasters more data on their listenership, some worried it would force a “reckoning”—and possibly an “ad apocalypse,” if brands decided that the fledgling new medium wasn’t worth their dollars, after all.

Apple’s Podcast Analytics feature finally became available last month, and Euceph—along with podcasters everywhere—breathed a sigh of relief. Though it’s still early days, the numbers podcasters are seeing are highly encouraging. Forget those worries that the podcast bubble would burst the minute anyone actually got a closer look: It seems like podcast listeners really are the hyper-engaged, super-supportive audiences that everyone hoped.

Via Marco Arment:

The podcast business didn’t really need precise listener behavioral data. Who knew?

Touch ID and the Fifth Amendment

Tim Cushing:

The US Supreme Court hasn’t seen a case involving compelled production of fingerprints land on its desk yet and there’s very little in the way of federal court decisions to provide guidance. What we have to work with is scattered state court decisions and the implicit understanding that no matter how judges rule, a refusal to turn over a fingerprint or a password is little more than a way to add years to an eventual sentence.

The Minnesota Supreme Court has issued the final word on fingerprints and the Fifth Amendment for state residents. In upholding the appeals court ruling, the Supreme Court says a fingerprint isn’t testimonial, even if it results in the production of evidence used against the defendant.)

Things I Wish I’d Known About Bash

zwischenzugs (via Hacker News):

The difference between [ and [[ was another thing I never really understood. [ is the original form for tests, and then [[ was introduced, which is more flexible and intuitive. In the first if block above, the if statement barfs because the $(grep not_there /dev/null) is evaluated to nothing, resulting in this comparison:

[ = '' ]

which makes no sense. The double bracket form handles this for you.

This is why you occasionally see comparisons like this in bash scripts:

if [ x$(grep not_there /dev/null) = 'x' ]

so that if the command returns nothing it still runs. There’s no need for it, but that’s why it exists.

[…]

Bash has configurable options which can be set on the fly. I use two of these all the time:

set -e

exits from a script if any command returned a non-zero exit code (see above).

This outputs the commands that get run as they run:

set -x

zwischenzugs (Hacker News):

  • The # means ‘match and remove the following pattern from the start of the string’
  • The % means ‘match and remove the following pattern from the end of the string

[…]

The trap builtin can be used to ‘catch’ when a signal is sent to your script.

Previously: Mac Terminal Tips, Craig’s Terminal Tips.

Update (2018-02-05): Der Teilweise:

It’s wrong regading !$:

!$ is not the last argument of the previous command. It’s the last word. The last argument is $_.

Given echo x>/dev/null:

$_ is x

!$ is /dev/null

C String Functions in Swift

Helge Heß:

The pointer you get back points into a buffer, which doesn’t exist anymore. That is why you need to be super careful when accessing C APIs.

[…]

When using C API with Swift Strings (be it a simple puts or maybe libxml2), be aware that such calls are really expensive (a malloc+free per call). If you want to do this a lot, you may want to convert Strings to UTF-8 unsafe buffers very early on, and use those.

Is this Swift behaviour reasonable? For a high level language I would say yes. Yet Swift also claims to be useful for system and server programming, and in such scenarios it is really hard to access standard Swift types in a performance sensible way (do zero copy, avoid allocs, etc).

Colour Management

Marc Edwards (via Gus Mueller):

Colour spaces are more complex than measurement units. They don’t just define a scale, they set a white point, range and scale for red, green and blue in the visible spectrum, as well as other various properties. There’s many ways to visualise colour profiles, but using a 3D hull is a common and useful way to display them.

[…]

However, there are some colours in the Display P3 space that are not in the sRGB space. Display P3 is wider gamut and it can represent more, especially deep reds and greens. #ff0000 in Display P3 can not be described as an sRGB HEX value, because it is out of the sRGB range.

[…]

On iOS and Android, sRGB is also the default, but both support wider gamut colours and colour spaces. On macOS, sRGB is sort of the default (the situation is a bit more complex due to some legacy issues).

Marc Edwards:

A colour space’s gamut defines the range of colours that can be represented by that colour space. It defines the extremities of how strong and pure colours can be.

[…]

Colour precision isn’t defined as part of a colour space. It is an implementation detail that’s left up to the rendering engine or design tool. This means different tools take a different amount of care, and the likelihood of problems is dictated by what you’re using as well as how you’re using it.

[…]

Unlike most rulers, the notches aren’t always evenly spaced. It is actually more common for them to be unevenly spaced. sRGB uses a non-linear gamma curve that’s like the image below. Other common colour spaces also use non-linear gamma curves. Display P3’s gamma curve is identical to sRGB’s gamma curve.

Update (2018-02-06): McCloudStrife:

“#ff0000 in Display P3” Get out.

I have also read Part 2 of this and I think the internet would be better off without either article tbh. Ignorance > misinformation.

Update (2018-03-15): Marc Edwards (tweet):

This article details the settings required for screen design in many popular design tools.