Are Swift on Android or Swift for TensorFlow valid areas for a GSoS 2019 proposal?

Thank you for taking the time to join GSoC, I was extremely happy to see Swift there. I’m trying to come up with a project proposal and would like to ask if something related to Swift to TensorFlow or Swift on Android is fair game.

I understand that both these projects are in a way tangential/independent and that Swift for TF probably goes under TF more than it goes under Swift. But at the same time they do feel central to Swift’s adoption and mission, so I thought I’d ask.

I unfortunately cannot be much more specific as to what I would have in mind for those yet. I’m sure I will in a few days, but with only a few days left to apply I decided to take this first step and post.

My motivation for Swift for Android is that my company uses it heavily, being probably the first in the world to have a serious production app that targets both platforms written in a single Swift codebase (we open-sourced the UI framework that allows us to do it under GitHub - flowkey/UIKit-cross-platform: Cross-platform Swift implementation of UIKit, mostly for Android). Making apps has been my passion and occupation for the past five years and bringing Swift development to Android seems like a wonderful high-impact project to be a part of.

My motivation for Swift for TensorFlow is just that Machine Learning is my second biggest area of interest and I would love to see Swift becoming a first-class citizen in that field. Perhaps there is something that I could do or propose that contributes to Swift’s adoption in ML independently of Swift for TF?

3 Likes

Hi @janek!

Thanks for the interest in joining us for GSoC but unfortunately both of the ideas you mentioned are not part of swift.org and we don't have available mentors with the proper expertise, so it is unlikely that such proposals would get accepted.

Thank you for replying @akyrtzi!
I understand. That's ok, I'm sure I'll be able to come up with something that could work, if time allows - I already found some leads in existing propositions yesterday.

One of them was (I'm pretty sure) from a member of the Swift team. Does it make sense to ask him if he'd consider mentorship or is the pool of mentors closed in some way?

Sure, go ahead!

Cool, writing him a message now!

android support would be interesting IMO. I'm willing to mentor that depending on what the project is.

4 Likes

Hi @compnerd!! Congrats on the recent breakthrough with Windows!

That's amazing to hear. I think I'll be able to be fairly precise about what the project could be sometime in the next 1-2 days.

How does this relate to what @akyrtzi said about Android not being part of swift.org and therefore unlikely to be accepted? Does your willingness to (potentially) mentor completely solve that problem, or only partly?

1 Like

The ideal result of a GSoC project is that the work continues to be properly integrated/tested/maintained in swift.org even if the GSoC student goes away after their work is done. My concern with a student doing work about Android support was that it will end-up bit rotting because it won't be continuously tested/maintained.

If you are able to address such concerns in the proposal itself it would be beneficial.

Understood, thank you for the explanation.

@akyrtzi - well, there are actual bots in the CI now for android, so I don't think that it will bit rot really.

Ah, I wasn't aware of that :sweat_smile:

Hi again,

I currently see two paths for myself.


1


The first is to work on UIKit-cross-platform, e.g. further developing the code, creating example apps and doing some ground work in community outreach. I would be able to be more specific in my proposal.

This has a lot of pros, including:

  • I come from an app development background and feel very comfortable there

  • I’m genuinely excited about this project and would be extremely motivated

  • I have already been successfuly contributing to it

  • potential contributions can easily be broken down into small steps, each of which would already mean something (in contrast to a big target that could work or fail)

  • I have great access to core contributors of that project (relieves some mentorship effort)

The issues are whether this can be considered for this program and whether @compnerd (or somebody else) would be willing to mentor it. It clearly is an offshoot project, but also clearly aligned with current goals of the Swift community, as I understand them.

To quote swift/docs/Android.md:

Does this mean I can write Android applications in Swift?

No. Although the Swift compiler is capable of compiling Swift code that runs on an Android device, it takes a lot more than just the Swift stdlib to write an app. You'd need some sort of framework to build a user interface for your application, which the Swift stdlib does not provide.

And the top Google result fot "Swift on Android":

Obviously UIKit or any high level frameworks are not available, so your Swift app for iOS cannot magically run on Android — you can use Swift for business logic code, but you will have to re-write all user interface and OS dependent parts specifically for Android.

This is what UIKit-crossplatform does. It still has a bit to go, but as mentioned before, we already use it in a decently popular production app. The vision of a single Swift codebase being a valid cross-platform soluton is very exciting and could do wonders for the adoption of Swift. And it's almost there, it just needs to cover a larger part of UIKit and be popularized. I can do a lot for both in three months.

In the short time that is left, this is the only proposal I can come up with myself, from the heart. I will absolutely understand if you say this is a hard no. If it’s more of a "hmm", please let me know what points I should touch on when advocating it in my proposal and how I could align it better with the goals of Swift and GSoC. As I understand them now, it's something that could be considered. I believe there is a spirit of some experimentation to GSoC projects, and TensorFlow for example proposes some that also seem a little fringe/tangential.


2


The other path is that I get input from @compnerd, my UIKit-crossplatform friends, or other members of the community regarding what they see as a potential project there, and if it’s something I feel I can do and get behind, I will make a proposal out of that. The problem here is that it’s very hard to pull off in 3.5 days, as I (very unfortunately) have personal obligations that require hours of work every day for the entirety of that period. Nevertheless, I’d like to try and see what happens - I’m asking here and I wrote to the aforementioned friends.



To @compnerd - I was not able to send you a PM here. Do you have a form of contact that you could share with me? I’m asking because if I make a proposal, your feedback on it could mean a lot, and with so little time left, a forum thread might take too many hours for a back-and-forth.

It is unlikely that such a proposal would be accepted for swift.org since it is not part of the Swift project umbrella.

The Swift for TensorFlow team is accepting GSoC proposals. Accepted projects will be part of the TensorFlow organization, not Swift.org, but we all contribute to Swift.org repos. You can find relevant discussions or ask questions on the Swift for TensorFlow mailing list.

2 Likes

I'm not sure about the viability of something like this as a GSoC project, but one idea is to actually create a JNI bridging layer for android (similar to the python interop). Not sure if that is of interest to you @janek.

2 Likes

Thank you all for your help. Very nice of you to write @rxwei, I was looking into TF aswell.

In the end, because of the other obligations I had and lack of a concrete idea that fits, I didn't create a proposal for GSoC. But it was a nice experience to engage in the community a bit more and I hope I will frequent this forum now, get more and more engaged and contribute something.

JNI bridging sounds interesting @compnerd, I would like to know more about this project, as it's probably relevant to UIKit-crossplatform which I'm already engaged in. I think my friends may have actually already done some work there, but I'm not sure.