Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
cballard
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
24 ms
·
181.
▲
by
cballard
11y ago
If you're dissatisfied with objc_msgSend performance, you can write C or C++ seamlessly - or use that other language that's partially designed to address the dynamic dispatch nightmare. If you're dissatisfied with JavaScript
182.
▲
by
cballard
11y ago
> If a private business wishes to permit its customers to consume something on its premises, why does the State have to get involved? Smoking is banned in restaurants because it's harmful to the waitstaff. The State should be involv
183.
▲
by
cballard
11y ago
Then you're not writing JavaScript, which was OP's concern. TypeScript is fine (although Elm, Swift, and Haskell are more interesting, IMO).
184.
▲
by
cballard
11y ago
I've tried JavaScript, and I decided I preferred type safety. This kind of thing: > It lets you do stuff like redefine entire objects, properties or methods at runtime Sounds horrifying to me, because, as in Ruby[1], library authors
185.
▲
by
cballard
11y ago
Well, these types of problems don't exist in languages that correctly distinguish floating-point numbers and integers as two separate incompatible things. I think that this isn't really a problem with integer division (which is f
186.
▲
by
cballard
11y ago
How, specifically, are you "coerced" into those services? Voice and YouTube are owned by Google. I'd expect a Google account to just work on all Google properties, without me having to sign up for each individually. If you do
187.
▲
by
cballard
11y ago
> you can't fit more trains on the track no matter what control "protocol" you use. This is false, CBTC has greatly increased L train capacity: https://en.wikipedia.org/wiki/Automation_of_the_New_York_
188.
▲
by
cballard
11y ago
Those are (or were, at least) bridged from NSString. There's a bunch of path handling stuff available as well, because Swift String can be converted to and from NSString.
189.
▲
by
cballard
11y ago
Swift solves this with "guard" statements, which must return if their condition fails. This is most commonly used in combination with converting optional values to non-optional values, to prevent pyramids of doom. guard le
190.
▲
by
cballard
11y ago
The problem I have with Netflix recommendations is that while they understand genres, they're not good at recommending good shows. Since I've watched Archer and Arrested Development, Netflix thinks I'd like every mediocre c
191.
▲
by
cballard
11y ago
I installed the dimmer myself after moving into this apartment somewhat recently, so it's a pretty recent model, whatever that means for a light switch.
192.
▲
by
cballard
11y ago
Yeah, CFL bulbs are icky blue flickering garbage, and the LED bulbs I've used (Hue), while otherwise fine, don't support my dimmer correctly. Using the Hue app isn't as easy as walking over to the light switch, and they won&#
193.
▲
by
cballard
11y ago
Why is this downvoted so heavily? Seriously, how is this implemented? I don't think Emscripten works with Swift yet, and even if it did, there hasn't been enough time since the open source release to implement an entire app.
194.
▲
by
cballard
11y ago
Muggers are still stealing iOS devices, which people can just permanently brick via iCloud now, so I wouldn't expect that level of foresight!
195.
▲
by
cballard
11y ago
Your cell phone's data is protected by a fingerprint reader or arbitrary-length passcode, while your wallet's data is protected by the other person not having a knife.
196.
▲
by
cballard
11y ago
What is the purpose of the signature, anyways? Mine never looks anywhere close to the same as before, and most of the readers at the bad grocery store next to my apartment just select seemingly random pixels anyways when you touch it. Is th
197.
▲
by
cballard
11y ago
> the consumer now has their fingerprint tied to payments FUD. This is not how Touch ID works. Fingerprint data, which is not a fingerprint image to begin with , more of a hash, is stored on the iPhone's A_ chip itself. It cannot l
198.
▲
by
cballard
11y ago
Apple Pay is just a nice frontend for Visa, AmEx, etc., with better security - disposable credit card numbers to defeat merchant tracking and leaks.
199.
▲
by
cballard
11y ago
This is not an issue on iOS. Does Android actually automatically increase permissions without opt-in from the user?
200.
▲
by
cballard
11y ago
Programming in Swift with protocols[1], generics, and value types is so much more productive than Objective-C for me. The amount of reusable code that you can write now is very high - even throwing away what type safety Obj-C can offer
201.
▲
by
cballard
11y ago
You also have that problem in a language with non-synthesized setters, because there's no guarantee that they don't do anything - and people avoid permitting direct field access, so you'll be going through a setter with unkno
202.
▲
by
cballard
11y ago
> worried it will lead to the incarceration of multiple public officials Would that be a bad thing? I'm in New York, and I'll dance in the street if (when?) Preet Bharara charges Cuomo.
203.
▲
by
cballard
11y ago
Many modern-ish languages with OO features (Swift, C#) let you declare that a thing has a getter without having to actually write boilerplate, i.e.: private(set) var foo: Int Int foo { get } etc.
204.
▲
by
cballard
11y ago
If it can be generated, why doesn't the compiler do it for you? This shouldn't be done at the IDE level.
205.
▲
by
cballard
11y ago
Xcode supports PDF IIRC. I think it bakes them into PNGs, 'cause performance.
206.
▲
by
cballard
11y ago
Swift has a passable type system, support for generics, and doesn't use a VM. Tooling support isn't there for Linux currently, so the act of writing code isn't much better than Python (no Xcode-type autocompletion), but onc
207.
▲
by
cballard
11y ago
Douches are harmful to female anatomy, so using them as a negative term is arguably pro-woman (is there a better term for that?). It's similar to if "corset" or "foot binding" were used as a negative slang for som
208.
▲
by
cballard
11y ago
I would implement that like: zip(names, 1...names.count).forEach { name, index in print("Person \(index) is called \(name)") } Or, in an ideal world: zip(names, 1...names.count) .map({ name, inde
209.
▲
by
cballard
11y ago
It's less beginner-proof, and more "doing bad things proof". The purpose of releasing Swift as open source is that they don't want it to be an Apple language. I can't wait for it to replace Python for scripting -
210.
▲
by
cballard
11y ago
Swift 3 will be ABI stable, so things will break less - that might not include standard library stability, but Swift projects currently include a copy of the standard library to avoid that.
More ›