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
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
学ばないDSL (渋谷.rb)
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
USAMI Kenta
January 15, 2014
Programming
180
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
学ばないDSL (渋谷.rb)
渋谷.rb[:20140115]
http://www.zusaar.com/event/2687020
で発表
USAMI Kenta
January 15, 2014
More Decks by USAMI Kenta
See All by USAMI Kenta
Rubicureに学ぶメタプログラミング
zonuexe
0
240
Other Decks in Programming
See All in Programming
一参加者から『中の人』へ 〜全通PHPerがブースに立って学んだ、カンファレンスを100倍楽しむコツ〜
wp_daisuke
0
130
業務時間外もAIに働いてもらう話
colorful12
3
10k
[DroidKaigi 2026] Bring your own phones to Gradle Managed Devices
f2lk
0
110
The Good Stuff, Not the Slop: Engineering High-Quality Android Apps with Modern AI Tooling
danybony
1
220
『寄り添うラジオ』をAIで作る 体験価値から逆算した、会話しないUXと品質設計
theoriatec2024
3
140
アクセシビリティから考える情報設計
high_g_engineer
0
330
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
190
AI時代に学ぶ 好きなルール 嫌いなルール Linter編
shorty5121
0
890
フロントエンドUIフレームワークのこれまでとこれから
ssssota
1
1.2k
デプロイ直後のレイテンシスパイクを調べたら、 Railsの仕様にたどり着いた
nhsykym
0
110
巨大モノリシックアプリ モダン化大作戦
ktcryomm
0
260
Hello, Hiroshima Geospatial Data! — Exploring DoboX with Python
ra0kley
0
180
Featured
See All Featured
We Are The Robots
honzajavorek
0
350
Ethics towards AI in product and experience design
skipperchong
2
360
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
250
Technical Leadership for Architectural Decision Making
baasie
3
560
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
530
[SF Ruby Conf 2025] Rails X
palkan
2
1.4k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
From π to Pie charts
rasagy
0
360
Mind Mapping
helmedeiros
1
350
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
400
Transcript
学ばないDSL 2014/01/15 @tadsan 渋谷.rb[:20140115]
お前誰よ うさみけんた 2012年の夏まで北海道で自宅警備 最近はずっとPHPばっかり書いてます ぷろぐらみんぐ言語が好きです 渋谷.rbの参加は3回め(だった気がする)
自己紹介
ぼくの好きなプログラミング
scripter = ->(*args){ ->{ puts args.join("\n") } } title =
->(text) { "ʰ#{text}ʱ\n" } paragraph = ->(*args){ args.join("\n") + "\n" } chara = ->(name) { ->(text){ "#{name}ʮ#{text}ʯ"} } ryu = chara[:Ϧϡ]; tak = chara[:͔ͨ͠] script = scripter[title[:ԶΑΓڧౕ͍ʹɺձ͍ʹߦ͘], paragraph[:ϐϯϙʔϯ, ryu[:͜Μʹͪ], tak[:͍Ͳͳͨ]], paragraph[ryu[:͍·ͪΐͬͱ͍͍Ͱ͔͢], tak[:͜Ε͔Βग़͔͚·͢]], paragraph[ryu[:ޕޙग़ۈͰ͔͢ʁ], tak[:͍]], paragraph[ryu[:ڧͦ͏Ͱ͢Ͷ], tak[:ͳʹ͕Ͱ͔͢]], paragraph[ryu[:ଶ͕]], paragraph[:ϦϡɺࣗΑΓڧͦ͏ͳౕʹɺձ͍ʹ͍ͬͨͷͩͬͨɻɹ] ] script[] スクリプト(台本)
ʰԶΑΓڧౕ͍ʹɺձ͍ʹߦ͘ʱ ! ϐϯϙʔϯ Ϧϡʮ͜Μʹͪʯ ͔ͨ͠ʮ͍Ͳͳͨʯ ! Ϧϡʮ͍·ͪΐͬͱ͍͍Ͱ͔͢ʯ ͔ͨ͠ʮ͜Ε͔Βग़͔͚·͢ʯ ! Ϧϡʮޕޙग़ۈͰ͔͢ʁʯ
͔ͨ͠ʮ͍ʯ ! Ϧϡʮڧͦ͏Ͱ͢Ͷʯ ͔ͨ͠ʮͳʹ͕Ͱ͔͢ʯ ! Ϧϡʮଶ͕ʯ ! ϦϡɺࣗΑΓڧͦ͏ͳౕʹɺձ͍ʹ͍ͬͨͷͩͬͨɻɹ 台本を出力(実行結果)
何をしてるのか ラムダ式とクロージャ 可変長引数を結合してる ドメイン固有言語 - Wikipedia ラムダ式で学ぶクロージャとDSL 意外と移植性が高い!
最近読んだ本
世間には根強く 「えっコンパイラも実装したことないの」 「Lispインタプリタとか課題で実装したわー」 ! といった声がある
None
言語処理系の基礎が 完全無料で学べる!
実装してみた 出落ち!
MatzLisp!
本書中のサンプルコードは ふつうのRubyで書かれてます ! ご安心ください
_ \ヽ, ,、 `''|/ノ .|
_ | \`ヽ、| \, V `L,,_ |ヽ、) .| / ,、 / ヽYノ .| r''ヽ、.| | `ー-ヽ|ヮ | `| ヽ, ,r .| ヽ,r'''ヽ!'-‐'''''ヽ、ノ ,,,..---r'",r, , 、`ヽ、 ヾ ヽ、__/ ./ハレハ i`ヽ、 `''r`ミ_ .レ//r,,,、 レ'レハヾ, L,,_ `ヽ、 "レ, l;;;l l;;;l`i.リレ' リ ̄~~ ヽ、 ワ `"/-'`'`' `''''''''" ┼ヽ -|r‐、. レ | d⌒) ./| _ノ __ノ