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
静的型付けプログラミング言語Shiika
Search
yhara
October 09, 2020
Programming
0
18k
静的型付けプログラミング言語Shiika
https://opt.connpass.com/event/188521/
yhara
October 09, 2020
Tweet
Share
More Decks by yhara
See All by yhara
それは残像だ
yhara
4
4.2k
スモートーク
yhara
0
2.8k
Ovto: Frontend web framework for Rubyists
yhara
0
7.1k
Ruby, Opal and WebAssembly
yhara
2
2.4k
Competitive Programming in Ruby (101)
yhara
0
670
Rubyで競技プログラミング(入門編)
yhara
0
1.8k
良いデバッグログはプロジェクトの資産である
yhara
54
18k
Let's make a functional language!
yhara
0
6.3k
Recent Updates (近況報告)
yhara
0
590
Other Decks in Programming
See All in Programming
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
160
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
310
Sidekiqで実現する 長時間非同期処理の中断と再開 / Pausing and Resuming Long-Running Asynchronous Jobs with Sidekiq
hypermkt
6
3k
C#/.NETのこれまでのふりかえり
tomokusaba
1
180
OpenTelemetryでRailsのパフォーマンス分析を始めてみよう(KoR2024)
ymtdzzz
5
1.9k
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
490
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
160
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
0
180
Jakarta Concurrencyによる並行処理プログラミングの始め方 (JJUG CCC 2024 Fall)
tnagao7
1
270
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
4
480
イベント駆動で成長して委員会
happymana
1
250
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
230
Featured
See All Featured
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
Speed Design
sergeychernyshev
24
580
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Automating Front-end Workflow
addyosmani
1366
200k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
The Language of Interfaces
destraynor
154
24k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
32
1.8k
How to Ace a Technical Interview
jacobian
276
23k
Designing on Purpose - Digital PM Summit 2013
jponch
115
6.9k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Making Projects Easy
brettharned
115
5.9k
Transcript
੩తܕ͚ϓϩάϥϛ ϯάݴޠShiika 2020-10-09 ࣗ࡞ϓϩάϥϛϯάݴޠͷू͍ @yhara (Yutaka HARA)
@yhara • ౡࠜݝࡏॅ • ωοτϫʔΫԠ༻௨৴ݚڀॴ • झຯɿݴޠॲཧܥͷ։ൃ • BiwaScheme (R7RS
Scheme in JS) • ॻ੶ʰRubyͰͭ͘Δحົͳϓϩάϥϛϯάݴޠʱ ࠷ۙͷڵຯɿΫϥϑτ Ϗʔϧࣗ࡞ΩʔϘʔ υ0DVMVT2VFTU $MBTI3PZBMF4PVM PG&EFO$PPLJF $MJDLFS
• Brainf*ckͳͲͷ͍ΘΏΔesolangΛͭ͘Δຊ • খ͞ͳϓϩάϥϛϯάݴޠͰॲཧܥ࣮Λֶ Ϳ • RubyΒͳͯ͘OK
Shiika • github: yhara/shiika • Ruby෩ͷจ๏ʴ੩తܕ͚ݴޠ • 2017ʙ • ࣮ɿRust
+ LLVM
ඪ • ࣮༻ݴޠΛࢦ͢ • ΧόʔൣғRubyͱ͍͍ͩͨಉ͡ 4IJJLB 3VCZ 8FCΞϓϦ ˕ ˕
εΫϦϓςΟϯά ˓ ˕ ήʔϜ ˕ ˓ ܭࢉ ˓ ˚ ϫϯϥΠφɺίʔυΰϧϑ ˓
σϞ • examples/ray.sk
ಈػ • Ruby͕͖͚ͩͲ੩తܕཉ͍͠ • έΞϨεϛεΛ࣮ߦલʹڭ͑ͯ΄͍͠ • ܕ͕ॻ͍ͯ͋Δͱಡղʹཱͭ • ܕ͔Βઃܭ͢Δָ͠Έ •
Rubyͷʮॻ͖ຯʯΛ࣋ͬͨ੩తܕݴޠΛ࡞Εͳ͍͔
ʮॻ͖ຯʯͱʁʁ • ͍ͪ͜͝ • ;Θͬͱ͍ͯ͠Δ…
Rubyͷॻ͖ຯΛߏ͢Δͷ • ʮεΫϦϓτݴޠʯͰ͋Δ͜ͱ • ͘ॻ͚Δ • ֤छsyntax sugarɾ๛ͳΈࠐΈϝιου • ָ͞ʼੑೳ
• Fixnum͔ΒBignumͷࣗಈঢ֨ • େΫϥεओٛ(Hashͷॱং͕อ࣋͞ΕΔ)
Rubyͷॻ͖ຯΛߏ͢Δͷ • ౷Ұײ • શ͕ͯΦϒδΣΫτͰ͋Δ (1.timesͱ͔) • ifcase-whenΛͭ
ݴޠઃܭͷτϨʔυΦϑ • ੑೳ vs ָ͞ • eg. Bignum • ಡΈ͢͞
vs ॻ͖͢͞ • eg. syntax sugar
ݴޠઃܭ
จ๏ • جຊRubyͱಉ͡ • ྫɿϝιουݺͼग़͠ͷׅހলུՄ • EnumͳͲɺRubyʹͳ͍ͷ༷Λݕ౼
ܕγεςϜ • ͋·Γ͍͠ͷೖΕͨ͘ͳ͍(͕ಡΊͳ ͘ͳΔͷͰ) • ͱ͍͑δΣωϦΫε(parametricଟ૬)͘Β͍ ཁΔ • ͳ͍ͱArray<T>Hash<S,T>࡞Εͳ͍…
ΫϥεͱϝλΫϥε "abc" "abc".class #=> String String #=> String String.name #=>
"String" String.class #=> Meta:String Array<Int> #=> Array<Int> Array<Int>.name #=> "Array<Int>" Array<Int>.new #=> [] Array<Int>.class #=> Meta:Array<Int>
ͳͥClassͰͳ͍ͷ͔ • Rubyͩͱ StringArrayClassΫϥε • ͔͠͠String.newͱArray.new(વͳ͕Β)γ άωνϟ͕ҧ͏ • => Class.newͷγάωνϟ͕ҰҙͰͳ͍
• => ͦΕͧΕҧ͏Λͭ͜ͱʹͨ͠
༨ஊɿΫϥεͱܕͷؔ • Ϋϥε != ܕ • ྫɿfoo(x: Float) • xFloatͷଞʹIntͰΑ͍
• ܕʹͷू߹(ͲͷΑ͏ͳΫϥεͷΠϯελϯ εΛڐ͔͢) ͜͜ΫϥεͰͳ͘ɺ ܕΛॻ͘ཝ
ޓੑʹ͍ͭͯ • Rubyͱͷޓੑॏࢹ͠ͳ͍ɻྫɿ • Ruby: "foo".start_with?("f") • Rust: "foo".starts_with("f") •
startsʹ߹Θ͍ͤͨ
ࠓޙͷల
ೖΕ͍ͨͷ • Enum (Option͕΄͍͠) • ύλʔϯϚον
ݕ౼தͷͷ • RubyͷModuleతͳͷ • ྫ֎ʁ • async/await
ೖΕͳ͍ͷ • Ϣʔβఆٛԋࢉࢠ • ߏจϚΫϩ • ಡղ͕େมͳͷͰ • Rubyͷdefine_methodͷΑ͏ʹɺओͳ༻్ΛΧόʔ͢Δͷ(Ṗ)ΛΘ ΓʹೖΕ͍ͨ
• ηϧϑϗετ͠ͳ͍ • σόοά͕େม • ظతʹੑೳ͕ॏཁʹͳΔ
Δ͜ͱແݶʹ͋Δ • ... • ׂίϯύΠϧ • ඪ४ϥΠϒϥϦ • ύοέʔδγεςϜ •
...
ҰॹʹΓ·͠ΐ͏ʂʂ • ݴޠॲཧܥSlack • https://prog-lang-sys-ja-slack.github.io/ wiki/ • νϟϯωϧ #shiika •
https://github.com/yhara/shiika