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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
karupanerura
February 11, 2024
Programming
67
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
90
Perl Meets \w+ あるいは開発を支えるPerl活用の実例集
karupanerura
0
76
log
karupanerura
1
110
Use Perl as Better Shell Script
karupanerura
0
910
GoでParserを書く
karupanerura
4
1.1k
マイ隙間家具OSSたちのご紹介
karupanerura
2
300
1つの言語を原点に色々な言語を学ぶということ
karupanerura
4
3.6k
Javaの実装をPerlでテストする
karupanerura
0
1.4k
Go Generics Overview
karupanerura
0
1.4k
Other Decks in Programming
See All in Programming
New "Type" system on PicoRuby
pocke
1
1k
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
270
A2UI という光を覗いてみる
satohjohn
1
150
「なぜそう決めたのか」を残し続ける仕組み ― Notion AI カスタムエージェント × Slack連携による設計判断の自動記録 - NIKKEI Tech Talk #47
niftycorp
PRO
0
220
Performance Engineering for Everyone
elenatanasoiu
0
200
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
190
The NotImplementedError Problem in Ruby
koic
1
900
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
7.5k
Developing with AI Agents — Codex, Claude Code & Cowork Practical Guide
x5gtrn
PRO
0
1.3k
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
350k
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
900
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
560
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
55
10k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.3k
Utilizing Notion as your number one productivity tool
mfonobong
4
320
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
230
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
230
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
470
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
1
220
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
62
44k
Designing for humans not robots
tammielis
254
26k
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 • ޙऀ͕͍ •
ੜͷςΩετʹ͠ͳ͍ͱ͍͚ͳ͍
ͭ·Γ͜͏
ͭΒ͍
ਲڰͰϑϧεϖοΫ࣮͢Δͷ Ίͱ͜