On Wed, Dec 19, 2007 at 08:29:59AM +0900, MonkeeSage wrote:
> On Dec 18, 9:17 am, "jwmerr... / gmail.com" <jwmerr... / gmail.com> wrote:
> > On Dec 17, 11:32 pm, Sharkie Landshark <shark.fin.s... / mac.com> wrote:
> >
> > > I want to write my core logics in a compiled language for 1) performance
> > > and 2) protecting my source code -- in case I will be selling my product
> > > to a customer.
> >
> > > What would be the most natural-supported-easy-fast language to do this
> > > in, given the many choices of language bridges?
> >
> > > I am particularly interested in,
> >
> > > 1) C
> > > 2) Objective C
> > > 3) Ocaml
> > > 4) Lisp (SBCL)
> > > 5) Scheme
[...]
> > There's rocaml:http://eigenclass.org/hiki/rocaml.  Never used it,
> > but thought I'd mention it.
> 
> I've been using rocaml lately, and I like it. OCaml isn't Haskell, but
> nobody's perfect! :P Seriously though, OCaml fits very well (imho) with the
> style of ruby (Hindley-Milner type inference + structural typing is very
                 =========================================================
> similar to duck typing), and rocaml makes it easy to
  ======================

Yes! I wish more people knew this. If anything, it would make the periodic
static vs. dynamic typing threads less boring. I've often started to write
about this for eigenclass.org, but I'm dropping more and more posts as of late
(I must be around ~75% rejection rate or so, and worsening).

> write extensions since it auto-generates all the glue code for you
> (similar to SWIG). You basically write a .ml file as you normally
> would, declare a few things about the interface, and rocaml does the
> rest. Doesn't work on windows yet I don't think (OCaml does, just not
> rocaml).

"Non-pure-Ruby" development on Windows is often difficult; even a plain old C
extension can be challenging. AFAIK, rocaml could in principle[1] work on
Win32, at least with the MinGW and cygwin builds of Ruby and OCaml (maybe with
the MSVC ones too, if the same compiler is used for both). So I believe that
rocaml should be usable on Win32 after some work in the Makefile generation
magic. I don't use Win32 myself so it will be up to some brave Win32 developer
to clear the path.

By the way,

> I've been using rocaml lately, and I like it. OCaml isn't Haskell, but
> nobody's perfect! :P 

What do you miss when you're doing OCaml instead of Haskell (apart from the
syntax, I assume :)? I sometimes ache for ad-hoc polymorphism; I'm looking
forward to the result of the attempt to bring type classes to OCaml.
How do you feel about the strict vs. non-strict semantics? One thing I love
about OCaml is that I can know what is happening under the hood and there are
no bad surprises (bad performance or unexpectedly high memory consumption).

[1] The inability of ocamlopt (up to 3.09.2 or so, 3.10.0 can on some
platforms) to generate PIC code is not a problem on win32, see [274896].
The next release of OCaml will feature dynamic loading of native code.

-- 
Mauricio Fernandez  -   http://eigenclass.org