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
ElixirによるBEAM言語の作り方とUiroのご紹介
Search
Yasushi Itoh
April 19, 2016
Programming
0
1.7k
ElixirによるBEAM言語の作り方とUiroのご紹介
tokyo.ex #1でのLT資料
Yasushi Itoh
April 19, 2016
Tweet
Share
More Decks by Yasushi Itoh
See All by Yasushi Itoh
A Cross-Platform Pure Python Declarative UI Framework
i2y
1
740
Introducing the Jet Programming Language
i2y
3
1.2k
Other Decks in Programming
See All in Programming
Flutter로 Gemini와 MCP를 활용한 Agentic App 만들기 - 박제창 2025 I/O Extended Seoul
itsmedreamwalker
0
150
あのころの iPod を どうにか再生させたい
orumin
2
2.5k
CSC305 Summer Lecture 12
javiergs
PRO
0
120
コンテキストエンジニアリング Cursor編
kinopeee
1
700
Oracle Database Technology Night 92 Database Connection control FAN-AC
oracle4engineer
PRO
1
200
UbieのAIパートナーを支えるコンテキストエンジニアリング実践
syucream
2
710
LLMOpsのパフォーマンスを支える技術と現場で実践した改善
po3rin
8
980
エンジニアのための”最低限いい感じ”デザイン入門
shunshobon
0
130
「リーダーは意思決定する人」って本当?~ 学びを現場で活かす、リーダー4ヶ月目の試行錯誤 ~
marina1017
0
240
kiroでゲームを作ってみた
iriikeita
0
180
TROCCO×dbtで実現する人にもAIにもやさしいデータ基盤
nealle
0
330
Laravel Boost 超入門
fire_arlo
1
120
Featured
See All Featured
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
How to Think Like a Performance Engineer
csswizardry
25
1.8k
Navigating Team Friction
lara
189
15k
Testing 201, or: Great Expectations
jmmastey
45
7.6k
Faster Mobile Websites
deanohume
309
31k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Statistics for Hackers
jakevdp
799
220k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
480
Intergalactic Javascript Robots from Outer Space
tanoku
272
27k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.6k
KATA
mclloyd
32
14k
The Cult of Friendly URLs
andyhume
79
6.5k
Transcript
ElixirʹΑΔBEAMݴޠ ͷ࡞ΓํͱUiro(Ծ)ͷ ͝հ
ࣗݾհ i2yͱਃ͠·͢ɻ ੈؒͰෳ߹ػϝʔΧʔͱͯ͠ೝ͞Εͯ ͍ΔձࣾͷιϑτΣΞΤϯδχΞͰ͢ɻ ࣄͰɺJavaC#ɺJavaScriptΛओ ʹ͍ͬͯ·͢ɻ ElixirɺErlangͱʹॳ৺ऀϨϕϧͰ ͢^^; ࠷ۙͷझຯΦϨΦϨݴޠ࡞ΓͰ͢ɻ PythonͰ࣮ͨ͠PythonʹࣅͨMochi
ͱ͍͏ݴޠΛGitHubͰެ։͍ͯ͠·͢ɻ
τʔΫ༰ ࠷ۙ࡞ͬͨUiro(Ծ)ΛྫʹBEAMݴޠͷ࡞ΓํΛ͓͠͠·͢ɻ Uiro(Ծ)RubyΆ͍จ๏ͷBEAMݴޠͰ͢ɻ ※ ࠷ޙʹRubyΛ৮ͬͨͷ13͘Β͍લͰɺRubyʹৄ͍͠༁Ͱ ͋Γ·ͤΜɻɻ
Uiro(Ծ)ͷ࡞εςοϓ ͬ͘͟Γɺ3εςοϓ 1.۩ମతͳจ๏ΛܾΊΔ ίϯύΠϥʢτϥϯεϨʔλʣΛ࣮͢Δ 2. ιʔείʔυΛߏจղੳͯ͠தؒܗࣜ(AST)ʹม͢Δ 3. தؒܗࣜ(AST)ΛBEAMͷόΠτίʔυʹม͢Δ
۩ମతͳจ๏ΛܾΊΔ Uiro(Ծ)ΛɺRubyʹࣅͨจ๏ͱ͠·ͨ͠ɻ • Rubyʹࣅͨߏจ • ཧ༝ɿErlangͱRubyʹࣅ͍ͯΔ͕͋ΓɺErlangͷػ ೳΛRubyʹϚοϐϯά͠қ͔͔ͬͨΒ ※ ڞʹؔͱม(ଋറʣͷ໊લۭؒΛ۠ผ͢ΔLisp-2ํࣜ ※
͞ΒʹErlangͷΞτϜΛRubyͷγϯϘϧ(:hoge)ͱಉ͡ هड़ͰදݱͰ͖ͦ͏
۩ମతͳจ๏ΛܾΊΔ • ΫϥεϕʔεͷΦϒδΣΫτࢦɺμοΫλΠϐϯά • ཧ༝ɿࣗଟ͘ͷਓʹೃછΈ͕͋Δ͔Βɻ • Πϯελϯεͷঢ়ଶෆม • ཧ༝ɿΦϒδΣΫτࢦ͔ͩΒͱ͍ͬͯɺՄม͕σϑΥϧτ Ͱͳ͍͍ͯ͘ͷͰɻ
Uiro(Ծ)ίʔυ͜Μͳײ͡ # Ϋϥεఆٛʢ1ϑΝΠϧʹ1Ϋϥε͘͠1ϞδϡʔϧͰ͢ʣ class Person def initialize(name, age) {name: name,
age: age} end def name() @name end end module Test_Person def test_name() hoge_san = new Person("hoge", 60) hoge_san.name # => "hoge" end end
Uiro(Ծ)ίʔυ͜Μͳײ͡ # Ϟδϡʔϧఆٛ module Enumerable def select(func) self.reduce([]) {|item, acc|
if func.(item) acc ++ [item] else acc end } end # ҎԼɺলུ end
Uiro(Ծ)ίʔυ͜Μͳײ͡ # ϛοΫεΠϯ module uiro_list include Enumerable def reduce(acc, func)
lists::foldl(func, acc, self) end # ҎԼɺলུ end module test_list def self.test_select() [1, 2, 2, 3].select {|item| item == 2 or item == 3) .unique # => [2, 3] end end
ߏจղੳͯ͠தؒܗࣜʹ leexͱyeccͷೖྗϑΝΠϧΛsrcσΟϨΫτϦʹஔ͍͓͚ͯɺ MixͰϏϧυ࣌ʹࣗಈతʹleexͱyecc͕࣮ߦ͞Ε·͢ɻ
தؒܗࣜΛBEAMͷόΠτίʔυʹ Erlangͷerl_syntaxϞδϡʔϧͱcompileϞδϡʔϧΛ͑ ɺBEAMͷόΠτίʔυΛੜ͔ΜͨΜͰ͢ɻ
࠷ޙʹ • BEAMݴޠ࡞ΔͷΧϯλϯ • ErlangElixirͱࣅ͍ͯΔݴޠɺHTMLςϯϓϨʔτ JSONͱ͍ͬͨΧϯλϯͳݴޠͳΒಛʹɻ • Elixir͍͍͢ʂ • Mixͱͯศར
࠷ޙʹ • Uiro(Ծ)ΑΖ͓͘͠ئ͍͠·͢ʂ • ϓϧϦΫͯ͠Β͑ͨΒخ͍͠Ͱ͢ʂUiro • ϩΰ΄͍͠Ͱ͢ɾɾ(Mochiʣ • MixͱReber3༻ͷϓϥάΠϯΛ࡞༧ఆͰ͢ʂʢ࡞ͬͯΒ ͬͯخ͍͠Ͱ͢ʂʣ
• ࠷ऴతʹηϧϑϗεςΟϯά͍ͨ͠ɻ