News for hackers. Stuff that matters.
Re:Swift: Google’s Bet on Differentiable Programming by cutler on Thursday April 09, 2020 @08:53AM (#22822032)
One thing to bear in mind with Swift is how difficult it is to stay up to date with the latest version. Swift versions are tied to Xcode versions and Apple has a history of leaving older versions of OS X in the dust. I'm on OS X Mojave, which is only one version behind Catalina, and I'm already denied access to Swift 5.2. Talk about building a community.
Re:Swift: Google’s Bet on Differentiable Programming by ken on Thursday April 09, 2020 @09:59AM (#22822595)
Even worse, macOS is tied to hardware years, so even though I've got 3 working Macintoshes here, only 1 of them can run the current version of Swift (and just barely). My quad-Xeon can't run the latest minor upgrade, even though the compiler is faster than the previous one.

I'm sick of this pointless and never-ending upgrade cycle. I started a new project this week, and it's in Clojure. I find it a much more productive language, and I'm confident I can run it on nearly any computer from the past 20 years.

(This is probably not my most productive comment ever, but I'm pretty frustrated right now with having chosen Swift in the past.)

Re:Swift: Google’s Bet on Differentiable Programming by 72deluxe on Thursday April 09, 2020 @11:20AM (#22823377)
Yes I too am getting tired of it. I have to get a new SSD every time Apple releases an OS because I don't want to run their latest OS and break all my audio hardware, but need something to build + release on for the app stores.

I have stuck with C++ but I did buy a book on Swift, which is now hopelessly out of date. People can say bad things about C++ (plenty of material!) but at least it is mostly backwards compatible.

Re:Swift: Google’s Bet on Differentiable Programming by saagarjha on Thursday April 09, 2020 @02:15PM (#22825545)
> I have to get a new SSD every time Apple releases an OS because I don't want to run their latest OS and break all my audio hardware, but need something to build + release on for the app stores.

Can't you just reuse the SSD?

Re:Swift: Google’s Bet on Differentiable Programming by 72deluxe on Friday April 10, 2020 @03:39PM (#22836596)
Yes that's what's occurring but I end up needing at least 2 for this version and the previous one because you can't always rely on the new OS to function properly for a few months.

(Still, I can't complain too much - it is a free entire OS upgrade unlike OSX upgrades of yesteryear)

Re:Swift: Google’s Bet on Differentiable Programming by machello13 on Thursday April 09, 2020 @02:18PM (#22825574)
This is only a problem if you're using Xcode-bundled Swift, right? It seems like you can easily run Swift on earlier version of macOS completely independently of Xcode if you want to.
Re:Swift: Google’s Bet on Differentiable Programming by ken on Thursday April 09, 2020 @03:38PM (#22826352)
Technically true, though if I’m going to give up the advantages of the standard toolchain and the ability to ship App Store apps, I’m not sure why I’d use Swift at all.

Some people like Swift on its own merits but I do not. It’s a terrible fit for the kinds of programming I want to do.

Re:Swift: Google’s Bet on Differentiable Programming by cutler on Thursday April 09, 2020 @09:40PM (#22829071)
Swift's main use - apps for iPhone, Mac OS X and Apple devices - most certainly does tie it to Xcode.
Re:Swift: Google’s Bet on Differentiable Programming by machello13 on Monday April 13, 2020 @12:39PM (#22857359)
Well, yes, but that's a completely different problem. Xcode is tied to specific versions of macOS, but Swift isn't.
Re:Swift: Google’s Bet on Differentiable Programming by valuearb on Thursday April 09, 2020 @11:22AM (#22823394)
How old are your computers when Catalina runs on a 2013 Mac Pro?
Re:Swift: Google’s Bet on Differentiable Programming by ken on Thursday April 09, 2020 @03:42PM (#22826389)
Slightly more than 7 years, it seems. Younger than my car, my boots, my desk, my stereo, etc. I’m one of those weirdos who replaces something when something better comes along, not just because a certain amount of time has passed. And I can’t afford to spend thousands of dollars just to run a slightly newer version of a compiler that doesn’t even fix the bugs I’m hitting in the old one.
Re:Swift: Google’s Bet on Differentiable Programming by microtherion on Thursday April 09, 2020 @12:56PM (#22824571)
If it's merely about access to Swift as a language, not for Apple platform development, you can run swift docker images for pretty much any Swift version you want (and you can, of course, run them on Mac as well).
Re:Swift: Google’s Bet on Differentiable Programming by cutler on Thursday April 09, 2020 @09:43PM (#22829093)
Since Swift's niche is Apple platform development it's tied to Xcode. As an independent language it hasn't developed any real niche to date.
Re:Swift: Google’s Bet on Differentiable Programming by erikstrottmann on Thursday April 09, 2020 @11:33AM (#22823522)
I agree that Xcode increases its macOS version requirement frustratingly quickly. But I imagine Swift for TensorFlow is often used outside of the macOS/Xcode context, where you aren’t using Xcode-bundled Swift anyway. Besides, you can download a newer Swift toolchain and tell Xcode to use that. [0]

You do need to use the Xcode-bundled toolchain when archiving for the App Store, but not for development or off–App Store releases. Even for the App Store, you could get away with just one computer on your team having the latest macOS and Xcode, or with using a separate build server instead of archiving on your workstation.

[0] https://swift.org/download/

Re:Swift: Google’s Bet on Differentiable Programming by fastball on Thursday April 09, 2020 @11:33AM (#22823520)
That is something Apple is limiting in their OS though, it's not really a lang limitation. Swift is open source and various groups are working on making sure it can run on different platforms and not need XCode.