Kotlin is a programming language made by JetBrains (the same company behind IDEs such as IntelliJ). I see it as โmodern Javaโ because it significantly reduces boilerplate code and introduces patterns for writing more functional code.
Starting a new Project
Even though Iโm not a big fan of Gradle (๐ I Donโt Like Gradle), itโs still the build system I use for Kotlin.
Starting a new project can be done using
gradle init --type kotlin-application --dsl kotlin
Reading Resource Files
val fileContent = this::class.java.getResource("/html/file.html").readText()
Donโt forget to add /
before the resource location! For example, if the file is resources/repositories.yaml
then the resource URL is /repositories.yaml
.
Charts
Kotlin has a system similar to Jupyter Notebooks, which is called Kotlin Notebooks. Charts can be rendered using Kotlinโs Plotting Library Kandy.
Other plotting libraries:
- AAY-chart: Kotlin Multiplatform, but itโs unclear how this is supposed to be used exactly.
- plotly.kt: Medium article about the tool