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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
karupanerura
February 11, 2024
Programming
0
50
Mustache Template 話 2024
YAYAPC::Hiroshima 2024
Lightning Talk
karupanerura
February 11, 2024
Tweet
Share
More Decks by karupanerura
See All by karupanerura
Perl Meets \w+ あるいは開発を支えるPerl活用の実例集
karupanerura
0
49
log
karupanerura
1
89
Use Perl as Better Shell Script
karupanerura
0
850
GoでParserを書く
karupanerura
4
1k
マイ隙間家具OSSたちのご紹介
karupanerura
2
280
1つの言語を原点に色々な言語を学ぶということ
karupanerura
4
3.2k
Javaの実装をPerlでテストする
karupanerura
0
1.3k
Go Generics Overview
karupanerura
0
1.4k
Japan.pm 2021 開催まで至る道
karupanerura
0
2.2k
Other Decks in Programming
See All in Programming
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
1
390
CSC307 Lecture 05
javiergs
PRO
0
490
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
120
Architectural Extensions
denyspoltorak
0
260
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
960
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
630
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
110
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.7k
Implementation Patterns
denyspoltorak
0
270
GISエンジニアから見たLINKSデータ
nokonoko1203
0
200
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
260
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
150
Featured
See All Featured
[SF Ruby Conf 2025] Rails X
palkan
0
740
Joys of Absence: A Defence of Solitary Play
codingconduct
1
280
Tell your own story through comics
letsgokoyo
1
800
WENDY [Excerpt]
tessaabrams
9
36k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
720
Deep Space Network (abreviated)
tonyrice
0
43
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
76
Optimising Largest Contentful Paint
csswizardry
37
3.6k
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 • ޙऀ͕͍ •
ੜͷςΩετʹ͠ͳ͍ͱ͍͚ͳ͍
ͭ·Γ͜͏
ͭΒ͍
ਲڰͰϑϧεϖοΫ࣮͢Δͷ Ίͱ͜