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.1k
Introduction to CircleCI
yubessy
1
98
Docker Hands-on
yubessy
0
87
Resource Polymorphism
yubessy
0
240
不動点コンビネータ?
yubessy
0
230
とりあえず機械学習したかった
yubessy
0
320
Type Erasure と Reflection のはなし
yubessy
1
390
量子暗号
yubessy
0
190
5分ちょいでわかった気になるラムダアーキテクチャ
yubessy
0
2k
Other Decks in Programming
See All in Programming
二郎系ラーメンのコールで学ぶ AST 解析
memory1994
PRO
7
1.7k
オブジェクト指向のリ・オリエンテーション~歴史を振り返り、AI時代に向きなおる~
hanyudaeiiti
10
5.6k
try! Swift Tokyo 初参加報告LT
hinakko2
0
190
App Router への移行は「改善」となり得るのか?/ Can migration to App Router be an improvement
takefumiyoshii
8
2.1k
pixivアプリでマルチモジュールを実現するまで
gatosyocora
1
130
Build with AI 2024 Seoul - 제로부터 시작하는 Flutter with Gemini 생활 - 박제창
itsmedreamwalker
0
200
エンターテイメント業界で利用されるAWS
demuyan
0
200
Micro Frontends for Java Microservices - Devnexus 2024
mraible
PRO
0
420
ONE WEDGE_company_guide
1wedge_one
0
380
ADRを一年運用してみた/adr_after_a_year
hanhan1978
7
2.2k
StoreKit2によるiOSのアプリ内課金のリニューアル
kangnux
0
100
CA.swift19 恋するAIアプリ開発の裏側
oskmr
0
340
Featured
See All Featured
Pencils Down: Stop Designing & Start Developing
hursman
117
11k
Building an army of robots
kneath
300
41k
Learning to Love Humans: Emotional Interface Design
aarron
266
39k
The MySQL Ecosystem @ GitHub 2015
samlambert
242
12k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
76
41k
Principles of Awesome APIs and How to Build Them.
keavy
120
16k
The Language of Interfaces
destraynor
151
23k
Making the Leap to Tech Lead
cromwellryan
123
8.5k
The Invisible Side of Design
smashingmag
294
49k
No one is an island. Learnings from fostering a developers community.
thoeni
14
2.1k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
How GitHub (no longer) Works
holman
304
140k
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