Twitter | Search | |
Rob Napier
Swift and Go. Love 'em both. They make me mad in completely different ways. Infosec as required.
13,155
Tweets
342
Following
5,906
Followers
Tweets
Rob Napier 6h
I think I looked at a little 🤨 when he mentioned these ideas to me the first time, but now that I've seen the whole talk, it's quite compelling. Highly recommended insights on MVC.
Reply Retweet Like
Rob Napier 6h
I'll be there.
Reply Retweet Like
Rob Napier Oct 15
I get the idea that we shouldn't lock the user out of of operations, and heaven knows I know how complicated and non-intuitive "simple" things in networking are. But we still need a way to know that "now would be a reasonable time to try to connect to the IMAP server."
Reply Retweet Like
Rob Napier Oct 15
Every time I see something from Apple saying "here's when you should tell the user you're offline," later it turns out that you should never have been using that & what were you thinking? I'm still lost on how Apple actually intends us to display "Network offline" like Mail does.
Reply Retweet Like
Rob Napier Oct 13
I don’t think I disagree, but what do you mean by “non-portability.” I thought the point of CGFloat was the same portability as NSInteger. (I already feel I’m not thinking about this deeply enough and am chastising myself about it, but I’m not clear how to express the issue.)
Reply Retweet Like
Rob Napier Oct 13
So many bugs have arisen from the mistaken idea that UInt (and more disastrously C's "unsigned") is the same ℕ. Their algebra is not the same. The implementation isn't magic; it's a different set of rules that have some overlap.
Reply Retweet Like
Rob Napier Oct 13
Replying to @krzyzanowskim
IMO, UInt* aren't "numbers" anyway. They're bit-patterns and should be treated as such.
Reply Retweet Like
Rob Napier Oct 13
Replying to @krzyzanowskim
Yeah… I still agree with this choice. Had enough subtle promotion bugs to last a lifetime; glad to see them stomped out. That it interacts so horribly with CGFloat… ok, that's obnoxious (but they could have fixed that by making CGFloat the "normal" FP type, like Int is).
Reply Retweet Like
Rob Napier Oct 13
Replying to @lizardbill
But not surprising, since both parties agreed with the ruling. Legislative foot dragging intentionally and cynically got us to the point that fixing the maps would hurt exactly the people it's meant to help (under-represented groups who have been intentionally district-packed).
Reply Retweet Like
Rob Napier retweeted
Greg Parker Oct 13
Note to authors of cross-platform libraries: this setting exists and you should honor it.
Reply Retweet Like
Rob Napier retweeted
Tom Erdmann Oct 12
Reply Retweet Like
Rob Napier Oct 11
I think Python pretty well demonstrates how good async/await is. Despite being a horrible implementation (esp prior to 3.6), coroutines still shine and I can’t imagine not using them. I do like C# better at first impressions but have only done a little hobby work there.
Reply Retweet Like
Rob Napier Oct 11
IMO async/await coroutines are absolutely the right future for Swift. CSP is not. Actors might be, but it’s a heavy lift (because it would be totally alien to Cocoa).
Reply Retweet Like
Rob Napier Oct 11
From my time in the Go world (professional), Akka and actors (hobby) and async/await (professional but limited), everything you’ve said makes sense to me. Goroutines and CSP are ok, but they’re not what’s important about Go. Go is brilliant because of its stdlib & tooling.
Reply Retweet Like
Rob Napier Oct 11
Replying to @badanalog
Same here in north Raleigh.
Reply Retweet Like
Rob Napier Oct 10
For Cocoa methods that I use often and return optional collections, I often fix it with an extension. Most commonly for me, I add a textField.string extension that returns a String rather than the String? from .text.
Reply Retweet Like
Rob Napier Oct 10
var x: [Int]? = nil var y = [1,2,3] y = x? Should that skip the assignment just like “for-in-?” skips the loop? Are there any places this trailing ? syntax could be expanded to? 2/2
Reply Retweet Like
Rob Napier Oct 10
I think what most concerns me about this syntax is that ...? isn’t a value even though it looks like one. The ? is part of the for-in, not part of the sequence expression. For example, this makes me think the following should work: 1/2
Reply Retweet Like
Rob Napier Oct 10
Replying to @NSExceptional
Yeah, happened to me too.
Reply Retweet Like
Rob Napier Oct 10
But I don’t think this is parallel if foo is optional but bar is not. () for x in ? {} The trailing ? doesn’t follow the same rules as optional chaining.
Reply Retweet Like