Masthash

#Kotlin

Dmitry Kandalov
3 hours ago

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}")

Java Weekly
5 hours ago

Balancing Momentum and Complexity in TDD - Writing a Kotlin JSON Parser Take 2 Part 2

https://youtu.be/2oktW82qYAE

Discussions: https://discu.eu/q/https://youtu.be/2oktW82qYAE

#kotlin #programming

Erik C. Thauvin
11 hours ago
Java Weekly
17 hours ago

Functional Error Handling in Kotlin with the Raise DSL

https://youtu.be/pOtET_i1v-w

Discussions: https://discu.eu/q/https://youtu.be/pOtET_i1v-w

#kotlin #programming

koje71 🙂
1 day ago

Hab alles wieder umgestrickt, es war vorher zu dunkel und düster 🧶

#Kotlin #AndroidDev #IndieGameDev

Video der Android Entwicklungsumgebung mit einem Emulator, auf dem ein unfertiges Spiel läuft
Java Weekly
1 day ago

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/

#kotlin #programming

Erik C. Thauvin
1 day ago
Armoured Wizard
2 days ago

The problem with being self-taught is that I don't know what I don't know.
It's difficult to find out what I should be learning.
I keep running into issues, and thinking "I don't even know what questions to ask to resolve this"
#kotlin #android #code

Alex Nedelcu
2 days ago

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):

https://github.com/lampepfl/gears/issues/19

#Scala #Kotlin #Java

Erik C. Thauvin
2 days ago

UrlEncoder for Kotlin Multiplatform (via Erik's Weblog)

First multiplatform version of the UrlEncoder for Kotlin library.

#java #kotlin

https://erik.thauvin.net/blog/posts/9490/urlencoder-for-kotlin-multiplatform?utm_medium=erik.in&utm_source=mastodon

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

Steffo 🐲
2 days ago

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.

#help?

A gif of the android emulator glitching while transitioning between start screen and app drawer.
Erik C. Thauvin
2 days ago
Der Unglaubliche Holg
3 days ago

Having fun at the September edition of the @kugberlin at the amazing SumUp Berlin offices.

#kugberlin #kotlin #community

growse ❎
3 days ago

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.

growse ❎
4 days ago

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.

Dioramic Life
4 days ago

#kotlin transpiled to #javascript. Someone explain to me when this was a problem that needed to be solved.

Angel Munoz
4 days ago

With all of Unity's shitstorm I feel the need to scratch my game dev itch and I found out about korge.org Yesterday

I'm tempted to try it out, but I also want to go with Godot + F#
Too hard to decide
😆

#gamedev #unity #kotlin #godot #fsharp #korge

Dmitry Kandalov
4 days ago

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.

Kevin Davin
4 days ago

@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😇

gregorni
4 days ago

The absolutely worst way to provide a programming language

#Kotlin #Kotlinlang #programminglanguages #programming

Screenshot of the "Getting Started" page of the Kotlin Docs. Under "Install Kotlin", it says

"Kotlin is included in each IntelliJ Idea and Android Studio release. Download and install one of these IDEs to start using Kotlin."
Larry Garfield
5 days ago

#Kotlin documentation > #CSharp documentation.

koje71 🙂
5 days ago

es kommt Bewegung ins Spiel 😀

physikalisch nicht ganz korrekt aber für den Laien kaum zu bemerken..

#Kotlin #AndroidDev #IndieGameDev #Ping

Blick auf die Android Entwicklungsumgebung. Ein kleines Raumschiff fliegt einen Kurs ab.
Dmitry Kandalov
5 days ago

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? 😅

aBe
5 days ago

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

aBe
5 days ago

KorGE, the Kotlin multiplatform game engine is back 🙂

https://blog.korge.org/korge-is-back

#gameEngine #kotlin #wasm

Tobias Roeser
5 days ago

Any idea how to achieve #Kotlin incremental compilation without IntelliJ #IDEA or #Gradle? Is it even possible from the CLI? It there some Java/Kotlin API and documentation?

I'd like to integrate it into Mill / mill-kotlin plugin.

#MillBuild

Khalid ⚡
6 days ago
Kevin Davin
6 days ago

@SusanPotter I used #VAVR a lot before switching to #Kotlin.

Inspired by Scala, every useful functional structure should be available

Harsh Shandilya
6 days ago

ktfmt v0.45 was released a couple hours ago with support for context receivers and better formatting for elvis operators!

#Kotlin #AndroidDev

https://github.com/facebook/ktfmt/releases/tag/v0.45

Java Weekly
6 days ago

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

Alex Nedelcu
6 days ago

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.

koje71 🙂
1 week ago

Es bewegt sich zwar noch nichts, aber es gibt kleine Fortschritte.

#Kotlin #AndroidDev #IndieGameDev #Ping

Sven Jacobs :androidHead:
1 week ago

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

Demo of my Reveal library running on an Android emulator and iOS simulator
Ivan Enderlin 🦀
1 week ago

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.

#matrix #client #Element #ElementX #RustLang #kotlin

Android Weekly
1 week ago

Latest Android Weekly Issue 588 is out!
https://androidweekly.net/issues/issue-588 #AndroidDev #Kotlin

Deniz Opal
1 week ago

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

Simon Vergauwen
1 week ago

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

Nils Andresen
2 weeks ago

I really love, how the new primary constructors make the c# code look like kotlin.

Now make the trailing lambda come to c#, pretty please.

#dotnet #Kotlin #csharp

Uli Kusterer
2 weeks ago

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… .

#kmm #kotlin #kotlinMultiplatformMobile

Will Iverson
2 weeks ago

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.

#unity #godot #capacitor #sveltekit #svelte #swift #kotlin

https://www.gamedeveloper.com/business/the-death-of-unity

Dmitry Kandalov
2 weeks ago

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

Hubert Klein Ikkink
2 weeks ago

New post JDriven blog: Kotlin Discovered: Pattern Matching #Kotlin https://blog.jdriven.com/2023/09/Kotlin-Discovered-Pattern-Matching/

Jeff Martin
2 weeks ago

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:

Sébastien Deleuze
2 weeks ago

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

Lickability
3 weeks ago

🤩 Basic data types in #Kotlin are so concise compared to #Swift!

What do you think — is Swift’s syntax still too verbose? 💭

Person.kt (Kotlin)

data class Person (val age: Int, val name: String)
Person.swift (Swift)

struct Person {     let name: String     let age: Int }
Hubert Klein Ikkink
3 weeks ago

New post JDriven blog: Kotlin Discovered: Variance #Kotlin https://blog.jdriven.com/2023/09/Kotlin-Discovered-Variance/

Android Weekly
3 weeks ago

Latest Android Weekly Issue 586 is out!
https://androidweekly.net/issues/issue-586 #AndroidDev #Kotlin

Alex Nedelcu
3 weeks ago

@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.

André Gasser
3 weeks ago

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

#Mastodon #Kotlin #Library

InfoQ
3 weeks ago

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

#JDK21 #JVMLanguages #FunctionalProgramming

Nicolas Fränkel
4 weeks ago

Great answer to the question "Can someone explain to me what #Coroutines are?"

https://www.reddit.com/r/Kotlin/comments/162d2lv/comment/jxwouwx/

#Kotlin

Angel Munoz
4 weeks ago

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

Jendrik Johannes
4 weeks ago

#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

Joshua Nozzi
4 weeks ago

You should absolutely hire Sean. His skills are legit and he’s an incredibly kind and fun coworker.

#mac #macos #ios #cocoa #swift #swiftlang #objc #objectivec #android #java #kotlin #python

https://mastodon.social/@seanreilly/110975092412782822

Khalid ⚡
1 month ago
Java Weekly
2 months ago
Jendrik Johannes
2 months ago

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

Jon Reid
2 months ago

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/

Angel Munoz
2 months ago

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

Jon Reid
2 months ago

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/

Jakub Zalas
2 months ago

„Functional Programming Ideas for the Curious Kotliner” by @trupill is a nice short book that summarises #fp practices in #kotlin very nicely.

https://leanpub.com/fp-ideas-kotlin

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/).

Inspecting https://kotlin-wasm-hello-world.glitch.me/ with DevTools shows that it transfers 1.4 MB of JS and Wasm to display the string "hello world".
Jon Reid
2 months ago

Based on the pre-workshop survey responses, I'm making changes to the workshop I'm starting tomorrow. Because my content is not the goal. Your success is the goal. (Testing & Refactoring Workshop for #Swift and #Kotlin developers)

Caroline Bell :verified:
2 months ago

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.

#Programmer #lookingforwork

Jakub Zalas
2 months ago

What do you think the #kotlin code in the two examples below does?

Append a single event to an event stream.
Reconstruct the state from events, execute the command, and update the resulting events to the stream.
Jakub Zalas
2 months ago

I was playing with function composition in #kotlin. Ended up using extension functions instead for more readable code and better flow.

`then` function lets to compose functions so the pipeline reads more natural
example pipeline
classic approach
Same example but using extension functions instead.
Jakub Zalas
2 months ago

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.

Jakub Zalas
2 months ago

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?

Ivan Enderlin 🦀
2 months ago

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.

#map #RustLang #WebGPU #WebAssembly #SwiftLang #kotlin

Demonstration of maplibre-rs rendering a vector map in Firefox.
Julien Lengrand-Lambert
2 months ago

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.

A google expert plaque with a lot of Kotlin stickers
The plaque placed next to my Github skyline and a pile of books.
Torb 🦋
2 months ago

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.

#programming #typescript #java #kotlin

maico
2 months ago

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?)

Anthony Accioly
2 months ago

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.

Java Weekly
3 months ago