Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Erik de Castro Lopo <mle+ocaml@mega-nerd.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] - Convert Caml to C/C++, C#, PHP, etc -
Date: Fri, 10 Oct 2008 08:57:41 +1100	[thread overview]
Message-ID: <20081010085741.c099a21b.mle+ocaml@mega-nerd.com> (raw)
In-Reply-To: <200810091747.59342.kuba@mareimbrium.org>

Kuba Ober wrote:

> Um, since Ocaml can be compiled to bytecode and said bytecode executed
> by an interpreter written in C, that's sorta-kinda el-cheapo conversion
> right there. One can work backwards.

I'm pretty sure the original poster's intent was to convert the MTASC
compiler to C, C++ or PHP and then continue developement in the new
language.

Unfortunately, the machine conversion from languages as different as
Ocaml and the imperative laguages above result ins source code that
may compile in the target language, but is almost completely
unreadable by human programmers familiar with the target language.

Doing the conversion via bytecode would result in even less readable
code than the more direct route for the same reasons that we don't
have usable binary to high level language decompilers.

> Side note: is there an Ocaml bytecode-compiler written in Ocaml
> somewhere?

I'm pretty sure the vast majority of the standard Ocaml bytecode
compiler is written in Ocaml. The same is probably not true for
the bytecode VM.

Erik
-- 
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
Pastafarianism : http://www.venganza.org/
The intelligent alternative to 'Intelligent Design'.


  reply	other threads:[~2008-10-09 21:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-03  4:03 axllaruse
2008-10-03  4:18 ` Erik de Castro Lopo
2008-10-03  5:33   ` axllaruse
2008-10-03  5:39     ` Erik de Castro Lopo
2008-10-03  8:06       ` Sylvain Le Gall
2008-10-03  9:56       ` [Caml-list] " Roberto Bagnara
2008-10-09 21:47       ` Kuba Ober
2008-10-09 21:57         ` Erik de Castro Lopo [this message]
2008-10-10  4:26           ` Jon Harrop
2008-10-10  3:30             ` Erik de Castro Lopo
2008-10-10  4:55               ` Jon Harrop
2008-10-10 14:25                 ` Mauricio Fernandez
2008-10-10 12:37           ` Kuba Ober
2008-10-10 13:38             ` Basile STARYNKEVITCH
2008-10-03 16:57     ` David Teller
2008-11-17 14:30     ` Nicolas Cannasse
2008-10-03  9:50 ` Erkki Seppala

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081010085741.c099a21b.mle+ocaml@mega-nerd.com \
    --to=mle+ocaml@mega-nerd.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox