From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 7EBC07EC6E for ; Fri, 17 Jan 2014 00:00:06 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of pfitzen@pfitzenmaier.de) identity=pra; client-ip=81.169.146.217; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="pfitzen@pfitzenmaier.de"; x-sender="pfitzen@pfitzenmaier.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of pfitzen@pfitzenmaier.de) identity=mailfrom; client-ip=81.169.146.217; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="pfitzen@pfitzenmaier.de"; x-sender="pfitzen@pfitzenmaier.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mo4-p00-ob.smtp.rzone.de) identity=helo; client-ip=81.169.146.217; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="pfitzen@pfitzenmaier.de"; x-sender="postmaster@mo4-p00-ob.smtp.rzone.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap0BAJFf2FJRqZLZnGdsb2JhbABZg0ODVLkiFg4BAQEBAQYNCQkUKIIcMx0JMRQJAT4CPxQwh3cJqCF2g2KYTAaPHIIZDzGBSZlWhH4SjwQ X-IPAS-Result: Ap0BAJFf2FJRqZLZnGdsb2JhbABZg0ODVLkiFg4BAQEBAQYNCQkUKIIcMx0JMRQJAT4CPxQwh3cJqCF2g2KYTAaPHIIZDzGBSZlWhH4SjwQ X-IronPort-AV: E=Sophos;i="4.95,670,1384297200"; d="scan'208,217";a="53610777" Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.217]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 17 Jan 2014 00:00:06 +0100 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1389913205; l=1481; s=domk; d=pfitzenmaier.de; h=Content-Type:MIME-Version:Subject:To:Reply-To:From:Date: X-RZG-CLASS-ID:X-RZG-AUTH; bh=XqK/6OryLMnXUxcZIYfk/JIZomc=; b=rLwByw0F435d6F4QXjlK+t9oFKgZRnUo+4TzxfLulXj5DCMwo6NP/87Mcr2tEpZKnQ6 Cg0TO6Dlzs+2sn7QliNUFfYqayfbSUC2Nyud+y5EZaosdwibbjUapiidfgdeppL1pvb4w XjDryN/kwNyIE6JaWPNrjaZAT7MDKSoKfXA= X-RZG-AUTH: :PGoNYVqtdd9e5qjsw4bqNNiSv2Gv8YbVG2pJaimL+rDBgj9+ODlitBMPUplZD09kEq8= X-RZG-CLASS-ID: mo00 Received: from omgreatgod.store (com4.strato.de [81.169.145.237]) by smtp.strato.de (RZmta 32.17 AUTH) with (TLSv1:EDH-RSA-DES-CBC3-SHA encrypted) ESMTPSA id c02409q0GN02hcr for ; Fri, 17 Jan 2014 00:00:02 +0100 (CET) Date: Fri, 17 Jan 2014 00:00:02 +0100 (CET) From: =?UTF-8?Q?J=C3=BCrgen_Pfitzenmaier?= Reply-To: =?UTF-8?Q?J=C3=BCrgen_Pfitzenmaier?= To: caml-list@inria.fr Message-ID: <2112632769.281907.1389913202532.open-xchange@communicator.strato.de> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_281906_2043488448.1389913202468" X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.4.1-Rev14 X-Validation-by: pfitzen@pfitzenmaier.de Subject: [Caml-list] ocaml considered dangerous ------=_Part_281906_2043488448.1389913202468 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Dear Ocaml users, I found some serious errors in the compiler e.g. in line 28 of typing/includecore.ml and line 499 of typing/ctype.ml of version 3.12.1. A longer list of errors with explanations and possible fixes will be under www.pfitzenmaier.de/ocaml-considered-dangerous.html regards, J=C3=BCrgen ------=_Part_281906_2043488448.1389913202468 MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
Dear Ocaml users,
I found some serious errors in the compiler e.g. in line 28 of typing/includecore.ml
and line 499 of typing/ctype.ml of version 3.12.1.
 
A longer list of errors with explanations and possible fixes will be under
      www.pfitzenmaier.de/ocaml-considered-dangerous.html
 
regards,
Jürgen
 
------=_Part_281906_2043488448.1389913202468-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id E797E7EC6E for ; Fri, 17 Jan 2014 00:28:00 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of milanst@gmail.com) identity=pra; client-ip=209.85.223.180; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="milanst@gmail.com"; x-sender="milanst@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of milanst@gmail.com designates 209.85.223.180 as permitted sender) identity=mailfrom; client-ip=209.85.223.180; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="milanst@gmail.com"; x-sender="milanst@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ie0-f180.google.com) identity=helo; client-ip=209.85.223.180; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="milanst@gmail.com"; x-sender="postmaster@mail-ie0-f180.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsECAMJe2FLRVd+0lGdsb2JhbABZg0NWgn64E4EICBYOAQEBAQcLCwkSKoIlAQEBBCMdAQgTHQEDDAYFCw0CAiYCAiIBEQEFARwGE4dvAQMRDZ0KjAlTgwmSFAoZJw1khHIRAQUMgR2NIzMHgm+BSQSJR45agTGOeRgphHce X-IPAS-Result: AsECAMJe2FLRVd+0lGdsb2JhbABZg0NWgn64E4EICBYOAQEBAQcLCwkSKoIlAQEBBCMdAQgTHQEDDAYFCw0CAiYCAiIBEQEFARwGE4dvAQMRDZ0KjAlTgwmSFAoZJw1khHIRAQUMgR2NIzMHgm+BSQSJR45agTGOeRgphHce X-IronPort-AV: E=Sophos;i="4.95,670,1384297200"; d="scan'208";a="45095013" Received: from mail-ie0-f180.google.com ([209.85.223.180]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 17 Jan 2014 00:28:00 +0100 Received: by mail-ie0-f180.google.com with SMTP id at1so1645951iec.11 for ; Thu, 16 Jan 2014 15:27:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=MPwFElO4CTjXB40zOaotje2e6chaHO4pM1y+Y/8b7Gg=; b=m8wJ+toUVX7Irkltt3XuZMHT7hni3VeZ2obJ1xG+iuRCHNlcAFLVOgsOMnc1bPvXYD d1uTdq6Xssm+W6nVOv1ypw/PoxmLYe0YlwN9mfoC04HWF396YUYyedqP5pICq5qGGEFa VnPyrZJVErqKCNaxkncfPPc+9Ok0XcRleIBaIAwBj7Tbn4kmh3KaISqvLnixs4MTf9zo d+1RPDPxRdV0Lbi0THWIftzilFgNcyR9pX5Aox4OfdXrBJvjbSUA4bsmSjYx7WghEB4t vDtix6aRhYGrnQg/X+653TLwVLVBGtflMWGe585rQhAYcD0Vcty0L4hVEukqBiJzlZeA RbyQ== X-Received: by 10.50.73.136 with SMTP id l8mr12680244igv.7.1389914876803; Thu, 16 Jan 2014 15:27:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.227.67 with HTTP; Thu, 16 Jan 2014 15:27:15 -0800 (PST) In-Reply-To: <2112632769.281907.1389913202532.open-xchange@communicator.strato.de> References: <2112632769.281907.1389913202532.open-xchange@communicator.strato.de> From: =?UTF-8?Q?Milan_Stanojevi=C4=87?= Date: Thu, 16 Jan 2014 18:27:15 -0500 Message-ID: To: =?UTF-8?Q?J=C3=BCrgen_Pfitzenmaier?= Cc: Caml List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] ocaml considered dangerous Your url returns 404 On Thu, Jan 16, 2014 at 6:00 PM, J=C3=BCrgen Pfitzenmaier wrote: > Dear Ocaml users, > I found some serious errors in the compiler e.g. in line 28 of > typing/includecore.ml > and line 499 of typing/ctype.ml of version 3.12.1. > > A longer list of errors with explanations and possible fixes will be under > www.pfitzenmaier.de/ocaml-considered-dangerous.html > > regards, > J=C3=BCrgen > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 475B57EC6E for ; Fri, 17 Jan 2014 00:33:54 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of daniel.buenzli@erratique.ch) identity=pra; client-ip=74.55.86.74; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="daniel.buenzli@erratique.ch"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of daniel.buenzli@erratique.ch) identity=mailfrom; client-ip=74.55.86.74; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="daniel.buenzli@erratique.ch"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@smtp.webfaction.com) identity=helo; client-ip=74.55.86.74; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="daniel.buenzli@erratique.ch"; x-sender="postmaster@smtp.webfaction.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ag0DAMJe2FJKN1ZKnGdsb2JhbABZg0ODVLgJBQMCgSYOAQEBAQEGDQkJFCiCJgEBBCNWEAsaAiYCAkcQBhsQh2wECakTnB0XgSmNVgeCbzWBFASZUoR+F4YZiGY X-IPAS-Result: Ag0DAMJe2FJKN1ZKnGdsb2JhbABZg0ODVLgJBQMCgSYOAQEBAQEGDQkJFCiCJgEBBCNWEAsaAiYCAkcQBhsQh2wECakTnB0XgSmNVgeCbzWBFASZUoR+F4YZiGY X-IronPort-AV: E=Sophos;i="4.95,670,1384297200"; d="scan'208";a="45095388" Received: from mail6.webfaction.com (HELO smtp.webfaction.com) ([74.55.86.74]) by mail3-smtp-sop.national.inria.fr with ESMTP; 17 Jan 2014 00:33:53 +0100 Received: from [172.20.10.2] (177-236.197-178.cust.bluewin.ch [178.197.236.177]) by smtp.webfaction.com (Postfix) with ESMTP id 296A12207299; Thu, 16 Jan 2014 23:33:50 +0000 (UTC) Date: Fri, 17 Jan 2014 00:33:47 +0100 From: =?utf-8?Q?Daniel_B=C3=BCnzli?= To: =?utf-8?Q?J=C3=BCrgen_Pfitzenmaier?= Cc: caml-list@inria.fr Message-ID: <0717784775E04CACB9E51F8DCCB1E056@erratique.ch> In-Reply-To: <2112632769.281907.1389913202532.open-xchange@communicator.strato.de> References: <2112632769.281907.1389913202532.open-xchange@communicator.strato.de> X-Mailer: sparrow 1.6.4 (build 1178) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Re: [Caml-list] ocaml considered dangerous No need to make sensationalist headlines. Bugs exist and they are being tracked here: http://caml.inria.fr/mantis/ You can report there any problems you may have found. Besides quite some work has been going on since 3.12.1. You may want to check if your problem still exists in the latest version. Here's a comprehensive list of what changed since then: http://caml.inria.fr/pub/distrib/ocaml-4.01/notes/Changes Best, Daniel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 907127EC6E for ; Fri, 17 Jan 2014 01:43:29 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of nicolas.braudsantoni@gmail.com) identity=pra; client-ip=74.125.83.42; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="nicolas.braudsantoni@gmail.com"; x-sender="nicolas.braudsantoni@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of nicolas.braudsantoni@gmail.com designates 74.125.83.42 as permitted sender) identity=mailfrom; client-ip=74.125.83.42; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="nicolas.braudsantoni@gmail.com"; x-sender="nicolas.braudsantoni@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ee0-f42.google.com) identity=helo; client-ip=74.125.83.42; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="nicolas.braudsantoni@gmail.com"; x-sender="postmaster@mail-ee0-f42.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap4BAJFf2FJKfVMqm2dsb2JhbABZg0ODVLkiFg4BAQEBAQYLCwkUKIImAQEEIx0BNwIDDAEFBSEWCwICCQMCAQIBIgEFARwTCAEBh2wDEQQBCJ0OjAmDXJI3Jw2FVhEBBQyPEIJZgUkEkDqBMYx8iWRBgWWCdQ X-IPAS-Result: Ap4BAJFf2FJKfVMqm2dsb2JhbABZg0ODVLkiFg4BAQEBAQYLCwkUKIImAQEEIx0BNwIDDAEFBSEWCwICCQMCAQIBIgEFARwTCAEBh2wDEQQBCJ0OjAmDXJI3Jw2FVhEBBQyPEIJZgUkEkDqBMYx8iWRBgWWCdQ X-IronPort-AV: E=Sophos;i="4.95,670,1384297200"; d="asc'?scan'208";a="53617222" Received: from mail-ee0-f42.google.com ([74.125.83.42]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 17 Jan 2014 01:43:29 +0100 Received: by mail-ee0-f42.google.com with SMTP id e49so1844468eek.1 for ; Thu, 16 Jan 2014 16:43:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type; bh=KIG4hI+VuRNte8xJhrGOTayHeOZ0y7CrRbTEv5mRY6o=; b=houEfppbLmVqqBUGtQhWXmHKZbB9Uid3mMqRhcw8+ICpyXFG7YNEI71cs3UqPv69SH GhbqWbeL3U0JE07NFZC0yDGEPUUgCxM5oegNcHjbqFMCWFuLJqiNf9GYmzISqX3Vf4uC 9cftgXwoggH+8r4629EjAcGXdhucwUHgt3PKlF6/FQPouhl56FTEQcGs6UjAjYZ7buFD qcLzIrY7th3qqaOvxDYt3DnXL2inf6qdFFCHlst91V9L8CCU1I5eU0r4W5ZLJOBDjeRv 9gnUXchQRlOVrMxRGvqLkKLZgmydEYkjWDuKso5jxnPCnmx5k9wAnkr4rMv2/fLchXpy i4TA== X-Received: by 10.15.56.132 with SMTP id y4mr15490496eew.61.1389919408182; Thu, 16 Jan 2014 16:43:28 -0800 (PST) Received: from [193.170.224.2] (m-2.vc-graz.ac.at. [193.170.224.2]) by mx.google.com with ESMTPSA id u7sm22433802eep.11.2014.01.16.16.43.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 16 Jan 2014 16:43:27 -0800 (PST) Sender: Nicolas Braud-Santoni Message-ID: <52D87CA9.4070500@braud-santoni.eu> Date: Fri, 17 Jan 2014 01:43:21 +0100 From: Nicolas Braud-Santoni User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: caml-list@inria.fr References: <2112632769.281907.1389913202532.open-xchange@communicator.strato.de> In-Reply-To: <2112632769.281907.1389913202532.open-xchange@communicator.strato.de> X-Enigmail-Version: 1.6 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KfPo1nu0hRPVsQCmMGlf6Qpa0iPegaxhm" X-Validation-by: nicolas@braud-santoni.eu Subject: Re: [Caml-list] ocaml considered dangerous This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --KfPo1nu0hRPVsQCmMGlf6Qpa0iPegaxhm Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Dear J=C3=BCrgen, First, for completeness' sake, the correct URL is http://www.pfitzenmaier.de/posts/ocaml-considered-dangerous.html It seems that most of the points in this blog post boil down to your confusion regarding the signification of 'a in types. Consider the following: let x : 'a =3D 0;; val x : int =3D 0 whereas let x: 'a. 'a =3D 0;; Error: This definition has type int which is less general than 'a. 'a In the first case, 'a is a unification variable, which the compiler may unify with int. In the second case, we quantify universally over 'a. As such, I would say that your claims of unsoundness were rather hasty, especially given that you follow-up by advertising your services. Moreover, as Daniel B=C3=BCnzli pointed out, problem reports are usually do= ne on the bugtracker. Kind regards, Nicolas --KfPo1nu0hRPVsQCmMGlf6Qpa0iPegaxhm Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJS2HytAAoJEPv4tP2UoeSejQIP/RSzVc1V0oL1rRTw1Tn1VMPF 86t1LxcQ2bXaSQa0Hxc9T4l5JmbaasUCYyFfRdhHjtSKDDEfOkqX0pJqpIa+yh1N 7EKlq6vBJPa+LkSsFdtFG4re0CsXaJ5De70g7wGmLNFglf63ODh4uE7/dcQ/kehG N9RHoajL5y189tbA+CZt8veSscvUO0qlRs/01eJUEfnrV0fori44aEy36j5Akssz Bq2SaB/39im+7Ibt2bKBhrpwxqnCus6eHVlo+Dh1BkAkAhKXFWXQJFV7Lcd44Gpi O4jA9jRRogwVpQWQ32X9MLee3xxXZbv9+SCga/mfeF2v5m5rS13vy4K0AEHYRa37 ZTOesG+JptYqtuRU/08CoxKCkGFgpXXEeqRqskTTLXV4SYJy342Zke2gisOk0sKo zarDpiLBf/aR3dYI/sf5D0AfBRWzEmssnK9cxI0ZHm+vdjVH08TGDajkJ5RQQh7y YxlAJOz8YR0G3i/3lBJLPbIJ6EjuzMZA0UeilytkO8RtldCVqJ3zDLix84Tc/I3K lg1Lh10vUSzdXzrZjJwJfMwqr3IyahFgN32PCvgwA0WOU0k2ci5tUeU8O606DtiJ /O2yYKDcOgIUmI8EKESpQ50clwPCcTD6ZUTPOOTQWqQ1Uji9PQGmHYpNoW3PpaVF roOFdanoc4/f1djqvGQp =iOXe -----END PGP SIGNATURE----- --KfPo1nu0hRPVsQCmMGlf6Qpa0iPegaxhm-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 6E6E77EC6E for ; Fri, 17 Jan 2014 03:12:59 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of nanaki@gmail.com) identity=pra; client-ip=209.85.128.171; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="nanaki@gmail.com"; x-sender="nanaki@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of nanaki@gmail.com designates 209.85.128.171 as permitted sender) identity=mailfrom; client-ip=209.85.128.171; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="nanaki@gmail.com"; x-sender="nanaki@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ve0-f171.google.com) identity=helo; client-ip=209.85.128.171; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="nanaki@gmail.com"; x-sender="postmaster@mail-ve0-f171.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkkEAJFf2FLRVYCrlGdsb2JhbABZg0NWqFqJYohVgQcIFg4BAQEBBwsLCRIqgiUBAQEDAScZAQgTHQEDAQsGBQQHOyIBEQEFARwGE4dvAQMJCA2dDoxcgwmSFAoZJw1khHIRAQUMjnMHhDgEiUeOWoExjnkYKYR6Gw X-IPAS-Result: AkkEAJFf2FLRVYCrlGdsb2JhbABZg0NWqFqJYohVgQcIFg4BAQEBBwsLCRIqgiUBAQEDAScZAQgTHQEDAQsGBQQHOyIBEQEFARwGE4dvAQMJCA2dDoxcgwmSFAoZJw1khHIRAQUMjnMHhDgEiUeOWoExjnkYKYR6Gw X-IronPort-AV: E=Sophos;i="4.95,670,1384297200"; d="scan'208";a="53621915" Received: from mail-ve0-f171.google.com ([209.85.128.171]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 17 Jan 2014 03:12:58 +0100 Received: by mail-ve0-f171.google.com with SMTP id c14so1364309vea.30 for ; Thu, 16 Jan 2014 18:12:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=r/AIrgzcF38dDVSmM3xvOBr6USkqDjZn38/KqTfhCVk=; b=tM9etYqi9NNNiR2SbeTzWhMa+hNQWywhQub4Yj4h/heO40yYwDz6rgkDUYiHxtaVhQ nqCVUMyI6KRX1FYUD5/yqLdPCY0OafAVbINh6CYkfLWL9MP0kIYbZDGS6rCPZtwYnGNW 4Qc2dBdfGDrzeZFCmyDm8tHsHVi8Cgd6G+nMo4izsDH23IHut/VKdhz6vYxXG/2BgYDi PIazIuaXIylnjf3Ph6T7WG8Yf6M+CkhIEkYsRHiRsLq5Yi+q59rBsl/Nw5mqhMvhwekp vS67A7YliyC9sH79/8TYkbjFTvbM4AeYgDeSZjBrq4Z4yrX5h4F4qRT5Qp8Dwqylx9Ue 81ag== MIME-Version: 1.0 X-Received: by 10.58.227.38 with SMTP id rx6mr8787353vec.10.1389924777500; Thu, 16 Jan 2014 18:12:57 -0800 (PST) Received: by 10.58.224.73 with HTTP; Thu, 16 Jan 2014 18:12:57 -0800 (PST) In-Reply-To: <2112632769.281907.1389913202532.open-xchange@communicator.strato.de> References: <2112632769.281907.1389913202532.open-xchange@communicator.strato.de> Date: Thu, 16 Jan 2014 18:12:57 -0800 Message-ID: From: Jeff Meister To: =?ISO-8859-1?Q?J=FCrgen_Pfitzenmaier?= Cc: Caml List Content-Type: multipart/alternative; boundary=047d7bd6b5b4a0a90204f0211407 Subject: Re: [Caml-list] ocaml considered dangerous --047d7bd6b5b4a0a90204f0211407 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I don't have time to evaluate and respond to all your points, but your first entry under "frightening discoveries" really jumped out at me. On line 499: try closed_type ty with Non_closed (ty0, real) -> The name "ty0" is a pattern capture variable, which the pattern matching construct binds to the first argument of the caught exn value with constructor Non_closed. It doesn't need a prior declaration... you are declaring it right there. Surely you were simply mistaken? I find it unbelievable that someone could write OCaml for years, even hacking on the compiler, without understanding basic pattern matching. On Thu, Jan 16, 2014 at 3:00 PM, J=FCrgen Pfitzenmaier < pfitzen@pfitzenmaier.de> wrote: > Dear Ocaml users, > I found some serious errors in the compiler e.g. in line 28 of typing/ > includecore.ml > and line 499 of typing/ctype.ml of version 3.12.1. > > A longer list of errors with explanations and possible fixes will be > under > www.pfitzenmaier.de/ocaml-considered-dangerous.html > > regards, > J=FCrgen > > --047d7bd6b5b4a0a90204f0211407 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I don't have time to evaluate and respond to all = your points, but your first entry under "frightening discoveries"= really jumped out at me. On line 499:

try closed_type ty with Non_c= losed (ty0, real) ->

The name "ty0" is a pattern capture variable, which the= pattern matching construct binds to the first argument of the caught exn v= alue with constructor Non_closed. It doesn't need a prior declaration..= . you are declaring it right there. Surely you were simply mistaken? I find= it unbelievable that someone could write OCaml for years, even hacking on = the compiler, without understanding basic pattern matching.


On Thu,= Jan 16, 2014 at 3:00 PM, J=FCrgen Pfitzenmaier <pfitzen@pfitzenmaie= r.de> wrote:
=20=20=20=20 =20
=20
Dear Ocaml users,
=20
I found some serious errors in the compiler e.g. in line 28 of typing/includecore.ml
=20
and line 499 of typing/cty= pe.ml of version 3.12.1.
=20
=A0
=20
A longer list of errors with explanations and possible fixes will be und= er
=20 =20
=A0
=20
regards,
=20
J=FCrgen
=20
=A0
=20

--047d7bd6b5b4a0a90204f0211407-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 922437EC6E for ; Fri, 17 Jan 2014 03:39:54 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of garrigue@math.nagoya-u.ac.jp) identity=pra; client-ip=133.6.130.5; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="garrigue@math.nagoya-u.ac.jp"; x-sender="garrigue@math.nagoya-u.ac.jp"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of garrigue@math.nagoya-u.ac.jp) identity=mailfrom; client-ip=133.6.130.5; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="garrigue@math.nagoya-u.ac.jp"; x-sender="garrigue@math.nagoya-u.ac.jp"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mailhost.math.nagoya-u.ac.jp) identity=helo; client-ip=133.6.130.5; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="garrigue@math.nagoya-u.ac.jp"; x-sender="postmaster@mailhost.math.nagoya-u.ac.jp"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgADAJFf2FKFBoIFdGdsb2JhbABZg0ODVLgTgSUOAQwVCDyCJgEBBCMEHAE3DgUGGgIYDgICVwYkh3KoL3aDYgKTOoR/EAeBKY0jOoJvNYEUiUmOXIExiy6IdA X-IPAS-Result: AgADAJFf2FKFBoIFdGdsb2JhbABZg0ODVLgTgSUOAQwVCDyCJgEBBCMEHAE3DgUGGgIYDgICVwYkh3KoL3aDYgKTOoR/EAeBKY0jOoJvNYEUiUmOXIExiy6IdA X-IronPort-AV: E=Sophos;i="4.95,670,1384297200"; d="scan'208";a="45103895" Received: from rabbit.math.nagoya-u.ac.jp (HELO mailhost.math.nagoya-u.ac.jp) ([133.6.130.5]) by mail3-smtp-sop.national.inria.fr with ESMTP; 17 Jan 2014 03:39:51 +0100 Received: from mailhost.math.nagoya-u.ac.jp (localhost [127.0.0.1]) by mailhost.math.nagoya-u.ac.jp (Postfix) with ESMTP id 4960C63EE for ; Fri, 17 Jan 2014 11:39:49 +0900 (JST) Received: from mailhost.math.nagoya-u.ac.jp (localhost [127.0.0.1]) by mailhost.math.nagoya-u.ac.jp (Postfix) with ESMTP id BA2B440E1; Fri, 17 Jan 2014 11:39:48 +0900 (JST) DomainKey-Signature: h=Received:Subject:Mime-Version:Content-Type:From:X-Priority:In-Reply-To:Date:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer; b=; c=nofws; d=math.nagoya-u.ac.jp; q=; s=alpha Received: from tet.garrigue.jp (58x158x128x157.ap58.ftth.ucom.ne.jp [58.158.128.157]) by mailhost.math.nagoya-u.ac.jp (Postfix) with ESMTPSA id 811EF3974; Fri, 17 Jan 2014 11:39:48 +0900 (JST) Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Content-Type: text/plain; charset=utf-8 From: Jacques Garrigue X-Priority: 3 In-Reply-To: <2112632769.281907.1389913202532.open-xchange@communicator.strato.de> Date: Fri, 17 Jan 2014 11:38:52 +0900 Content-Transfer-Encoding: quoted-printable Message-Id: <0290505B-A21A-4A05-A1C9-4C5F765DFEB5@math.nagoya-u.ac.jp> References: <2112632769.281907.1389913202532.open-xchange@communicator.strato.de> To: OCaML List Mailing X-Mailer: Apple Mail (2.1827) Subject: Re: [Caml-list] ocaml considered dangerous Let me repost here the answer I sent to Jurgen on the developer=E2=80=99s l= ist. I wonder why he posted simultaneously to both lists. First remark, rather than posting such a (broken) link, it would be better to file a report in the bug tracking system at http://caml.inria.fr/mantis/ Second, I=E2=80=99ve read your post (fortunately going to http://www.pfitz= enmaier.de/ let me access it), and this appears to be a misunderstanding of the meaning of = type annotations in OCaml. Namely, while type annotations in signatures are universally quantified (which is why =E2=80=98a list =3D forall =E2=80=98a. =E2=80=98a list is mor= e general than int list, and your first example is not accepted), type annotations in expressions are existentially quantified, i.e. the variables may be instantiated, and as a result your se= cond example is accepted (int list ref is an instance of =E2=80=98a list ref). Same thing in your third example: the annotation =E2=80=98a list -> =E2=80= =98a just means that there should be some type a such that get_sum has type a list -> a, and here that type is int. If you want annotations in expressions to be universally quantified, you mu= st be explicit: let get_sum : 'a. 'a list -> 'a =3D A.sum This one requires get_sum to be polymorphic, and will report an error. Of course changing line 28 in includecore.ml solves nothing, since this lin= e is correct from the beginning. Your examples with polymorphic variants are again a misunderstanding of how typing works. Namely, in OCaml subtyping is always explicit. So in F1 you should write: let get_count :> [`A] list -> 'a =3D A.count (Note that in some case you also need to give the original type of the expr= ession for subtyping to work properly. Here this is not needed because the target = type is simple enough) For your frightening discoveries, the definition of ty0 is on line 499=E2= =80=A6 maybe too close to see. Last, the current implementation of Printf relies heavily on Obj.magic, whi= ch means that you cannot tell much about the typing by what you see inside the imple= mentation. To my best knowledge, the exported interface is type safe. By the way, there is now an implementation of Printf that avoids most of th= e Obj.magic by using GADTs. It should be merged soon. Finally I would suggest not to post such a blog before you discuss the prob= lems you encountered with somebody (not necessarily the developers, just somebody knowledgeable enough in OCaml) as this may confuse people in a useless way. This would also have avoided you to part from OCaml for inexistent reasons.= .. Best regards, Jacques Garrigue= From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 7A8897EC6E for ; Fri, 17 Jan 2014 10:01:49 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.214.47; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.214.47 as permitted sender) identity=mailfrom; client-ip=209.85.214.47; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-bk0-f47.google.com) identity=helo; client-ip=209.85.214.47; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-bk0-f47.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsECAJFf2FLRVdYvlWdsb2JhbABZDoM1VqgokmmBBwgWDgEBAQEHDQkJEiqCJQEBAQMBJxkBGxILAQMBCwYFCw0NISIBEQEFAQoSBhMICoddAQMJCA2dDoxcgwmSFAoZJwMKZIRyEQEFDIx4gUgzB4Q4BJghgTGLLoNLGCmEGkA7 X-IPAS-Result: AsECAJFf2FLRVdYvlWdsb2JhbABZDoM1VqgokmmBBwgWDgEBAQEHDQkJEiqCJQEBAQMBJxkBGxILAQMBCwYFCw0NISIBEQEFAQoSBhMICoddAQMJCA2dDoxcgwmSFAoZJwMKZIRyEQEFDIx4gUgzB4Q4BJghgTGLLoNLGCmEGkA7 X-IronPort-AV: E=Sophos;i="4.95,670,1384297200"; d="scan'208";a="45136620" Received: from mail-bk0-f47.google.com ([209.85.214.47]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 17 Jan 2014 10:01:48 +0100 Received: by mail-bk0-f47.google.com with SMTP id d7so410504bkh.34 for ; Fri, 17 Jan 2014 01:01:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=k8htI8rxgt57nn8DyfM/1aDkLOXEDBNYxV7cz0z4knI=; b=vlYO3ahVHeZaqcikHEpdzk5Y1Z7JU/P5EEckCzJWcWm/+b/vLghR6OdI5GO6XBMuAg ku6CeRqPg8bMWLCA7d/MaHbN4t5KXyACSD9fUD/CzbK9NnvHXMTSxsq55l21Mf0GvMN8 G1+Rv6r7TZQd7vp4jxkYgrWYpYP5ZBTrKMOmTVLmYo9OEZOIJ9GiDQwa6DfmMD8mXwd+ 4hHsqP5SrJ0XWbDJ2plI28oup5BG5UIbr8P0IfCa8K5Fmwq8C+0e8Ddwdcym71qXfWDu sIcAGmiNG0mOua/pG0B0sW1h5KxjBXoc87ray+zYCNsy8Mdj+EvnjeM7FA7qyVYl2Oci IRnA== X-Received: by 10.205.38.4 with SMTP id tg4mr432853bkb.55.1389949307810; Fri, 17 Jan 2014 01:01:47 -0800 (PST) MIME-Version: 1.0 Received: by 10.205.45.5 with HTTP; Fri, 17 Jan 2014 01:01:07 -0800 (PST) In-Reply-To: <0290505B-A21A-4A05-A1C9-4C5F765DFEB5@math.nagoya-u.ac.jp> References: <2112632769.281907.1389913202532.open-xchange@communicator.strato.de> <0290505B-A21A-4A05-A1C9-4C5F765DFEB5@math.nagoya-u.ac.jp> From: Gabriel Scherer Date: Fri, 17 Jan 2014 10:01:07 +0100 Message-ID: To: Jacques Garrigue Cc: OCaML List Mailing Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] ocaml considered dangerous > After some investigations it turned out that the Ocaml compiler shows a q= uestionable understanding of type checking. After immediate reading it turned out that the post author shows a complete misunderstanding of the type system he's talking about. It's great that he felt motivated to look at the internals of the admittedly-complex type checker and experiment with language extensions. The problem is the arrogance in assuming other people are wrong. For anyone interested in understanding the core of the type checker, there is a very nice presentation by Oleg at http://okmij.org/ftp/ML/generalization.html (It does not cover the issues that are treated here, rather the simple ML fragment on let-generalization, but it's a start and it helps understand the way mutation is used in the implementation, which indeed makes it not a piece of cake.) On Fri, Jan 17, 2014 at 3:38 AM, Jacques Garrigue wrote: > Let me repost here the answer I sent to Jurgen on the developer=92s list. > I wonder why he posted simultaneously to both lists. > > > First remark, rather than posting such a (broken) link, it would be better > to file a report in the bug tracking system at > http://caml.inria.fr/mantis/ > > Second, I=92ve read your post (fortunately going to http://www.pfitzenma= ier.de/ let > me access it), and this appears to be a misunderstanding of the meaning o= f type > annotations in OCaml. > Namely, while type annotations in signatures are universally quantified > (which is why =91a list =3D forall =91a. =91a list is more general than i= nt list, and your first > example is not accepted), type annotations in expressions are existential= ly > quantified, i.e. the variables may be instantiated, and as a result your = second > example is accepted (int list ref is an instance of =91a list ref). > Same thing in your third example: the annotation =91a list -> =91a just m= eans that > there should be some type a such that get_sum has type a list -> a, and h= ere > that type is int. > > If you want annotations in expressions to be universally quantified, you = must be > explicit: > > let get_sum : 'a. 'a list -> 'a =3D A.sum > > This one requires get_sum to be polymorphic, and will report an error. > > Of course changing line 28 in includecore.ml solves nothing, since this l= ine is > correct from the beginning. > > Your examples with polymorphic variants are again a misunderstanding of > how typing works. Namely, in OCaml subtyping is always explicit. > So in F1 you should write: > let get_count :> [`A] list -> 'a =3D A.count > (Note that in some case you also need to give the original type of the ex= pression > for subtyping to work properly. Here this is not needed because the targe= t type is > simple enough) > > For your frightening discoveries, the definition of ty0 is on line 499=85= maybe too close > to see. > > Last, the current implementation of Printf relies heavily on Obj.magic, w= hich means > that you cannot tell much about the typing by what you see inside the imp= lementation. > To my best knowledge, the exported interface is type safe. > By the way, there is now an implementation of Printf that avoids most of = the Obj.magic > by using GADTs. It should be merged soon. > > Finally I would suggest not to post such a blog before you discuss the pr= oblems > you encountered with somebody (not necessarily the developers, just someb= ody > knowledgeable enough in OCaml) as this may confuse people in a useless wa= y. > This would also have avoided you to part from OCaml for inexistent reason= s... > > Best regards, > > Jacques Garrigue > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 38BF17EC6E for ; Sat, 18 Jan 2014 01:39:26 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of jon@ffconsultancy.com) identity=pra; client-ip=84.93.230.244; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jon@ffconsultancy.com"; x-sender="jon@ffconsultancy.com"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of jon@ffconsultancy.com) identity=mailfrom; client-ip=84.93.230.244; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jon@ffconsultancy.com"; x-sender="jon@ffconsultancy.com"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@avasout03.plus.net) identity=helo; client-ip=84.93.230.244; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jon@ffconsultancy.com"; x-sender="postmaster@avasout03.plus.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AukCAAfM2VJUXeb0lWdsb2JhbABZDoM1g1SlRHqRbIELFg4BAQEBBw0JCRIqgiUBAQEDAQgCGQRHEAcBAwIJEQQBAQMCCRoDAgIZIwkBCQgCBAESCwUCh18DCQwJp2aWQwOFYBeBKY1dBoIpQIFJBI8lii2LLogmPw X-IPAS-Result: AukCAAfM2VJUXeb0lWdsb2JhbABZDoM1g1SlRHqRbIELFg4BAQEBBw0JCRIqgiUBAQEDAQgCGQRHEAcBAwIJEQQBAQMCCRoDAgIZIwkBCQgCBAESCwUCh18DCQwJp2aWQwOFYBeBKY1dBoIpQIFJBI8lii2LLogmPw X-IronPort-AV: E=Sophos;i="4.95,677,1384297200"; d="scan'208";a="53787376" Received: from avasout03.plus.net ([84.93.230.244]) by mail2-smtp-roc.national.inria.fr with ESMTP; 18 Jan 2014 01:39:25 +0100 Received: from XPS ([91.125.229.6]) by avasout03 with smtp id FCfN1n00408vflX01CfQFS; Sat, 18 Jan 2014 00:39:24 +0000 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.1 cv=VqIaXYGn c=1 sm=1 tr=0 a=YNNwqyIk8JSiwARLj6s6Lw==:117 a=YNNwqyIk8JSiwARLj6s6Lw==:17 a=0Bzu9jTXAAAA:8 a=f8j1qH8oLZQA:10 a=Xub9RBUEA-sA:10 a=Kvk-SOs2Z7YA:10 a=IkcTkHD0fZMA:10 a=r2vSxAw-AAAA:8 a=3NpDWv-ezvYA:10 a=ZOzjf2MOAAAA:8 a=CPTEj4YnAAAA:8 a=CjxXgO3LAAAA:8 a=RkHw4m7IlxyVtlHr5SsA:9 a=Hev6Ck5zRVMwEgyk:21 a=FyoRZOzixTCiEXM_:21 a=QEXdDO2ut3YA:10 a=rV3xvP3FSvkA:10 X-AUTH: jdh302:2500 Reply-To: From: "Jon Harrop" To: "'Jacques Garrigue'" , "'OCaML List Mailing'" References: <2112632769.281907.1389913202532.open-xchange@communicator.strato.de> <0290505B-A21A-4A05-A1C9-4C5F765DFEB5@math.nagoya-u.ac.jp> In-Reply-To: <0290505B-A21A-4A05-A1C9-4C5F765DFEB5@math.nagoya-u.ac.jp> Date: Sat, 18 Jan 2014 00:39:24 -0000 Organization: Flying Frog Consultancy Ltd. Message-ID: <02b301cf13e5$bdd11af0$397350d0$@ffconsultancy.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQFKLuDUCGYg/v2fnJQOy0RxKffuMwKqA4Dkm34dfMA= Content-Language: en-gb Subject: RE: [Caml-list] ocaml considered dangerous > By the way, there is now an implementation of Printf that avoids most of = the Obj.magic by using GADTs. It should be merged soon. Just curious: is that a drop-in replacement? Cheers, Jon. -----Original Message----- From: caml-list-request@inria.fr [mailto:caml-list-request@inria.fr] On Beh= alf Of Jacques Garrigue Sent: 17 January 2014 02:39 To: OCaML List Mailing Subject: Re: [Caml-list] ocaml considered dangerous Let me repost here the answer I sent to Jurgen on the developer=E2=80=99s l= ist. I wonder why he posted simultaneously to both lists. First remark, rather than posting such a (broken) link, it would be better = to file a report in the bug tracking system at http://caml.inria.fr/mantis/ Second, I=E2=80=99ve read your post (fortunately going to http://www.pfitz= enmaier.de/ let me access it), and this appears to be a misunderstanding of= the meaning of type annotations in OCaml. Namely, while type annotations in signatures are universally quantified (wh= ich is why =E2=80=98a list =3D forall =E2=80=98a. =E2=80=98a list is more g= eneral than int list, and your first example is not accepted), type annotat= ions in expressions are existentially quantified, i.e. the variables may be= instantiated, and as a result your second example is accepted (int list re= f is an instance of =E2=80=98a list ref). Same thing in your third example: the annotation =E2=80=98a list -> =E2=80= =98a just means that there should be some type a such that get_sum has type= a list -> a, and here that type is int. If you want annotations in expressions to be universally quantified, you mu= st be explicit: let get_sum : 'a. 'a list -> 'a =3D A.sum This one requires get_sum to be polymorphic, and will report an error. Of course changing line 28 in includecore.ml solves nothing, since this lin= e is correct from the beginning. Your examples with polymorphic variants are again a misunderstanding of how= typing works. Namely, in OCaml subtyping is always explicit. So in F1 you should write: let get_count :> [`A] list -> 'a =3D A.count (Note that in some case you a= lso need to give the original type of the expression for subtyping to work = properly. Here this is not needed because the target type is simple enough) For your frightening discoveries, the definition of ty0 is on line 499=E2= =80=A6 maybe too close to see. Last, the current implementation of Printf relies heavily on Obj.magic, whi= ch means that you cannot tell much about the typing by what you see inside = the implementation. To my best knowledge, the exported interface is type safe. By the way, there is now an implementation of Printf that avoids most of th= e Obj.magic by using GADTs. It should be merged soon. Finally I would suggest not to post such a blog before you discuss the prob= lems you encountered with somebody (not necessarily the developers, just so= mebody knowledgeable enough in OCaml) as this may confuse people in a usele= ss way. This would also have avoided you to part from OCaml for inexistent reasons.= .. Best regards, Jacques Garrigue -- Caml-list mailing list. Subscription management and archives: https://sympa.inria.fr/sympa/arc/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs=3D From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 620527EC6E for ; Sat, 18 Jan 2014 03:22:49 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of yallop@gmail.com) identity=pra; client-ip=74.125.82.174; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yallop@gmail.com"; x-sender="yallop@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of yallop@gmail.com designates 74.125.82.174 as permitted sender) identity=mailfrom; client-ip=74.125.82.174; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yallop@gmail.com"; x-sender="yallop@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-we0-f174.google.com) identity=helo; client-ip=74.125.82.174; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yallop@gmail.com"; x-sender="postmaster@mail-we0-f174.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvMCAE/k2VJKfVKulGdsb2JhbAA/GoNDVoJ+uCiBAggWDgEBAQEHCwsJEiqCJQEBAQICIx0BGx0BAwwGBQsNAgImAgIiAREBBQEcBhMIh2gBAxENNpsnjAlTgwmSHAoZJw1khHIRAQUMgR2NIzMHgm+BSQSYIYExjnkYKYRZPA X-IPAS-Result: AvMCAE/k2VJKfVKulGdsb2JhbAA/GoNDVoJ+uCiBAggWDgEBAQEHCwsJEiqCJQEBAQICIx0BGx0BAwwGBQsNAgImAgIiAREBBQEcBhMIh2gBAxENNpsnjAlTgwmSHAoZJw1khHIRAQUMgR2NIzMHgm+BSQSYIYExjnkYKYRZPA X-IronPort-AV: E=Sophos;i="4.95,677,1384297200"; d="scan'208";a="45241015" Received: from mail-we0-f174.google.com ([74.125.82.174]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 18 Jan 2014 03:22:48 +0100 Received: by mail-we0-f174.google.com with SMTP id x55so5188111wes.19 for ; Fri, 17 Jan 2014 18:22:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=y147bgTcTqLUwQK2luDx0lQ3Q0UT8qtDbmds1cfoRfU=; b=FYcitjonaIYUPa5nL0uB53C2mG7Q7LnlxJLkj/YnlQ6OXjfrg+j5MuOhXwsuiOxdWv NEhQVHa0HaTfyq2lUakel+yrr9h/RJZtGkCmk3GYKHNcejoU3wMHjFhiq+Pn7pd+FBiQ rHkHPSapUXXWORjqipR90s1CiMLvWCQN7urPRc45U2Cnaaj9sFRr+Kkww/om95QsANUL Xwag7oaPR1JKyoIVaQy54xmPkalZiS8lShYYM4PiHlyUigxHtcz29CcWaXMtunHEDp2I xJIfbkF1BsIoRKCsL+9XyXDBHIjzSOuKId6Breo2kyg70o9DGZtI43XPAEyn4hcVp3Kf 3DYw== MIME-Version: 1.0 X-Received: by 10.180.79.106 with SMTP id i10mr981133wix.23.1390011768261; Fri, 17 Jan 2014 18:22:48 -0800 (PST) Received: by 10.216.33.4 with HTTP; Fri, 17 Jan 2014 18:22:48 -0800 (PST) In-Reply-To: <02b301cf13e5$bdd11af0$397350d0$@ffconsultancy.com> References: <2112632769.281907.1389913202532.open-xchange@communicator.strato.de> <0290505B-A21A-4A05-A1C9-4C5F765DFEB5@math.nagoya-u.ac.jp> <02b301cf13e5$bdd11af0$397350d0$@ffconsultancy.com> Date: Sat, 18 Jan 2014 02:22:48 +0000 Message-ID: From: Jeremy Yallop To: Jon Harrop Cc: Jacques Garrigue , OCaML List Mailing Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] ocaml considered dangerous Jacques Garrigue wrote: >> By the way, there is now an implementation of Printf that avoids most of= the Obj.magic by using GADTs. It should be merged soon. Jon Harrop wrote: > Just curious: is that a drop-in replacement? Yes, except for some tiny incompatibilities, mostly fixes for bugs that the development of the GADT version uncovered in the original implementation. The patch is here, along with a description and some discussion: http://caml.inria.fr/mantis/view.php?id=3D6017 The author, Beno=C3=AEt Vaugon, presented the design along with some performance figures at OCaml 2013: http://ocaml.org/meetings/ocaml/2013/proposals/formats-as-gadts.pdf http://ocaml.org/meetings/ocaml/2013/slides/vaugon.pdf From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 9E93D7EC6E for ; Sat, 18 Jan 2014 08:05:25 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.214.42; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.214.42 as permitted sender) identity=mailfrom; client-ip=209.85.214.42; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-bk0-f42.google.com) identity=helo; client-ip=209.85.214.42; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-bk0-f42.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Am8DALom2lLRVdYqlGdsb2JhbAA/GoNDVqhAkmaBAAgWDgEBAQEHCwsJEiqCJQEBAQICQAEbEgsBAwwGBQsNDSEhAQERAQUBChIGExKHXgEDEQ02myeMXIMJkj4KGScDCmSEchEBBQyMX4FhMweEOASUO4F6gWyBMYsrg04YKYRaOw X-IPAS-Result: Am8DALom2lLRVdYqlGdsb2JhbAA/GoNDVqhAkmaBAAgWDgEBAQEHCwsJEiqCJQEBAQICQAEbEgsBAwwGBQsNDSEhAQERAQUBChIGExKHXgEDEQ02myeMXIMJkj4KGScDCmSEchEBBQyMX4FhMweEOASUO4F6gWyBMYsrg04YKYRaOw X-IronPort-AV: E=Sophos;i="4.95,678,1384297200"; d="scan'208";a="53805404" Received: from mail-bk0-f42.google.com ([209.85.214.42]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 18 Jan 2014 08:05:25 +0100 Received: by mail-bk0-f42.google.com with SMTP id my12so1933043bkb.29 for ; Fri, 17 Jan 2014 23:05:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=JEcEj0eM7kVzg5tosi7j1NHHAa0QIQ7qJfvULEX5M+A=; b=PlO4o1KNaf4jcAvSU9TrHde2b20ob8bdCCo5GI7bStWfozqdxAQBv0A3dCUDEULeI/ g+gS72KMiCfiqDm5FxvVfWmxeLSsXk39nYNfXSKoRSsoDnk3VDpluVINEgj/qXp7M7hi KFuIn8dC+P4JRn1Bxofh6fqpxYUde5N0Xujn+Ifbq0W83vEWGFQZ3U5euv3uXfWfS2SJ pnPNSRcvwX3SbyFvL0Jf7eZU7Dv3bSdaRZQz/jez3yWKqfDBun+3ww96/VnlzmaTqL3b /rT2Ox7nbrPj63TJe8kRApPAGTp8KI4cfZSDByfqfH0Kgyt6SUcdrtxCx4oalkIRI4EV i3fA== X-Received: by 10.205.25.6 with SMTP id rg6mr3060707bkb.10.1390028724529; Fri, 17 Jan 2014 23:05:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.205.45.5 with HTTP; Fri, 17 Jan 2014 23:04:44 -0800 (PST) In-Reply-To: References: <2112632769.281907.1389913202532.open-xchange@communicator.strato.de> <0290505B-A21A-4A05-A1C9-4C5F765DFEB5@math.nagoya-u.ac.jp> <02b301cf13e5$bdd11af0$397350d0$@ffconsultancy.com> From: Gabriel Scherer Date: Sat, 18 Jan 2014 08:04:44 +0100 Message-ID: To: Jeremy Yallop Cc: Jon Harrop , Jacques Garrigue , OCaML List Mailing Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] ocaml considered dangerous I guess one could also mention that the no-magic implementation is notably faster than the current implementation (as it avoids any format string parsing at runtime), which is not necessarily a concern for printf (for large output you're probably killed by I/O overhead anyway) but can be for sprintf or bprintf. Note that while the current proposal uses GADTs, Beno=EEt also experimented with reasonable similar designs using higher-order function (this is the usual initial vs. final tagless interpreter choice) that would have been implementable before 4.00. On Sat, Jan 18, 2014 at 3:22 AM, Jeremy Yallop wrote: > Jacques Garrigue wrote: >>> By the way, there is now an implementation of Printf that avoids most o= f the Obj.magic by using GADTs. It should be merged soon. > > Jon Harrop wrote: >> Just curious: is that a drop-in replacement? > > Yes, except for some tiny incompatibilities, mostly fixes for bugs > that the development of the GADT version uncovered in the original > implementation. The patch is here, along with a description and some > discussion: > > http://caml.inria.fr/mantis/view.php?id=3D6017 > > The author, Beno=EEt Vaugon, presented the design along with some > performance figures at OCaml 2013: > > http://ocaml.org/meetings/ocaml/2013/proposals/formats-as-gadts.pdf > http://ocaml.org/meetings/ocaml/2013/slides/vaugon.pdf > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 571D17EC6E for ; Sat, 18 Jan 2014 10:11:14 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of dra-news@metastack.com) identity=pra; client-ip=62.13.149.58; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="dra-news@metastack.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of dra-news@metastack.com designates 62.13.149.58 as permitted sender) identity=mailfrom; client-ip=62.13.149.58; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="dra-news@metastack.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@outmail149058.authsmtp.co.uk) identity=helo; client-ip=62.13.149.58; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="postmaster@outmail149058.authsmtp.co.uk"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjYCAL5E2lI+DZU6nGdsb2JhbAA/GoJqWVaoRZJmgQgWDgEBAQEBCBQJPIIlAQEBAgJuFwQCAQgRBAEBAQoDGgchERMBCQgCBBMICodfAxIDCTa+EQMKhVYXjGuBYzgGgx6BFASJD4ssgXqBbIExiyuIaIIq X-IPAS-Result: AjYCAL5E2lI+DZU6nGdsb2JhbAA/GoJqWVaoRZJmgQgWDgEBAQEBCBQJPIIlAQEBAgJuFwQCAQgRBAEBAQoDGgchERMBCQgCBBMICodfAxIDCTa+EQMKhVYXjGuBYzgGgx6BFASJD4ssgXqBbIExiyuIaIIq X-IronPort-AV: E=Sophos;i="4.95,679,1384297200"; d="scan'208";a="45261071" Received: from outmail149058.authsmtp.co.uk ([62.13.149.58]) by mail3-smtp-sop.national.inria.fr with ESMTP; 18 Jan 2014 10:11:13 +0100 Received: from mail-c235.authsmtp.com (mail-c235.authsmtp.com [62.13.128.235]) by punt14.authsmtp.com (8.14.2/8.14.2) with ESMTP id s0I9BCdE094186 for ; Sat, 18 Jan 2014 09:11:12 GMT Received: from romulus.metastack.com (cpc1-cmbg5-0-0-cust241.5-4.cable.virginm.net [81.98.252.242]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/) with ESMTP id s0I9BBjc012070 for ; Sat, 18 Jan 2014 09:11:11 GMT Received: from remus.metastack.local (remus.metastack.com [172.16.0.1]) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id s0I9BA6U021811 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Sat, 18 Jan 2014 09:11:11 GMT Received: from Remus.metastack.local ([fe80::547c:3c42:e1da:eda2]) by Remus.metastack.local ([fe80::547c:3c42:e1da:eda2%10]) with mapi id 14.03.0174.001; Sat, 18 Jan 2014 09:11:10 +0000 From: David Allsopp To: OCaML List Mailing Thread-Topic: [Caml-list] ocaml considered dangerous Thread-Index: AQHPEw/9fywvLBUW2kyKf5SGv8sAlpqINGQAgAFw9ACAABzjAIAATsYAgAAh/xA= Date: Sat, 18 Jan 2014 09:11:10 +0000 Message-ID: References: <2112632769.281907.1389913202532.open-xchange@communicator.strato.de> <0290505B-A21A-4A05-A1C9-4C5F765DFEB5@math.nagoya-u.ac.jp> <02b301cf13e5$bdd11af0$397350d0$@ffconsultancy.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.0.18] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Organization: MetaStack Solutions Ltd. X-Scanned-By: MIMEDefang 2.65 on 172.16.0.20 X-Server-Quench: 79928e67-8020-11e3-b802-002590a15da7 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCd1ZAARAlZZVg1f DC4bFwdFRBksPQFF ChxFJgxfNlEAUAAU NkdBMnJSNkcdTBdX QSgKU0suAQNuW2N0 bxpRZA9cY0BPXkti UVZASkxQEQd2AxgD GRwbTRk8NAU/cQwC PxViX3JbW0Q0cUZ8 RgBTHGQEbTJmb30X UEJYagJVJQBXLBdF aE1/VHEIaGVWZ380 FlAlBR1jdQZ0ISFR BwUMNk4nCUEAFzs4 DxsFGy4uEUAfSil7 IxUgJVMGG1sKWgAA X-Authentic-SMTP: 61633634383431.1023:706 X-AuthFastPath: 0 (Was 255) X-AuthSMTP-Origin: 81.98.252.242/25 X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. Subject: RE: [Caml-list] ocaml considered dangerous Does this new version fix positional specifiers? (http://caml.inria.fr/mant= is/view.php?id=3D4204) or has that rather useful (if never working!) featur= e been consigned to history? > -----Original Message----- > From: caml-list-request@inria.fr [mailto:caml-list-request@inria.fr] On > Behalf Of Gabriel Scherer > Sent: 18 January 2014 07:05 > To: Jeremy Yallop > Cc: Jon Harrop; Jacques Garrigue; OCaML List Mailing > Subject: Re: [Caml-list] ocaml considered dangerous >=20 > I guess one could also mention that the no-magic implementation is notably > faster than the current implementation (as it avoids any format string > parsing at runtime), which is not necessarily a concern for printf (for > large output you're probably killed by I/O overhead > anyway) but can be for sprintf or bprintf. >=20 > Note that while the current proposal uses GADTs, Beno=EEt also experiment= ed > with reasonable similar designs using higher-order function (this is the > usual initial vs. final tagless interpreter > choice) that would have been implementable before 4.00. >=20 > On Sat, Jan 18, 2014 at 3:22 AM, Jeremy Yallop wrote: > > Jacques Garrigue wrote: > >>> By the way, there is now an implementation of Printf that avoids most > of the Obj.magic by using GADTs. It should be merged soon. > > > > Jon Harrop wrote: > >> Just curious: is that a drop-in replacement? > > > > Yes, except for some tiny incompatibilities, mostly fixes for bugs > > that the development of the GADT version uncovered in the original > > implementation. The patch is here, along with a description and some > > discussion: > > > > http://caml.inria.fr/mantis/view.php?id=3D6017 > > > > The author, Beno=EEt Vaugon, presented the design along with some > > performance figures at OCaml 2013: > > > > http://ocaml.org/meetings/ocaml/2013/proposals/formats-as-gadts.pdf > > http://ocaml.org/meetings/ocaml/2013/slides/vaugon.pdf > > > > -- > > Caml-list mailing list. Subscription management and archives: > > https://sympa.inria.fr/sympa/arc/caml-list > > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > > Bug reports: http://caml.inria.fr/bin/caml-bugs >=20 > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 9D9757EC6E for ; Sat, 18 Jan 2014 10:29:29 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.214.54; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.214.54 as permitted sender) identity=mailfrom; client-ip=209.85.214.54; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-bk0-f54.google.com) identity=helo; client-ip=209.85.214.54; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-bk0-f54.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnADADpI2lLRVdY2lGdsb2JhbAA/GoNDVqhFkmaBAAgWDgEBAQEHCwsJEiqCJQEBAQICQAEbEgsBAwgEBgULAwMEAQEBDRoHIQEBEQEFAQoBCQgGExIIh1YBAxENNpsnjFyDCZI6ChknAwpkhHIRAQUMjF+BYTMHBoQyBJQ7gXqBbIExiyuDThgphFo7 X-IPAS-Result: AnADADpI2lLRVdY2lGdsb2JhbAA/GoNDVqhFkmaBAAgWDgEBAQEHCwsJEiqCJQEBAQICQAEbEgsBAwgEBgULAwMEAQEBDRoHIQEBEQEFAQoBCQgGExIIh1YBAxENNpsnjFyDCZI6ChknAwpkhHIRAQUMjF+BYTMHBoQyBJQ7gXqBbIExiyuDThgphFo7 X-IronPort-AV: E=Sophos;i="4.95,679,1384297200"; d="scan'208";a="45262046" Received: from mail-bk0-f54.google.com ([209.85.214.54]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 18 Jan 2014 10:29:28 +0100 Received: by mail-bk0-f54.google.com with SMTP id u14so1979944bkz.27 for ; Sat, 18 Jan 2014 01:29:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=suOE8lxbnCaDxd2OzEkQveKaBVvOKoeC1saAQbjAm5U=; b=l8C32/7kPLBDth77Kel4F2MXx1ZDzSO79FYMhxol+OweflyVj+Ot3K9JR0e0MR1UiK 6Xw3UFXIJ4vPQjudxtT2vG+6sdgMVKZ2PJlxwMffb+lSdrdiBeN8rf5q+yWsS82dgxat CGdnWX32MoFWzcf1fuWtw/Dz3a5xYIsCbCCAC7f/faLyf3AziQnRF4V5BmkmJDHM9mI2 JAKXxRn5RpqOFtfe0Euky8MK/unVNV/2w1XYQ8tPCsFv3SF9USkI96cFO92zr8jkuXct 8CLr+WJKD4TB8j5BnhC8Bxclqi7IxYpR9GtWkV8C9Gpmyjmrcunt/jRbijDjy8Vce0xr G82A== X-Received: by 10.205.36.81 with SMTP id sz17mr3522818bkb.29.1390037368113; Sat, 18 Jan 2014 01:29:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.205.45.5 with HTTP; Sat, 18 Jan 2014 01:28:47 -0800 (PST) In-Reply-To: References: <2112632769.281907.1389913202532.open-xchange@communicator.strato.de> <0290505B-A21A-4A05-A1C9-4C5F765DFEB5@math.nagoya-u.ac.jp> <02b301cf13e5$bdd11af0$397350d0$@ffconsultancy.com> From: Gabriel Scherer Date: Sat, 18 Jan 2014 10:28:47 +0100 Message-ID: To: David Allsopp Cc: OCaML List Mailing Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] ocaml considered dangerous No, it does not. It makes the printf codebase easier to work with (if you know your GADTs), but lately the tendency has rather been to hope for *less* complex stuff in formats, rather than more. On Sat, Jan 18, 2014 at 10:11 AM, David Allsopp wr= ote: > Does this new version fix positional specifiers? (http://caml.inria.fr/ma= ntis/view.php?id=3D4204) or has that rather useful (if never working!) feat= ure been consigned to history? > >> -----Original Message----- >> From: caml-list-request@inria.fr [mailto:caml-list-request@inria.fr] On >> Behalf Of Gabriel Scherer >> Sent: 18 January 2014 07:05 >> To: Jeremy Yallop >> Cc: Jon Harrop; Jacques Garrigue; OCaML List Mailing >> Subject: Re: [Caml-list] ocaml considered dangerous >> >> I guess one could also mention that the no-magic implementation is notab= ly >> faster than the current implementation (as it avoids any format string >> parsing at runtime), which is not necessarily a concern for printf (for >> large output you're probably killed by I/O overhead >> anyway) but can be for sprintf or bprintf. >> >> Note that while the current proposal uses GADTs, Beno=EEt also experimen= ted >> with reasonable similar designs using higher-order function (this is the >> usual initial vs. final tagless interpreter >> choice) that would have been implementable before 4.00. >> >> On Sat, Jan 18, 2014 at 3:22 AM, Jeremy Yallop wrote: >> > Jacques Garrigue wrote: >> >>> By the way, there is now an implementation of Printf that avoids most >> of the Obj.magic by using GADTs. It should be merged soon. >> > >> > Jon Harrop wrote: >> >> Just curious: is that a drop-in replacement? >> > >> > Yes, except for some tiny incompatibilities, mostly fixes for bugs >> > that the development of the GADT version uncovered in the original >> > implementation. The patch is here, along with a description and some >> > discussion: >> > >> > http://caml.inria.fr/mantis/view.php?id=3D6017 >> > >> > The author, Beno=EEt Vaugon, presented the design along with some >> > performance figures at OCaml 2013: >> > >> > http://ocaml.org/meetings/ocaml/2013/proposals/formats-as-gadts.pdf >> > http://ocaml.org/meetings/ocaml/2013/slides/vaugon.pdf >> > >> > -- >> > Caml-list mailing list. Subscription management and archives: >> > https://sympa.inria.fr/sympa/arc/caml-list >> > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners >> > Bug reports: http://caml.inria.fr/bin/caml-bugs >> >> -- >> Caml-list mailing list. Subscription management and archives: >> https://sympa.inria.fr/sympa/arc/caml-list >> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners >> Bug reports: http://caml.inria.fr/bin/caml-bugs > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 0FCB97F706 for ; Sat, 18 Jan 2014 10:43:48 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of dra-news@metastack.com) identity=pra; client-ip=62.13.148.110; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="dra-news@metastack.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of dra-news@metastack.com designates 62.13.148.110 as permitted sender) identity=mailfrom; client-ip=62.13.148.110; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="dra-news@metastack.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@outmail148110.authsmtp.com) identity=helo; client-ip=62.13.148.110; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="postmaster@outmail148110.authsmtp.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjYCAMBL2lI+DZRunGdsb2JhbABZgmqBL7gngwSBCBYOAQEBAQEIFAk8giUBAQEDATpECwIBCBgKFBAyJQIEG4d1CQPEMReOTjiDJIEUBJghlUSCKg X-IPAS-Result: AjYCAMBL2lI+DZRunGdsb2JhbABZgmqBL7gngwSBCBYOAQEBAQEIFAk8giUBAQEDATpECwIBCBgKFBAyJQIEG4d1CQPEMReOTjiDJIEUBJghlUSCKg X-IronPort-AV: E=Sophos;i="4.95,679,1384297200"; d="scan'208";a="45262860" Received: from outmail148110.authsmtp.com ([62.13.148.110]) by mail3-smtp-sop.national.inria.fr with ESMTP; 18 Jan 2014 10:43:47 +0100 Received: from mail-c237.authsmtp.com (mail-c237.authsmtp.com [62.13.128.237]) by punt14.authsmtp.com (8.14.2/8.14.2) with ESMTP id s0I9hkqf030968 for ; Sat, 18 Jan 2014 09:43:46 GMT Received: from romulus.metastack.com (cpc1-cmbg5-0-0-cust241.5-4.cable.virginm.net [81.98.252.242]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/) with ESMTP id s0I9hkrv090325 for ; Sat, 18 Jan 2014 09:43:46 GMT Received: from remus.metastack.local (remus.metastack.com [172.16.0.1]) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id s0I9hjRE021963 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Sat, 18 Jan 2014 09:43:45 GMT Received: from Remus.metastack.local ([fe80::547c:3c42:e1da:eda2]) by Remus.metastack.local ([fe80::547c:3c42:e1da:eda2%10]) with mapi id 14.03.0174.001; Sat, 18 Jan 2014 09:43:45 +0000 From: David Allsopp To: OCaML List Mailing Thread-Topic: [Caml-list] ocaml considered dangerous Thread-Index: AQHPEw/9fywvLBUW2kyKf5SGv8sAlpqINGQAgAFw9ACAABzjAIAATsYAgAAh/xCAAAZAgIAAAjZw Date: Sat, 18 Jan 2014 09:43:44 +0000 Message-ID: References: <2112632769.281907.1389913202532.open-xchange@communicator.strato.de> <0290505B-A21A-4A05-A1C9-4C5F765DFEB5@math.nagoya-u.ac.jp> <02b301cf13e5$bdd11af0$397350d0$@ffconsultancy.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.0.18] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Organization: MetaStack Solutions Ltd. X-Scanned-By: MIMEDefang 2.65 on 172.16.0.20 X-Server-Quench: 06884deb-8025-11e3-94fa-002590a135d3 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCd1ZAARAlZZVg1f DC4bFwdFRBksPQFF ChxFJgxfNlEAUAAU NkdBMnJSNkcdTBdX QSgKU0suAQNuW2N0 bxpRZA9ZYUBKWUti UVZASkxQEQd2AxgD GRwbTRk8NAU/cSYr JwBiV3BYXkE0d0B8 QgBUE2UOYTM1On0X UEJdagJVJQBXdxsT O01/VHEIaGVWZ3ll E1QlBR1jdQZ0ISFR BwUMNk4nCUEAFzs4 DxsFGy4uEUAfSil7 IxUgJVMGG1sKWgAA X-Authentic-SMTP: 61633634383431.1024:706 X-AuthFastPath: 0 (Was 255) X-AuthSMTP-Origin: 81.98.252.242/25 X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. Subject: RE: [Caml-list] ocaml considered dangerous Gabriel Scherer wrote: > David Allsopp wrote: > > Does this new version fix positional specifiers? > No, it does not. It makes the printf codebase easier to work with (if you > know your GADTs), Shame - it's an absence I find regularly irritating! Printf.printf "long-perfectly-readable-multi-line-format-string" id id id = id date id id date date id :o) > but lately the tendency has rather been to hope for *less* complex stuff = in formats, rather than more. Well, for me, the hope was that things that were supposed to have been ther= e (in the docs) might be fixed! The comments closing PRs 3992, 4204, 4290 a= nd 4321 all suggested that a rewrite would hope reintroduce positional spec= ifiers. From the printf perspective, I thought the objective was to match a= ll the implementable parts of ISO C's printf (i.e. skipping only the things= which are not type-safe). David=20 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id A815B7EC6E for ; Sat, 18 Jan 2014 11:00:27 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.214.52; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.214.52 as permitted sender) identity=mailfrom; client-ip=209.85.214.52; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-bk0-f52.google.com) identity=helo; client-ip=209.85.214.52; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-bk0-f52.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Am8DAOpP2lLRVdY0lGdsb2JhbABZg0NWqEWSZoEACBYOAQEBAQcLCwkSKoIlAQEBBEABGxILAQMMBgULAwoNISIBEQEFAQoSBhMSCIdWAQMRDZtdjFyDCZI5ChknAwpkhHIRAQUMjkAzB4Q4BJghgTGOeRgphFo7 X-IPAS-Result: Am8DAOpP2lLRVdY0lGdsb2JhbABZg0NWqEWSZoEACBYOAQEBAQcLCwkSKoIlAQEBBEABGxILAQMMBgULAwoNISIBEQEFAQoSBhMSCIdWAQMRDZtdjFyDCZI5ChknAwpkhHIRAQUMjkAzB4Q4BJghgTGOeRgphFo7 X-IronPort-AV: E=Sophos;i="4.95,679,1384297200"; d="scan'208";a="53817047" Received: from mail-bk0-f52.google.com ([209.85.214.52]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 18 Jan 2014 11:00:27 +0100 Received: by mail-bk0-f52.google.com with SMTP id e11so998798bkh.11 for ; Sat, 18 Jan 2014 02:00:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=BUUoH7AHOSyX8zbc3cKwU0LzIShmGMXjAGH2UKzRD1U=; b=gVUN9CLoiHR7mz8+jf4E5/e1c/htittzg8RkGdNZL7jX4P44a2eyX4pCM5aT/afy/Q GNVurxNyR2wWjclE5MdG75E4uUVn3Npdl4BDBNpcDEbyni+GDtFp5TOoeC6PUV2UTz4Z S8Avw2+BfNmOvFrfZxSPQgDzOJwI8ZWLJpYRd4Nz+Aze4iCVzYlA46udgzhBndlmFtfS w5RXFFZVNAsO0VFSdNjvnlAhHQmnmMETBZMgtl4bTWE1qT0bmJy/8GyEsJCPCyDhbqxb aFEhxaby13wwUmIYl6DmNrjj826DlF3wlvwFtpZwxZdynNRe1gvHbbyv5rFE8dwWVpf3 L2pA== X-Received: by 10.205.77.196 with SMTP id zj4mr6084bkb.170.1390039226522; Sat, 18 Jan 2014 02:00:26 -0800 (PST) MIME-Version: 1.0 Received: by 10.205.45.5 with HTTP; Sat, 18 Jan 2014 01:59:46 -0800 (PST) In-Reply-To: References: <2112632769.281907.1389913202532.open-xchange@communicator.strato.de> <0290505B-A21A-4A05-A1C9-4C5F765DFEB5@math.nagoya-u.ac.jp> <02b301cf13e5$bdd11af0$397350d0$@ffconsultancy.com> From: Gabriel Scherer Date: Sat, 18 Jan 2014 10:59:46 +0100 Message-ID: To: David Allsopp Cc: OCaML List Mailing Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] ocaml considered dangerous Right now (in the following weeks) the priority is to finish a thorough review of the (quite large) proposed patch, and integrate it in trunk. After that, you will be welcome to experiment with implementing propositional parameter and proposing it for integration. Assuming maintainers are ready to take the feature back (which is not a given), my intuition is that it would be doable, but you would have to be careful to have an implementation that does not degrade performances for formats that do not use the feature. On Sat, Jan 18, 2014 at 10:43 AM, David Allsopp wr= ote: > Gabriel Scherer wrote: >> David Allsopp wrote: >> > Does this new version fix positional specifiers? >> No, it does not. It makes the printf codebase easier to work with (if you >> know your GADTs), > > Shame - it's an absence I find regularly irritating! > > Printf.printf "long-perfectly-readable-multi-line-format-string" = id id id id date id id date date id :o) > >> but lately the tendency has rather been to hope for *less* complex stuff= in formats, rather than more. > > Well, for me, the hope was that things that were supposed to have been th= ere (in the docs) might be fixed! The comments closing PRs 3992, 4204, 4290= and 4321 all suggested that a rewrite would hope reintroduce positional sp= ecifiers. From the printf perspective, I thought the objective was to match= all the implementable parts of ISO C's printf (i.e. skipping only the thin= gs which are not type-safe). > > > David > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id DEB087EE99 for ; Sun, 19 Jan 2014 07:09:08 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of oleg@okmij.org) identity=pra; client-ip=66.39.3.115; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="oleg@okmij.org"; x-sender="oleg@okmij.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of oleg@okmij.org designates 66.39.3.115 as permitted sender) identity=mailfrom; client-ip=66.39.3.115; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="oleg@okmij.org"; x-sender="oleg@okmij.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@www1.g3.pair.com) identity=helo; client-ip=66.39.3.115; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="oleg@okmij.org"; x-sender="postmaster@www1.g3.pair.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvERAHxr21JCJwNzY2dsb2JhbABZg0OIMLNcgRwDGAcOCDyCJQEBAQMBeQUWGBxpFIgCCA3EFxeNBIF7BxaEIgSYIQGBMpQTPA X-IPAS-Result: AvERAHxr21JCJwNzY2dsb2JhbABZg0OIMLNcgRwDGAcOCDyCJQEBAQMBeQUWGBxpFIgCCA3EFxeNBIF7BxaEIgSYIQGBMpQTPA X-IronPort-AV: E=Sophos;i="4.95,683,1384297200"; d="scan'208";a="53869487" Received: from www1.g3.pair.com ([66.39.3.115]) by mail2-smtp-roc.national.inria.fr with SMTP; 19 Jan 2014 07:09:07 +0100 Received: (qmail 69436 invoked by uid 9370); 19 Jan 2014 06:09:06 -0000 Date: 19 Jan 2014 06:09:06 -0000 Message-ID: <20140119060906.69435.qmail@www1.g3.pair.com> From: oleg@okmij.org To: gabriel.scherer@gmail.com CC: yallop@gmail.com, jon@ffconsultancy.com, garrigue@math.nagoya-u.ac.jp, caml-list@inria.fr In-reply-to: Subject: Re: [Caml-list] ocaml considered dangerous > Jacques Garrigue wrote: > By the way, there is now an implementation of Printf that avoids > most of the Obj.magic by using GADTs. It should be merged soon. Perhaps it may be worth mentioning a (quite old actually) paper http://okmij.org/ftp/typed-formatting/index.html#derivation that attempts to _derive_ various typed scanf and printf implementation, including a couple of new ones. All the code is in OCaml. Perhaps also relevant is http://okmij.org/ftp/typed-formatting/index.html#C-like which uses Template Haskell to convert a C-like format string into the proper combinator format. The conversion is syntax-directed rather than type directed (that is, a simple preprocessor, like ppx). In the above developments, the types seem to have fewer type parameters than what I've seen presented at the OCaml workshop. I am still not clear about the source of that difference. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 5F9697EE99 for ; Mon, 20 Jan 2014 11:07:31 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of goswin-v-b@web.de) identity=pra; client-ip=212.227.15.14; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="goswin-v-b@web.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of goswin-v-b@web.de) identity=mailfrom; client-ip=212.227.15.14; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="goswin-v-b@web.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mout.web.de) identity=helo; client-ip=212.227.15.14; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="postmaster@mout.web.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArcCAGP03FLU4w8OnGdsb2JhbABZg0O2RIVPgQwWDgEBAQEBBg0JCRQogiUBAQEEMgFWCxgJJQ8FKIgkARgJvRgfhiWPBhaEIgSYIYYxEo8E X-IPAS-Result: ArcCAGP03FLU4w8OnGdsb2JhbABZg0O2RIVPgQwWDgEBAQEBBg0JCRQogiUBAQEEMgFWCxgJJQ8FKIgkARgJvRgfhiWPBhaEIgSYIYYxEo8E X-IronPort-AV: E=Sophos;i="4.95,689,1384297200"; d="scan'208";a="53980571" Received: from mout.web.de ([212.227.15.14]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 20 Jan 2014 11:07:31 +0100 Received: from frosties.localnet ([37.49.32.119]) by smtp.web.de (mrweb001) with ESMTPSA (Nemesis) id 0MaJc8-1VlKUz2qlc-00Jt7C for ; Mon, 20 Jan 2014 11:07:29 +0100 Received: from mrvn by frosties.localnet with local (Exim 4.80) (envelope-from ) id 1W5BlR-0007Gc-6F for caml-list@inria.fr; Mon, 20 Jan 2014 11:07:29 +0100 Date: Mon, 20 Jan 2014 11:07:29 +0100 From: Goswin von Brederlow To: caml-list@inria.fr Message-ID: <20140120100729.GG26447@frosties> References: <2112632769.281907.1389913202532.open-xchange@communicator.strato.de> <52D87CA9.4070500@braud-santoni.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <52D87CA9.4070500@braud-santoni.eu> User-Agent: Mutt/1.5.21 (2010-09-15) X-Provags-ID: V03:K0:WzQwkah5kH2vVSxNy8VZch4MM9+BcWFtuj1+aMVXQQQZ1oPL/qh UcKAY7pB4cYp4uvB/HpsJfCCunVorB0igitbrsY+gnyF2VixKO6vZo/xuxDAB70pD+OdUoP 11pIfX6xjzw/96aZPGmROZh7ZD4o+fVcs7NCh4XyxB6GdVkBzR5nDD935xRDkDiVYhP6+jz FIQ9c1AV4JF4xbR0ivQwA== Subject: Re: [Caml-list] ocaml considered dangerous On Fri, Jan 17, 2014 at 01:43:21AM +0100, Nicolas Braud-Santoni wrote: > Dear Jürgen, > > First, for completeness' sake, the correct URL is > http://www.pfitzenmaier.de/posts/ocaml-considered-dangerous.html > > It seems that most of the points in this blog post boil down to your > confusion regarding the signification of 'a in types. > Consider the following: > let x : 'a = 0;; > val x : int = 0 > > whereas > let x: 'a. 'a = 0;; > Error: This definition has type int which is less general than 'a. 'a > > In the first case, 'a is a unification variable, which the compiler may > unify with int. > In the second case, we quantify universally over 'a. > > As such, I would say that your claims of unsoundness were rather hasty, > especially given that you follow-up by advertising your services. > Moreover, as Daniel Bünzli pointed out, problem reports are usually done > on the bugtracker. > > Kind regards, > Nicolas It should also be noted that he claims the compiler produces faulty programms. But all his examples are about the compiler rejecting some bit of code that he thinks should be accepted. So his code, which the compiler currently accepts or he couldn't run it, crashes and he blames the compiler because other code doesn't get accepted. Does that make any sense? Seems to me that the crashes are more likely caused by his tinkering with the compiler trying to get code accepted that the compiler currently rejects because they are (or could be) unsound. Punhcing holes in the type system like that obviously can cause crashes as can use of Obj.magic to work around the type system. Dear Jürgen, Your first half seems to be, as mentioned, about misunderstanding the type system. You might want to read up on universal and existential types and unification. I also recommend reading up on the value restriction, which explains why you sometimes loose polymorphism unless you lift arguments. As for your "Frightening discoveries" in the second half of your post: Ocaml inferes types. Some types are infered by how the function is declared and some types are infered by how the function (or method) is USED, esspecially within objects. In the full example the use of the method lets the compiler infere the right type so everything works. But when you simplify the example to the point where the use case disapears that is no longer possible and the compiler tells you so. This can be surprising and anoying at times but that is how it works. It does not mean the compiler accepted something in the longer example that was unsound. MfG Goswin