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
Mustache Template 話 2024
Search
karupanerura
February 11, 2024
Programming
73
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Mustache Template 話 2024
YAYAPC::Hiroshima 2024
Lightning Talk
karupanerura
February 11, 2024
More Decks by karupanerura
See All by karupanerura
音を出したい
karupanerura
0
110
Perl Meets \w+ あるいは開発を支えるPerl活用の実例集
karupanerura
0
82
log
karupanerura
1
110
Use Perl as Better Shell Script
karupanerura
0
940
GoでParserを書く
karupanerura
4
1.1k
マイ隙間家具OSSたちのご紹介
karupanerura
2
300
1つの言語を原点に色々な言語を学ぶということ
karupanerura
4
3.8k
Javaの実装をPerlでテストする
karupanerura
0
1.4k
Go Generics Overview
karupanerura
0
1.4k
Other Decks in Programming
See All in Programming
プロポーザルを書いてもらう
pvcresin
0
290
PHP Application における Kubernetes 内 gRPC 通信
ganchiku
0
590
AI Engineeringは、AIプロダクトだけのものか? 〜AIがソフトウェアを作る時代の新しい当たり前〜 / No AI in your product. AI Engineering in your development.
rkaga
4
380
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
670
Apache Hive: Toward a Cloud Native Lakehouse
okumin
0
180
琵琶湖の水は止められてもNet--HTTPのリトライは止められない / You might be able to stop the water flow of Lake Biwa but you can't stop Net::HTTP retries
luccafort
PRO
0
610
ルールを書いて終わらせないハーネスエンジニアリング
yug1224
4
1.9k
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
540
OpenSpecのproposalにbrainstormingを持たせてみた
tigertora7571
1
210
ビデオ通話が繋がる0.2秒で何が起きているのか
supurazako
2
180
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
450
Built Our Own Background Agent at LayerX
layerx
PRO
9
5k
Featured
See All Featured
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
Making the Leap to Tech Lead
cromwellryan
135
10k
A Soul's Torment
seathinner
6
3.4k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
460
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
The Pragmatic Product Professional
lauravandoore
37
7.4k
Claude Code のすすめ
schroneko
67
230k
Building an army of robots
kneath
306
46k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
Transcript
Mustache Template 2024 YAYAPC::Hiroshima 2024 Lightning Talk @karupanerura
Mustache Template?
Hello {{name}}
YAPC::{{{country}}} {{#tiny}}::Tiny{{/tiny}} {{year}}
͜͏͍͏ͭ
ࢮ͵΄Ͳ͍ΖΜͳݴޠͰ࣮͞Ε͍ͯΔ
Logic-less templates Β͍͠
࣮spec͋Δ
Speci fi cation
Speci fi cation
Speci fi cation
ςετέʔεͱ༷ͯ͠Λهड़
comments.yaml
comments.yaml
͜͏͍͏ͷ͕ͨ͘͞Μ͋Δ
ϚχϡΞϧ͋Δ
ϚχϡΞϧ
͜͜ͰϚχϡΞϧΛνϥݟ͢Δ https://mustache.github.io/mustache.5.html
ຊ
࣮ϑϧεΫϥον࣮ͭ͘Γ·ͨ͠
ਲڰͰϑϧεϖοΫ࣮ࡁ
Speci fi cationͷςετέʔε ͯ͢PASS
Mustache Templateͷ༷ ͕͜͜Ϝζ͍
ίϯςΩετ
ίϯςΩετ • ʢPerlͷίϯςΩετͰͳ͍ʣ • ςϯϓϨʔτʹ͢ͷ͜ͱΛίϯςΩετͱݺͿ • ͨͱ͑ "Hello, {{name}}" ʹରͯ͠
{ name => "papix" } ͩͱͯ͠ • { name => "papix" } શମ͕ίϯςΩετ
ίϯςΩετͷ͍͠ϙΠϯτ • ܧঝ
ϗϫΠτεϖʔεͷѻ͍
֤specʹࡏ
֤specʹࡏ
ΠϯϥΠϯ͔ͦ͏͡Όͳ͍͔ͷ۠ผ
ΠϯϥΠϯ͔ͦ͏͡Όͳ͍͔ͷ۠ผ
ܧঝςϯϓϨʔτ
࠶ؼ͕Ͱ͖Δ
ͬͺΓείʔϓΛܧঝ͢Δ
ϥϜμ
ϥϜμ
ϥϜμ
ϥϜμ
ϠόΆ͍Μͱ • Lambdaͷѻ͍͕2छྨ͋Δ • ςϯϓϨʔτʹຒΊࠐΉͱͯ͠ͷLambda • ηΫγϣϯͷதͷςΩετΛςϯϓϨʔτʹ͢ΔLambda • ޙऀ͕͍ •
ੜͷςΩετʹ͠ͳ͍ͱ͍͚ͳ͍
ͭ·Γ͜͏
ͭΒ͍
ਲڰͰϑϧεϖοΫ࣮͢Δͷ Ίͱ͜