From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr 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 D751FBC6B for ; Tue, 9 Oct 2007 17:31:08 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAJI7C0fAXQInh2dsb2JhbACOSAIBCAop X-IronPort-AV: E=Sophos;i="4.21,249,1188770400"; d="scan'208";a="2663374" Received: from concorde.inria.fr ([192.93.2.39]) by mail1-smtp-roc.national.inria.fr with ESMTP; 09 Oct 2007 17:31:08 +0200 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l99FV844027228 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Tue, 9 Oct 2007 17:31:08 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAAo8C0dAahQhh2dsb2JhbACOSAIBCAop X-IronPort-AV: E=Sophos;i="4.21,249,1188770400"; d="scan'208";a="17758738" Received: from mail.cs.unm.edu ([64.106.20.33]) by mail4-smtp-sop.national.inria.fr with ESMTP; 09 Oct 2007 17:31:07 +0200 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.cs.unm.edu (Postfix) with ESMTP id B370FE41DB; Tue, 9 Oct 2007 09:31:05 -0600 (MDT) Received: from mail.cs.unm.edu ([127.0.0.1]) by localhost (mail [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20245-09; Tue, 9 Oct 2007 09:31:05 -0600 (MDT) Received: from cs.unm.edu (webmail.cs.unm.edu [64.106.20.39]) by mail.cs.unm.edu (Postfix) with ESMTP id 1367EE41DA; Tue, 9 Oct 2007 09:31:05 -0600 (MDT) From: "William D. Neumann" To: skaller , Gerd Stolpmann Cc: Caml-list List Subject: Re: [Caml-list] Correct way of programming a CGI script Date: Tue, 9 Oct 2007 10:31:10 -0500 Message-Id: <20071009152522.M54192@cs.unm.edu> In-Reply-To: <1191942991.5966.4.camel@rosella.wigram> References: <1191859489.10162.16.camel@localhost.localdomain> <1191879429.28011.27.camel@rosella.wigram> <1191925574.10162.54.camel@localhost.localdomain> <1191942991.5966.4.camel@rosella.wigram> X-Mailer: Open WebMail 2.50 20050106 X-OriginatingIP: 205.175.225.22 (wneumann) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at cs.unm.edu X-Miltered: at concorde with ID 470B9EBC.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; buffer:01 buffer:01 blit:01 stdlib:01 presto:98 wrote:01 caml-list:01 append:02 neumann:02 neumann:02 string:02 string:02 slightly:03 module:03 programming:03 On Wed, 10 Oct 2007 01:16:31 +1000, skaller wrote > No you don't, that's the point. There is no fast way to append using > string. You can use Buffer, but then you can't do (for example) > search. You can convert back and forth, and then you > pay an extra conversion cost. So use buffer.ml with a slightly modified interface to create a rawBuffer module that gives you direct access to the normally hidden string (and the position of the end of the buffer). Presto, Bufferlike operations with a string you can directly touch, search, blit, whatever. No, it's not the default way the stdlib works, and again, it may not be the first thing someone thinks of when they facce this problem. But the language makes this option available with a minimum of work. Is it ideal? No. Is is awful? Again, no. -- William D. Neumann