CommunityNews

CommunityNews

Definitive Guide to Ruby's C API

Before You Start

For the greatest chance of success with this guide, I recommend being fairly comfortable with C and very comfortable with Ruby.

Using Ruby’s C API does not require any advanced C concepts, however the API is huge and largely undocumented. After you start using it, you will likely find yourself delving through the Ruby source code at some point to figure out the behavior of some obscure function or macro. The Ruby source uses some fairly sophisticated C, so you should at least feel comfortable reading it.

You can think of the C API is being a big, clunky alternative to writing normal Ruby code. However the simple, elegant patterns of Ruby can be pretty unintuitive once translated into the language of the API. Having a strong intuition for Ruby’s internal logic and the ideas behind its design will go a long way toward steering you toward the correct API functions.

Read in full here:

https://silverhammermba.github.io/emberb/c/

This thread was posted by one of our members via one of our news source trackers.

Where Next?

Popular Backend topics Top

dimitarvp
Apparently he decided to live-stream how he’s going to create a semver library.
New
First poster: bot
The run-time speed and memory usage of programs written in Rust should about the same as of programs written in C, but overall programmin...
New
First poster: bot
Over the last few years, due in large part to the hype surrounding blockchain and cryptocurrencies, decentralized applications have gaine...
New
First poster: bot
Once a year, I look back at the recent developments in the PHP world, and also look forward to what’s to come. And just like in 2020 and ...
New
brainlid
We take a deeper dive with Nathan Long into IOLists in Elixir. We cover what they are, how they work, the power they have when concatenat...
New
First poster: bot
Too long have we hustled to deploy Clojure websites. Too long have we spun up one server instance per site. Too long have reminisced abou...
New
pablocostass
Todos coñecemos os focos de Erlang/Elixir máis renomeados do mundo, como a Suecia, o Brasil, a California ou Londres. Mais a comunidade, ...
New
brainlid
In episode 83 of Thinking Elixir, We talk with Isaac Yonemoto about the Zig language and his Zigler Elixir library. We learn where Zig ca...
New
ragamuf
Does the world need another How to create a blog article? Maybe not. But then again, creating something out of nothing is what we love....
New
mudasobwa
Peeper is the tiny library to preserve state across GenServer crashes/restarts. Works as an almost drop-in substitute for GenServer, sui...
New

Other popular topics Top

PragmaticBookshelf
Design and develop sophisticated 2D games that are as much fun to make as they are to play. From particle effects and pathfinding to soci...
New
New
AstonJ
I’ve been hearing quite a lot of comments relating to the sound of a keyboard, with one of the most desirable of these called ‘thock’, he...
New
PragmaticBookshelf
Rust is an exciting new programming language combining the power of C with memory safety, fearless concurrency, and productivity boosters...
New
Exadra37
On modern versions of macOS, you simply can’t power on your computer, launch a text editor or eBook reader, and write or read, without a ...
New
AstonJ
Do the test and post your score :nerd_face: :keyboard: If possible, please add info such as the keyboard you’re using, the layout (Qw...
New
dimitarvp
Small essay with thoughts on macOS vs. Linux: I know @Exadra37 is just waiting around the corner to scream at me “I TOLD YOU SO!!!” but I...
New
New
Help
I am trying to crate a game for the Nintendo switch, I wanted to use Java as I am comfortable with that programming language. Can you use...
New
First poster: bot
Large Language Models like ChatGPT say The Darnedest Things. The Errors They MakeWhy We Need to Document Them, and What We Have Decided ...
New