Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Mustache Template 話 2024
Search
karupanerura
February 11, 2024
Programming
79
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
120
Perl Meets \w+ あるいは開発を支えるPerl活用の実例集
karupanerura
0
98
log
karupanerura
1
120
Use Perl as Better Shell Script
karupanerura
0
970
GoでParserを書く
karupanerura
4
1.1k
マイ隙間家具OSSたちのご紹介
karupanerura
2
310
1つの言語を原点に色々な言語を学ぶということ
karupanerura
4
4.5k
Javaの実装をPerlでテストする
karupanerura
0
1.5k
Go Generics Overview
karupanerura
0
1.4k
Other Decks in Programming
See All in Programming
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
1
2k
一人だけ、Kiroが静止する日
hideg
0
140
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
1
330
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
4
350
JRuby: Past, Present, and Future
headius
0
210
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
1
680
【高い買い物LT会】初任給で話題の国産フィジカルAIを買った話
akagami
PRO
0
180
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3k
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
280
カツオ、ご期待ください
suneo3476
0
120
Java 27新機能 / Java 27 new features
kishida
2
180
Featured
See All Featured
Producing Creativity
orderedlist
PRO
348
41k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
520
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
690
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
We Have a Design System, Now What?
morganepeng
55
8.3k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
490
The Cult of Friendly URLs
andyhume
79
7k
The Limits of Empathy - UXLibs8
cassininazir
1
690
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
How to Think Like a Performance Engineer
csswizardry
28
2.8k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
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 • ޙऀ͕͍ •
ੜͷςΩετʹ͠ͳ͍ͱ͍͚ͳ͍
ͭ·Γ͜͏
ͭΒ͍
ਲڰͰϑϧεϖοΫ࣮͢Δͷ Ίͱ͜