Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] OCaml as fancy calculator...
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Oliver Bandel <oliver@f...>
Subject: [Caml-list] OCaml as fancy calculator...
Hello,

in the examples of the introductional texts to OCaml
is mentioned, that OCaml may be used as a fancy
calculator.
Ok, if I take this idea, I want to have some mathematical
libraries, like histograms (frequencies) and the like.

If I write some often-needed mathematical routines,
so that it can be used with file-based OCaml-programs
for compilation, how can I use such files (or the compiled
byte-code or binaries) for interactive sessions with
ocaml?

Is this the first step to use the module system?
Or can I start with things like "include"-statements
in other calculator-like programs? (Including
source-files like an #include in C or load-commands
of some programs.)

I think about writing some mathematical routines
and maybe some output-routines to postscript
(Or maybe I can use cdk for this?).

Maybe this can acchieve things like gnuplot does,
but in a functional way.

So I'm thinking about implementing some simple
routines for loading data-files, doing mathematical
operations and writing the results as ASCII-output and
maybe as postscript-output (or psTricks-Output for including
the reults in LaTeX-documents).


I think as a beginner of FPLs and OCaml, it's too much effort
to write a complete application like a functional-gnuplot.

I want to use this tool for solving some common problems of the day
and I want to learn OCaml (and FP in general) with it.
So, it's ok, if it is only a small tool. But I want to have the
right design decisions for using it as a tool, but one, which is
expandable in future time, when it - maybe - can become a
complete application.



* Any hints, how to plan/design such a project, which
  tools I can use and so on...?!
* How can I use it in in interactive mode?

* other things to think about?


TIA,
  Oliver

-- 
    Obviously, because programming is a creative activity there is not
    going to be a set of rules which will always lead us mechanically
    to a solution to a problem.
            (Simon Thompson: Haskell - The Craft of Functional Programming)

-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr