Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
KScript
Search
oshai
January 13, 2020
Technology
21
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
KScript
oshai
January 13, 2020
More Decks by oshai
See All by oshai
Maintaining an Open Source The Good, Bad & Ugly
oshai
0
37
Klean Code with Kotlin
oshai
0
77
JVM languages shootout - Java, Scala & *Kotlin*
oshai
0
64
Koroutinify ; Lessons learned from applying Coroutines in Kotlin Backend ; Deep dive into Coroutines
oshai
1
130
Klean that Code, Boil those Boilerplates
oshai
2
96
Scala vs. Kotlin; Friend or Foe?
oshai
0
170
No forks, One star. Now what?! — How I published my Kotlin Open-Source lib
oshai
0
81
Scala--pack your Future[T]; Kotlin is coming! (Kotlin TLV)
oshai
0
210
X tips [X==9] for building a Bulletproof Deployment Pipeline with Jenkins
oshai
0
61
Other Decks in Technology
See All in Technology
Claude Code本って、 読む必要あるの?
oikon48
2
390
作り直せるコードは迅速に 作り直せないDBは慎重に - AI時代のプロダクトエンジニアが「判断の不可逆性」で開発速度を変える話
kinosuke01
0
310
作品が生態系になった ─ Mini Tokyo 3D から世界へ
nagix
0
150
2026-09-09 【sigma_ucj#1】Sigma を IaC 管理したい! / IaC for Sigma
civitaspo
0
110
2026-09-11 【Snowflake World Tour Tokyo 2026】Snowflakeを起点に、AI Agentが自律稼働し続ける未来へ / Driving AI Agents with Snowflake
civitaspo
0
310
AIネイティブプロダクトで顧客価値を最大化するプロダクトエンジニアとFDEの協働
righttouch
PRO
0
230
enechainの内製セルフサービスプラットフォーム
hiyosi
0
160
Microsoft 365 Copilot chat -tekoälypalvelun tietosuojaongelmat
hponka
0
660
Claude in Chrome 入門 / Introduction to Claude in Chrome
cielo1985
0
190
Amazon Quick on DesktopがIAM Identity Centerで動かない理由
yukiogawa
0
160
HRC_Frontend_Conference_Fukuoka_2026.pdf
ts020
0
460
幾何アルゴリズムで なめらかなピン操作を / iOSDC Japan 2026 / smoothpin
kazumanagano
0
260
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
408
67k
4 Signs Your Business is Dying
shpigford
187
23k
Statistics for Hackers
jakevdp
799
230k
Marketing to machines
jonoalderson
1
5.8k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
510
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
980
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
840
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
280
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
440
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Google's AI Overviews - The New Search
badams
0
1.6k
Believing is Seeing
oripsolob
1
210
Transcript
KScript @OhadShai
My Name is Ohad
And I write scripts in...
Bash
Perl
And you?
Kotlin
fun main() { println("Hello World!") } ››› kotlinc Hello.kt -include-runtime
-d hello.jar ››› java -jar hello.jar Hello World!
println("Hello World!") ››› kotlinc -script helloKotlinScript.kts Hello World!
println(args.joinToString(" ")) ››› kotlinc -script helloKotlinScript.kts Hello World! Hello World!
import java.io.File fun explore(current: File) { println(current.path) if (current.isDirectory) {
current.listFiles().forEach { explore(it) } } } explore(File("../scripts")) ››› kotlinc -script FileExplorer.kts ../scripts ../scripts/requirements.txt ../scripts/pgdump_parser.py ../scripts/pgdump_diff.py ../scripts/update_schema.py ../scripts/.gitignore ../scripts/utils.py ../scripts/README.md
KScript
println("Hello World!") ››› kscript hello.kts Hello World!
println("Hello World!") ››› time kscript hello.kts Hello World! kscript hello.kts
7.33s user 0.78s system 224% cpu 3.608 total ››› time kscript hello.kts Hello World! kscript hello.kts 0.49s user 0.18s system 120% cpu 0.555 total
#!/usr/bin/env kscript println("Hello World!") ››› ./hello.kts zsh: permission denied: ./hello.kts
››› chmod u+x ./hello.kts ››› ./hello.kts Hello World!
Input modes Script > kscript script-file.kts URL > kscript https://git.io/v1cG6
Inline* > kscript 'println("Hi")' REPL > kscript -i test Text Processing > cat some_file | kscript -t 'lines .filter { "^de0[-0]*".toRegex().matches(it) } .map { it + "foo:" } .print() '
kscript Open source created by Holger Brandl for Type Safe
scripts
Major Features Dependencies & Imports @file:MavenRepository("jcenter","http://jcenter.bintray.com" ) @file:DependsOnMaven("net.postgis:postgis-jdbc:2.3.0") @file:DependsOnMaven("com.github.ajalt:clikt:2.3.0")
Major Features Packaging into self executing jar (using Capsule) ›››
kscript --package hello.kts [kscript] Packaging script 'hello' into standalone executable... [kscript] Finished packaging into 'hello'
IDEA bootstrap ➜ ~ kscript ——idea my-script.kts [kscript] Setting up
idea project from my-script.kts
Issues encountered • Dependency resolution did not always work on
my Mac (and errors were sometimes funky) • Auto completion in IDE is not always working as expected.
Questions?
Thanks!