# Is the Ruby executable written in C?

**URL:** <https://www.ruby-forum.com/t/is-the-ruby-executable-written-in-c/55049>\
**Category:** Ruby\
**Created:** [December 30, 2005, 4:40pm UTC](https://www.ruby-forum.com/t/is-the-ruby-executable-written-in-c/55049 "2005-12-30T16:40:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![spiz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@spiz](https://www.ruby-forum.com/u/spiz)\
**Post date:** [December 30, 2005, 4:40pm UTC](https://www.ruby-forum.com/t/is-the-ruby-executable-written-in-c/55049/1 "2005-12-30T16:40:21Z")

</div>

Hi all,

Is the Ruby executable written in C?

Thanks

SteveT

Steve L.

> **[Troubleshooters.Com](http://www.troubleshooters.com)**
>
> The process and mindset of troubleshooting.

removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![spiz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@spiz](https://www.ruby-forum.com/u/spiz)\
**Post date:** [December 30, 2005, 4:52pm UTC](https://www.ruby-forum.com/t/is-the-ruby-executable-written-in-c/55049/2 "2005-12-30T16:52:37Z")

</div>

On Dec 30, 2005, at 9:39 AM, Steve L. wrote:

> Hi all,
> 
> Is the Ruby executable written in C?

In a word: Yes.

James Edward G. II

---

<div class="post-metadata">

**Author:** ![spiz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@spiz](https://www.ruby-forum.com/u/spiz)\
**Post date:** [December 30, 2005, 6:52pm UTC](https://www.ruby-forum.com/t/is-the-ruby-executable-written-in-c/55049/3 "2005-12-30T18:52:28Z")

</div>

At 12:50 AM +0900 12/31/05, James Edward G. II wrote:

> On Dec 30, 2005, at 9:39 AM, Steve L. wrote:
> 
> > Hi all,
> > 
> > Is the Ruby executable written in C?
> 
> In a word: Yes.

modulo JRuby

---

<div class="post-metadata">

**Author:** ![spiz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@spiz](https://www.ruby-forum.com/u/spiz)\
**Post date:** [December 31, 2005, 12:48pm UTC](https://www.ruby-forum.com/t/is-the-ruby-executable-written-in-c/55049/4 "2005-12-31T12:48:29Z")

</div>

Steve L. wrote:

> Is the Ruby executable written in C?

It seems to be written in a version of C that I found a little difficult  
to read. It uses old K&R style function declarations, and uses macros  
in places I’m not used to seeing them. Honestly, I’d love to spend some  
time hacking the VM, but it looks prohibitively difficult. Maybe  
someone will enlighten me. 🙂

---

<div class="post-metadata">

**Author:** ![spiz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@spiz](https://www.ruby-forum.com/u/spiz)\
**Post date:** [December 31, 2005, 1:00pm UTC](https://www.ruby-forum.com/t/is-the-ruby-executable-written-in-c/55049/5 "2005-12-31T13:00:39Z")

</div>

Steve L. wrote:

> Hi all,
> 
> Is the Ruby executable written in C?

yes.

---

<div class="post-metadata">

**Author:** ![spiz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@spiz](https://www.ruby-forum.com/u/spiz)\
**Post date:** [December 31, 2005, 2:52pm UTC](https://www.ruby-forum.com/t/is-the-ruby-executable-written-in-c/55049/6 "2005-12-31T14:52:17Z")

</div>

On Sat, Dec 31, 2005 at 10:34:19PM +0900, Christian N. wrote:

> > difficult. Maybe someone will enlighten me. 🙂
> 
> The Perl source is worse.

According to Nat Torkington, the Perl source is “an interconnected mass  
of livers and pancreas and lungs and little sharp pointy things and the  
occasional exploding kidney.”

–  
Chad P. [CCD CopyWrite | [http://ccd.apotheon.org](http://ccd.apotheon.org) ]

“A script is what you give the actors. A program  
is what you give the audience.” - Larry Wall

---

<div class="post-metadata">

**Author:** ![spiz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@spiz](https://www.ruby-forum.com/u/spiz)\
**Post date:** [December 31, 2005, 4:46pm UTC](https://www.ruby-forum.com/t/is-the-ruby-executable-written-in-c/55049/7 "2005-12-31T16:46:25Z")

</div>

Jeffrey S. wrote:

> Steve L. wrote:
> 
> > Is the Ruby executable written in C?
> 
> It seems to be written in a version of C that I found a little difficult  
> to read. It uses old K&R style function declarations, and uses macros  
> in places I’m not used to seeing them. Honestly, I’d love to spend some  
> time hacking the VM, but it looks prohibitively difficult. Maybe  
> someone will enlighten me. 🙂

Might be an acquired taste. I’ve not done any regular C coding in many  
years, (which may have helped here) but when crawling through the Ruby  
source some years back, in preparation for a book, I found it fairly  
easy to get used to the naming and coding conventions and figure things  
out. It was a great help when trying to determine if some class or  
method had any potentially unexpected behavior that was not documented,  
or not documented correctly.

(I realize it may seem pretty obvious to say that the source code is a  
good place to look for this information, the point being that it is  
quite readable.)

James

–

[http://www.ruby-doc.org](http://www.ruby-doc.org) - Ruby Help & Documentation  
[Ruby Code & Style](http://www.artima.com/rubycs/) - Ruby Code & Style: Writers wanted  
[http://www.rubystuff.com](http://www.rubystuff.com) - The Ruby Store for Ruby Stuff  
[http://www.jamesbritt.com](http://www.jamesbritt.com) - Playing with Better Toys  
[http://www.30secondrule.com](http://www.30secondrule.com) - Building Better Tools

---

<div class="post-metadata">

**Author:** ![spiz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@spiz](https://www.ruby-forum.com/u/spiz)\
**Post date:** [December 31, 2005, 2:37pm UTC](https://www.ruby-forum.com/t/is-the-ruby-executable-written-in-c/55049/8 "2005-12-31T14:37:01Z")

</div>

Jeffrey S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

> Steve L. wrote:
> 
> > Is the Ruby executable written in C?
> 
> It seems to be written in a version of C that I found a little  
> difficult to read. It uses old K&R style function declarations, and  
> uses macros in places I’m not used to seeing them. Honestly, I’d love  
> to spend some time hacking the VM, but it looks prohibitively  
> difficult. Maybe someone will enlighten me. 🙂

The Perl source is worse.

_scnr_,
