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