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
yubessy
January 29, 2018
Programming
0
210
Scala Native
社内勉強会用資料です
yubessy
January 29, 2018
Tweet
Share
More Decks by yubessy
See All by yubessy
DDIA (Designing Data-Intensive Applications) はいいぞ
yubessy
0
1.3k
Introduction to CircleCI
yubessy
1
100
Docker Hands-on
yubessy
0
93
Resource Polymorphism
yubessy
0
270
不動点コンビネータ?
yubessy
0
260
とりあえず機械学習したかった
yubessy
0
320
Type Erasure と Reflection のはなし
yubessy
1
420
量子暗号
yubessy
0
200
5分ちょいでわかった気になるラムダアーキテクチャ
yubessy
0
2.1k
Other Decks in Programming
See All in Programming
Security_for_introducing_eBPF
kentatada
0
110
数十万行のプロジェクトを Scala 2から3に完全移行した
xuwei_k
0
310
Go の GC の不得意な部分を克服したい
taiyow
3
800
fs2-io を試してたらバグを見つけて直した話
chencmd
0
240
선언형 UI에서의 상태관리
l2hyunwoo
0
180
GitHubで育つ コラボレーション文化 : ニフティでのインナーソース挑戦事例 - 2024-12-16 GitHub Universe 2024 Recap in ZOZO
niftycorp
PRO
0
100
開発者とQAの越境で自動テストが増える開発プロセスを実現する
92thunder
1
200
Semantic Kernelのネイティブプラグインで知識拡張をしてみる
tomokusaba
0
180
Effective Signals in Angular 19+: Rules and Helpers @ngbe2024
manfredsteyer
PRO
0
140
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
8
4.1k
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
610
KMP와 kotlinx.rpc로 서버와 클라이언트 동기화
kwakeuijin
0
170
Featured
See All Featured
A better future with KSS
kneath
238
17k
Facilitating Awesome Meetings
lara
50
6.1k
Code Reviewing Like a Champion
maltzj
521
39k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.3k
The Pragmatic Product Professional
lauravandoore
32
6.3k
The Invisible Side of Design
smashingmag
298
50k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
The Language of Interfaces
destraynor
154
24k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Making the Leap to Tech Lead
cromwellryan
133
9k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.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