caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jon Harrop <jonathandeanharrop@googlemail.com>
To: "'Yoann Padioleau'" <padator@wanadoo.fr>
Cc: <caml-list@yquem.inria.fr>
Subject: RE: [Caml-list] [Was: OCamlJit 2.0]
Date: Sat, 20 Nov 2010 18:05:50 -0000	[thread overview]
Message-ID: <04ee01cb88dd$91c04d00$b540e700$@com> (raw)
In-Reply-To: <1BAB09A3-7235-4744-8401-06BA5E24A464@wanadoo.fr>

Yoann Padioleau wrote:
> On Nov 20, 2010, at 9:08 AM, Jon Harrop wrote:
> >> Do we have example of big companies porting their whole codebase to
> >> another language ?
> >
> > Yes, of course. Companies modernise all the time. We have a client
> > who just
> > started porting 1MLOC of C++ to F#.
> 
> How they do that ? Are they using compiler frontends to assist them
> in automatically translating part of the code to F# ?

We do it for them for a fee, using magic. We tried automated translation
(from Fortran) but it is usually easier just to knuckle down by hand. Old
code bases are usually 90% cruft anyway. That 1MLOC of C++ could have been
100kLOC of C++ but now it will be 10kLOC of F# instead.

> > Flying Frog have ported hundreds of thousands of lines of OCaml to F#.
> 
> OCaml and F# are very similar language, so such porting does not look
> that hard.

Yes. The main thing is that OCaml source is nice and readable so it is easy
to translate even if it makes heavy use of features that don't port
(polymorphic variants, macros). C++ source can be a nightmare so you really
need to pin down a precise specification for what it does using advanced
techniques like poking it with a stick.

> Translating from C++ to F#,  or from PHP to Java seems more
> complicated.
> I wonder what kind of techniques people have developed to help such
> language-to-language translation.

The only viable option seems to be to do it by hand. You can churn through
an enormous amount of code when you put your mind to it...

Cheers,
Jon.



  parent reply	other threads:[~2010-11-20 18:05 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-16 14:52 OCamlJit 2.0 Benedikt Meurer
2010-11-16 17:07 ` [Caml-list] " bluestorm
2010-11-16 17:32   ` Benedikt Meurer
2010-11-17  8:44 ` Native toplevel? (was: OCamlJit 2.0) Alain Frisch
2010-11-17 10:46   ` Satoshi Ogasawara
2010-11-17 11:38   ` Sylvain Le Gall
2010-11-17 22:57   ` [Caml-list] Native toplevel? Wojciech Daniel Meyer
2010-11-18 16:49   ` [Caml-list] Native toplevel? (was: OCamlJit 2.0) Ashish Agarwal
2010-11-19 18:09     ` David MENTRE
2010-11-19 18:24       ` Hezekiah M. Carty
2010-11-19 18:30         ` Ashish Agarwal
2010-11-19 18:42           ` Benedikt Meurer
2010-11-20 11:49     ` Jon Harrop
2010-11-18 18:19   ` Benedikt Meurer
     [not found]   ` <2025993285.616104.1290144569061.JavaMail.root@zmbs4.inria.fr>
2010-11-19 10:02     ` [Caml-list] Re: Native toplevel? Fabrice Le Fessant
2010-11-19 19:16       ` Benedikt Meurer
2010-11-19 18:43 ` [Caml-list] OCamlJit 2.0 Yoann Padioleau
2010-11-19 19:10   ` Benedikt Meurer
2010-11-20 15:59     ` Yoann Padioleau
2010-11-19 19:46   ` Dario Teixeira
2010-11-19 20:20     ` Yoann Padioleau
2010-11-20 15:19       ` [Was: OCamlJit 2.0] Vincent Balat
2010-11-20 15:42         ` [Caml-list] " Benedikt Meurer
2010-11-20 16:10           ` Yoann Padioleau
2010-11-20 16:25             ` Benedikt Meurer
2010-11-20 17:35               ` Yoann Padioleau
2010-11-20 17:08             ` Jon Harrop
2010-11-20 17:37               ` Yoann Padioleau
2010-11-20 17:48                 ` Sylvain Le Gall
2010-11-20 18:51                   ` [Caml-list] " Jon Harrop
2010-11-20 18:05                 ` Jon Harrop [this message]
2010-11-20 17:15             ` [Caml-list] " Gerd Stolpmann
2010-11-23  2:09             ` Elias Gabriel Amaral da Silva
2010-11-24  7:20     ` [Caml-list] OCamlJit 2.0 Alain Frisch
2010-11-24  7:59       ` Yoann Padioleau
2010-11-24  9:04       ` Compiling to Javascript Jerome Vouillon

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='04ee01cb88dd$91c04d00$b540e700$@com' \
    --to=jonathandeanharrop@googlemail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=padator@wanadoo.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;
as well as URLs for NNTP newsgroup(s).