Why would you use Swift as your new data science language when Julia was made for that purpose and Swift was not? Julia's data structures, functions, syntax and libraries were all designed with scientific computing in mind. Swift was designed for general purpose app development.
>engineers need a language that treats machine learning as a “first class citizen”<p>Machine/Deep Learning are not some novel application, we've been multiplying matrices since forever.
hm, no! data scientist are not using only Tensorflow... in the article libraries like Numpy, Scipy, Pandas are mentioned and swift does not have it or not in that maturity at all. It's not only about the beauty of a language, especially for data scientiest it's the variety and maturity of third party packages designed for data scientist and Tensorflow is only ONE part.
Don't get me wrong... swift is beautiful and it is great to have Tensorflow natively running on it for certain scenarios but I don't see swift as a bright and good language outside the apple ecosystem (look at C#, great language, still mostly Windows).<p>If you are starting with Python definitely start with Python 3 and you are future safe...
Just to give an example why a "domain specific" language like Julia is more appealing then a "general purpose" language like Swift: I would like to demonstrate this on the old and classy Fortran vs C++ discussion in numerical computing.<p>In Fortran, you can write linear algebra on n-dimensional arrays (similar as in numpy and julia) very compactly, i.e.<p><pre><code> d(i) = TRANSPOSE(MATMUL(B(i,:),c))
</code></pre>
Writing something like this in C++ is absolutely possible and elegant with modern templates libraries such as `eigen`. However, the compilation will be slower, the compiler errors will be hard to read and it is hard to beat Fortrans runtime efficiency of such code.<p>But it get's more interesting. Think of tensor contractions. This is something where you probably want to implement your own algebra (say for relativistic quantum mechanics or for general relativity) -- or you just stick to the n-dimensional array again and use index-wise loops:<p><pre><code> DO i=1,4
DO j=1,4
DO k=1,4
DO l=1,4
A(i,j) = B(k,l)*C(i,k)*D(l,j) ! note: compe up with better examples
END DO
END DO
END DO
END DO
</code></pre>
I maintain a templated C++ library to write such expressions in one line instead of 4 loops. But contrary to this Fortran code, in order to understand my code, you first have to learn this library. Means you need to learn C++, then the library. In Fortran, it is just Fortran. Nothing more.<p>Believe it or not: Many scientists are no good programmers. Cut-down domain specific languages are perfect to avoid them to loose time on weird compiler features such as "const", templates and all that overhead which is hard to regain in time.
Correct title: Why TensorFlow developers should start learning Swift<p>Why on earth should data scientists ditch the IPython/Jupyter/SciPy/etc. ecosystem?
While the author says "Don’t mistake Swift for TensorFlow as a simple wrapper around TensorFlow to make it easier to use on iOS devices." , the only thing Python is missing from his wishlislist of features is "6. Native execution on mobile".<p>"7. Performance closer to C" is a non-issue - all the parts where performance matters are going to run on CUDA anyway and there's no performance hit there, and very little computing time is spent in the actual python code.
Does Swift have the libraries that Python/Matlab has? My wife is doing some kind of fMRI analysis/research for her PhD and she's using Matlab. I'm an iOS developer, so I'd love it if I can get her to use Swift!
Google just release tensorflow support javascript and swift.
I don't understand why would somebody go with swift for this, if javascript is the language for the web.
with javascript you could not just make a web app but also potentially like almost native app using frameworks. so, where is the use case for swift? probably running on IOT devices? or is swift is faster than javascript?<p>Javascript should just upgraded its syntax to be more swift syntax in the near future, that would be a game changer.
I haven't followed the news about Chris Lattner. For those who like me who haven't seen that he's in Google now:<p><a href="http://nondot.org/sabre/" rel="nofollow">http://nondot.org/sabre/</a><p>"I worked for Apple from July 2005 to January 2017, holding a number of different positions over the years" "This included managing the Developer Tools department, which was responsible for Swift Playgrounds for the iPad, Xcode, and Instruments, as well as compilers, debuggers, and related tools. In early 2017, I briefly ran the Tesla Autopilot team. We built a lot of great things, but Tesla wasn't the right fit for me."<p>Joined "Google Brain" in August 2017.<p><a href="https://techcrunch.com/2017/08/14/swift-creator-chris-lattner-joins-google-brain-after-tesla-autopilot-stint/" rel="nofollow">https://techcrunch.com/2017/08/14/swift-creator-chris-lattne...</a>
The end to end application building aspect of python is not yet there with swift (swift for servers?). Also if folks keep sticking to tools well tuned for their jobs, maybe something like graalvm may provide enough interoperability and performance eventually ... in the "good enough is the competitor to the best" sense.
>> A clean, automated way of compiling code for specialized hardware from TPUs to mobile chips<p>If it is so good at that, why are we waiting so long for expeditiousness on run-of-the-mill industry-standard non-specialized non-Apple linux machines?
I hope swift gets serious about serving the needs of data scientists tool — it would not take that much work to improve swift playgrounds to the point to enable a far better dx than can be had with Jupyter notebooks or matlab ...
I don't know anything about Swift, but I really wish ML had settled on a language with higher performance. Interpreter speed doesn't bottleneck vision stuff but reinforcement learning really suffers.
Honest question: isn't python just glue over the well-performamt c++ tensorflow library? I thought it was, but given this article does python do more then? There wouldn't be much to gain by swappinge the wrapper.
It may sound weird, but
I believe if any data scientists switch to a ‘nontypical’ language for the domain, it should be JavaScript.<p>What’s required for data science is a healthy ecosystem of scientific computing tools. While js obviously isn’t as mature as python (anaconda stack + Jupiter, etc) or R (tidyverse etc) in this aspect, it has made great strides recently:
- tensorflow.js
- observable notebooks
- mathjs
- simple-statistics / jstat<p>Furthermore, with tools like d3 + leaflet, js has very little competition when it comes to data visualiation.<p>A big thing holding js back is a mature library for data manipulation, hopefully this changes in the future (anybody know of any potential fills for this gap?).
Honestly I don't even use Swift for serious iOS apps, just for 'throwaway' apps for lack of a better word. Swift would need to stabilize for at least 5-10 years before I would consider building anything with Swift as the foundation. I strongly believe in backwards compatibility, the Swift team does not.
Swift? Um, okay... Good language, yes, but it's still very iOS-centric. I generally agree with the assessment of Python, but I'll stick with R for everything it can do. I use Python for everything else. If Swift breaks out of the iOS box then maybe I'll think about learning it.
Please stop balkanizing the scientific software development community. Python has excellent wrappers for many other excellent scientific libraries which in turn leverage C and Fortran for high performance computing.