From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA24770; Mon, 2 Feb 2004 16:41:57 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 QAA24925 for ; Mon, 2 Feb 2004 16:41:56 +0100 (MET) Received: from aomori.annexia.org (annexia.force9.co.uk [212.56.101.183]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id i12FfsP15684 for ; Mon, 2 Feb 2004 16:41:55 +0100 (MET) Received: from rich by aomori.annexia.org with local (Exim 3.36 #1 (Debian)) id 1AngCv-00077K-00; Mon, 02 Feb 2004 15:41:53 +0000 Date: Mon, 2 Feb 2004 15:41:53 +0000 To: "Khamenia, Valery" Cc: "'caml-list@inria.fr'" Subject: Re: [Caml-list] laconical input from a file for arrays and/or mat rices Message-ID: <20040202154153.GA26639@redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i From: Richard Jones X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 2004:99 origins:01 spreadsheets:99 obstacle:01 vanier:01 arrays:01 ltd:98 mat:01 tar:01 wrote:03 library:03 library:03 perl:03 data:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, Feb 02, 2004 at 04:33:39PM +0100, Khamenia, Valery wrote: > Hi Rich and all, > > > Probably not quite what you want, but I have a library for reading and > > writing comma-separated values (CSV) files here: > > http://www.merjis.com/developers/csv/ > > http://www.merjis.com/developers/csv/ocaml-csv-1.0.1.tar.gz > > thank you, it would be interesting what's the skeleton idea > behind your code, but I can't get it after first apporoach :) Can you define the problem some more? Do you have lots of existing files in this particular format which you'd like to be able to read? Or are you just looking for a reliable way to store and load your program data? If you've got a lot of existing files that you must read in, then you'll obviously need to write or find a reader for that format. If you're just looking around for a suitable format for storing and loading your data, then locate some existing code which already does this and just use that. One possibility is indeed CSV, which, despite its origins in the DOS world, turns out to be quite a useful and reliable format. Another is using input/output matrix functions. You could also try converting from the space-separated format to CSV format using either a quick Perl script, or even using a spreadsheet program -- most spreadsheets will let you read in the space-separated format and write it out in CSV format, which can then be read using the ocaml-csv library. Rich. -- Richard Jones. http://www.annexia.org/ http://www.j-london.com/ Merjis Ltd. http://www.merjis.com/ - improving website return on investment "One serious obstacle to the adoption of good programming languages is the notion that everything has to be sacrificed for speed. In computer languages as in life, speed kills." -- Mike Vanier ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners