Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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.2k
Ruby, Opal and WebAssembly
yhara
2
2.4k
Competitive Programming in Ruby (101)
yhara
0
680
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
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
3
840
初めてDefinitelyTypedにPRを出した話
syumai
0
480
Develop iOS apps with Neovim / vimconf_2024
uhooi
1
240
カンファレンスの「アレ」Webでなんとかしませんか? / Conference “thing” Why don't you do something about it on the Web?
dero1to
2
160
PaaSとSaaSの境目で信頼性と開発速度を両立する 〜TROCCO®︎のこれまでとこれから〜
gtnao
6
6.1k
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
1
120
DevFest Tokyo 2025 - Flutter のアプリアーキテクチャ現在地点
wasabeef
2
300
romajip: 日本の住所CSVデータを活用した英語住所変換ライブラリを作った話
sangunkang
0
2.3k
HTTP compression in PHP and Symfony apps
dunglas
2
970
Gestaltung digitaler Lösungen – Produktions- oder Designprozess?
techstories
0
120
talk-with-local-llm-with-web-streams-api
kbaba1001
0
110
eBPF Deep Dive: Architecture and Safety Mechanisms
takehaya
12
1.2k
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
Agile that works and the tools we love
rasmusluckow
328
21k
The Cost Of JavaScript in 2023
addyosmani
45
6.9k
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
Optimizing for Happiness
mojombo
376
70k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
YesSQL, Process and Tooling at Scale
rocio
169
14k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Designing Experiences People Love
moore
138
23k
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