Kotlin code can be run ad hoc using the Kotlin compiler’s -script option1!

kotlinc -script my-skript.kts