From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id A5F66BCAC for ; Thu, 2 Jun 2005 00:40:14 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j51MeERr010695 for ; Thu, 2 Jun 2005 00:40:14 +0200 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 AAA04865 for ; Thu, 2 Jun 2005 00:40:13 +0200 (MET DST) Received: from ptb-relay03.plus.net (ptb-relay03.plus.net [212.159.14.214]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j51MeDuW010689 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Thu, 2 Jun 2005 00:40:13 +0200 Received: from [80.229.56.224] (helo=chetara) by ptb-relay03.plus.net with esmtp (Exim) id 1Ddbsi-000207-Pb for caml-list@inria.fr; Wed, 01 Jun 2005 23:40:12 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: Caml-list Subject: Incremental loading Date: Wed, 1 Jun 2005 23:39:17 +0100 User-Agent: KMail/1.7.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200506012339.17990.jon@ffconsultancy.com> X-Miltered: at concorde with ID 429E394E.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 429E394D.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocamlyacc:01 parser:01 ocaml's:01 threads:01 parser:01 loader:01 ocaml:01 frog:98 incremental:01 data:02 caml:02 objective:02 guess:02 output:02 output:02 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: I'd like to load an image incrementally and draw what has been loaded until loading is complete. My "loading" code is an ocamlyacc parser. What's the easiest way to convert it into something which incrementally produces output? My guess is that I use ocaml's threads and make the parser compose its output by way of side effects, such that the intermediate results can be read. Perhaps an alterative is to make the loader recycle loaded data and a stream. Does anyone have any example code which does this kind of thing? -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. Objective CAML for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists