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
230
0
Share
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
120
Docker Hands-on
yubessy
0
120
Resource Polymorphism
yubessy
0
310
不動点コンビネータ?
yubessy
0
310
とりあえず機械学習したかった
yubessy
0
350
Type Erasure と Reflection のはなし
yubessy
1
480
量子暗号
yubessy
0
240
5分ちょいでわかった気になるラムダアーキテクチャ
yubessy
0
2.3k
Other Decks in Programming
See All in Programming
forteeの改修から振り返るPHPerKaigi 2026
muno92
PRO
3
290
HTML-Aware ERB: The Path to Reactive Rendering @ RubyKaigi 2026, Hakodate, Japan
marcoroth
0
140
Kubernetes上でAgentを動かすための最新動向と押さえるべき概念まとめ
sotamaki0421
3
500
Kingdom of the Machine
yui_knk
2
330
AWS re:Invent 2025の少し振り返り + DevOps AgentとBacklogを連携させてみた
satoshi256kbyte
3
160
AIベース静的検査器の偽陽性率を抑える工夫3選
orgachem
PRO
3
310
「Linuxサーバー構築標準教科書」を読んでみた #ツナギメオフライン.7
akase244
0
1.4k
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
2
180
Making the RBS Parser Faster
soutaro
0
380
AWSコミュニティ活動は顧客のクラウド推進に効くのか / Do AWS community activities help customers adopt the cloud?
seike460
PRO
0
140
おれのAgentic Coding 2026/03
tsukasagr
1
150
Coding as Prompting Since 2025
ragingwind
0
830
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Producing Creativity
orderedlist
PRO
348
40k
Prompt Engineering for Job Search
mfonobong
0
270
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
400
Why Our Code Smells
bkeepers
PRO
340
58k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
260
Context Engineering - Making Every Token Count
addyosmani
9
830
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
100
WCS-LA-2024
lcolladotor
0
540
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.5k
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