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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
yubessy
January 29, 2018
Programming
0
220
Scala Native
社内勉強会用資料です
yubessy
January 29, 2018
Tweet
Share
More Decks by yubessy
See All by yubessy
DDIA (Designing Data-Intensive Applications) はいいぞ
yubessy
0
1.5k
Introduction to CircleCI
yubessy
1
120
Docker Hands-on
yubessy
0
110
Resource Polymorphism
yubessy
0
300
不動点コンビネータ?
yubessy
0
300
とりあえず機械学習したかった
yubessy
0
340
Type Erasure と Reflection のはなし
yubessy
1
470
量子暗号
yubessy
0
230
5分ちょいでわかった気になるラムダアーキテクチャ
yubessy
0
2.3k
Other Decks in Programming
See All in Programming
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
400
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
120
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
20
6.7k
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
590
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
680
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.5k
Kotlin Multiplatform Meetup - Compose Multiplatform 외부 의존성 아키텍처 설계부터 운영까지
wisemuji
0
190
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
160
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
440
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
600
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Are puppies a ranking factor?
jonoalderson
1
2.7k
Music & Morning Musume
bryan
47
7.1k
GitHub's CSS Performance
jonrohan
1032
470k
sira's awesome portfolio website redesign presentation
elsirapls
0
140
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
117
110k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.3k
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.9k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
430
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
89
Bash Introduction
62gerente
615
210k
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