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
Rubyで日本四大祭の一つを楽しんだ。
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
北䑓如法
March 05, 2016
Technology
1.4k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Rubyで日本四大祭の一つを楽しんだ。
Hiroshima Ruby Conference 2016 でRubyで日本四大祭の一つを楽しんだことについて発表しました。
北䑓如法
March 05, 2016
Transcript
54 slides
RubyͰຊ࢛େࡇ ͷҰͭΛָ͠Μͩɻ Introduction to Mention it to Balsers 㝳๏ from
Hiroshima.rb 20163݄4() @ Hiroshima Ruby Conference
ࣗݾհ
None
KITADAI, Yukinori 㝳๏ ▸ ͖͍ͨͩΏ͖ͷΓ ▸ ๏ΛԻಡΈ(༗৬ಡΈ)ͯ͠ʹΐ΄͏ ▸ ༵ϓϩάϥϚ
J1BEౡห ݕࡧ ৄ͘͠
ࠓHiroshima Ruby ConferenceͷϨϕϧΛԼ͛ ʹདྷ·ͨ͠!
RubyͰຊ࢛େࡇ ͷҰͭΛָ͠Μͩ?
࢛େࡇ? ϑϦʔࣸਅૉࡐͺͨͦ͘
෮श: ݹདྷΑΓΘΔ ຊࡾେࡇ
The three major festivals in Japan ݹདྷΑΓΘΔຊࡾେࡇ
The three major festivals in Japan ݹདྷΑΓΘΔຊࡾେࡇ ▸ ϠϚβΩय़ͷύϯࡇ
The three major festivals in Japan ݹདྷΑΓΘΔຊࡾେࡇ ▸ ϠϚβΩय़ͷύϯࡇ ▸
౦ө·Μ͕ࡇ
The three major festivals in Japan ݹདྷΑΓΘΔຊࡾେࡇ ▸ ϠϚβΩय़ͷύϯࡇ ▸
౦ө·Μ͕ࡇ ▸ ՖԦϔΞέΞࡇ
ۙՃ͞Εͨ 4ͭͷࡇͱ?
http://twitter.com/ama495/status/704556082220310528
http://twitter.com/ama495/status/704556082220310528
ʊਓਓਓਓਓਓਓਓਓʊ ʼɹόϧεࡇͰ͠ΐɹʻ ʉ̮̮̮̮̮̮̮̮̮ʉ
The fourth festival — Bals Fest όϧεࡇ ▸ ༵ۚϩʔυSHOW!Ͱʰఱۭͷϥϐϡλʱ์ૹ ▸
ΫϥΠϚοΫε໓ͼͷढจʮόϧεʯ ▸ ಉ࣌ʹTwitterͰօҰ੪ʹʮόϧεʯͱπΠʔτ ▸ …ͱ͍͏ຊʹΘΔ͓ࡇ ▸ TwitterͷετϨεςετͷׂ୲͏
Twitter Inc. provoked lol Twitterެࣜʮͥͻָ͓͠Έ͍ͩ͘͞ʯͱൃ
डཱ͚ͯͱ͏
͔ͤͬ͘ͳͷͰԿ͔ RubyͷϓϩάϥϜΛ ॻָ͍ͯ͠͏
ઌߦݚڀ
ઌߦݚڀ ▸ όϧεͱ͍͏πΠʔτ͕ۃʹଟ͘ͳͬͨ ΒʮόϧεʯͱࣗಈπΠʔτ͢Δ ▸ (ͳͲ)
͜͏͍͏ͷ ͍͍͚Ͳ
SNS ίϛϡχέʔγϣϯ ͯ͠ͳΜ΅͡ΌΖὑ
ϐίʔϯ
ʮόϧεʯͱπΠʔτͨ͠ਓʹ ʮφΠεόϧεʯͱϝϯγϣϯ ͠Α͏! όϧε !CBMTFSφΠεόϧε
͜Ε ɾ㱼ɾ řšƄŘ
ఱۭͷϥ ϐ ϡ λ ɺ ์ૹ։࢝ɻ
Α͏͍ͲΜ
None
None
༻ͨ͠gem
Used rubygems ༻ͨ͠gem ▸ twitter ▸ user_stream (ࠓ twitter gem
͕͋Εཁ Βͳ͍) ▸ foreman, doting, color_echo
……ຊ൪
όϧε!! γʔλͱύζʔ ͍ͭʹͦͷͱ͖͕!
ズバババババ!!!!!
ズバババババ!!!!!
ズバババババ!!!!!
͓͓͓ʔ! ͏·͍ͬͨ͘ʔ!
΄Ͳͳ͘…
お、お返事 がっ!!
お、お返事 がっ!!
お、お返事 がっ!!
ϓϩάϥϜͰ ͢Έ·ͤΜ"
ࣗͳΓʹ ͨ͠ͱ͜Ζ
ࣗͳΓʹͨ͠ͱ͜Ζ RT@URL͖ͭπΠʔτʹԠ͠ͳ͍Α͏ʹ if text !~ /^RT / and text !~
/@/ and text !~ /http/ and text =~ /όϧε/ if bals_density_high?(text) puts CE.fg(:green).get("@#{user.screen_name}: #{text}") @client.update("@#{status.user.screen_name} " + random_message, in_reply_to @client.favorite(status.id) end
ࣗͳΓʹͨ͠ͱ͜Ζ ʮφΠεόϧεʯҎ֎ͷϝοηʔδ ▸ ྻͷ .sample ศརͩͳ ▸ จࣈྻʹ͔͚ࢉͰ͖Δͷศརͩͳ def random_message
array = ['φΠεόϧε', ‘͜Ε͍͍όϧε', ‘͍͍όϧεͰͨ͠Αʙ', 'ϥϐϡλѪͷ͋;ΕΔόϧεͰͨ͠Ͷ', 'ૉΒ͍͠όϧε'] array.sample + '!' * rand(1..10) end
ࣗͳΓʹͨ͠ͱ͜Ζ ʮόϧεʯີͷߴ͍πΠʔτ͚ͩʹ ▸ ֯จࣈΛআ ▸ όϧεີͷ͍πΠʔτແࢹ (ʮόϧε͍ͬͯ͏ ͷ͕ྲྀߦ͍ͬͯΔΒ͍͠ʯͱ͔εϧʔ͍ͨ͠) def bals_density_high?
str return false if str.length == 0 s = str.gsub(/([[:ascii:]]|[[:punct:]])/,'') t = s.gsub(/όϧε/,'') t.length.to_f / s.length.to_f < 0.5 end
OSS Φʔϓϯιʔε ▸ GitHubͰެ։͍ͯ͠·͢ ▸ https://github.com/Nyoho/MentionItToBalsers
OSS Φʔϓϯιʔε ▸ GitHubͰެ։͍ͯ͠·͢ ▸ https://github.com/Nyoho/MentionItToBalsers
OSS Φʔϓϯιʔε ▸ GitHubͰެ։͍ͯ͠·͢ ▸ https://github.com/Nyoho/MentionItToBalsers ͬɺผʹ4UBS͠ʜ
Conclusion ·ͱΊ ▸ ͜ͷΑ͏ʹझຯͰRubyΛָ͠ΜͰ͍·͢ ▸ ·ͭͱ͞ΜΛ࢝Ίͱͨ͠RubyʹؔΘΔ օ༷ʹײँ ▸ ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ
Appendix ͦͷଞͷ੍࡞ ▸ TwitterͰʹ ʮ!/F9545&1049 ΞΠίϯΛʙʹมߋͯ͠ʯͱϝϯγϣϯ͢ ΔͱɺͷΞΠίϯΛͦͷจࣈྻΛͬͨ ը૾ʹมߋ͢ΔγεςϜ(POV-RayͰϨϯμ Ϧϯάͨ͠3DCG) ▸
TwitterͷϑΥϩϫͷࠩΛه͢Δͷ
More Decks by 北䑓如法
See All by 北䑓如法
PyCon JP 2025で短いBGMを3曲作った / Composed 3 pieces of music for PyCon JP 2025
nyoho
0
64
PyCon JP 2025で「Pythonのピース」を集めるウェブアプリを作って運用した / Building and operating web apps to collect "Python pieces" at PyCon JP 2025
nyoho
0
73
PyCon JP 2025「すごい広島」コミュニティポスター制作記 / The making of a community poster of Great Hiroshima at PyCon JP 2025
nyoho
0
73
ビジュアライゼーションと数学 〜 すうがくむかしばなし 負の数・複素数編 〜 / Visualization-and-mathematics-OSH2022
nyoho
0
610
初心者、電子工作に入門。 Python Charity Talks 2021.09 / A beginner started electronic handicraft - Python Charity Talks 2021.09
nyoho
0
19k
Next.js + Heroku + Dockerでも玉ねぎの汁で涙が出んように 〜PyCon mini Hiroshima サイト構築の一コマ〜 / Avoiding onion essence with Next.js + Heroku + Docker -- development of the site of PyCon mini Hiroshima
nyoho
0
420
SageMathで数学の力を上げます PyCon mini Hiroshima 2019 / Enlarge your ability of mathematics with SageMath
nyoho
1
740
Python初心者がPyTorchをいじって機械学習の計算してみた PyCon mini Hiroshima 2018 / Python-newbies machine learning learning with PyTorch
nyoho
2
1.2k
RubyKaigi 2017 の告知 / A notification of RubyKaigi 2017 at WTM100
nyoho
0
2.3k
Other Decks in Technology
See All in Technology
田んぼの見回りをIoTで減らしたい!水位監視から電池駆動カメラまでの試行錯誤
itosoft
1
120
AI Agent 時代のデータ基盤: ClickHouse で実現する 超高速分析とコスト削減の両立
jozono
0
230
Context != Context: One window, many lifecycles (AI Native DevCon, Nov 2026)
birgitta410
0
110
【Oracle AI SPOTLIGHT ウェビナー】【特別開催:日本語で解説!】Oracle AI World 2026 最新情報フィードバック
oracle4engineer
PRO
1
140
Kiro 入門 (1 つのエージェントを、どの画面からでも) | 目指せ Kiro マスター 01
inariku
PRO
6
1.6k
Steering と Hook (チームの決まりを守らせる) | 目指せ Kiro マスター 06
inariku
PRO
2
110
AIエージェントの監視、思考を見るか行動を見るか / Monitoring AI Agents: Thoughts or Actions
yusukeshimizu
2
190
81天的 AI Agent 軟體開發團隊治理實務分享
regionbbs
0
150
[JAWS Festa 2026]一番いい仕事は、請求書に現れない / jawsfesta2026
sh_fk2
2
450
AI時代に求められる優秀なTechLeadの振る舞い
pospome
11
16k
bpf_arenaとstruct_opsを使うのが難しかった話
masu_mi
0
230
続・ソフトウェアアーキテクトのための意思決定術: Decision Readiness, Revisited — When AI Changes the Economics of Software Architecture
snoozer05
PRO
9
2.9k
Featured
See All Featured
Building the Perfect Custom Keyboard
takai
2
950
The SEO identity crisis: Don't let AI make you average
varn
0
630
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
690
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
820
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
560
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.9k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
660
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.8k
What's in a price? How to price your products and services
michaelherold
247
13k
Unsuck your backbone
ammeep
672
58k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
470
エンジニアに許された特別な時間の終わり
watany
109
250k