@kyanny's blog

My thoughts, my life. Views/opinions are my own.

Ruby Weekly #507

Table of Contents

  1. Ruby Weekly #507
    1. An Introduction to Web Scraping with Ruby
    2. The AWS SDK for Ruby v2 End of Life Dates Announced
    3. Postgres Indexes for ActiveRecord Join Tables in Rails Apps
    4. A Look at Ruby 2.7's Enumerable#filtermap
    5. Comma: A CSV Generation Extension for Ruby Objects
    6. EBNF: An EBNF Parser and Generic Parser Generator

Ruby Weekly #507

An Introduction to Web Scraping with Ruby

  • Kimurai という Web スクレイピングフレームワーク

The AWS SDK for Ruby v2 End of Life Dates Announced

  • 2020-11-20 でメンテナンスモードに入り、 2021-11-21 でサポート対象外に。

Postgres Indexes for ActiveRecord Join Tables in Rails Apps

A Look at Ruby 2.7's Enumerable#filtermap

  • .select{}.map{} と書かなくてよくなる。以下の例はありがたみが薄いが。
irb(main)> (1..10).to_a.select(&:odd?).map(&:to_s)
=> ["1", "3", "5", "7", "9"]
irb(main):014:0> (1..10).to_a.filter_map{|n|n.to_s if n.odd?}
=> ["1", "3", "5", "7", "9"]

Comma: A CSV Generation Extension for Ruby Objects

  • Model に DSL で書けるのはビジネスロジックを集約できて良さそう。内部実装を `csv` より早いものに変更できたりすると良さそうだが。

EBNF: An EBNF Parser and Generic Parser Generator