News for hackers. Stuff that matters.
Re:Swift 5: start your engines by protomyth on Wednesday August 09, 2017 @04:10PM (#14973107)
One of the problems I find with Swift is that Apple doesn't go back and properly update their sample code at developer.apple.com. They have examples that will not build. If you search you can find folks that have patch sets, but they really need to fix the examples.
Re:Swift 5: start your engines by Snackchez on Wednesday August 09, 2017 @04:22PM (#14973212)
This! I tried to learn Swift with the playground that came from "A Swift Tour"... A lot of examples didn't compile and it took WAY too long to figure out that it wasn't a problem on my end.

Definitely not a good way to introduce new programming languages to newbies.

Re:Swift 5: start your engines by saagarjha on Wednesday August 09, 2017 @04:26PM (#14973252)
I downloaded "A Swift Tour" a week or two ago and it was written in Swift 4 (a fact which I found out when I tried to run it in Swift Playgrounds 1.5). When did you try it?
Re:Swift 5: start your engines by melling on Wednesday August 09, 2017 @04:36PM (#14973333)
I don't think that matters. The iOS Swift community is large enough that there's lots of example code. I've got almost 7000 urls in my database of Swift blogs:

http://www.h4labs.com/dev/ios/swift.html?age=90 - Last 90 days

Take a look at a weekly view: http://www.h4labs.com/dev/ios/swift.html?week=0

Most topics get sufficient coverage. If you don't mind paying a small monthly fee, Ray Wenderlich's site has lots of tutorials that are well maintained. Plenty of free examples too:

https://www.raywenderlich.com

Another pay site that is be useful if you want to come up to speed quickly is http://nsscreencast.com

Re:Swift 5: start your engines by amrshafik on Wednesday August 09, 2017 @04:43PM (#14973397)
Great URL's, also a number free iOS app examples and resources on this youtube channel (Lets Build That App) as well https://www.youtube.com/channel/UCuP2vJ6kRutQBfRmdcI92mA
Re:Swift 5: start your engines by acmecorps on Wednesday August 09, 2017 @10:20PM (#14975774)
Seconded on Lets Build That App. Found about it last week, and bought the subscription asap - was impressed with the quality.

However, I was an iOS dev 3-4 years ago and wanted to learn swift - so, it was a pretty smooth upgrade for me. I think whoever wants to learn iOS dev might be better off learn the basics more thoroughly and then come back to this course.

Re:Swift 5: start your engines by 18nlknca on Wednesday August 09, 2017 @05:15PM (#14973697)
Definitely recommend visiting their list of swift blogs. Nicely aggregates different sources, as a primarily iOS dev, it's a great way for me to catch up every once in a while on the dozens of blogs I don't want to follow daily.
Re:Swift 5: start your engines by saagarjha on Wednesday August 09, 2017 @04:12PM (#14973123)
File a Radar and someone will get around to fixing it: http://bugreport.apple.com/
Re:Swift 5: start your engines by protomyth on Wednesday August 09, 2017 @04:22PM (#14973210)
Yeah, right, that is some serious BS right there. I've filed radars on the Finder (multiple with reproducible crashes), location data, and Quicktime and it holding onto external drives. The only one they have ever fixed is the Quicktime bug but it reappeared later then went away again.

Apple is horrible about bugs and providing feedback. Why the heck would I need to file a radar anyway? Doesn't someone at Apple check the examples to make sure they still work? These are the examples Apple uses to promote and teach the language and how to build apps.

Re:Swift 5: start your engines by saagarjha on Wednesday August 09, 2017 @04:30PM (#14973286)
> Apple is horrible about bugs and providing feedback.

Yes, they can be a bit tight-lipped. I have found that they're pretty quick on fixing documentation though. They won't tell you that it's resolved, but it's usually updated within a couple of days.

> Doesn't someone at Apple check the examples to make sure they still work?

I'd expect that they do, but some slip through the cracks. Maybe on of the Apple engineers in this thread could weigh in?

Re:Swift 5: start your engines by chc on Wednesday August 09, 2017 @09:51PM (#14975622)
Apple are super slipshod about their documentation in general. Hardly a day goes by that I don't get a Stack Overflow comment telling me that some link to Apple's docs is broken.
Re:Swift 5: start your engines by forkLding on Wednesday August 09, 2017 @04:36PM (#14973337)
Ive filed before but they still send back the same docs about coreLocation, funniest is when the update is for Swift but they just send me the Apple docs with Obj-C (only has Obj-C, no swift for years), a swift beginner would never understand, I can because I can translate but its pretty frustrating still because you're still guessing thats the right way.
Re:Swift 5: start your engines by physicsyogi on Wednesday August 09, 2017 @09:33PM (#14975508)
Yeah, that's not ideal. Apple at least keeps the Swift language guide current though: https://developer.apple.com/library/content/documentation/Sw...
Re:Swift 5: start your engines by westoque on Thursday August 10, 2017 @05:34AM (#14978005)
I propose a solution.

Developer documentations should start following API like structures. For example, in API land we have:

    /api/v1/users
    /api/v2/users
This means that making requests to v1 will only work with v1 and v2 only with v2. This makes sure that the API you are connecting to is using the correct parameters for its version.

Going back to documentations, they should state in the examples or in the documentation that this document is written for V2 of swift or anything more specifc. Even better would be sticking to Semver like specifications for the versioning.

Re:Swift 5: start your engines by cf on Thursday August 10, 2017 @05:56AM (#14978113)
This is what sklearn does for their documentation and it's fantastic!