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.2k
Introduction to CircleCI
yubessy
1
100
Docker Hands-on
yubessy
0
93
Resource Polymorphism
yubessy
0
270
不動点コンビネータ?
yubessy
0
250
とりあえず機械学習したかった
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
3rd party scriptでもReactを使いたい! Preact + Reactのハイブリッド開発
righttouch
PRO
1
610
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
630
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
Ethereum_.pdf
nekomatu
0
470
Jakarta EE meets AI
ivargrimstad
0
710
Remix on Hono on Cloudflare Workers
yusukebe
1
300
Jakarta EE meets AI
ivargrimstad
0
260
Figma Dev Modeで変わる!Flutterの開発体験
watanave
0
150
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
最新TCAキャッチアップ
0si43
0
200
Macとオーディオ再生 2024/11/02
yusukeito
0
380
CSC509 Lecture 13
javiergs
PRO
0
110
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
How STYLIGHT went responsive
nonsquared
95
5.2k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
The Language of Interfaces
destraynor
154
24k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Adopting Sorbet at Scale
ufuk
73
9.1k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Agile that works and the tools we love
rasmusluckow
327
21k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
What's in a price? How to price your products and services
michaelherold
243
12k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
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