Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Rubyで日本四大祭の一つを楽しんだ。

 Rubyで日本四大祭の一つを楽しんだ。

Hiroshima Ruby Conference 2016 でRubyで日本四大祭の一つを楽しんだことについて発表しました。

853cd87b5c317b8c16b0e78c2efbf8d1?s=128

北䑓如法

March 05, 2016
Tweet

More Decks by 北䑓如法

Other Decks in Technology

Transcript

  1. RubyͰ೔ຊ࢛େࡇ ͷҰͭΛָ͠Μͩɻ Introduction to Mention it to Balsers ๺㝳೗๏ from

    Hiroshima.rb 2016೥3݄4೔(౔) @ Hiroshima Ruby Conference
  2. ࣗݾ঺հ

  3. None
  4. KITADAI, Yukinori ๺㝳೗๏ ▸ ͖͍ͨͩΏ͖ͷΓ ▸ ೗๏ΛԻಡΈ(༗৬ಡΈ)ͯ͠ʹΐ΄͏ ▸ ೔༵ϓϩάϥϚ

  5. J1BE޿ౡห ݕࡧ ৄ͘͠͸

  6. ࠓ೔͸Hiroshima Ruby ConferenceͷϨϕϧΛԼ͛ ʹདྷ·ͨ͠!

  7. RubyͰ೔ຊ࢛େࡇ ͷҰͭΛָ͠Μͩ?

  8. ࢛େࡇ? ϑϦʔࣸਅૉࡐͺͨͦ͘

  9. ෮श: ݹདྷΑΓ఻ΘΔ ೔ຊࡾେࡇ

  10. The three major festivals in Japan ݹདྷΑΓ఻ΘΔ೔ຊࡾେࡇ

  11. The three major festivals in Japan ݹདྷΑΓ఻ΘΔ೔ຊࡾେࡇ ▸ ϠϚβΩय़ͷύϯࡇ

  12. The three major festivals in Japan ݹདྷΑΓ఻ΘΔ೔ຊࡾେࡇ ▸ ϠϚβΩय़ͷύϯࡇ ▸

    ౦ө·Μ͕ࡇ
  13. The three major festivals in Japan ݹདྷΑΓ఻ΘΔ೔ຊࡾେࡇ ▸ ϠϚβΩय़ͷύϯࡇ ▸

    ౦ө·Μ͕ࡇ ▸ ՖԦϔΞέΞࡇ
  14. ۙ೥௥Ճ͞Εͨ 4ͭ໨ͷࡇͱ͸?

  15. http://twitter.com/ama495/status/704556082220310528

  16. http://twitter.com/ama495/status/704556082220310528

  17. ʊਓਓਓਓਓਓਓਓਓʊ ʼɹόϧεࡇͰ͠ΐɹʻ ʉ̮̮̮̮̮̮̮̮̮ʉ

  18. The fourth festival — Bals Fest όϧεࡇ ▸ ༵ۚϩʔυSHOW!Ͱʰఱۭͷ৓ϥϐϡλʱ์ૹ ▸

    ΫϥΠϚοΫε໓ͼͷढจʮόϧεʯ ▸ ಉ࣌ʹTwitterͰօҰ੪ʹʮόϧεʯͱπΠʔτ ▸ …ͱ͍͏೔ຊʹ఻ΘΔ͓ࡇ ▸ TwitterͷετϨεςετͷ໾ׂ΋୲͏
  19. Twitter Inc. provoked lol Twitterެࣜ΋ʮͥͻָ͓͠Έ͍ͩ͘͞ʯͱ௅ൃ

  20. डཱ͚ͯͱ͏

  21. ͔ͤͬ͘ͳͷͰԿ͔ RubyͷϓϩάϥϜΛ ॻָ͍ͯ͠΋͏

  22. ઌߦݚڀ

  23. ઌߦݚڀ ▸ όϧεͱ͍͏πΠʔτ͕ۃ୺ʹଟ͘ͳͬͨ ΒʮόϧεʯͱࣗಈπΠʔτ͢Δ ▸ (ͳͲ)

  24. ͜͏͍͏ͷ΋ ͍͍͚Ͳ

  25. SNS͸ ίϛϡχέʔγϣϯ ͯ͠ͳΜ΅͡ΌΖὑ

  26. ϐίʔϯ

  27. ʮόϧεʯͱπΠʔτͨ͠ਓʹ ʮφΠεόϧεʯͱϝϯγϣϯ ͠Α͏! όϧε !CBMTFSφΠεόϧε

  28. ͜Ε͸ ɾ㱼ɾ řšƄŘ

  29. ఱۭͷ৓ϥ ϐ ϡ λ ɺ ์ૹ։࢝ɻ

  30. Α͏͍ͲΜ

  31. None
  32. None
  33. ࢖༻ͨ͠gem

  34. Used rubygems ࢖༻ͨ͠gem ▸ twitter ▸ user_stream (ࠓ͸ twitter gem

    ͕͋Ε͹ཁ Βͳ͍) ▸ foreman, doting, color_echo
  35. ……ຊ൪

  36. όϧε!! γʔλͱύζʔ ͍ͭʹͦͷͱ͖͕!

  37. ズバババババ!!!!!

  38. ズバババババ!!!!!

  39. ズバババババ!!!!!

  40. ͓͓͓ʔ! ͏·͍ͬͨ͘ʔ!

  41. ΄Ͳͳ͘…

  42. お、お返事 がっ!!

  43. お、お返事 がっ!!

  44. お、お返事 がっ!!

  45. ϓϩάϥϜͰ ͢Έ·ͤΜ"

  46. ࣗ෼ͳΓʹ ޻෉ͨ͠ͱ͜Ζ

  47. ࣗ෼ͳΓʹ޻෉ͨ͠ͱ͜Ζ 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
  48. ࣗ෼ͳΓʹ޻෉ͨ͠ͱ͜Ζ ʮφΠεόϧεʯҎ֎ͷϝοηʔδ΋ ▸ ഑ྻͷ .sample ศརͩͳ ▸ จࣈྻʹ͔͚ࢉͰ͖Δͷศརͩͳ def random_message

    array = ['φΠεόϧε', ‘͜Ε͸͍͍όϧε', ‘͍͍όϧεͰͨ͠Αʙ', 'ϥϐϡλѪͷ͋;ΕΔόϧεͰͨ͠Ͷ', 'ૉ੖Β͍͠όϧε'] array.sample + '!' * rand(1..10) end
  49. ࣗ෼ͳΓʹ޻෉ͨ͠ͱ͜Ζ ʮόϧεʯີ౓ͷߴ͍πΠʔτ͚ͩʹ ▸ ൒֯จࣈΛ࡟আ ▸ όϧεີ౓ͷ௿͍πΠʔτ͸ແࢹ (ʮόϧε͍ͬͯ͏ ͷ͕ྲྀߦ͍ͬͯΔΒ͍͠ʯͱ͔͸εϧʔ͍ͨ͠) 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
  50. OSS Φʔϓϯιʔε ▸ GitHubͰެ։͍ͯ͠·͢ ▸ https://github.com/Nyoho/MentionItToBalsers

  51. OSS Φʔϓϯιʔε ▸ GitHubͰެ։͍ͯ͠·͢ ▸ https://github.com/Nyoho/MentionItToBalsers

  52. OSS Φʔϓϯιʔε ▸ GitHubͰެ։͍ͯ͠·͢ ▸ https://github.com/Nyoho/MentionItToBalsers ΂ͬɺผʹ4UBS͠ʜ

  53. Conclusion ·ͱΊ ▸ ͜ͷΑ͏ʹझຯͰRubyΛָ͠ΜͰ͍·͢ ▸ ·ͭ΋ͱ͞ΜΛ࢝Ίͱͨ͠RubyʹؔΘΔ օ༷ʹײँ ▸ ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ

  54. Appendix ͦͷଞͷ੍࡞෺ ▸ TwitterͰ๻ʹ ʮ!/F9545&1049 ΞΠίϯΛʙʹมߋͯ͠ʯͱϝϯγϣϯ͢ Δͱɺ๻ͷΞΠίϯΛͦͷจࣈྻΛ࢖ͬͨ ը૾ʹมߋ͢ΔγεςϜ(POV-RayͰϨϯμ Ϧϯάͨ͠3DCG) ▸

    TwitterͷϑΥϩϫͷࠩ෼Λه࿥͢Δ΋ͷ