GSOC 20, Support for Kotlin Native

Hi to community ,
I am Aditya Rana , undergrad student at National Institute of Technology ,Trichy ,India. Currently pursuing BTech 2nd year with Major in Instrumnentation and Control Engineering and Minor in Computer Science Engineering. I am proficient in android application development ,java ,kotlin ,golang ,python. As i have already good experience in kotlin and have published few apps powered by kotlin on Google Playstore .
I would love to contribute in Processing -Android to the -“Support for Kotlin Native” as this matches my skills best.

2 Likes

You can start by exploring previous posts related to Kotlin in the forum. I found two posts that are relevant:

My suggestion to prepare to GSoC? Become familiar with the PDE, learn how the PDE manages modes, how does java and android mode works and then explore what is needed to support Kotlin. Get involved here with the community by helping users and learning current use cases. Finally, this wiki doc might come handy to get started with Processing android.

Kf

5 Likes

Maybe you would like contact or work with this user

4 Likes

Please keep all conversations in the forum so other ppl can pitch in. @Andres is the Processing Android owner FYI. @sarahlensing has an oversight of Kotlin Native and their input (plus other Processing contributors and users) will be useful to drive this discussion forward.

Kf

3 Likes

@codeanticode at Github is the main contributor

3 Likes

@kfrajer @noel thanks for the reply , these were the good starting points for project . I went through these posts and all related posts and learn about the kotlin Native and trying to make a small multiplatform app using kotlin Native here .

Thanks @Andres and @sarahlensing for such a wonderful project. I think that possibility of using the Kotlin Native to run Processing sketches on both iOS and Android is really promising and through this our project will be able to use the advanced functionality that kotlin has and ios graphics will also be boost using processing.

Thanks ,
Aditya Rana

3 Likes

Kotlin has a big potential to allow people writing processing code that can be run on virtually any platform.

I’ve created an interface that unified Java and Android implementations (with limited functionality) but learning about Kotlin Multiplatform made me reconsider and I’m currently looking to create a Kotlin project that would compile sketches into Android, Java and JavaScript. I picked these because Processing core libraries are available for these platforms. Compiling into native code for iOS or other platforms would be icing on the cake!

2 Likes

Hi @anoniim , welcome to the forum.
I am looking forward to see it. Is a preview available?

Thanks @noel :slight_smile:
I discontinued the work on Android + Java interface. Although a good idea, my original design didn’t execute it very well.

It’s not documented but you can check where I was going with it.
Ignore the second part of the file after /* Custom fields */. The important bit is GenericApplet that abstracts the platform-specific PApplet classes and Applet interface that has Android and Java implementation to provide two-way communication. All I had to do then is implement the GenericApplet and I was able to compile to both Android and Java.

Quite feasible at the first glance but I hit a roadblock when trying to work with images. I would have to abstract PImage (and pretty much every other library class) in this tedious way. That’s where Kotlin Multiplatform might work better because it has multiplatform class declarations that could be implemented directly by the library classes.

The biggest worries are interface inconsistencies and the difference between various Processing library implementations which would result in a different behvior on some platforms.

1 Like