Ruby in 2019

2cf373725ded741824c50fd571eda6e1?s=47 KONDO Uchio
August 29, 2019

Ruby in 2019

@Developers Summit 2019 Fukuoka

Sample codes: https://github.com/udzura/ruby-2.7.0-samples

2cf373725ded741824c50fd571eda6e1?s=128

KONDO Uchio

August 29, 2019
Tweet

Transcript

  1. 2.

    Engineer @ GMO Pepabo, Inc. Uchio Kondo / @udzura https://blog.udzura.jp/

    * ɹɹɹɹɹɹɹɹ ϩʔΧϧΦʔΨφΠβʔ/ొஃऀ * CloudNative Days Fukuoka 2019 νΣΞΦʔΨφΠβʔ * ίϛϡχςΟ: Fukuoka.rb ɺ #;͘͹Ͷͯ͢ * Duolingo Ruby Leaguer
  2. 8.

    Ruby on Dockerhub • Docker community͕४උͨ͠RubyҎ֎ʹɺRuby core teamͷϏϧυͯ͠ ͍ΔΠϝʔδ͕ଘࡏ͢Δɻ৔߹ʹΑͬͯ͸ͪ͜ΒΛ࢖ͬͨํ͕͍͍͔΋ •

    Docker community൛: ruby:2.6.3-* • Ruby core team൛: rubylang/ruby:2.6.3-* • trunk(एऀͷ͍͏master) ΋؆୯ʹར༻Ͱ͖Δ
  3. 10.

    RubyϦϙδτϦGitԽ • ௕Β͘ Subversion ͕ϝΠϯϦϙδτϦ͕ͩͬͨGitʹҠߦ • GitHub ͳͲͰϛϥʔ͍͕ͨ͠ git-svn ͸ͱͯ΋໘౗

    • ύονΛૹͬͯ͘Εͨਓͷ৘ใͳͲΛ͏·͘ࡌ͍ͤͨ • https://k0kubun.hatenablog.com/entry/ruby-core-2019 • https://www.hsbt.org/diary/20190423.html
  4. 12.

    ͪͳΈʹ • ඪ४ϥΠϒϥϦ͸ gem Խ͕΄΅ऴΘ͍ͬͯΔ • https://stdgems.org/ • GitHub ্Ͱɺ

    Ruby ίΞͱ͸ผͷϦϙδτϦʹͳ͍ͬͯΔ
 ʢRubyίΞࣗମ͸ɺgitwebʹ͋Δʣ • https://github.com/ruby/
  5. 13.

    ͪͳΈʹ • ඪ४ϥΠϒϥϦͰ͋ͬͯ΋ɺʮ࠷৽൛ʯΛΠϯετʔϧͯ͠ར༻͕Մೳ $ gem install specific_install $ gem specific_install

    http://github.com/ruby/irb $ gem list -d irb *** LOCAL GEMS *** irb (1.1.0.pre.2, 1.0.0) Author: Keiju ISHITSUKA Homepage: https://github.com/ruby/irb License: BSD-2-Clause Installed at (1.1.0.pre.2): /Users/udzura/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0 (1.0.0, default): /Users/udzura/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0 Interactive Ruby command-line tool for REPL (Read Eval Print Loop).
  6. 14.

    ruby-jp • ೔ຊޠΛ࿩ͤΔRubyistʹΑΔڊେSlack͕Ͱ͖ͨ • https://ruby-jp.github.io/ • > ruby-jp ͸ Ruby

    ϓϩάϥϚʔಉ࢜ͷަྲྀΛ໨తͱͨ͠ Slack ϫʔΫε ϖʔεͰ͢ɻ
 > ࢀՃऀͷٕज़ϨϕϧʹؔΘΒͣɺ࣭໰ɾ૬ஊɾ৘ใަ׵ΛؾܰʹͰ͖Δ ৔Λ໨ࢦ͍ͯ͠·͢ɻ
  7. 15.

    Where Ruby is used • Web Application Framework: Ruby on

    Rails • 6.0 released @ 2019-08-15
  8. 16.

    Where Ruby is used • Logging middleware: Fluentd • A

    member project of Cloud Native Computing Foundation
  9. 18.
  10. 19.

    ͓·͚: mruby • ʮ૊ΈࠐΈʯ޲͚ mruby • ಛ௃: • CRuby ͱൺ΂όΠφϦ͕খ͔ͬͨ͞ΓলϝϞϦ


    ʮશ෦ೖΓʯmrubyόΠφϦ/static libΛ࡞Γ΍͍͢
 C API͕੔උ͞Ε͍ͯΔ • ͨͩ͠ɺࠓ೔͸CRubyͷ࿩Λத৺ʹ͠·͢...
  11. 23.
  12. 24.
  13. 25.

    Topics • Keynotes: • About Ruby 3 and its future

    by Matz • Branch Maintainer’s Life by nagachika • Extreme optimization tech for Ruby by Jeremy • Talks: • C-level Ruby optimization / specification details • Ecosystems such as bundler, RSpec, Typings, Homebrew... • JRuby / TruffleRuby / mruby... / serverless, containers, cloudnative...
  14. 28.

    Ruby 2.3.0 • Frozen String Literal ϓϥάϚ • did_you_mean gem

    ͷόϯυϧ • ʮ&.ʯΦϖϨʔλͷಋೖɻnilͰ΋ͳΔ΂҆͘શʹϝιουݺͼग़͠ • ύϑΥʔϚϯεͷվળʢProc#call ͷ࠷దԽͳͲʣ
  15. 30.
  16. 31.

    Ruby 2.6.0 • JITͷಋೖ • RubyVM::AST ͷಋೖ • ऴ୺ͳ͠Rangeͷಋೖ •

    ύϑΥʔϚϯεͷվળ
 ʢϒϩοΫݺͼग़͠ͷվળɺίϧʔνϯͷωΠςΟϒԽʣ
  17. 32.
  18. 36.

    Pattern matching • case ... in ... ͱ͍͏จ๏Λಋೖ • ෳࡶͳߏ଄ͷϚονϯάͷधཁʹԠ࣮͑ͯ૷ɻ


    ΨʔυઅͳͲ΋͋Δ • Duck TypingΛར༻ͯ͠Ϛονϯά͢ΔΫϥεΛ֦ுͰ͖Δ http://blog.akanumahiroaki.com/entry/2019/05/02/200000
  19. 39.

    Changed! (edited after presentation) • @1, @2, @3 -> _1,

    _2, _3 • _1, _2, _3 ͱ͍͏ϩʔΧϧม਺͕͋ͬͨΒܯࠂ͕ग़ΔΑ͏ʹͳΓ·͢
  20. 42.

    reverted... (edited after presentation) > Maybe we would revisit the

    idea in the future (with different operator appearance)
  21. 50.

    Concurrency (Guild) • Many presentations by Koichi Sasada • "Guild

    Prototype" in RubyKaigi “2018” https://www.slideshare.net/KoichiSasada/guild-prototype
  22. 59.