From: "Ara.T.Howard" Date: 2005-07-21T08:15:55+09:00 Subject: Re: Ruby/OCaml Was Re: [WAY OT] Re: Ruby/Rails as a starter language? On Thu, 21 Jul 2005, Rick Nooner wrote: >> I was just at the OCaml site, >> http://caml.inria.fr/pub/docs/manual-ocaml/manual032.html >> looking at what it would *really* take to do this and it >> seems very possible. >> >> OCaml supports mixed C/OCaml libraries, too. Lot's of >> possibilities. >> >> Maybe I'll look into it further. It would be useful for me. >> >> Rick > > Well, I looked into it and it is far easier that I thought. > > I wrote a small fibonacci function in OCaml (actually took the > example from the OCaml docs), wrapped it in a C library, > built a ruby extension that loads the OCaml runtime and called > the fib function, passing in an integer and returning the > calculated value as a Ruby value. > > It might not seem like much but it proves that OCaml can > be easily interfaced with Ruby. > > It's not bullet proof but it could be made so. > > There is too much to it to explain on the list. I'll put up > a web page with code and explainations if people are interested. go rick! http://sciruby.codeforpeople.com/sr.cgi/ProjectIdeas http://sciruby.codeforpeople.com/sr.cgi/ProjectIdeas/RubyOCaml i added you to http://sciruby.codeforpeople.com/sr.cgi/MemberGroup you'll have to login and setup a password the first time. cheers. -a -- =============================================================================== | email :: ara [dot] t [dot] howard [at] noaa [dot] gov | phone :: 303.497.6469 | My religion is very simple. My religion is kindness. | --Tenzin Gyatso ===============================================================================