#Kotlin
I wish more #Kotlin assertion libraries had assertion functions as expressions so that they could be chained. For example:
result.expectSuccess() equalTo 123
httpResponce.expectStatus(OK).body.equalTo("{some json}")
Balancing Momentum and Complexity in TDD - Writing a Kotlin JSON Parser Take 2 Part 2
Discussions: https://discu.eu/q/https://youtu.be/2oktW82qYAE
How to use Processing 4 with Kotlin and Gradle
https://www.mindevice.net/posts/processing4-kotlin
Discussions: https://discu.eu/q/https://www.mindevice.net/posts/processing4-kotlin
JokeAPI for Kotlin 0.9.0 has been released.
Functional Error Handling in Kotlin with the Raise DSL
Discussions: https://discu.eu/q/https://youtu.be/pOtET_i1v-w
CryptoPrice 1.0.1 has been released.
A Deep Dive into Kotlin Property Initialization: lateinit, const, var, val, and lazy
Hab alles wieder umgestrickt, es war vorher zu dunkel und düster 🧶

High-quality documentation for my kotlin ORM framework is completed
https://babyfish-ct.github.io/jimmer/
Discussions: https://discu.eu/q/https://babyfish-ct.github.io/jimmer/
TIOBE Index News (September 2023): Java Competitor Kotlin Returns to the Top 20
I wrote about why `Future` and the async/await programming model is error-prone and obsolete, the industry moving away from it (e.g., Go, Kotlin's Coroutines, Project Loom):
UrlEncoder for Kotlin Multiplatform (via Erik's Weblog)
First multiplatform version of the UrlEncoder for Kotlin library.
Stay tuned for the new video I just finished recording about the BOM - Bill of materials dependencies in Android projects 🎥🔴
https://youtube.com/@AndroidDeveloperTips/
#ADT #AndroidDeveloperTips #Video #YouTube #Android #AndroidDev #Kotlin #KotlinDev #BOM #BillOfMaterial

So.. I currently have the task to make an app in #Android Studio with #Kotlin in school. My first time making an app.
Connecting my phone to my laptop doesn't really work. Our wifi is blocked (school, again) and usb just disconnects randomly.
The #emulator is buggy though. Has it something to do with my hardware? I have a Surface Laptop Studio with an RTX 3050 Ti. Drivers updated yesterday.

UrlEncoder for Kotlin 1.4.0 has been released.
Having fun at the September edition of the @kugberlin at the amazing SumUp Berlin offices.

More #Kotlin fun (1.8.21):
If you have a class `Foo` with a property `bar` of type `MyValueClass(val value: String)` (which is @JvmInline):
If you call `Foo::class.java.getMethod("getBar").invoke(...)`, you'll get a String.
However, if you call `Foo::class.java.declaredMemberProperties.first { it.name=="bar" }.get(...)`, you'll get a MyValueClass!
Different return types depending on how you reflect.
So, here's a fun #Kotlin thing.
If you create a @JvmInline value class, a method that uses that class as an argument or a return type has weird things done to it, which leads to interesting results if you're trying to do reflection.
#kotlin transpiled to #javascript. Someone explain to me when this was a problem that needed to be solved.
Runtime Surprise: Kotlin Breaks !!Non-Nullability Promise on Developer Cheating in Field Initialization
PayU is hiring Engineering Manager (Mobile)
🔧 #kotlin #android #ios #cicd #engineeringmanager
🌎 Bangalore, India
⏰ Full-time
🏢 PayU
Job details https://jobsfordevelopers.com/jobs/engineering-manager-mobile-at-payu-com-jul-6-2023-59c608?utm_source=mastodon.world&ref=mastodon.world
#jobalert #jobsearch #hiring
Here is another basic function I wish was in #Kotlin stdlib
inline fun <T : Any, R> T?.ifNotNull(f: (T) -> R): R? = this?.let(f)
This is really just `?.let` but I think `ifNotNull` follows the Kotlin way by being more explicit.
visibilityよりもisVisibleを積極的に使った方がいい理由
https://qiita.com/mi_iroha/items/4efe565f1ed85d964523?utm_campaign=popular_items&utm_medium=feed&utm_source=popular_items
#qiita #Android #Kotlin
@SusanPotter @routis the question was about #java+functional idioms... So #Kotlin is out of context 😅
I love kotlin, I'm even GDE for this specialty, but if the requirement is Java, then we should not advertise for it. #KotlinFatigue
And yes, #VAVR is old and not maintained a lot... But it still exists and works as a lib😇
The absolutely worst way to provide a programming language

es kommt Bewegung ins Spiel 😀
physikalisch nicht ganz korrekt aber für den Laien kaum zu bemerken..

Not many people consider this but CONSTANTS DON'T NEED TO BE UPPERCASE. They're not the most important thing in the code and don't need the emphasis (e.g. unlike mutable global variables). The convention dates back to the early days of C and the need to distinguish symbolic constants defined as macros from variables 👉 https://accu.org/journals/overload/22/121/wakely_1923 It's never too late to stop the cargo cult! Can we have it in #Kotlin 2.0 please? 😅
Did you know you can make games with #GodotEngine in #kotlin ? https://github.com/utopia-rise/godot-kotlin-jvm
This is their Discord: https://discord.gg/zpb5Ru7v9x
KorGE, the Kotlin multiplatform game engine is back 🙂
TIL there is a #kotlin #game #engine https://korge.org/
@SusanPotter I used #VAVR a lot before switching to #Kotlin.
Inspired by Scala, every useful functional structure should be available
ktfmt v0.45 was released a couple hours ago with support for context receivers and better formatting for elvis operators!
Java recap for week 37/2023
https://discu.eu/weekly/java/2023/37/
#java #jvm #kotlin #programming
Get RSS feeds and support this bot with the premium plan: https://discu.eu/premium
Programming in Java, anything non-trivial is still, “death by a thousand cuts”.
This is why alternative languages running on top of the JVM will always be relevant (e.g., #Scala, #Kotlin, #Clojure, #JRuby), especially if they strive to be more than just Java++. Because Java++ is the same boring old Java.
The redeeming quality that Java has is the extreme backwards compatibility. But this doesn't really speak for the libraries that people use, upgrades are still hard & classpath hell is real.
Es bewegt sich zwar noch nichts, aber es gibt kleine Fortschritte.

What I've been working on this Sunday:
Migrating my #Reveal library to #ComposeMultiplatform and getting it to work on an #iOS device 🎉
#JetBrains has done an incredible job of porting #Compose to other platforms! I'm really looking forward to the future of #multiplatform development.
#Android #AndroidDev #JetpackCompose #KMP #Kotlin #KotlinMultiplatform

This week has been pretty busy at work. Hopefully it has resulted in absolutely awesome results!
✨ Cold start up time for Element X Android has significantly improved from 3-4sec to 100-150ms for accounts with 1000, 2000 or even 4000 rooms (≈30x speed up). That’s awesome! ✨
I’ll explain tomorrow how we did that. Async Rust and immutable data types simply rock.
Latest Android Weekly Issue 588 is out!
https://androidweekly.net/issues/issue-588 #AndroidDev #Kotlin
Hey Fediverse, I'm still using the same old tools to construct app wireframes for clients, are there any new fangled things I'm missing out on?
#Coding #swift #kotlin #iOS #Android #appdesign #appdevelopment
Next week I am giving 2 free trainings on #functionalprogramming in #kotlin and Kotlin(X) Coroutines!
In person, and remotely!
Garth Gilmour will be giving a training on #JetBrains #Ktor, and Urs Peter on #Spring #SpringBoot!
Kotlin Training Day by #Xebia Sign up here, https://pages.xebia.com/kotlin-training-day
Has anyone managed to implement any iOS delegate protocols from KMM?
Given most will/did delegate methods have the same names and argument types (application for application(willChangeOrientation:…) and application(didChangeOrientation:…)), Kotlin gets confused when I try to implement both, saying I'd already done ...will… when I do …did… .
I am literally going to have to rewrite the https://Dayboard.io parent and family apps in another stack because of this. Maybe capacitor/Tauri/Sveltekit, Godot, or native swift/Kotlin.
Ugh.
Here is the simplest way to implement any interface in #Kotlin 🙈 Aka mocking library in four lines of code. (I didn't come up with it though so can't take the credit.)
class MyList<T> : List<T> by strictMock()
inline fun <reified T> strictMock(): T =
java.lang.reflect.Proxy.newProxyInstance(
T::class.java.classLoader,
arrayOf(T::class.java)
) { _, _, _ -> throw NotImplementedError() } as T
New post JDriven blog: Kotlin Discovered: Pattern Matching #Kotlin https://blog.jdriven.com/2023/09/Kotlin-Discovered-Pattern-Matching/
Also, curse you #Kotlin and #Rust for having different syntaxes for range values and confusing the hell out of me! :blobcatreeeeeee:
In Kotlin, `x .. y` includes the upper bound and `x until y` doesn't.
In Rust, `x ..= y` includes the upper bound and `x .. y` doesn't.
Perfect, right? :blobCatGooglyTableFlip:
For the record, I like Rust's range syntax much much better.
But damn if switching from Rust to Kotlin isn't going to introduce a TON of subtle bugs in my code! :blobcatverysad:
Where should we store the secret key in Android?
I have worked on several improvements in #Spring Framework 6.1 that will bring #Kotlin Coroutines support to the next level: Spring AOP support, context propagation in functional or annotation-based filters, new context DSL. Feedback appreciated! https://github.com/spring-projects/spring-framework/issues?q=label%3A%22theme%3A+kotlin%22+milestone%3A6.1.0-RC1+is%3Aclosed
Exploring Kotlin 1.9.0: What’s New in the Latest Release
New post JDriven blog: Kotlin Discovered: Variance #Kotlin https://blog.jdriven.com/2023/09/Kotlin-Discovered-Variance/
Latest Android Weekly Issue 586 is out!
https://androidweekly.net/issues/issue-586 #AndroidDev #Kotlin
@acowley I agree, import statements are required.
For #Scala and #Kotlin I like offering full working scripts that can be copied/pasted and executed directly via Scala-CLI and Jbang, respectively. It's not much to add towards the end, like "oh, here's the full working script." It's great for the author, too, as a way to re-validate that the code actually works. As all too often mistakes make their way in due to revisions.
A new #BigBone snapshot is out. I have re-ordered some method parameters in certain calls to improve #Java friendliness. If you get compilation errors, just quickly check the method signature and modify accordingly. Should be no big thing. Also, I got a report about a kotlin-stdlib version issue that should now be fixed.
Details here: https://github.com/andregasser/bigbone/releases/tag/v2.0.0-20230902.213631
Explore the use of the Unnamed Patterns / Variables in programming languages like #Java, #Kotlin & #Scala.
Enhancing code readability, allowing the omission of unnecessary components, and simplifying code are key features.
Read the #InfoQ article by A N M Bazlur Rahman for more insights: https://bit.ly/44Aknbe
Great answer to the question "Can someone explain to me what #Coroutines are?"
https://www.reddit.com/r/Kotlin/comments/162d2lv/comment/jxwouwx/
What I haven't liked so far from kotlin is that is so tied to android that you hardly find a kotlin library for kotlin and most of it is specific for android
at least on my naive searches so far
#kotlin #jvm #notandroid
#Gradle supports different options to write plugins. This is good, because it gives you the choice to use what fits your context. Any you should always write plugins - if only to organize your project's build configuration.
But it is confusing 😖. That's why I created this overview:
https://github.com/jjohannes/gradle-plugins-howto
Learn by exploring the difference between writing the same Gradle plugins in:
- Gradle Kotlin DSL
- Gradle Groovy DSL
- #Java
- #Kotlin
- #Groovy
- #Scala
- #Clojure
Such a cool little clip about #WebAssembly and #Kotlin https://www.youtube.com/watch?v=RcHER-3gFXI&t=965s
HTMX - Dynamic HTML without Javascript
Discussions: https://discu.eu/q/https://youtu.be/0cLdSd41Cis
HTML Form parsing with http4k lenses
Discussions: https://discu.eu/q/https://youtu.be/LLaSCE4SNAw
Hi 👋 I am Jendrik and I do software build automation and improve developer productivity using #Gradle – with focus on #Java #JVM #Android #Kotlin
🎞️ My ongoing Understanding Gradle video series:
https://youtube.com/@jjohannes
✨ Gradle plugins and examples
https://github.com/jjohannes
📚 My Modern Gradle Fundamentals online course https://www.udemy.com/course/modern-gradle-fundamentals/?referralCode=3AC1B96C0EBE6F4FBE6E
In part 3 of my workshop for #Swift & #Kotlin, we did TDD (part 2) and Faking & Mocking (part 1). Student takeaways:
"getting better at the TDD loop (doing more frequent refactorings)"
"starting to recognize some smells (duplication) but probably need to practice and expand set of smells I can detect"
https://www.industriallogic.com/testing-refactoring-workshop/
One week into android dev and I'm having quite a blast of fun, this is backed by an Google Cloud F# Functions that I built sometime ago
Not the best app ever but it works to learn some fundamentals
So much for learning in the open
https://github.com/AngelMunoz/MandadinReloaded
Here are the F# bits
https://github.com/AngelMunoz/FsFediverseArchive
#fsharp #dotnet #kotlin #jetpackcompose #android
Today's workshop content for #Swift & #Kotlin developers: Microtesting, and TDD (part 1). Student takeaway: "Testing is like exercise: you never really want to do it but you always feel better after." https://www.industriallogic.com/testing-refactoring-workshop/
Looked into Kotlin/Wasm, which lets you build Web apps, but with Kotlin: https://kotlinlang.org/docs/wasm-get-started.html. Here's the "Hello World" deployed: https://kotlin-wasm-hello-world.glitch.me/.
They essentially recreate browser APIs, but in #Kotlin, which then gets compiled to #Wasm:
`kotlin.browser`: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.browser/
`kotlin.dom`: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.dom/
The pitch seems to be: bring your Android app's Kotlin business logic and build the missing Web UI using the same language or Jetpack Compose (https://www.jetbrains.com/lp/compose-multiplatform/).
I just moved instances but I'm still looking for work!
I need a job. I'm willing to relocate anywhere trans-friendly, or work remotely (but my current home internet is not reliable).
I understand several programming languages, and can use #Java and #Kotlin fluently. I also dabble in HTML and CSS, but my JavaScript skills are lacking.
I'm right at home in any Jetbrains IDE + #Git environment, but I can also make do with other editors. Other source control may not be so easy for me to learn.
My GitHub and personal website are linked in my bio. I contribute to open source projects regularly.
My highest formal education is a GED.
I've worked professionally in the past as a video game tester, a grocery bagger, a home mover, and a car lot attendant.
Please email me at halotroop2288@proton.me with any serious offers.
Thank you.
I was playing with function composition in #kotlin. Ended up using extension functions instead for more readable code and better flow.
I got some useful hints on #kotlin slack https://app.slack.com/client/T09229ZC6/C5UPMM0A0/thread/C5UPMM0A0-1690281738.955939
Sealed wrapper classes in combination with Arrow's `withError()` DSL.
Since union types are unavailable in #kotlin, how do people compose functions that return errors from separate hierarchies?
i.e.
fun one(): Either<MyErrorType, Something>
then
fun two() : Either<MyOtherErrorType, Something>
I'd like to avoid MyErrorType and MyOtherErrorType being in the same error type hierarchy, so I probably need to map/wrap them to something common. Are there any known patterns to do that?
maplibre-rs, https://github.com/maplibre/maplibre-rs.
maplibre-rs is a portable and performant vector maps renderer, which aims to support Web, mobile and desktop applications. It is written in Rust, and uses WebGPU.
An academic paper has been published, https://isprs-archives.copernicus.org/articles/XLVIII-4-W1-2022/35/2022/ _maplibre-rs: toward portable map renderers_.
It targets the Web via WebAssembly, and other platforms via FFI. Rust is used as a Lingua-franka on all platforms.
Thanks @GoogleDevExpert @GoogleDevEurope #officialGDE for the token of appreciation 😊. Loving the program, and it's a great way to meet more #kotlin lovers from all horizons.
I really like having generics in languages, but I always struggle to understand the wfinder details of it. Like how the types flow and compose in TypeScript, how star projections work in Java or the in/out stuff in Kotlin.
Designing UI in a #Kotlin app feels awful after using #SwiftUI for so long. Why is making android apps so… painful? And not fun.
Who’s designed this file structure honestly. Why are my UI xml files (just the fact I have to say those words is horrifying) so far from my code files? AHHHHHHH (and why are so many typed for code and UI done by codegen so there’s no fancy jump to xml file feature?)
New Mastodon account, new #introduction.
Hi Fediverse, I'm Anthony, a Software Engineer and a recently naturalized British citizen (originally from Brazil) currently living in London. 🇧🇷🇬🇧
Aside from #tech related subjects close to my heart (JVM languages like #java, #kotlin, #scala, as well as more general topics like #agile, #foss and #extremeProgramming), my interests include #astronomy, #immigration, #retrogames, #scifi and #travel.
I'm proudly 'owned' by a tuxedo cat named Sean Bean.
Wow! Refactoring with JetBrains AI Assistant
Discussions: https://discu.eu/q/https://youtu.be/t5WVfbSs_dw
#Kotlin 1.9.0 released with new k2 compiler in beta
https://blog.jetbrains.com/kotlin/2023/07/kotlin-1-9-0-released/