From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id D977BBB81 for ; Thu, 12 Jan 2006 20:29:35 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k0CJTZdj023817 for ; Thu, 12 Jan 2006 20:29:35 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA24890 for ; Thu, 12 Jan 2006 20:29:34 +0100 (MET) Received: from rwcrmhc12.comcast.net (rwcrmhc14.comcast.net [216.148.227.154]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k0CJTVeI018812 for ; Thu, 12 Jan 2006 20:29:34 +0100 Received: from 192.168.1.100 (c-24-118-210-113.hsd1.mn.comcast.net[24.118.210.113]) by comcast.net (rwcrmhc14) with SMTP id <20060112192919014002mk9ge>; Thu, 12 Jan 2006 19:29:29 +0000 Subject: Re: [Caml-list] Request for comments: Printf list conversion From: Bill Wood To: Richard Jones Cc: Ocaml In-Reply-To: <20060112173956.GA9364@furbychan.cocan.org> References: <43C61F1F.4030101@barettadeit.com> <1137081054.29722.13.camel@localhost> <20060112173956.GA9364@furbychan.cocan.org> Content-Type: text/plain Date: Thu, 12 Jan 2006 13:29:18 -0600 Message-Id: <1137094158.6027.8.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.0.1-1mdk Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 43C6AE1F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 43C6AE1B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 printf:01 debugging:01 cvs:01 viewcvs:01 mli:01 scheduler:01 wrote:01 wrote:01 sourceforge:01 structures:01 latex:01 latex:01 data:02 std:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.3 On Thu, 2006-01-12 at 17:39 +0000, Richard Jones wrote: . . . > If you just want to dump out data structures (for debugging, for > example) then you might want to take a look at the Std.dump function > in Extlib: > > http://cvs.sourceforge.net/viewcvs.py/ocaml-lib/extlib-dev/std.mli?rev=1.15&view=markup > > Or: http://merjis.com/developers/dumper > > Of course this isn't suitable for end user reports. This is good to know, but I'm talking about situations where I need more structured output. For example, I wrote a scheduling program for an organization I belonged to, and found it convenient to output the results as a LaTeX table. So there was pre-matter boiler plate, then the table, and finally post-matter boiler plate. The results of the scheduler were produced as a list of lists, where each member list had an item for each column of the table. A single (format...) form consumed the results and wrote out the table. All I had to do was run the program, then run latex, and finally pipe the output of dvips to my printer. Of course, a major part of the convenience was that *I didn't have to write the formatter*. -- Bill Wood