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.3k
Introduction to CircleCI
yubessy
1
100
Docker Hands-on
yubessy
0
95
Resource Polymorphism
yubessy
0
270
不動点コンビネータ?
yubessy
0
260
とりあえず機械学習したかった
yubessy
0
320
Type Erasure と Reflection のはなし
yubessy
1
430
量子暗号
yubessy
0
210
5分ちょいでわかった気になるラムダアーキテクチャ
yubessy
0
2.2k
Other Decks in Programming
See All in Programming
Kanzawa.rbのLT大会を支える技術の裏側を変更する Ruby on Rails + Litestream 編
muryoimpl
0
220
第3回 Snowflake 中部ユーザ会- dbt × Snowflake ハンズオン
hoto17296
4
360
Honoとフロントエンドの 型安全性について
yodaka
4
250
Amazon Q Developer Proで効率化するAPI開発入門
seike460
PRO
0
110
お前もAI鬼にならないか?👹Bolt & Cursor & Supabase & Vercelで人間をやめるぞ、ジョジョー!👺
taishiyade
5
3.8k
AWS Organizations で実現する、 マルチ AWS アカウントのルートユーザー管理からの脱却
atpons
0
130
ARA Ansible for the teams
kksat
0
150
JavaScriptツール群「UnJS」を5分で一気に駆け巡る!
k1tikurisu
10
1.8k
さいきょうのレイヤードアーキテクチャについて考えてみた
yahiru
3
730
Spring gRPC について / About Spring gRPC
mackey0225
0
220
2024年のWebフロントエンドのふりかえりと2025年
sakito
1
230
パスキーのすべて ── 導入・UX設計・実装の紹介 / 20250213 パスキー開発者の集い
kuralab
3
670
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
298
20k
We Have a Design System, Now What?
morganepeng
51
7.4k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
630
Adopting Sorbet at Scale
ufuk
74
9.2k
How to Ace a Technical Interview
jacobian
276
23k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
GraphQLの誤解/rethinking-graphql
sonatard
68
10k
Building Your Own Lightsaber
phodgson
104
6.2k
It's Worth the Effort
3n
184
28k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.4k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
12
950
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