Archive for August 5, 2019

Monday, August 5, 2019 [Tweets] [Favorites]

Opening Huge CSV Files

Matt Birchler:

Basically, BBEdit was remarkably fast at opening the file, being 4x faster than Visual Studio Code and 20x faster than Sublime. And then in terms of saving changes to the file, most apps were in the same ballpark, which I assume is because this is reliant on my SSD’s ability to save the data, not the app doing anything special.

Patrick Seemann:

ed: immediately
emacs: ~6s
vi: ~8s

I’d like to see the results for Excel, Numbers, and TextEdit.


Update (2019-08-06): Greg Hurrell:

Vim takes 8s to open a 1.5GB CSV file.

Matt Birchler:

I updated the post with the 3 apps you listed 🙂


Regarding the csv loading, Numbers can’t load more than 255 columns of data, which annoyed me frequently in the past few weeks. Google sheets and Excel had no problem with lots of columns.

Friedrich Markgraf:

Numbers does not support more than 65k lines. Current versions at least warn about that after the long import. Last year it just silently dropped lines.

Phantom Types in Swift

John Sundell:

When converting Data into a String, like we do above, we pass the encoding that we want the string to be decoded using — in this case UTF8 — by passing a reference to that type itself. That’s really interesting. If we dive a bit deeper, we can then see that the Swift standard library defines the UTF8 type that we refer to above as a case-less enum within yet another namespace-like enum called Unicode[…]


Through the use of phantom types, the above two measurement values can’t be mixed, since what kind of unit that each value is for is encoded into that value’s type. That prevents us from accidentally passing a length to a function that accepts an angle, and vice versa — just like how we prevented document formats from being mixed up before.


Using phantom types is an incredibly powerful technique that can let us leverage the type system in order to validate different variants of a given value. While using phantom types usually makes an API more verbose, and does come with the added complexity of generics — when dealing with different formats and variants, it can let us reduce our reliance on run-time checks, and let the compiler perform those checks instead.


Performance of Combine

quickbirdstudios (via Peter Steinberger):

This project contains a benchmarking test suite for comparing the performance of the most commonly used components and operators in RxSwift and Combine. For a detailed comparison of RxSwift with Combine have a look at our blog post.


As a summary Combine was faster in every test and on average 4,5x more performant than RxSwift.

You can also use the two test files as a Rosetta stone.


Update (2019-08-06): Matt Gallagher:

The numbers on that page are generated in Debug builds.

I’m disappointed that people are repeating values so uncritically. Built in Release, those tests show Combine to be slightly faster than RxSwift but not by much.

Matt Gallagher:

The biggest change I would suggest for most of the tests is to put the Publisher/Subscribe/Cancel outside the measure closure. These can be expensive but are done only once so only matter in specific scenarios.

Matt Gallagher:

Reactive programming frameworks have different specialities. I have test cases where RxSwift is 3 times faster. I have test cases where Combine is 5 times faster.

Cloudflare and Voxility Ban 8Chan

Matthew Prince:

We just sent notice that we are terminating 8chan as a customer effective at midnight tonight Pacific Time. The rationale is simple: they have proven themselves to be lawless and that lawlessness has caused multiple tragic deaths. Even if 8chan may not have violated the letter of the law in refusing to moderate their hate-filled community, they have created an environment that revels in violating its spirit.

We do not take this decision lightly. Cloudflare is a network provider. In pursuit of our goal of helping build a better internet, we’ve considered it important to provide our security services broadly to make sure as many users as possible are secure, and thereby making cyberattacks less attractive — regardless of the content of those websites. Many of our customers run platforms of their own on top of our network. If our policies are more conservative than theirs it effectively undercuts their ability to run their services and set their own policies. We reluctantly tolerate content that we find reprehensible, but we draw the line at platforms that have demonstrated they directly inspire tragic events and are lawless by design. 8chan has crossed that line. It will therefore no longer be allowed to use our services.

Adi Robertson (via Hacker News):

Internet hate forum 8chan has gone dark after web services company Voxility banned the site — and also banned 8chan’s new host Epik, which had been leasing web space from it. Epik began working with 8chan today after web services giant Cloudflare cut off service, following the latest of at least three mass shootings linked to 8chan. But Stanford researcher Alex Stamos noted that Epik seemed to lease servers from Voxility, and when Voxility discovered the content, it cut ties with Epik almost immediately.


Update (2019-08-07): Ben Thompson (Hacker News):

The question of when and why to moderate or ban has been an increasingly frequent one for tech companies, although the circumstances and content to be banned has often varied greatly. Some examples from the last several years[…]


In short, Section 230 doesn’t shield platforms from the responsibility to moderate; it in fact makes moderation possible in the first place. Nor does Section 230 require neutrality: the entire reason it exists was because true neutrality — that is, zero moderation beyond what is illegal — was undesirable by Congress.

Keep in mind that Congress is extremely limited in what it can make illegal because of the First Amendment. Indeed, the vast majority of the Communications Decency Act was ruled unconstitutional a year after it was passed in a unanimous Supreme Court decision. This is how we have arrived at the uneasy space that Cloudflare and others occupy: it is the will of the democratically elected Congress that companies moderate content above-and-beyond what is illegal, but Congress can not tell them exactly what content should be moderated.

Apple No Longer Is the iPhone Company

Jean-Louis Gassée:

When the iPhone grew to represent more than 50% of Apple’s revenue, critics worried that the company was overly dependent on the device. Now, critics fret because the percentage fell to 48% in the quarter ending in June. The decline isn’t bad news; it’s the mark of a neatly maturing business that benefits from its ecosystem’s network effects.


Still, there is a problem to be solved: What do you do when your leading product finds itself in a saturated and stagnating market? A strong temptation is to wage a price war. When the race to the bottom ends, the last man standing is supposed to be able to raise prices back to profit-making levels.


Apple’s iPhone Game Plan is in plain view, repeatedly explained by its executives to Wall Street analyst in Earnings Release conference calls and other public pronouncements: Let the iPhone stay in its natural element: the Affordable Luxury segment, analogous to Audi for cars or Burberry for clothing. And, from there, play the ecosystem game.

Why is the alternative selling products at a loss in a race-to-the-bottom? Why not trade some margin for more marketshare, which would help both the app ecosystem and services revenue? Or expand down by designing lower cost, lower end products that are nevertheless good and still have good margins.

This is probably even more needed with the Mac product line. Too many potential customers are being turned away because the base prices keep going up and up.

See also:


Update (2019-08-08): Rich Edmonds:

When looking at the two different prices, you’d assume the MacBook Pro packs more of a punch, but throwing these two notebooks into the ring would result in a draw. The numbers don’t lie.