Swift for Tensorflow could never be taken seriously outside Apple community.
On Linux, Foundation barely works and one still needs to selectively do either import Darwin or import Glibc for basic IO stuff.
Then we are already at Swift 5.1, and Windows version has to be built from source will lots of caveats.
How can it even be taken seriously against Julia, Tensorflow for C++, ML.NET all of which work across macOS, Linux and Windows as of today, and offer the same strong typing benefits?
While I agree there is an even chance that Google will allow S4TF to fade away after Lattner's departure, that is more of a reflection on the company having no commitment or consistency to good ideas: ex: https://gcemetery.co
However S4TF should be taken seriously if you understand what they are trying to accomplish and how deeply they designed machine learning support into the language. Take a look at http://fast.ai new course offerings using S4TF. Swift has always been a long bet. If it doesn't work as you want it, is still short sighted to discount it in the future.
With all due reference to Jeremy and Fast.AI (which I love and continue to recommend) I think it's fair to say they don't stick with things for a long time. I think the Fast.AI python library has been re-written 3 times in the past 3 years (Keras -> PyTorch -> PyTorch, differently).
The Swift core team just added two new members, whose contributions are related to Swift on Windows, and Swift on the server respectively, and have specifically called out supporting Swift in non-Apple domains as a part of the roadmap for Swift 6 (including adding the autodiff work from S4TF into mainline Swift). There is attention being paid to these issues.
Thanks for the heads up, I have been looking at that thread, the roadmap still looks quite uncertain, with big questions regarding what Apple is willing to support outside their platforms, tooling (e.g. IDE support), dependencies to WWDC announcements and deliveries.
I love the idea of Swift for Tensorflow : powerful automatic differentiation and a solid type system in a single language.
That's something that is not seen elsewhere and that would make it a perfect fit to write deep learning code targeting production systems.
Now the language needs two things in order to be safe from an hypothetical abandon from Google :
- running smoothly on linux (I though it was already there but your post seem to imply that it is not the case)
- getting the auto-diff out of the alpha stage where people can build framework on top of it (fastai seem to be ready to jump on that ball which is nice)
Having distinct Darwin or Glibc imports seems a little crazy for these examples. When you code in c, libc is just there. It has minor variations from platform to platform, but you always think of it as libc. (Even if Darwin calls it libsystem etc. Or if Microsoft's is mscvrt and it kind of sucks.) It would be more reasonable to call it libc. (If I run on BSD do I still call it "glibc" with no actual GNU present? And if the arc4random APIs present in libc there look a lot like Darwin's because they actually share code? Maybe they have not considered porting to non-linux?)
Basically they set a portability boundary in the wrong place.
But for context, the previous sentence on that page is:
“You can also import any available system modules, such as Darwin on macOS and Glibc on Linux”
The random number examples aren’t saying that’s the right way to generate random numbers in a platform-independent way, it is specifically demonstrating how to import system libraries on your local platform.
File handling can be done using Foundation, which I believe has API parity between Darwin and Linux at least.
I think the point of the example was to demonstrate importing platform-specific modules, not random number generation per se. But you're right, it should probably be updated to do something else.
Not many use an actual c/c++ compiler (clang) to generate language native calling convention wrappers for calling into C/ObjC code (not sure how well c++ interop works these days).
for what it is worth: a few days ago I installed the latest Swift and TensorFlow in Swift on both my little MacBook and my Linux laptop (1070 GPU, i7, fast laptop).
I had to manually set LD_LOAD_PATH on macOS, but then everything worked on macOS and Linux.
sadly i agree with you. initially i was really excited about S4TF because swift is a fantastic language and it would be a fantastic replacement for python as the defacto ML language. but then i realized tensorflow is much worse than pytorch and the S4TF team was too small to build anything substantive enough to win market share.
S4TF was started over 2 years ago, and hasn't really gained any ground since then. It's a project on life support and Lattner's departure means the project is going to be put down soon.
It's good to try different things; S4TF tried, and failed. No one really cares about it at Google except the team developing it. The researchers are adopting other new technologies, like JAX.
Unfortunately Swift is a dud.... and the Apple ecosystem is stuck with it for the next few decades....
I have said, Swift is to Objective-C, what Scala is to Java. Sure, there are plenty of people that like Scala, but its 'academic stuffiness and complexity' doomed it to a niche language.
Same with Swift. It is doomed to be an apple ecosystem only type of language.
All I wanted is a Python* look alike, with some solid static typing, what we got was a franken/monster/language where people felt to try out their little academic pet-peeves, and sucking out the fun out of programing with it, and making it less accessible to beginners.
GO is becoming popular, not because it is shoved down the throat to people, but because its own merit, and mainly because they kept it simple. It is a closely to a "static Python and some minimal features" we got....
*I think Python is a great language, and very accessible for beginners, just not suitable for large projects due to its dynamic type system
I write iOS apps for a living. Most the people I know have moved away from ObjectiveC. When I see language boards, and jobs for iOS, I see Swift asked for over ObjectiveC. On Reddit, Swift has more subscribers than ObjectiveC, most of the tech articules I see these days are ObjectiveC, when I watch a video on WWDC I often see Swift first.
Swift may not be what you wanted, but it is a long way from being a dud. Swift didn't have to be great, it just had to be better than ObjectiveC.
I'm not sure this argument makes sense. I'm not primarily a Swift developer. My goto languages are Python, C++, Java and Javascript (I build DevOps automation pipelines and monitoring tools -- primarily for scientific computing). But my experience with Swift on MacOs and iOS has been pleasant. I definitely would not use it for cross-platform development. But that is not because the language isn't nice. It's because it won't have widespread support outside the MacOS ecosystem. But for UI apps on MacOS and iOS, it is the best choice. Similarly, I use C# for Windows UI apps, but would not use it for anything else. Use the right tool for the job.
Because of some technical argument, or just personal aesthetics?
>I have said, Swift is to Objective-C, what Scala is to Java. Sure, there are plenty of people that like Scala, but its 'academic stuffiness and complexity' doomed it to a niche language.
While Objective-C was really cool, it was neither modern enough, and few people liked it (mostly old NeXT/early OS X guys, but not most of the iOS crowds).
And Swift is easy to use and nothing like Scala in academic-ness and complexity.
>All I wanted is a Python look alike, with some solid static typing*
That's not what the ecosystem needed, or what people in general want (there's Go for that, for one). Swift is somewhere between Rust and Kotlin, features wise.
Have you checked Nim? It's the closest thing to static Python that I know of (plus some extras like Lisp inspired macros), and there is some early development of a machine learning ecosystem (outside of wrappers):
Swift for Tensorflow could never be taken seriously outside Apple community.
On Linux, Foundation barely works and one still needs to selectively do either import Darwin or import Glibc for basic IO stuff.
Then we are already at Swift 5.1, and Windows version has to be built from source will lots of caveats.
How can it even be taken seriously against Julia, Tensorflow for C++, ML.NET all of which work across macOS, Linux and Windows as of today, and offer the same strong typing benefits?