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.4k
Introduction to CircleCI
yubessy
1
110
Docker Hands-on
yubessy
0
100
Resource Polymorphism
yubessy
0
280
不動点コンビネータ?
yubessy
0
280
とりあえず機械学習したかった
yubessy
0
330
Type Erasure と Reflection のはなし
yubessy
1
450
量子暗号
yubessy
0
220
5分ちょいでわかった気になるラムダアーキテクチャ
yubessy
0
2.2k
Other Decks in Programming
See All in Programming
git worktree × Claude Code × MCP ~生成AI時代の並列開発フロー~
hisuzuya
1
590
『自分のデータだけ見せたい!』を叶える──Laravel × Casbin で複雑権限をスッキリ解きほぐす 25 分
akitotsukahara
2
640
GitHub Copilot and GitHub Codespaces Hands-on
ymd65536
2
150
テスト駆動Kaggle
isax1015
1
420
Android 16KBページサイズ対応をはじめからていねいに
mine2424
0
120
AI Agent 時代のソフトウェア開発を支える AWS Cloud Development Kit (CDK)
konokenj
3
260
Is Xcode slowly dying out in 2025?
uetyo
1
280
オンコール⼊⾨〜ページャーが鳴る前に、あなたが備えられること〜 / Before The Pager Rings
yktakaha4
0
120
状態遷移図を書こう / Sequence Chart vs State Diagram
orgachem
PRO
1
130
イベントストーミング図からコードへの変換手順 / Procedure for Converting Event Storming Diagrams to Code
nrslib
2
860
PHP 8.4の新機能「プロパティフック」から学ぶオブジェクト指向設計とリスコフの置換原則
kentaroutakeda
2
950
Modern Angular with Signals and Signal Store:New Rules for Your Architecture @enterJS Advanced Angular Day 2025
manfredsteyer
PRO
0
230
Featured
See All Featured
The Cult of Friendly URLs
andyhume
79
6.5k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.5k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
107
19k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
970
Git: the NoSQL Database
bkeepers
PRO
430
65k
Optimizing for Happiness
mojombo
379
70k
KATA
mclloyd
30
14k
The Language of Interfaces
destraynor
158
25k
Making the Leap to Tech Lead
cromwellryan
134
9.4k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.4k
Done Done
chrislema
184
16k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.3k
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