Nino
12/16/2024, 12:32 PMkotlin
CLI is already dead ? Such a same it seemed such a beautiful and powerful replacement for bash files 😞
• Then I tried Kotlin Notebook but they never mentionned that it needed Intellij Ultimate. I lost half a day trying to download the plugin until I understood. Greedy fuckers 😞
• Then I tried ki shell
but I don't quite understand what is it for. Looks like Kotlin Playground locally, which doesn't fit my need.
• Then I'm trying to use kotlinc -script
but there's no documentation (https://kotlinlang.org/docs/command-line.html#run-scripts), or I don't understand the relation between the overly complex documentation linked there (https://kotlinlang.org/docs/custom-script-deps-tutorial.html) and a simple CLI-invoked script in Kotlin.
Please guide me in this maze I'm already on the verge to going back to bash scripting. What tool would you use to produce the specified script ?Piotr Krzemiński
12/16/2024, 12:37 PMmy-script.main.kts
, make it executable, and put there e.g.:
#!/usr/bin/env kotlin
println("Hello from Kotlin scripting!")
Piotr Krzemiński
12/16/2024, 12:38 PMkotlin
CLi is dead?Nino
12/16/2024, 12:41 PMkotlin my-file.main.kts
like in the article. It says "kotlin is not found" in my console.
I'm sorry even if it's not my first rodeo, I'm so lost there's nothing "official" to read about and every bit of documentation about kotlin scripting is so confusing, everything is deprecated / not working anymore.Vampire
12/16/2024, 12:42 PMPiotr Krzemiński
12/16/2024, 12:43 PMNino
12/16/2024, 12:43 PMPiotr Krzemiński
12/16/2024, 12:44 PMNino
12/16/2024, 12:44 PMNino
12/16/2024, 12:44 PMVampire
12/16/2024, 12:45 PMNino
12/16/2024, 12:45 PMNino
12/16/2024, 12:46 PMMeanwhile, we are improving the Kotlin Notebook plugin for IntelliJ IDEA
Nino
12/16/2024, 12:46 PMNino
12/16/2024, 12:47 PMhttps://plugins.jetbrains.com/plugin/16340-kotlin-notebookWho still uses a website to download plugins ? I was trying to download it from the "plugins manager" in Android Studio as everyone does
Vampire
12/16/2024, 12:47 PMPiotr Krzemiński
12/16/2024, 12:49 PMNino
12/16/2024, 12:49 PMNino
12/16/2024, 12:49 PMPiotr Krzemiński
12/16/2024, 12:50 PMNino
12/16/2024, 12:50 PMNino
12/16/2024, 12:50 PMVampire
12/16/2024, 12:51 PMVampire
12/16/2024, 12:51 PMPiotr Krzemiński
12/16/2024, 12:51 PMPiotr Krzemiński
12/16/2024, 12:52 PMNino
12/16/2024, 12:52 PMIf it's not there it is obviously not compatible with your versionYeah I figured it out after half a day, even if I worked for 10 years on Android Studio
Vampire
12/16/2024, 12:53 PMNino
12/16/2024, 12:54 PMNino
12/16/2024, 12:55 PMAnd it is their fault that you need half a day to open a website? o_OI didn't even know there would be a WEBSITE for plugins lol We have a working plugin manager in the software Is the year 2004 ?
Vampire
12/16/2024, 12:55 PMNino
12/16/2024, 12:55 PMVampire
12/16/2024, 12:56 PMVampire
12/16/2024, 12:57 PMVampire
12/16/2024, 12:58 PMNino
12/16/2024, 1:02 PMYou just assumed that.Like the other android dev I asked around me lol Every single other plugin I used / downloaded / heard of was working with Android Studio. So, if I read "this plugin is working with Intellij Idea", and I can't make it work, the fault is cleary in the missleading docs / blogpost. IF there would be a mention of "Intellij Idea ULTIMATE / PAY ONLY / PREMIUM" or whatever, yeah, that would be my bad. But defending "hey try this super awesome plugin on Intellij Idea" is deafening. The documentation should be 100% clear and not commercially / politically influenced. That's what I like about Kotlin instead of Java. Clear, simple, on the point. The scripting part is CLEARLY not. I guess that's why it's failing so hard, and that's a bummer because I liked the
./kotlin script.kts
idea a lot.Vampire
12/16/2024, 1:07 PMLike the other android dev I asked around me lolThey assume it is based on IntelliJ IDEA? That is fine and correct, but still does not mean that plugins working for one work for the other. If they assume that a free product is based on a paid product in that scale, that would be a bit naive. 🤷♂️
The scripting part is CLEARLY not.... from your point of view For me the scripting is quite clear and working just fine, I used it often already. If you would learn how to properly behave in an open community of users and just asked for help instead of starting your post with swearing inappropriately, you would probably already have a working setup.
Nino
12/16/2024, 1:15 PMkotlin
or kotlinc
work, my script would not be working anymore in Kotlin 2.4 (source `CLI REPL (via kotlinc
) will continue to function at least until the release of Kotlin 2.3, but its operation will be limited to compatibility mode, i.e. with the -language-version 1.9
option set (and may require an opt-in flag starting from release 2.2).` https://blog.jetbrains.com/kotlin/2024/11/state-of-kotlin-scripting-2024/)Vampire
12/16/2024, 1:17 PMVampire
12/16/2024, 1:17 PM.main.kts
scripts will stay and be further maintained and improvedVampire
12/16/2024, 1:18 PMVampire
12/16/2024, 1:19 PMVampire
12/16/2024, 1:19 PMNino
12/16/2024, 1:26 PMVampire
12/16/2024, 1:37 PMI can't call people greedyCalling them "greedy" would still be non-sense, but acceptable. Calling them "greedy fuckers" is not acceptable. JetBrains provides many things for free like IntelliJ IDEA Community Edition and thus Android Studio, Kotlin, .... A greedy company would not do that.
when their actions clearly are motivated by software sellingThey are a software company, what do you expect? That they provide every product for free?
instead of documentation in a clearly developer-targeted blogpost and even on the documentation itself ???For me it is clearly documented. Documentation could be improved as always. But there is nothing misleading in what they wrote, it just might not be clear enough for every reader and no documentation will ever be.
How is it violating any kind of code of conduct ?You do not see how calling them "greedy fuckers" might be against the CoC? Really? o_O
They violated the "implicit" kind of conduct where documentation is 100% true and fullDocumentation is never 100% true. The moment you write documentation it is almost already outdated and not 100% true. There is no such "kind of conduct".
Since they are removing scripting CLI capabitiliesThey do not, as said multiple times, scripting on the CLI is there and will stay, they even committed to it in the blog post you mentioned as said before. Again, REPL has nothing to do with scripting. REPL is an interactive shell where you enter something and get the result, much like the Kotlin Notebooks. Scripting is you write a script to a file and then can execute that file and that continues to work and will also be maintained further as already mentioned multiple times. As you more want scripting than a REPL from what you said, the plugin you are upset about is anyway not what you are after as it is more REPL / playground like, not scripting.
and "hidding scripting support" behind a paywall,I don't see how scripting is in any way behind any paywall. A plugin to add interactive Kotlin-playing as functionality into the IDE requires a paid version of that IDE. But that has nothing to do with Scripting at all.