Version française
Home     About     Download     Resources     Contact us    
Browse thread
AW: [Caml-list] laconical input from a file for arrays and/or mat rices
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Khamenia, Valery <V.Khamenia@b...>
Subject: AW: [Caml-list] laconical input from a file for arrays and/or mat rices
> 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