News for hackers. Stuff that matters.
Re:The Decade of Swift by m_ke on Monday December 30, 2019 @05:25PM (#21917237)
With Chris Lattner's move to Google and the state of Java it would interesting to see Google embrace Swift and add official support for it to Android.
Re:The Decade of Swift by 6700417 on Monday December 30, 2019 @05:48PM (#21917385)
This seems very unlikely to me.

They would need it to interoperate with their existing stack. They chose Kotlin where they reasonably could have chosen Swift and then worked to extend it to work with their existing stack.

Judging by what I would argue has been a lukewarm reception to Swift for Tensorflow, I think it would a very hard sell to convince people within Google to support Swift as a first-class language in the rest of their ecosystem.

They could for example start by adopting Swift for server-side programming for Google cloud and they seem to be putting no effort into that, at least public-facing effort.

Re:The Decade of Swift by endorphone on Monday December 30, 2019 @05:58PM (#21917458)
Just to clarify Google's choice of Kotlin -- the maker of their IDE invented and did all of the heavy lifting with Kotlin, including building the JVM targeting compiler, and the IDE to develop it in (which is the foundation of Android Studio). Adopting Kotlin was very close to free for Android, and was really just rubber stamping what a lot of developers were doing regardless.
Re:The Decade of Swift by skohan on Monday December 30, 2019 @06:45PM (#21917737)
JetBrains is a plague on mobile development. Their current business model appears to be selling workflows which are totally dependent on their proprietary tooling, and make over-complex monstrosities of mobile applications
Re:The Decade of Swift by m_ke on Monday December 30, 2019 @06:03PM (#21917490)
From what I remember Kotlin came to Android before Google embraced Jetbrains and Android Studio.
Re:The Decade of Swift by endorphone on Monday December 30, 2019 @06:11PM (#21917540)
May 2013 - https://blog.jetbrains.com/blog/2013/05/15/intellij-idea-is-...

May 2017 - https://www.theverge.com/2017/5/17/15654988/google-jet-brain...

You could use Kotlin for years before Google officially endorsed it...given that Android Studio is made by JetBrains and they made it trivial to use. JetBrains did 100% of the heavy lifting, and Google just conceded eventually.

Re:The Decade of Swift by m_ke on Monday December 30, 2019 @05:56PM (#21917444)
I'm pretty sure they went with Kotlin before Swift was open sourced, but I agree with you that the likelihood of them doing it is very low.

Swift for Tensorflow hasn't gotten much traction because the overlap between programmers who know swift and machine learning engineers is super tiny. Making the core language differentiable sounds very promising though .

Re:The Decade of Swift by 6700417 on Monday December 30, 2019 @06:54PM (#21917791)
Swift was open-sourced 18 months before Google announced support for Kotlin.

There was probably several months or more of debate and work within Google by the time of the announcement, but it seems reasonable that during those 18 months they would have also considered and rejected Swift.

Re:The Decade of Swift by skohan on Monday December 30, 2019 @09:01PM (#21918402)
It's an interesting value proposition to consider. From one side, Google could have stood to gain by potentially luring the legion of iOS devs onto their platform. At the same time, it's hard to imagine them surrendering any part of their product to a language which is ultimately controlled by Apple at the end of the day (although I suppose they could fork it).

In any case, open source Swift was not ready for prime time at time of release.

Re:The Decade of Swift by skohan on Monday December 30, 2019 @06:42PM (#21917718)
Swift for Tensorflow also isn't at 1.0 AFAIK and hasn't been deemed "ready for primetime".

I think it's going to be hard to get data-scientists using anything other than Python any time soon, but I'm hopeful it will take off at some point, since it's really painful to work with scripting languages once you get used to a decent type system.

It's also a super interesting project to follow. The stuff they are doing with automatic differentiation, and the stuff they are talking about with metaprogramming is truly fascinating stuff, with all kinds of applications outside of machine learning. I really hope they manage to get it off the ground.

Re:The Decade of Swift by 6700417 on Monday December 30, 2019 @06:58PM (#21917804)
Yes it’s not at 1.0, but my point when I mention to people actually doing deep learning that Swift is coming and has support for native differentiation and static typing, the response is underwhelming to the point that I wonder if either of those features provide enough pull to get people to ever drop Python for Swift.
Re:The Decade of Swift by skohan on Monday December 30, 2019 @07:31PM (#21917999)
Yeah I think it will be a really hard sell since my perception is that programming is python for a lot of data scientists. Also static typing is something you have to use for a bit before you can understand that the little bit of extra formality is actually saving you a lot of trouble in the medium and long term.

Still given the growth of that industry, it's hard to imagine that Python can bear the burden of the increasingly complex work there forever.

Re:The Decade of Swift by m_ke on Monday December 30, 2019 @07:48PM (#21918093)
Static typing is useless for exploratory data analysis and data wrangling.

Once you get to the modelling step all of the data is in typed arrays.

Static types start to shine once the project grows and the new type annotation syntax works great for that.

I've tried doing machine learning in C++, Java, Scala and JavaScript and all of them are a pain compared to python.

Python would be perfect if I could annotate parts of my code and compile them. (Pretty much what's commonly done with cython or numba jit.

Re:The Decade of Swift by skohan on Monday December 30, 2019 @08:26PM (#21918251)
> Static typing is useless for exploratory data analysis and data wrangling.

In my experience, doing this kind of task in an weak-typed or duck-typed language is already tedious. Function signatures don't tell me enough detail to know exactly what I'm working with, so I end up spending a lot of time digging through documentation or print debugging. Why not let the compiler, or the function signatures do this work for you?

Re:The Decade of Swift by pjmlp on Tuesday December 31, 2019 @05:50AM (#21920172)
Julia is the only sound alternative to Python.

If they want to make an Apple only version of Tensorflow, so be it, but don't expect it to take off on Linux and Windows research labs.

Re:The Decade of Swift by skohan on Tuesday December 31, 2019 @06:05AM (#21920221)
What’s with the FUD? You can already run S4TF notebooks on Colab, and it’s trivial to spin up S4TF in any environment using Docker.
Re:The Decade of Swift by pjmlp on Tuesday December 31, 2019 @07:37AM (#21920607)
How do you spin S4TF on Windows Containers or any kind of Linux distribution in-house?
Re:The Decade of Swift by skohan on Tuesday December 31, 2019 @10:12AM (#21921452)
Using Docker

Edit: or on Ubuntu just download the toolchain.

Re:The Decade of Swift by pjmlp on Tuesday December 31, 2019 @10:40AM (#21921688)
So instead of using the native tooling provided by Julia, ML.NET, PyTorch, the solution is to somehow either emulate Linux on Windows, or being stuck with Ubuntu as distribution.
Re:The Decade of Swift by skohan on Tuesday December 31, 2019 @11:05AM (#21921962)
I mean containerization is not the same as emulation.

But I would assume a lot of people just want a notebook to do their work in. Does it really matter if it’s running in a container or natively? Most python projects run inside a virtual environment anyway, which is comparable if not more poorly encapsulated.

Also the cloud use-case is expanding. Environment basically doesn’t matter at all in that case.

Re:The Decade of Swift by pjmlp on Tuesday December 31, 2019 @11:13AM (#21922034)
It is on Windows, because Swift hardly runs there, if at all.

Yes it matters, because many organisations get development stations managed by IT, and there are very strict compliance regulations regarding where data processing takes place.

Re:The Decade of Swift by jbverschoor on Monday December 30, 2019 @06:05PM (#21917503)
Swift was released before kotlin
Re:The Decade of Swift by m_ke on Monday December 30, 2019 @06:09PM (#21917530)
But wasn't open source till the end of 2015 (https://developer.apple.com/swift/blog/?id=34)

Kotlin was open sourced around 2012 and people were using it in Android apps before Google officially started supporting it in 2016.

Re:The Decade of Swift by 6700417 on Monday December 30, 2019 @07:00PM (#21917818)
Re:The Decade of Swift by lokedhs on Tuesday December 31, 2019 @04:13AM (#21919854)
That was the official support from Google. Kotlin had been around for a long time before that. I used to write Android applications using it before Google officially supported it.
Re:The Decade of Swift by adonese on Tuesday December 31, 2019 @04:41PM (#21924973)
Are not they use c++/GO for their server side programming?
Re:The Decade of Swift by 3fe9a03ccd14ca5 on Monday December 30, 2019 @05:46PM (#21917373)
From what I understand they’ve put their chips on Kotlin.
Re:The Decade of Swift by lostmsu on Monday December 30, 2019 @11:20PM (#21918920)
The fight of single platform gardens?
Re:The Decade of Swift by innagadadavida on Monday December 30, 2019 @05:33PM (#21917293)
Google will be making making it easier for devs to write portable mobile apps. But it will also need android deva to learn new language.