mastodon.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
The original server operated by the Mastodon gGmbH non-profit

Administered by:

Server stats:

331K
active users

#ruby

81 posts62 participants2 posts today

🌗 解鎖 Ractors:物件 ID
➤ 追蹤 Ruby 中物件 ID 的效能問題與解決方案
byroot.github.io/ruby/performa
本文探討了 Ruby 中 Ractors 的效能瓶頸,以及對 `object_id` 方法進行優化的過程。作者分析了 `object_id` 演變的歷史,從早期基於物件位址的簡單實現,到引入哈希表以支援 GC compaction 的複雜設計,並指出此過程導致了效能下降和 Ractors 中的競爭條件。目前,開發者正努力消除這些競爭點,以提升 Ractors 的並行效能。
+ 讀到這篇文章讓我更瞭解 Ruby 底層機制,以及效能優化背後複雜的考量。
+ 雖然我不是 Ruby 開發者,但瞭解這些技術細節有助於我更好地理解程式的運行原理。

byroot’s blog · Unlocking Ractors: object_idIn a previous post about ractors, I explained why I think it’s really unlikely you’d ever be able to run an entire application inside a ractor, but that they could still be situationally very useful to move CPU-bound work out of the main thread, and to unlock some parallel algorithm.

Awesome Regex leanpub.com/b/regex by Sundeep Agarwal is the featured bundle on the Leanpub homepage! leanpub.com

LeanpubAwesome RegexBundle details Example based guide to mastering Regular Expressions in various programming languages, text editors and command line tools. The bundle includes the following seven books:Understanding Python re(gex)? (builtin re and third-party regex modules) Understanding JavaScript RegExpUnderstanding Ruby RegexpCLI text processing with GNU grep and ripgrep (BRE/ERE, PCRE, Rust regex crate, PCRE2)CLI text processing with GNU sed (BRE/ERE)CLI text processing with GNU awk (ERE)Vim Reference GuideThe above links point to GitHub repos for the respective book. These repos have files used in examples/exercises and other information related to the books.Understanding Python re(gex)?, JavaScript RegExp and Ruby Regexp books are solely focused on regular expressions.CLI text processing with GNU grep and ripgrep, GNU sed and GNU awk books will help you learn how to use these command line tools from the terminal. The various regex flavors used in these tools are discussed in dedicated chapters/sections with plenty of examples. See my blog post for subtle differences between the BRE/ERE implementations in these tools.Vim Reference Guide focuses on the Vim text editor. There's an entire chapter for the Vim regex flavor. Testimonials I love your books on regex...As a student from the Digital VLSI space, it is indeed useful now and definitely in the future. It's really well written and really easy to understand the examples — feedback on reddit Step up your cli fu with this fabulous intro & deep dive into awk. I learned a ton of tricks! — feedback on twitter Literally was having a mini-breakdown about not understanding Regex in algorithm solutions the other day and now I'm feeling so much better, so thank YOU! I genuinely feel like I'm developing the skill for spotting when and where to use them after so much practice! — feedback on twitter I consider myself pretty experienced at shell-fu and capable of doing most things I set out to achieve in either bash scripts or fearless one-liners. However, my awk is rudimentary at best, I think mostly because it's such an unforgiving environment to experiment in. These books you've written are great for a bit of first principles insight and then quickly building up to functional usage. I will have no hesitation in referring colleagues to them! — feedback on Hacker News Hi, great work releasing this! Trying to explain vim concisely is always an interesting challenge and I had a great time reading your attempt in this book. I always find it really interesting on how people try to group certain vim functions in a way that makes sense to people that don't use vim. I think you cover that idea pretty well in your 'Vim philosophy and features' section whilst not making it overly abstract and keeping it relatable. — feedback on Hacker News Thank you for choosing to write and share your knowledge. I read your books on CLI and sed - I think they are very comprehensive and very well explained. Keep up the great work — feedback on twitter Bundle cover image created using canva.