From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p3DKepQI004563 for ; Wed, 13 Apr 2011 22:40:51 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuwIAIEJpk1ii1v2dGdsb2JhbACYbY1IAQwJDQcRBiLDJoVuBI1og28 X-IronPort-AV: E=Sophos;i="4.64,206,1301868000"; d="scan'208";a="92818454" Received: from nm14-vm0.bullet.mail.sp2.yahoo.com ([98.139.91.246]) by mail4-smtp-sop.national.inria.fr with SMTP; 13 Apr 2011 22:40:45 +0200 Received: from [98.139.91.68] by nm14.bullet.mail.sp2.yahoo.com with NNFMP; 13 Apr 2011 20:40:43 -0000 Received: from [98.136.185.28] by tm8.bullet.mail.sp2.yahoo.com with NNFMP; 13 Apr 2011 20:40:43 -0000 Received: from [127.0.0.1] by smtp109.mail.gq1.yahoo.com with NNFMP; 13 Apr 2011 20:40:43 -0000 X-Yahoo-Newman-Id: 812494.56599.bm@smtp109.mail.gq1.yahoo.com Received: from [192.168.1.80] (createsoftware@93.7.165.145 with plain) by smtp109.mail.gq1.yahoo.com with SMTP; 13 Apr 2011 13:40:43 -0700 PDT X-Yahoo-SMTP: nOQXzg.swBB4sp2etEdz2uv_gATJYHejNKHVByHxjw-- X-YMail-OSG: Yai5QdAVM1kOK4fHH7sWYaWaETVx7bcJQC9Z09qnpMoWHi. Ou3UD4moENqoZBFE3fUHkVXYEao1biYUZMneEEOR6eWH1LYQJWlLTUuBHMgH qu86rbI37ZKxmOQZrohZGkC2Q5Le4_L_L4x52S3yQyWPwJTvmXzE5dBkzwdY r9_0a.YFgReCX1MAL5CIPffzno9zAQ8uV1YfWTNlv4dqmG1aMDdb3UlKeORd 954lp0fhuHSJUutNpAwkeYSpue69vfOUoKyeE9cppIo836rE3vqhTDtn.2Qx m9itWZhIn_jpv4sAqnng4itE0LBEkNShgEmc7.MIK5FUb4H4k0q2jLHLecvc s_ODRo6l_MHI6kAzu35FeA.XfqZPLbUUF X-Yahoo-Newman-Property: ymail-3 Message-ID: <4DA60A48.8010404@users.sourceforge.net> Date: Wed, 13 Apr 2011 22:40:40 +0200 From: Create Software User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; fr; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: [Caml-list] Nicely written Caml/OCaml code to read. Hi all, I'll be taking exams at the end of the year (starting in a week, actually), which include programming / informatics tests. The language used in these exams is Caml Light (you guessed right: grandes écoles). I've done a lot of programming in previous years, but I didn't know Caml/OCaml before high school -- I come from a mixed C++/C# world, with drops of Python here and there. In developing my skill in other languages, I always found that reading good code at some point was a great boost to the beauty and cleanness of the programs I wrote. Usually, every language has it's own conventions, best practices, and I think you can usually learn a lot by reading well-written, nicely-crafted code. So here's my question: **which code would you recommend to read?** (As a side note, I'm not really interested (at least in the very short term) in anything on the object-oriented side of the language, since the notions used at the exam are limited to the elements available in Caml Light.) I've tried batteries and Jane street core/ext-core libraries, but the former has extremely few comments, and the latter is too widely optimized to be enjoyable to read (Jane street's map function is 30 lines long due to loop unrolling). Anything that deals with trees or finite state automata gets extra brownie points =) (and +2 if Gabriel Scherer answers) Thanks for your help! Clément. -- Create Software - Open source, lightweight, and efficient software - @createsoftware http://createsoftware.users.sourceforge.net - http://synchronicity.sourceforge.net