mjtsai + mdiep   26

Twitter
I had no idea that ⌘⇡/⌘⇣ jumped between previous/next prompts in https://t.co/m1LhdHPssG. 😲

This will save me SO. MUCH. TIME. pic.twitter.com/rxb8v5Q0oF

— Matt Diephouse (@mdiep) March 6, 2020
FavoriteTweet  mdiep 
27 days ago by mjtsai
Twitter
AFAICT, you can’t create an `AnyHashable` from an `Any`. `AnyHashable.init` takes a `Hashable`, so it’s no help.

— Matt Diephouse (@mdiep) February 4, 2020
FavoriteTweet  mdiep 
8 weeks ago by mjtsai
Twitter
I’ve started writing functions that “diff” two values to return a nicely formatted description of their differences to use in test failures.

e.g.

let a = M(id: “A”, foo: “bar”)
let b = M(id: “B”, foo: “baz”)
diff(a,b) == “””
• id: “A” != “B”
• foo: “bar” != “baz”
“””

— Matt Diephouse (@mdiep) February 3, 2020
FavoriteTweet  mdiep 
8 weeks ago by mjtsai
Twitter
Elsewhere in technology:

• Dial-up internet was still common
• Webpages were laid out with HTML tables
• JavaScript didn’t have an ecosystem
• Everyone was migrating from CVS to Subversion
• Open source happened on SourceForge
• Communication was on AIM, ICQ, and IRC

— Matt Diephouse (@mdiep) January 3, 2020
FavoriteTweet  mdiep 
january 2020 by mjtsai
Twitter
20 years ago in the Apple ecosystem:

• Mac OS X was brand new
• Macs dual booted into OS 9
• Aqua had pinstripes
• Wi-Fi was new (and an add-on purchase!)
• Objective-C was at 1.x
• Java seemed promising
• Safari, iWork, and iLife didn’t exist
• iPod hadn’t been created

— Matt Diephouse (@mdiep) January 3, 2020
FavoriteTweet  mdiep 
january 2020 by mjtsai
Twitter
The secret to writing concurrent code is to make most of it serial. Restrict concurrency to a small, outer layer. (Serial core, concurrent shell.)

e.g. instead of using a lock to manage 5 properties, create a new type that wraps them and use a single property inside the lock.

— Matt Diephouse (@mdiep) December 18, 2019
FavoriteTweet  mdiep 
december 2019 by mjtsai
Twitter
The implementation of `AnyHashable` looks quite a bit different than I expected. 🕵🏻‍♂️

I’ve always used closures to implement type erasure, but `AnyHashable` uses conditional casting. (Presumably this has better performance.)https://t.co/G52WcvPOBz

— Matt Diephouse (@mdiep) October 29, 2019
FavoriteTweet  mdiep 
october 2019 by mjtsai
Twitter
It’s maddening how @AmazonKindle names devices “Matt’s 2nd Kindle” and “Matt’s 3rd iPhone” instead of using the model name.

Even worse: you can’t update the name on device. You have to find and use the slow, janky web UI.

— Matt Diephouse (@mdiep) October 2, 2019
FavoriteTweet  mdiep 
october 2019 by mjtsai
Twitter
So far, I’d say:

– Expressions over statements: IMO Kotlin takes this too far in places, but Swift could definitely improve here. e.g. `let x = y ?? throw Error()` is handy.

– Cheap packages: It’s easy to create new packages in Kotlin for fine-grained access control.

— Matt Diephouse (@mdiep) August 1, 2019
FavoriteTweet  mdiep 
august 2019 by mjtsai
Twitter
Swift and Kotlin are often compared, but IMO Kotlin’s type system is closer to Obj-C’s than Swift’s.

– Type parameters only exist at compile time
– Nullability is an annotation, not a type
– Lots of reflection is required

I’ve found this to be a big headache after a few weeks.

— Matt Diephouse (@mdiep) August 1, 2019
FavoriteTweet  mdiep 
august 2019 by mjtsai
Twitter
So… Feedback Assistant has an inbox with messages that you can’t get rid of?

I guess I won’t make it to inbox zero. 😳

— Matt Diephouse (@mdiep) June 24, 2019
FavoriteTweet  mdiep 
june 2019 by mjtsai
Twitter
5. The integration with non-SwiftUI views is very nice.

IMO Swift’s excellent integration with Obj-C has been key for quick adoption. SwiftUI does the same with AppKit/UIKit.

e.g. I wrapped `NSSearchField` in SwiftUI in ~60 lines of simple code. Hosting SwiftUI is even easier.

— Matt Diephouse (@mdiep) June 23, 2019
FavoriteTweet  mdiep 
june 2019 by mjtsai
Twitter
4. SwiftUI is more viable on less capable platforms

UIs on macOS are more complex than UIs on iOS or watchOS, so more is required. That additional functionality seems to be mostly missing right now.

e.g. On macOS, a window with a SwiftUI root view defaults to a (0, 0) size.

— Matt Diephouse (@mdiep) June 23, 2019
FavoriteTweet  mdiep 
june 2019 by mjtsai
Twitter
My impressions of SwiftUI after 3 weeks:

1. It’s no more obvious than AppKit/UIKit.

The most immediate effect of this is that it’s hard to tell whether something is broken in the beta or if you’re doing it wrong.

e.g. How do you turn off animations when reloading a List?

— Matt Diephouse (@mdiep) June 23, 2019
FavoriteTweet  mdiep 
june 2019 by mjtsai
Twitter
I really hope that Apple revisits the SFSymbols API and chooses to provide compile-time constants instead of just strings.

That would:

1. Let Apple use @available to add/deprecate symbols
2. Aid discoverability of icons
3. Let the compiler catch typos

Those seem like big wins.

— Matt Diephouse (@mdiep) June 10, 2019
FavoriteTweet  mdiep 
june 2019 by mjtsai
Twitter
IMO the biggest problem with Swift development today is the often confusing compiler errors.

This is a combination of:

— Poor presentation of errors
— Poorly written error messages
— Poor diagnostics when inferencing fails
— Missing generics features

— Matt Diephouse (@mdiep) June 9, 2019
FavoriteTweet  mdiep 
june 2019 by mjtsai
Twitter
SwiftUI definitely feels like Swift. 😅

(I’m missing the `.identified(by:)` on the list. This is not the first time I’ve puzzled after forgetting it.) pic.twitter.com/pahhVc9PPr

— Matt Diephouse (@mdiep) June 9, 2019
FavoriteTweet  mdiep 
june 2019 by mjtsai
Twitter
Things that don’t work in the Xcode 11b1 UI:

— Creating a new target in a project
— Creating a new project in a workspace
— Deleting a project in a workspace
— The “Edit Scheme…” keyboard shortcut
— Deleting a build setting

The Xcode team needs a better testing strategy. 😔

— Matt Diephouse (@mdiep) June 5, 2019
FavoriteTweet  mdiep 
june 2019 by mjtsai
Twitter
I consider the Swift compiler to be the poster child for “no one can write correct C/C++ and no one should try”.

The compiler team has many extremely qualified C/C++ engineers, but the compiler/runtime have suffered from many crashes.

Think of all the wasted time fixing them!

— Matt Diephouse (@mdiep) March 16, 2019
FavoriteTweet  mdiep 
march 2019 by mjtsai
Twitter
We upgraded to Swift 4.2 to get a fix for a runtime crash, but now we have a new set of Swift crashes on 32-bit devices. 💔https://t.co/JunEFYY0yjhttps://t.co/NmwFXsfwIW

— Matt Diephouse (@mdiep) November 14, 2018
FavoriteTweet  mdiep 
november 2018 by mjtsai
Twitter
Swift Compiler Blog, Entry 4

I taught the Swift compiler to derive `Equatable` & `Hashable` for enums with no cases.https://t.co/kcSgtRtE1l

— Matt Diephouse (@mdiep) July 14, 2018
FavoriteTweet  mdiep 
july 2018 by mjtsai
Twitter
SE-0215, Conform `Never` to `Equatable` and `Hashable`, has been accepted! 🎉 https://t.co/zBneV1oWiZ

The core team also concluded:

1. `Never` should also conform to `Error` and `Comparable`

2. `Never` should become a blessed bottom type

Exactly the resolution I hoped for. 💖

— Matt Diephouse (@mdiep) July 14, 2018
FavoriteTweet  mdiep 
july 2018 by mjtsai
Twitter
PSA: If you have a Swift framework, you need to move your “Headers” build phase to be before the “Compile Sources” phase.

If you don’t move it, you may get build cycle dependency errors. (The Swift files depend on the framework/umbrella header.)

— Matt Diephouse (@mdiep) June 6, 2018
FavoriteTweet  mdiep 
june 2018 by mjtsai
Matt Diephouse on Twitter: "TIL that Optional, Array, Dictionary and some other types won’t conditionally conform to Hashable in Swift 4.1. 💔 https://t.co/8dWv3geXLp"
TIL that Optional, Array, Dictionary and some other types won’t conditionally conform to Hashable in Swift 4.1. 💔https://t.co/8dWv3geXLp

— Matt Diephouse (@mdiep) March 3, 2018
FavoriteTweet  mdiep 
march 2018 by mjtsai
Matt Diephouse on Twitter: "If you strive to write maximally testable code, you’ll eventually arrive at functional programming. Easily testable code relies on immutabi… https://t.co/ZOGfi54Z9P"
If you strive to write maximally testable code, you’ll eventually arrive at functional programming.

Easily testable code relies on immutability, referential transparency, and higher-order functions.

— Matt Diephouse (@mdiep) January 8, 2018
FavoriteTweet  mdiep 
january 2018 by mjtsai
Matt Diephouse on Twitter: "OMG. Xcode 8ß5: “Interface Builder is much less likely to modify documents on open, prior to any user events or manually saving.“ 🙌🏻"
OMG.
Xcode 8ß5: “Interface Builder is much less likely to modify documents on open, prior to any user events or manually saving.“
🙌🏻

— Matt Diephouse (@mdiep) August 9, 2016
FavoriteTweet  mdiep 
august 2016 by mjtsai

Copy this bookmark:



description:


tags: