Kotlin support


#41

Hi everyone

Not sur if it's the good place to share this, if not can you tell me where is it !

I am newbie but I made some work on a Gradle script to rebuild all kotlin file into a single one.
For what I need It work pretty well.
I use it like this

$ ./gradlew :module_name: buildSingleFile

The file is written in

module_name/build/codingame/codingame.kt

If you have some tips or improvement don't be shy and share it !!

Best


#42

Is it possible to update from version 1.1 to version 1.2?

Thanks


#43

Just wanted to ask if this update is planned soon - depending on that I take the next contest with that language.

Version 1.2 really fixes a lot of library functions and stuff I use a lot - without it programming IS very different. Updating the language should be really easy for you guys. And bring on more new people to this platform who interested in learning new languages.


#44

Is there any update on when Kotlin 1.2 will be introduced? Although I haven't had much chance to play around on CodinGame with Kotlin yet, I'd greatly appreciate the continued support :slight_smile:


#45

Also waiting for 1.2 here, I'm very much used to the new stdlib features already :confused:


#46

same... and 1.3 is coming...


#47

When we did the last languages update this summer, we contacted the Kotlin team because we needed their help. They didn't reply right away so we couldn't update.
Now that Kotlin Native is public, we won't need their specific support each time we want to update. https://kotlinlang.org/docs/reference/native-overview.html

But our installation is a bit different, we'll need a bit of time to update. We'll do it as soon as we have some time.


#48

btw it seems https://www.codingame.com/faq is not showing which target & lib you use for kotlin (I thought it was jre target.... but it seems you are using native).the lib probably is kotlin-stdlib. can you add these informations on faq page ?


#49

maybe you could also specify kotlin native version you use.

when is next languages update ?


#50

we do an update of languages every 6 months or so. Since we couldn't update Kotlin last summer, I think the dev team will take care of it before the next update. I'll ask them to put the complete info in the FAQ


#51

Great news! Thanks for the info. Looking forward to using an updated version :slight_smile:


#52

btw its not kotlin native (System.in everywhere :stuck_out_tongue:)


#53

So how’s the update coming on? Kotlin 1.1.50 is really old now. Even all the 1.2 versions are obsolete now that 1.3.0 is out. Time for an upgrade, please?


#54

Kotlin has been updated! Now using v 1.3 (FAQ not yet updated)
@Speekha


#55

There’s a bug in the current Kotlin build which is preventing me from doing nested arrays. The issue appears to be compiler or OS dependent.

https://youtrack.jetbrains.com/issue/KT-28285

The issue can be reproduced with the following code in any of the current puzzles.

fun main(args: Array<String>) {
    val board = Array(10, { IntArray(10) })
}

Would it be possible to revert the version of Kotlin until this is fixed? Thanks.


#56

A current workaround is to do something like this, which isn’t too bad if we want to wait until the YouTrack issue is resolved.

val board = ArrayList<IntArray>(width)
for (i in 0 until width) {
    board.add(IntArray(height))
}