Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Compiling Ocaml sources to c sources
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-09-15 (19:55)
From: Basile Starynkevitch <basile@s...>
Subject: Re: [Caml-list] Compiling Ocaml sources to c sources
On Wed, 15 Sep 2010 15:04:30 +0200
Vincent Gripon <> wrote:

>   Hi Thomas,
> Basile's suggestion allows us to use the whole OCaml syntax with no real 
> need for coding. That's why we are planing to use it.
> Thank you for your solution.

I am not sure to follow what you call "Basile's suggestion" exactly. If
it is ocamljitrun.c it is just a tiny improvement over interp.c from
ocaml distribution. Of course you don't need my permission to use
ocamljitrun.c provided you respect its licence and its copyright owner
(which is INRIA, which was my employer at the time I wrote it).

And after glancing quickly at
I was not able to easily find mention of a fixed set of languages like
C, C#, Java, C++.

However, perhaps in reality, your question becomes: what is source code
in the eyes of an expert (the human jury of your competition). This
don't have any easy or trivial answer. Maybe your answer should take
into account the preference of the jury.

The definition I usually like the most is that source code is the form
of code which is preferred by the programmer (I think it is a GNU
definition, or perhaps an FSF one). But again, this could be subject to
interpretation, and lawyers or programmers have different views on it.
And different programmers have different preferences (just think about
the role of comments; there are probably important in your competition,
but they don't mean anything to Ocaml.).

Source code is not necessarily even a textual file (but in Ocaml or C
it usually is; however I could be very pedantic and claim that source
code for me is the code picture with syntax hightlighting and colors -as
provided by my favorite editor's setting.). Likewise, I am not able to
give a precise definition of what a text is (are two different
translations or editions of the Bible the same text?).

There used to be systems where source code was not textual. Long long
time ago, at IRIA (the predecessor of INRIA) there used to be systems
like Centaur... I also remember having a read a paper about Galaxy and
hypertext programming (forgot the references).

Good luck for the competition.

email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***