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.

0 1011 0

Where Next?

Popular Backend topics Top

dimitarvp
Apparently he decided to live-stream how he’s going to create a semver library.
12 1173 5
New
DevotionGeo
There are 3 main formatters for Erlang which you can use from the command-line, rebar3_format, Steamroller elmfmt. Visual Studio Cod...
10 2148 3
New
First poster: bot
Such inflammatory, much wow. Unfortunately, Haskell itself agrees. Some languages naturally lend themselves towards adoption. Some don’t...
0 1513 0
New
First poster: bot
The Race to Replace C & C++. Three expert compiler writers sit down to discuss moving beyond C and C++ This thread...
0 1302 0
New
AstonJ
Just finished doing a clean install of macOS (which I highly recommend btw!) and have updated my macOS Ruby & Elixir/Erlang dev env s...
3 1467 0
New
CommunityNews
Have you ever wanted to write a structurally typed function in Rust? Do you spend a lot of time and effort getting your Rust struct s jus...
5 992 1
New
New
AstonJ
Includes talk about concurrency and performance topics:
62 2073 23
New
First poster: bot
I wrote Python for the last 10 years, and I always tend to write code in a “functional” way - map, filter, lambda and so on, it makes me ...
0 1042 0
New
brainlid
Episode 244 of Thinking Elixir. News includes the release of Elixir 1.18.2 with various enhancements and bug fixes, a new experimental SQ...
1 227 0
New

Other popular topics Top

DevotionGeo
I know that these benchmarks might not be the exact picture of real-world scenario, but still I expect a Rust web framework performing a ...
36 6636 11
New
axelson
I’ve been really enjoying obsidian.md: It is very snappy (even though it is based on Electron). I love that it is all local by defaul...
38 4062 19
New
New
AstonJ
Continuing the discussion from Thinking about learning Crystal, let’s discuss - I was wondering which languages don’t GC - maybe we can c...
21 4800 7
New
rustkas
Intensively researching Erlang books and additional resources on it, I have found that the topic of using Regular Expressions is either c...
91 5152 43
New
AstonJ
If you get Can't find emacs in your PATH when trying to install Doom Emacs on your Mac you… just… need to install Emacs first! :lol: bre...
4 4891 0
New
First poster: joeb
The File System Access API with Origin Private File System. WebKit supports new API that makes it possible for web apps to create, open,...
43 3103 21
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...
8 3528 3
New
PragmaticBookshelf
Develop, deploy, and debug BEAM applications using BEAMOps: a new paradigm that focuses on scalability, fault tolerance, and owning each ...
40 2292 21
New
AstonJ
This is cool! DEEPSEEK-V3 ON M4 MAC: BLAZING FAST INFERENCE ON APPLE SILICON We just witnessed something incredible: the largest open-s...
0 3570 1
New