From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id A7FD7BC58 for ; Wed, 15 Sep 2010 15:03:23 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvkAAB5hkEzAbHMMmWdsb2JhbACDG5BMjgwVAQEBAQEICwoHESKwQ5IShE10BI0q X-IronPort-AV: E=Sophos;i="4.56,371,1280700000"; d="vcf'?scan'208";a="57314417" Received: from coliposte.enst-bretagne.fr ([192.108.115.12]) by mail3-smtp-sop.national.inria.fr with ESMTP; 15 Sep 2010 15:03:23 +0200 Received: from localhost (localhost.localdomain [127.0.0.1]) by coliposte.enst-bretagne.fr (8.13.7/8.13.7/2009.11.10) with ESMTP id o8FD3Qn9017125; Wed, 15 Sep 2010 15:03:26 +0200 Received: from courrier.enst-bretagne.fr (smtps.enst-bretagne.fr [10.29.90.4]) by coliposte.enst-bretagne.fr (8.13.7/8.13.7/2009.11.10) with ESMTP id o8FD3Jug017085; Wed, 15 Sep 2010 15:03:22 +0200 Received: from [10.66.144.72] (pc-salsa-elec-072.ext.enst-bretagne.fr [10.66.144.72]) (user=vgripon mech=PLAIN bits=0) by courrier.enst-bretagne.fr (8.13.8/8.13.8/2010.02.22) with ESMTP id o8FD3GKZ004389 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 15 Sep 2010 15:03:16 +0200 Message-ID: <4C90C45E.70308@telecom-bretagne.eu> Date: Wed, 15 Sep 2010 15:04:30 +0200 From: Vincent Gripon User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.10pre) Gecko/20100914 Shredder/3.1.5pre MIME-Version: 1.0 To: Thomas Gazagnaire Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Compiling Ocaml sources to c sources References: <4C8F660B.4060901@telecom-bretagne.eu> <1284468428.2252.400.camel@saorge.inria.fr> In-Reply-To: <1284468428.2252.400.camel@saorge.inria.fr> Content-Type: multipart/mixed; boundary="------------020200000302030307030201" X-Virus-Scanned: amavisd-new at enst-bretagne.fr X-Spam: no; 0.00; ocaml:01 ocaml:01 syntax:01 planing:01 cheers:01 bigloo:01 compiler:01 syntax:01 functors:01 variants:01 cheers:01 www-sop:01 0200,:01 planing:01 compilable:01 X-Attachments: cset="UTF-8" cset="utf-8" name="vincent_gripon.vcf" name="vincent_gripon.vcf" This is a multi-part message in MIME format. --------------020200000302030307030201 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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. Cheers! On 09/14/2010 02:47 PM, Thomas Gazagnaire wrote: > Hi Vincent! > > you can try camloo [1] which compiles (old-syntax) caml-light to bigloo, > which is a scheme to C compiler. I reckon it would be quite easy to > update it to parse the ocaml syntax if you don't use > functors/objects/variants/labels/thread (ie. if you use only what is > available in caml-light). > > Cheers, > Thomas > > [1] http://www-sop.inria.fr/members/Thomas.Gazagnaire/ > > > On Tue, 2010-09-14 at 14:09 +0200, Vincent Gripon wrote: >> Hello, >> >> We are currently planing to participate to a programming contest. This >> contest allows the use of four languages (C/C#/C++/java) but not >> OCaml. >> >> We would like to use Ocaml as it is to us the language that fits the >> most the kind of exercises proposed. The organizers don't mind if we >> use OCaml as long as we provide an easily compilable C source to them, >> even if it is not readable. >> >> Is there any platform independent way to compile OCaml sources to C >> sources? And if not, do you have any pointer (we gave a try at >> compiling OCaml sources to C object files using the -output-obj option >> but couldn't compile then the resulting file with our C compiler)? >> >> Best, >> >> Vincent >> _______________________________________________ >> Caml-list mailing list. Subscription management: >> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list >> Archives: http://caml.inria.fr >> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners >> Bug reports: http://caml.inria.fr/bin/caml-bugs > --------------020200000302030307030201 Content-Type: text/x-vcard; charset=utf-8; name="vincent_gripon.vcf" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="vincent_gripon.vcf" YmVnaW46dmNhcmQNCmZuOlZpbmNlbnQgR3JpcG9uDQpuOkdyaXBvbjtWaW5jZW50DQpvcmc6 VGVsZWNvbSBCcmV0YWduZTtDb21wdXRlciBTY2llbmNlIGFuZCBUZWxlY29tbXVuaWNhdGlv bnMNCmFkcjo7O1RlbGVjb20gQnJldGFnbmUgLSBUZWNobm9wb2xlIEJyZXN0IElyb2lzZTtC cmVzdCBDZWRleCAzOzsyOTIzODtGcmFuY2UNCmVtYWlsO2ludGVybmV0OnZpbmNlbnQuZ3Jp cG9uQGVucy1jYWNoYW4ub3JnDQp0aXRsZTpQaEQgU3R1ZGVudA0KdGVsO3dvcms6KzAwMzMg MiAyOSAwMCAxNTg2DQp1cmw6aHR0cDovL3BlcnNvLmVsZXZlcy5icmV0YWduZS5lbnMtY2Fj aGFuLmZyL35ncmlwb24NCnZlcnNpb246Mi4xDQplbmQ6dmNhcmQNCg0K --------------020200000302030307030201--