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
240
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
130
Docker Hands-on
yubessy
0
130
Resource Polymorphism
yubessy
0
310
不動点コンビネータ?
yubessy
0
330
とりあえず機械学習したかった
yubessy
0
350
Type Erasure と Reflection のはなし
yubessy
1
490
量子暗号
yubessy
0
250
5分ちょいでわかった気になるラムダアーキテクチャ
yubessy
0
2.3k
Other Decks in Programming
See All in Programming
「つくるAI」だけではバグは見つからない ~テストに必要な「見つけるAI」を分離させる戦略~
mfunaki
0
200
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
650
Pythonの実行はどこまで賢くなったのか? CPythonとPyPyから見る最適化のしくみ
curekoshimizu
4
2.3k
AI Readyの正体はデータマネジメントだ メダリオン2.0の最前線
freee
PRO
0
430
AIに既存システムを理解させる技術 ~レガシーを見捨てないハーネスエンジニアリング入門~
ochtum
0
170
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.4k
まずはプロンプトガイドを読もう、話はそれからだ
kiakiraki
1
230
信頼性の目標を誰も求めてない
shubox
0
270
ALB ログから Trace を気合で繋げる技術
fohte
7
770
Introducing Stack Pull Request in GitHub
kkamegawa
0
110
リアルな遅延を測る仕様
kota_yata
1
130
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
560
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1369
210k
Designing Powerful Visuals for Engaging Learning
tmiket
1
510
Mind Mapping
helmedeiros
PRO
1
340
30 Presentation Tips
portentint
PRO
1
380
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
210
AI: The stuff that nobody shows you
jnunemaker
PRO
9
950
Code Review Best Practice
trishagee
74
20k
Evolving SEO for Evolving Search Engines
ryanjones
0
270
Paper Plane
katiecoart
PRO
2
53k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.9k
WENDY [Excerpt]
tessaabrams
12
39k
Speed Design
sergeychernyshev
33
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