Definitive Guide to Ruby's C API
silverhammermba.github.io
silverhammermba.github.io
I tried 10, 100 and 1000 concurrent connections.
That said, if Ruby were to get an option to statically compile into a standalone binary, I might check it out again. It really is expressive and joyful.
I don't relish the thought of going back to loops though. Or not having a good REPL.
Deno appeals to me, but isn't very portable yet. Also has a limited node style REPL (can't reload files).
I am now seeing a similar lull in the Node space, which I also cover, but it, too, will surely pass through it unscathed.
I wrote and retooled a bunch of Ruby C extensions. Back in my day, we looked at other extensions to see how things worked. And then sometimes looked at the docs.
For people who want to use LSP + clangd to explore the Ruby codebase, I wrote up some instructions here:
https://blog.jez.io/clangd-ruby/
tl;dr: Bear[1] is a tool that hijacks a process tree, looks for calls to clang, records the args it was given, and serializes those out into a compile_commands.json file that can be consumed by various clang tools, including clangd. It's really slick and in my experience Just Works (the highest praise, IMO).
You can use more or less the same trick described in that post to get the Ruby C extensions you build working with LSP + clangd (no guide for this, but it should be self-evident from reading the original guide).
That's how I ran across this reference, but from the other direction — I've been reading the MRI codebase with the goal of writing faster/better Ruby :)
I've been working on my own version of a file-type identification library (even before the recent `mimemagic` drama) and have found it very necessary to understand the way allocation works since the code in question sits in my app's startup path and gets referenced more frequently than anything else. This post series by Pat Shaughnessy was also very useful for me: http://patshaughnessy.net/2013/2/8/ruby-mri-source-code-idio...
msbuild YourProject.sln /p:Configuration=Release /p:DesignTimeBuild=true /t:_PrintIntellisenseInfo
The _PrintIntellisenseInfo target is the key, and "lying" to the rules that you are the IDE - e.g DesignTimeBuild=true.
This prints almost the info you want for compilation_database.json