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
0
64
Mustache Template 話 2024
YAYAPC::Hiroshima 2024
Lightning Talk
karupanerura
February 11, 2024
Tweet
Share
More Decks by karupanerura
See All by karupanerura
音を出したい
karupanerura
0
66
Perl Meets \w+ あるいは開発を支えるPerl活用の実例集
karupanerura
0
60
log
karupanerura
1
99
Use Perl as Better Shell Script
karupanerura
0
870
GoでParserを書く
karupanerura
4
1k
マイ隙間家具OSSたちのご紹介
karupanerura
2
290
1つの言語を原点に色々な言語を学ぶということ
karupanerura
4
3.3k
Javaの実装をPerlでテストする
karupanerura
0
1.3k
Go Generics Overview
karupanerura
0
1.4k
Other Decks in Programming
See All in Programming
AI Assistants for Your Angular Solutions
manfredsteyer
PRO
0
160
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
570
GC言語のWasm化とComponent Modelサポートの実践と課題 - Scalaの場合
tanishiking
0
130
飯MCP
yusukebe
0
400
今年もTECHSCOREブログを書き続けます!
hiraoku101
0
190
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
690
PHP でエミュレータを自作して Ubuntu を動かそう
m3m0r7
PRO
2
150
ネイティブアプリとWebフロントエンドのAPI通信ラッパーにおける共通化の勘所
suguruooki
0
210
Understanding Apache Lucene - More than just full-text search
spinscale
0
140
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
310
へんな働き方
yusukebe
6
2.9k
Ruby and LLM Ecosystem 2nd
koic
1
1.4k
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
340
58k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
390
Chasing Engaging Ingredients in Design
codingconduct
0
150
From π to Pie charts
rasagy
0
160
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.2k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.2k
SEO for Brand Visibility & Recognition
aleyda
0
4.4k
Making the Leap to Tech Lead
cromwellryan
135
9.8k
Unsuck your backbone
ammeep
672
58k
ラッコキーワード サービス紹介資料
rakko
1
2.8M
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
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 • ޙऀ͕͍ •
ੜͷςΩετʹ͠ͳ͍ͱ͍͚ͳ͍
ͭ·Γ͜͏
ͭΒ͍
ਲڰͰϑϧεϖοΫ࣮͢Δͷ Ίͱ͜