Kotlin

716 readers
1 users here now

Kotlin is a statically typed programming language for the JVM, Android, JavaScript, and native.

Subreddit rules:

Resources:

founded 2 years ago
MODERATORS
26
27
 
 

Hello developers!

I need some programming advice and I hope that I am not off-topic. I couldn't find a more relevant group in Lemmy.

I have a Gradle convention plugin (written in Kotlin) that needs a buildscript classpath. But I can't get it to resolve correctly in the project.

  1. If I add the buildscript classpath to the convention plugin and then apply the plugin to the project, it throws an error saying that buildscript is not allowed and the plugins section should be used instead.
  2. If I add the buildscript classpath to the project itself (although this doesn't feel right because the convention plugin should be already compiled), then it throws an error saying that the dependencies are not met (classpath not applied).

Any advice?

28
29
30
31
 
 

I've for a good while been using an excellent port of Scala's persistent data structures in my Kotlin code known as Dexx. This also works well from Java code.

However, while the project is what I would call feature complete, it's no longer maintained, resulting in outdated dependencies. It would also become problematic should any bugs or issues pop up.

Hence I decided to fork it as Sigbla PDS and tidy it up a bit, with v1.0 now released and ready for use.

32
33
 
 

I was using freecodecamp's tutorial on Kotlin but I was told that a video isn't a good way to learn a language. So I did the hyperskill course but it marks all of my answers as wrong even when the code works, and the subscription for more than ten questions a day is crazy expensive. I will be getting atomic kotlin soon but I still want to learn before it comes

34
35
36
2
Coil goes multiplatform (talkingkotlin.com)
submitted 1 year ago by [email protected] to c/kotlin
 
 

At least they took the grant from the Kotlin Foundation... Let's wait for version 3 to be ready!

37
38
 
 
39
40
3
Won't it? Open for debate (www.donnfelker.com)
submitted 1 year ago by [email protected] to c/kotlin
 
 

Seen this post by Donn Felker (!) on some other discussion platform and though I'd like to see the opinion of Lemmings about it.

41
42
43
44
 
 

Usually when I read a KMP article it talks about mobile. This one is about JS and the JVM.

45
4
Making Multiplatform Better (talkingkotlin.com)
submitted 2 years ago by samus7070 to c/kotlin
 
 

In this episode, we talk to Rick Clephas, one of the Kotlin Foundation Grants Program winners and the creator of KMP-NativeCoroutines and KMM-ViewModel.

When I last used KMP it was before the new memory model so I avoided coroutines as much as possible. A year later and it looks to be so much easier and better now.

46
47
2
Molecule and Mosaic updates out (mastodon.jakewharton.com)
submitted 2 years ago by Mreeman to c/kotlin
48
 
 

Hey, I am trying to do some data storing on compose multiplatform for ios and Android and tried using Jetpack Datastores but it seems that the class Context does not exist for shared platforms does anyone have any ideas on how to do this?

49
 
 

I bumped into this interesting behavior around unsigned types. At first I was confused why UInt doesn't extend Number, but as I was experimenting, it got weirder. It sometimes is a Number (see case c below) and sometimes isn't (see case d)?!

val a: Int = 12
a is Number // true

val b: UInt = 12u
b is Number // doesn't compile, `Incompatible types: Number and UInt`

val c: UInt = 12u
(c as Any) is Number // true, Idea says "No cast needed"

val d: Any = 12u
d is Number // false

I guess this is partly legacy of Java, which doesn't have unsigned types, and partly effect of UInt being value class. I'm curious if someone has a deeper explanation.

50
27
Kotlin 1.9.0 Released! (blog.jetbrains.com)
submitted 2 years ago by austin to c/kotlin
view more: ‹ prev next ›