News for hackers. Stuff that matters.
Re:My Thoughts on Kotlin: Perspectives after 4 years by BoardsOfCanada on Friday January 10, 2025 @12:59PM (#42658039)
I've ported a lot of services from kotlin to rust. In my experience the kotlin code is about half the size of rust, and has about 200 mb + 2*x the memory overhead. Kotlin code probably takes about half of the time (or less) to write compared to rust as well, but you're not quite as sure that is it bug free as the rust code once it's done.
Re:My Thoughts on Kotlin: Perspectives after 4 years by terussell85 on Friday January 10, 2025 @01:40PM (#42658581)
That's a great point and I'm not sure why the memory usage/performance didn't come to mind when writing this.

It's probably because, like most JVM related things, it fits into the "good enough" bracket. Most things running in the JVM are definitely not on the forefront of either CPU or memory performance.

I haven't done personal estimates, but your 200 mb + 2*x estimate feels in line to what I'd expect when compared to "memory-tight" languages.

Re:My Thoughts on Kotlin: Perspectives after 4 years by BoardsOfCanada on Saturday January 11, 2025 @04:24PM (#42669021)
I agree and I'm not sure what language I would choose myself if it was up to me. In reality, we deployed to kubernetes with redundant instances and memory usage was the limiting factor with kotlin and it would not have been with rust.
Re:My Thoughts on Kotlin: Perspectives after 4 years by frnkng on Friday January 10, 2025 @03:11PM (#42659599)
Im curious :) Why did you port the services from Kotlin to rust? Can you elaborate a bit on the reasons for the rewrite?
Re:My Thoughts on Kotlin: Perspectives after 4 years by BoardsOfCanada on Saturday January 11, 2025 @04:06PM (#42668925)
I just like programming and I ported what I wrote at work to rust in my spare time. Basically I was thinking about if rust would be viable at work and in my spare time I tested the hypothesis.
Re:My Thoughts on Kotlin: Perspectives after 4 years by thegrim33 on Saturday January 11, 2025 @01:01PM (#42667660)
An important distinction is also whether you were using Kotlin-JVM or Kotlin-native. I'd imagine the native version doesn't have the same memory impacts. (But you also don't get the JVM advantages).
Re:My Thoughts on Kotlin: Perspectives after 4 years by BoardsOfCanada on Saturday January 11, 2025 @04:08PM (#42668938)
While I didn't try kotlin native, I did try porting the micro service from spring boot to micronaut + graalvm native and the memory usage was pretty much identical to spring boot.