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
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.4k
Introduction to CircleCI
yubessy
1
110
Docker Hands-on
yubessy
0
100
Resource Polymorphism
yubessy
0
290
不動点コンビネータ?
yubessy
0
290
とりあえず機械学習したかった
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
オンコール⼊⾨〜ページャーが鳴る前に、あなたが備えられること〜 / Before The Pager Rings
yktakaha4
2
1.2k
バイブコーディングの正体——AIエージェントはソフトウェア開発を変えるか?
stakaya
3
290
抽象化という思考のツール - 理解と活用 - / Abstraction-as-a-Tool-for-Thinking
shin1x1
1
890
Claude Code派?Gemini CLI派? みんなで比較LT会!_20250716
junholee
1
760
Comparing decimals in Swift Testing
417_72ki
0
140
MCPで実現できる、Webサービス利用体験について
syumai
7
2.2k
The Niche of CDK Grant オブジェクトって何者?/the-niche-of-cdk-what-isgrant-object
hassaku63
1
730
TypeScriptでDXを上げろ! Hono編
yusukebe
4
890
AIコーディングエージェント全社導入とセキュリティ対策
hikaruegashira
15
8.8k
QA x AIエコシステム段階構築作戦
osu
0
220
構文解析器入門
ydah
7
1.9k
「次に何を学べばいいか分からない」あなたへ──若手エンジニアのための学習地図
panda_program
3
680
Featured
See All Featured
Writing Fast Ruby
sferik
628
62k
Designing Experiences People Love
moore
142
24k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
720
4 Signs Your Business is Dying
shpigford
184
22k
Typedesign – Prime Four
hannesfritz
42
2.7k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
530
The Cost Of JavaScript in 2023
addyosmani
51
8.7k
Intergalactic Javascript Robots from Outer Space
tanoku
272
27k
Building an army of robots
kneath
306
45k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.6k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
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