Filter
Exclude
Time range
-
Near
Signal/noise retweeted
Replying to @xhackjp1
コチラが元となってるStripeの移行記事だと思われますが、rubyfmt (Linter) の話が変に伝わってるかもです🤔💭 Formatting an entire 25 million line codebase overnight stripe.dev/blog/formatting-a… > And today, 100% of Stripe's 42 million lines of Ruby are formatted with rubyfmt. (現在は50M)
1
2
2
399
ハングリィ・ライク・カネゴン retweeted
これ「移行」という言葉に引っ張られて勘違いされやすそうな話なんですよね..💦 Stripeの話は 「#Ruby から別言語に移行」ではなくて 「Ruby Linterの (rubyfmtへの) 移行」の話と 「Selective Test Executionへの移行」の話っぽいです...!! 💎✅ stripe.dev/blog/formatting-a… stripe.dev/blog/selective-te…
別言語書き換えとか、オンプレ版作るとかそう言う戦略が気軽にできる世の中になるのかも > 5000 万行の Ruby コードベースで、チームが手作業なら 2 ヶ月超かかる全体移行を、Fable 5 は 1 日でやり切ったという。
1
3
3
2,967
Formatter 25 millions de lignes de Ruby en une nuit avec rubyfmt, un outil maison écrit en Rust. Le retour d'expérience de Stripe sur le déploiement à cette échelle vaut la lecture. stripe.dev/blog/formatting-a…
2
4
834
I was looking at code produced by rubyfmt, and it struck me as odd that it adds parentheses to puts. 99% of Ruby tutorials write puts without them. That style is deeply ingrained in the language’s culture and readability. Why intentionally go against the language’s established visual style? Might as well change it to `Kernel.puts()` instead 🤷‍♂️
1
1
5
1,196
Python界隈でもruffやuvみたいに「Rustで高速化」はかなり普通になってきたけど、rubyfmtの記事はさらに一段深いところまで行っていて面白い。 単なるformatterというより、「Ruby VMの中にRustで潜っていく」みたいな話になっているのが面白かった。
3
972
Pythonでも最近はruffのように「Rust製で爆速」が当たり前になってきたが、rubyfmtの記事を読むと、巨大モノレポ時代のformatterはもう単なる整形ツールではなく、「コンパイラ・parser・IDE体験・レビュー文化」まで含めた基盤技術なんだなと感じる。 特に「100msを超えると遅い」という感覚は、black登場初期よりさらに厳しい世界になっている。
1
4
6
1,762
Stripeが、自社の2500万行(現在は4200万行)規模のRubyコードベース全体に、自動フォーマッタ「rubyfmt」を一晩で適用した経緯を公開。RubyにはGoのgofmtのような「ゼロ設定・高速・強制的に統一する」タイプのフォーマッタが長年存在せず、巨大コードベースではPRレビュー時のスタイル議論やrubocop調整が大きな負担になっていたという。 rubyfmtは2018年に個人OSSとして始まり、最初はRuby製だったが、100ms以内で動かすという目標のためにRustへ移植。さらにRuby VM内部のparse treeをRust側から直接たどるという、かなり異様な実装に進化していく。Rubyのripper parserが返す内部データをJSON経由でRustに渡していたが、最終的にはRubyオブジェクト(VALUE)を直接serdeでデシリアライズするところまで到達したという話がかなり濃い。 Stripeでは以前prettier-rubyも試したが、大規模ファイルでクラッシュし、速度面も問題だった。そこでDeveloper Productivityチームがrubyfmtを本格採用。まずはファイル単位で段階的に適用し、ripper tree比較や巨大テストスイートで安全性を検証。その後、土曜日を選んで「全コードベース一括フォーマット」を実施した。 面白いのは、導入後の感想が「誰も話題にしなくなった」という点。特にGoやPythonなど他言語出身エンジニアにとって、Ruby特有の「どう書くべきか分からない問題」が消え、レビューでの細かなフォーマット指摘も激減。開発体験そのものを変えたという。 また最近は、Ruby公式の新parser「Prism」への移行も進み、Ruby VMをリンクせずにparse tree生成が可能になったことで、バイナリサイズ削減とさらなる高速化も実現したとのこと。 ・巨大モノレポでは「コードを書く」より「コードの見た目を揃える」コストが無視できなくなる ・gofmt文化をRubyにも持ち込みたかった、という思想が一貫している ・Rust Ruby VM serde parser internalsという、かなり変態的な実装話でもある ・「誰も話題にしないほど自然に定着した」がDeveloper Productivity系ツールの理想形かもしれない stripe.dev/blog/formatting-a…
1
85
439
48,621
We also completed a lot of internal work in the LSP to allow for server addons. This is the mechanism that powers ruby-lsp-rails, ruby-lsp-rspec and ruby-lsp-rubyfmt!
1
1
217
It was a ton of fun to work on the Ruby LSP with the community at the first @rubyconf hackday! Heredoc completion, omitted hash value hints, ERB support, an addon for rubyfmt and enabling YJIT after boot were either completed or explored in-depth
2
4
46
10,774
what if Rubyfmt wasm build
1
You can now brew install rubyfmt! Happy hunting
1
15
I made a discord server for Rubyfmt! Come say hi: discord.gg/4gTH7hvT

1
1
Just cut a binary release of Rubyfmt v0.8.0, which is the first daily drivable build of Rubyfmt! Please give it a go :3 github.com/penelopezone/ruby…
5
19