From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id E6938BC37 for ; Tue, 26 Jan 2010 01:14:28 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApICAGDCXUvRVaAsimdsb2JhbACCF48QPYISh1M/AQEBCgkMBxEFrhKBQIRhiEgBAQMFhDQE X-IronPort-AV: E=Sophos;i="4.49,343,1262559600"; d="scan'208,217";a="50249361" Received: from mail-pw0-f44.google.com ([209.85.160.44]) by mail1-smtp-roc.national.inria.fr with ESMTP; 26 Jan 2010 01:14:27 +0100 Received: by pwi15 with SMTP id 15so2861593pwi.3 for ; Mon, 25 Jan 2010 16:14:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:references :in-reply-to:subject:date:message-id:mime-version:content-type :x-mailer:thread-index:content-language; bh=9Wg1llFPaMPCl006MyLyQ9kPB1aVv2qIE5iY0GBq2Fk=; b=acFm8s5FQGbOBx+Lc84edD2Kac+Z9qxBnO6rqs77Xl6zTwHGvn6XVDkS9Jdr4NC8RL nvSk4Kha/cLf48c2/pgFVM8bqATvIR2vwaW+8CWk8lprymP6AM5CWSzxpBbj3SEyfKJJ ewUhSjDBTQqHjcyjDve7fPAAFFApZRbBjtZt4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-type:x-mailer:thread-index:content-language; b=cc9V5XTOWrLqMD/8ot9WCnLKJKmORNj1D992iAmfAjz76aylRb4c6PkvVe8K1YJIag hCyQrHtyUKV/hlAiV8X4OcXBu3q5XvPjNsbMOsmBE+sqbUR0+HIpWKs3i6eq8NU+Sj0w e1kD1N0Re4dZBqWsx0Aa9RlhRIw8/JocE9FIs= Received: by 10.142.6.19 with SMTP id 19mr1262703wff.131.1264464866652; Mon, 25 Jan 2010 16:14:26 -0800 (PST) Received: from psr1913plus16 ([32.177.10.214]) by mx.google.com with ESMTPS id 22sm5287238pzk.6.2010.01.25.16.14.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 25 Jan 2010 16:14:25 -0800 (PST) From: "Alexander Voinov" To: "'blue storm'" Cc: "'Damien Doligez'" , References: <4b523e9c.0d67f10a.06ab.ffffced7@mx.google.com> <003801ca9702$a72e2b30$f58a8190$@com> <527cf6bc1001170024r1e74b0dal38c92924037f2788@mail.gmail.com> <005b01ca9e07$c254d6a0$46fe83e0$@com> <527cf6bc1001251432n1e72c0b6idd26154e32cccfb9@mail.gmail.com> In-Reply-To: <527cf6bc1001251432n1e72c0b6idd26154e32cccfb9@mail.gmail.com> Subject: RE: [Caml-list] A syntax extension to simplify List manipulation Date: Mon, 25 Jan 2010 16:14:16 -0800 Message-ID: <006201ca9e1c$825f5880$871e0980$@com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0063_01CA9DD9.743C1880" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcqeDjzIl1jIz/qSTQ2tNUdtUNsgnQABim9w Content-Language: en-us X-Spam: no; 0.00; voinov:01 syntax:01 syntax:01 compiler:01 camlp:01 voinov:01 damien:01 uncomment:01 makefile:01 compiler:01 compile-time:01 makefile:01 command-line:01 runtime:01 camlp:01 This is a multi-part message in MIME format. ------=_NextPart_000_0063_01CA9DD9.743C1880 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi I've thrown in your version and used it within that big app, a portion of which I've presented as an 'example' for the syntax extension. Everything works well. I've also checked that the compiler correctly points to locations of syntax errors (probably this was the problem which forced me to move to camlp5). I will test it more. Can I incorporate your contribution into the deliverable for that extension? Now that this tiny project grows, it's probably worth introducing a configure script with parameters like --without-interatei and --enable-camlp5. Thank you! Alexander From: blue storm [mailto:bluestorm.dylc@gmail.com] Sent: Monday, January 25, 2010 2:32 PM To: Alexander Voinov Cc: Damien Doligez; caml-list@yquem.inria.fr Subject: Re: [Caml-list] A syntax extension to simplify List manipulation On Mon, Jan 25, 2010 at 10:45 PM, Alexander Voinov wrote: I've updated this extension to remove the dependency on ExtLib (as suggested previously). The price is that iteratei is not available with the core List module. If you do need iteratei, first uncomment the # WITH_ITERATEI = 1 line in the Makefile (and do a fresh build), and, second, always open ExtLib;; I think you should keep iteratei by default : if the user use an insufficient List module, he will get a classical "unbound value List.iteratei" error from the compiler, and will easily relate it to the code using your extension (as the "iteratei" name is apparent). If you document that point, it could be much easier than a compile-time option that requires one to edit the Makefile. If you really want an option to disallow iteratei syntaxically, you could use command-line options to make that choice at runtime (that would be more flexible). I don't know how well camlp5 handle command-line parameters, so I can't help you there. Regarding camlp4, I don't remember why this extension didn't work with it after that big refactoring, which gave birth to camlp5. I'm making a TODO for myself to take a look at this. In case you're interested, attached is a short camlp4 (>= 3.10) port of your extension (wich wasn't thoroughly tested). As you can see, changes are minimal. This is just in case, I don't have any opinion on what preprocessor you should use. The tarball is: http://www.voinov.org/FP/spbSyntax-1.0.1.tgz (and also http://www.voinov.org/FP/spbSyntax.tgz) PS : the software license is the zlib/png license. Maybe you should mention it explicitely. ------=_NextPart_000_0063_01CA9DD9.743C1880 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi

 

I’ve thrown in your version and used it within that = big app, a portion of which I’ve presented as an ‘example’ = for the syntax extension. Everything works well. I’ve also checked = that the compiler correctly points to locations of syntax errors (probably this = was the problem which forced me to move to camlp5). I will test it = more.

 

Can I incorporate your contribution into the deliverable = for that extension?

 

Now that this tiny project grows, it’s probably = worth introducing a configure script with parameters like --without-interatei = and --enable-camlp5.

 

Thank you!

 

Alexander

 

 

From:= blue storm [mailto:bluestorm.dylc@gmail.com]
Sent: Monday, January 25, 2010 2:32 PM
To: Alexander Voinov
Cc: Damien Doligez; caml-list@yquem.inria.fr
Subject: Re: [Caml-list] A syntax extension to simplify List manipulation

 

On Mon, Jan 25, 2010 at 10:45 PM, Alexander Voinov = <avoinov@gmail.com> = wrote:

I've updated this extension to remove the = dependency on ExtLib (as suggested
previously). The price is that iteratei is not available with the core = List
module.

If you do need iteratei, first uncomment the

# WITH_ITERATEI =3D 1

line in the Makefile (and do a fresh build), and, second, always

open ExtLib;;


I think you should keep iteratei by default : if the user use an = insufficient List module, he will get a classical "unbound value = List.iteratei" error from the compiler, and will easily relate it to the code using = your extension (as the "iteratei" name is apparent).
If you document that point, it could be much easier than a compile-time = option that requires one to edit the Makefile. If you really want an option to disallow iteratei syntaxically, you could use command-line options to = make that choice at runtime (that would be more flexible).
I don't know how well camlp5 handle command-line parameters, so I can't = help you there.

Regarding camlp4, I don't remember why this = extension didn't work with it
after that big refactoring, which gave birth to camlp5. I'm making a = TODO
for myself to take a look at this.


In case you're interested, attached is a short camlp4 (>=3D 3.10) = port of your extension (wich wasn't thoroughly tested). As you can see, changes are = minimal. This is just in case, I don't have any opinion on what preprocessor you = should use.
 

The tarball is: http://www.voinov.org/FP/spbSyntax-1.0.1.tgz

(and also http://www.voinov.org/FP/spbSyntax.tgz)<= /p>

 

PS : the software license is the zlib/png license. = Maybe you should mention it explicitely.

------=_NextPart_000_0063_01CA9DD9.743C1880--