# \[OT\] ruby4caml?

**URL:** <https://rubytalk.org/t/ot-ruby4caml/12762>\
**Category:** ruby-talk\
**Created:** [26 July 2004 15:11 UTC](https://rubytalk.org/t/ot-ruby4caml/12762 "2004-07-26T15:11:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Berger3](https://avatars.discourse-cdn.com/v4/letter/d/c68b51/32.png) [@Daniel\_Berger3](https://rubytalk.org/u/Daniel_Berger3)\
**Post date:** [26 July 2004 15:11 UTC](https://rubytalk.org/t/ot-ruby4caml/12762/1 "2004-07-26T15:11:50Z")

</div>

Hi all,

Has anyone written any sort of Ruby for OCaml stuff? I found this for Perl:

[http://www.merjis.com/developers/perl4caml](http://www.merjis.com/developers/perl4caml)

I might be more inspired to learn OCaml if something like ruby4caml existed. 🙂

Regards,

Dan

---

<div class="post-metadata">

**Author:** ![Lennon\_Day-Reynolds1](https://avatars.discourse-cdn.com/v4/letter/l/5f8ce5/32.png) [@Lennon\_Day-Reynolds1](https://rubytalk.org/u/Lennon_Day-Reynolds1)\
**Post date:** [26 July 2004 16:38 UTC](https://rubytalk.org/t/ot-ruby4caml/12762/2 "2004-07-26T16:38:29Z")

</div>

OCaml is one of those languages which I've always wanted to learn, and  
in fact have an almost yearly practice of sitting down with a spare  
weekend and every intention of doing so. Every time, though, the  
(IMHO) awkward way in which the language marries functional,  
procedural, and OO paradigms just puts me off.

It's not that I don't appreciate having all those styles available to  
me -- indeed, Ruby's natural support for functional composition are  
one of its major draws for me -- but the OCaml language model is just  
\*huge\*. All of the paradigms supported have their own syntax and  
semantics, and they only seem to really combine at the primitive  
typing level.

That being said, it looks like the perl4caml tool is basically just a  
FFI binding of the Perl runtime to OCaml by way of C; you could do the  
same for the Ruby C API without too much difficulty.

Lennon

---

<div class="post-metadata">

**Author:** ![Ptkwt](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@Ptkwt](https://rubytalk.org/u/Ptkwt)\
**Post date:** [26 July 2004 17:21 UTC](https://rubytalk.org/t/ot-ruby4caml/12762/3 "2004-07-26T17:21:51Z")

</div>

In article \<6e613a32.0407260710.3da30549@posting.google.com\>,

> **···**
>
> Daniel Berger \<djberg96@hotmail.com\> wrote:
> 
> > Hi all,
> > 
> > Has anyone written any sort of Ruby for OCaml stuff? I found this for Perl:
> > 
> > [http://www.merjis.com/developers/perl4caml](http://www.merjis.com/developers/perl4caml)
> > 
> > I might be more inspired to learn OCaml if something like ruby4caml existed. 🙂
> 
> THAT's pretty cool! (it allows you to inline Perl code in your OCaml  
> code) I wonder how hard it would be to create ruby4OCaml? Probably they  
> just made an OCaml extension of the Perl eval code.
> 
> Phil
