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 RAA26156; Mon, 2 Feb 2004 17:03:00 +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 RAA26380 for ; Mon, 2 Feb 2004 17:02:59 +0100 (MET) Received: from VIRUSWALL (mail.biovision-discovery.de [212.59.36.67]) by concorde.inria.fr (8.11.1/8.11.1) with SMTP id i12G2wP19169 for ; Mon, 2 Feb 2004 17:02:58 +0100 (MET) Received: from 192.168.43.51 by VIRUSWALL (InterScan E-Mail VirusWall NT); Mon, 02 Feb 2004 17:02:24 +0100 Received: by EXS_BDC with Internet Mail Service (5.5.2655.55) id ; Mon, 2 Feb 2004 17:03:03 +0100 Message-ID: From: "Khamenia, Valery" To: "'Richard Jones'" , "Khamenia, Valery" Cc: "'caml-list@inria.fr'" Subject: AW: [Caml-list] laconical input from a file for arrays and/or mat rices Date: Mon, 2 Feb 2004 17:03:03 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2655.55) Content-Type: text/plain; charset="iso-8859-1" X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 no-no:01 python:01 spreadsheets:99 spreadsheets:99 reproducible:01 doubles:01 vak:99 arrays:01 arrays:01 mat:01 ocaml:01 prototyping:03 library:03 matrices:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > 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? i have a lot of "R" and C/C++ code, where (especially at math prototyping phase) i used text ascii files to I/O with matrices/arrays. Now I try to use ocaml a bit. I don't want change old code. I'd like to use the same format. For example for matrices I use format like here: 2 3 a b c d e f > 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. you are right, and I have posted this code in previous mail. but i am not happy: 1. with error-proness of my code and 2. that these simple things kill that much time :) > 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. no-no. I am already stuck to my old format. > [...] Another is using input/output matrix functions. ? any link? > You could also try converting from the space-separated format to CSV > format using either a quick Perl script, I was thinking about perl/python scripts. > 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. conversion with spreadsheets is not reproducible and doubles the number of files. not good. thanks. -- vak ------------------- 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