[ruby-talk:444308] [ANN] Learning by Reversing: Native Gems, Part 5

Hi Everyone,

I started on a series to learn by reversing a simple native C Ruby gem. Part 5 is now published! This does a deep dive on understanding how to use the Ruby C API from a C file.It shows how the Ruby C API works & how it accesses Ruby data, raises exceptions, checks function arguments and so on.

Link to Part 5: Ruby Learning by Reversing: Native Gems, Part 5

The first 4 parts are also online on my blog:
* Part 1 - This covers the background to the gem we explore
Link: Ruby Learning by Reversing: Native Gems, Part 1
* Part 2 - This goes into the details of how ruby loads the native gem and extension (and includes a nice sequence diagram of how all the bits happen together)
Link: Ruby Learning by Reversing: Native Gems, Part 2
* Part 3 - How do we ensure that we have everything and that it actually gets built at installation?
Link: Ruby Learning by Reversing: Native Gems, Part 3
* Part 4 - Understanding the development Makefil
Link: Ruby Learning by Reversing: Native Gems, Part 4

Future posts are planned to go into details like:
* Documenting the code
* Running the specs and the performance benchmark
* Enhancements:
- Providing an executable
- A gem that also works on JRuby
- Making the gem ractor friendly
- Patching an existing gem rather than a new module

Comments on the posts or the plans welcome. I'm @onghu on Twitter or @onghu@ruby.social on Mastodon if you're on either.

Best regards,
Mohit.