Archive for April 1, 2019

Monday, April 1, 2019

What’s New in Swift 5.1

Paul Hudson:

SE-0068 expands Swift’s use of Self so that it refers to the containing type when used inside classes, structs, and enums. This is particularly useful for dynamic types, where the exact type of something needs to be determined at runtime.

[…]

In Swift 5.1 this confusion now prints a warning: “Assuming you mean ‘Optional.none’; did you mean ‘BorderStyle.none’ instead?” This avoids the source compatibility breakage of an error, but at least informs developers that their code might not quite mean what they thought.

[…]

Well, in Swift 5.1 we can now use switch/case pattern matching to match optional enums with non-optionals, like this[…]

[…]

SE-0240 introduces the ability to calculate and apply the differences between ordered collections. This could prove particularly interesting for developers who have complex collections in table views, where they want to add and remove lots of items smoothly using animations.

Or for use in test cases.

Because Swift now ships inside Apple’s operating systems, new features like this one must be used with an #available check to make sure the code is being run on an OS that includes the new functionality. For features that will land in an unknown, unannounced operating system shipping at some point in the future, a special version number of “9999” is used to mean “we don’t know what the actual number is just yet.”

Texting Means Never Having to Say Goodbye

Jane C. Hu (via Hacker News):

I thought about the last time I’d actually typed ttfn. I imagine it was at least 18 years ago, on my family’s Gateway desktop during the era of dial-up AOL. And then I realized I couldn’t remember the last time I said “g2g,” or even “bye,” in an online conversation. I asked some friends in a group chat if they ever say goodbye when chatting digitally. “They never really have a beginning. Do they also not have an end?” said my friend Dan. Another friend, Mitch, chimed in with a diagnosis: “It’s because we never go offline anymore.”

[…]

In a 2016 study, many respondents say they read into a lack of response. It’s especially confusing when your conversational medium tells you if someone is currently online, or has already read your messages, like the “read” labels in iMessage, the green dot by your name in Slack, or the blue tick mark on WhatsApp messages. “When WhatsApp introduced the blue tick [that shows when you’re online], that introduced a lot of anxiety,” she says.

Alternatives to Mac Laptops

Dieter Bohn (tweet):

Even though the XPS 13 has a strong pedigree, it’s worth talking about again. It was one of the first mainstream laptops with a nearly edge-to-edge screen. It doesn’t go in for 360-degree hinge tricks — there’s the XPS 13 2-in-1 for that — it was just always a good, well-built laptop. It has become something of a default alternative to the MacBook Air for Windows users — something thin, light, stylish, and also reliable.

[…]

The 2019 version of the XPS 13 starts at $899, but I think most people will want to step up to the $1,199 (as of this writing) version. That will get you a Core i5 processor, 8GB of RAM, 256GB of storage, and the 1080p screen.

[…]

The keyboard on this machine is excellent, with a very good balance of key travel, firmness, and thinness. I don’t love that the page up and page down buttons are crammed in next to the arrow keys […]

But at least it has those keys.

Dell quotes up to 21 hours of battery life with the 1080p screen and around 12 for the 4K. As usual, I think those estimates are super optimistic, but that doesn’t mean I think the battery life on this laptop is bad.

[…]

I am mostly pleased with the port choices: there are two Thunderbolt ports on the left, one USB-C port on the left, a headphone jack, and a microSD card slot. It would have been nicer if Dell had found a way to bring back a USB-A port, but it at least includes a dongle in the box.

[…]

And the USB-C power brick is just plain thoughtful in its design: it’s easy to wrap the cord around it cleanly and compactly.

Nolan O’Brien:

I find myself at a crisis somewhat. This 300 dollar chromebook is by all metrics a pos harware-wise, but the damn thing outperforms my $2000 MBP for normal non-dev use cases.

And it’s keyboard kills the butterfly keys of Apple. Plus it has really good drawing tablet mode

I would have expected needing to go to an equally expensive Windows machine to get out of the plodding degradation of macOS, but I can actually get away with a cheap chromebook.

[…]

I can’t even fathom why folks would do iPad leasing at schools given how much better using a chromebook is. This is after expecting it to not be any good, but being proven wrong.

Thomas Reed:

Since there is, definitively, already malware that can affect Chromebooks, it’s reasonable to install antivirus software on a Chromebook. And since Chromebooks are increasing in popularity, it’s also reasonable to assume cybercriminals will continue to develop more malware to get their piece of the pie. Once Pandora’s Box has been opened for a device, operating system, browser, or other platforms, we’ve never once seen the bad guys back away from it.

However, there is a catch to all of this. And to discover the catch, you must first answer this question: Does your Chromebook support Google Play?

Not all Chromebooks do. If yours does not, it cannot download malware through Google Play, much less third-party app stores, because it cannot download any apps at all.

Previously:

Update (2019-04-02): scott:

My alternatives are:

Macbook - Dell XPS 13 ($899)
MacBook Air - Lenovo 14e ($279)
MacBook Pro - Lenovo X1 ($1,139) or Pixelbook ($799 on sale)
iMac Pro/Mac Pro (Xeon, ECC) - Lenovo P1 ($2,059)

Key iOS Chip Architect Departs Apple

Chris Jenkins:

Gerard Williams III, lead designer of Apple’s custom iOS chips from A7 to A12X, has departed the company, according to CNET. While no indication of a change has been made on his LinkedIn profile, it does offer a glimpse into his design prowess.

[…]

He came to Apple with a splash, as the A7 was Apple’s first 64-bit CPU core. This design arrived on the market over a full year before competitors like Qualcomm and Samsung could respond and largely cemented the technical prowess of the SoC team Apple had created.

If confirmed, his departure would follow the more well-known CPU architect Jim Keller, who was part of Apple’s acquisition of PA Semi. More recently, Apple’s SoC team lost its lead Manu Gulati, whose vacated role was assumed by Williams.

Seems like we were just hearing that all the top people were going the other way.

Paying to Whitewash Wikipedia Pages

Ashley Feinberg (via Hacker News):

The vast majority of the people who propose and make changes to Wikipedia are volunteers. A few people, however, have figured out how to manipulate Wikipedia’s supposedly neutral system to turn a profit.

That’s Sussman’s business. And in just the past few years, companies including Axios, NBC, Nextdoor and Facebook’s PR firm have all paid him to manipulate public perception using a tool most people would never think to check.

[…]

One of Wikipedia’s more well-known rules is its prohibition on editing pages that you have any sort of direct connection to. This, along with the fact that it’s humiliating to get caught editing your own Wikipedia page, is usually enough of a deterrent to companies and public figures looking to inject a positive spin. But those looking to get around the site’s conflict of interest rules aren’t totally without options. Anyone, even someone financially tied to the subject in question, is allowed to merely suggest edits in the hopes that a less conflicted editor might come by, agree, and implement the changes for them. This is where a paid editor like Sussman comes in.

[…]

He often replies to nearly every single bit of pushback with walls of text arguing his case. Trying to get through even a fraction of it is exhausting, and because Wikipedia editors are unpaid, there’s little motivation to continue dealing with Sussman’s arguments. So he usually gets his way.