Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Scala Native
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
yubessy
January 29, 2018
Programming
230
0
Share
Scala Native
社内勉強会用資料です
yubessy
January 29, 2018
More Decks by yubessy
See All by yubessy
DDIA (Designing Data-Intensive Applications) はいいぞ
yubessy
0
1.6k
Introduction to CircleCI
yubessy
1
120
Docker Hands-on
yubessy
0
120
Resource Polymorphism
yubessy
0
310
不動点コンビネータ?
yubessy
0
310
とりあえず機械学習したかった
yubessy
0
350
Type Erasure と Reflection のはなし
yubessy
1
480
量子暗号
yubessy
0
240
5分ちょいでわかった気になるラムダアーキテクチャ
yubessy
0
2.3k
Other Decks in Programming
See All in Programming
PHPer、Cloudflare に引っ越す
suguruooki
1
150
My daily life on Ruby
a_matsuda
3
200
UaaL×Androidアプリのメモリ計測 — Memory Profilerの先へ
rio432
0
140
過去のレビュー知見をSkillsで資産化した話
pkshadeck
PRO
1
1.8k
ソースコード→AST→オペコード、の旅を覗いてみる
o0h
PRO
1
130
How We Practice Exploratory Testing in Iterative Development( #scrumniigata ) / 反復開発の中で、探索的テストをどう実施しているか
teyamagu
PRO
3
780
GoogleCloudとterraform完全に理解した
terisuke
1
190
AI時代になぜ書くのか
mutsumix
0
340
Explore CoroutineScope
tomoeng11
0
180
PHPでローカル環境用のSSL/TLS証明書を発行することはできるのか? #phpconkagawa
akase244
0
350
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
260
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
250
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Docker and Python
trallard
47
3.8k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Designing Powerful Visuals for Engaging Learning
tmiket
1
360
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.9k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
800
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
550
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
130
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
220
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
340
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
Transcript
Scala Native @yubessy 0x64 Reboot #10 " "
: : ( ) x -> o +
Scala Native Scala Scala JVM -> Java Scala Native ->
Java
LLVM (?) Scala Native Scala SBT
$ sbt new scala-native/scala-native.g8 object Main { def main(args: Array[String]):
Unit = println("Hello, world!") } $ sbt run Hello, World!
LLVM https://github.com/okapies/scala-native-example bonacci
(rec) def fib(n: Long): Long = n match { case
0 => 0 case 1 => 1 case _ => fib(n - 2) + fib(n - 1) }
(tail rec) def fibImpl(n: Long, a: Long, b: Long): Long
= n match { case 0 => a case _ => fibImpl(n - 1, b, a + b) } def fib(n: Long): Long = { fibImpl(n, 0, 1) }
(mut rec) def fib(n: Long): Long = n match {
case 0 => 0 case _ => fibS(n - 1) } def fibS(n: Long): Long = n match { case 0 => 1 case _ => fib(n - 1) + fibS(n - 1) }
(μs) rec tail rec mut rec JAR 74801223 262 67248872
Native -O0 168336051 4 164421481 Native -O2 77311107 4 34026913 Native -O0 ( ) rec, mute rec JAR . tail rec Native -O2 ( ) mute rec JAR
Scala Native LLVM