Ruby Cool things in Ruby in 2018

hooopo · January 29, 2018 · Last by qiukun replied at April 21, 2018 · 9727 hits
Topic has been selected as the excellent topic by the admin.

rbspy

First up there's a new profiler out by @b0rk, rbspy! https://github.com/rbspy/rbspy Looks exciting + makes cool flamegraphs


Great news - @b0rk is taking a 3-month sabbatical to work on Ruby profiling tools https://buff.ly/2iEjj5q (h/t @segment for funding this)

作者 blog 很有料:https://jvns.ca/

FIR

A potential friendlier IRB replacement: FIR. Intro: https://www.nasseri.io/posts/2.html

更像编辑器的 repl:https://github.com/dnasseri/fir

Performance

The always impeccable @tenderlove just may have saved 3% memory usage across your (and all?) Rails apps. Great deep dive into Ruby’s internals + how its VM works too: https://tenderlovemaking.com/2018/01/23/reducing-memory-usage-in-ruby.html


More memory optimization tricks + tips from @matugm: https://blog.codeship.com/tracking-object-allocations-in-ruby/


Not sure why, but I haven't tried Enumerable#lazy yet! Also ObjectSpace is fun to play around with if you haven't yet.


Also there's a big ruby VM performance PR almost ready to merge... tons of perf enhancements coming down the line for Ruby this year. https://github.com/ruby/ruby/pull/1782 … (thanks @thibaut_barrere for these last two links!)


Some initial Spectre / Meltdown benchmarks on Ruby & Rails perf. Basically, yes, there's an impact but not much: http://engineering.appfolio.com/appfolio-engineering/2018/1/4/rails-ruby-bench-cruby-and-meltdownspectre

Splitting up a Rails monolith into gems + engines

I enjoyed reading this post today re splitting up a Rails monolith into gems + engines from @dan_manges (via @martinfowler) - that tipping point where an app gets too unwieldly to work with needs a name of its own https://medium.com/@dan_manges/the-modular-monolith-rails-architecture-fb1023826fc4

via @martinfowler, 因吹斯汀。。

dry-rb && rom-rb

we’re working on 1.0.0s of all the gems from @dry_rb and some of them will be the foundation for @rom_rb 5.0 (also planned for this year) and rom will get identity map, caching API and probably first-class support for event sourcing, among other cool things that won’t fit here ;)

dry-rb 是框架的框架,期待 event sourcing。

kafka && ruby

#karafkarb -> https://github.com/karafka/karafka - over 50k messages per second. Internally uses @dry_rb stuff plus integrates greatly with @trailblazer_to :)

第一眼看成了 50 messages per second。。。。

补充一些

via:https://twitter.com/qrush/status/956000323398701056

还有我的 😎

jasl mark as excellent topic. 30 Jan 01:14
5 Floor has deleted

关注 Julia Evans 的博客很久了,非常非常喜欢,强烈推荐 https://jvns.ca/ https://twitter.com/b0rk

给炮哥点赞 👍

哇 Stripe 的

rbspy 真不错

dry-rb 这是要干啥?改造 ruby?太疯狂了吧

Reply to geniousli

应该算是重造 Ruby 生态系统吧...

Fir 用了下,感觉挺难用的,谁能告诉我下它比irb或者pry好在哪,是我理解错了?

关注点不一样呀 fir 主要是在 repl 里写代码方便,可以缩进补全

有点意思哦

19 Floor has deleted

test ^_^ 测试一下

Reply to hooopo

pry 不也可以?

You need to Sign in before reply, if you don't have an account, please Sign up first.