caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Richard Jones <rich@annexia.org>
To: "Khamenia, Valery" <V.Khamenia@biovision-discovery.de>
Cc: "'caml-list@inria.fr'" <caml-list@inria.fr>
Subject: Re: [Caml-list] laconical input from a file for arrays and/or mat rices
Date: Mon, 2 Feb 2004 15:41:53 +0000	[thread overview]
Message-ID: <20040202154153.GA26639@redhat.com> (raw)
In-Reply-To: <D15343265276D31197BC00A024A6C110774276@EXS_BDC>

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


      reply	other threads:[~2004-02-02 15:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-02 15:33 AW: " Khamenia, Valery
2004-02-02 15:41 ` Richard Jones [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040202154153.GA26639@redhat.com \
    --to=rich@annexia.org \
    --cc=V.Khamenia@biovision-discovery.de \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).