[clean-list] Communicating with other programs

Siegfried Gonzi siegfried.gonzi@kfunigraz.ac.at
Thu, 15 Nov 2001 16:01:41 +0100


Marco Kesseler schrieb:

> I am not sure that I understand what you mean. I can come up with
> two answers:
> - An executable generated from Clean is no different from an
> executable generated from C.
> -  No, you cannot simply call a Clean function from a C program,
> but I wish it were possible (and yes, this is simpler than calling C
> from Clean, because there is - to some extend - less trouble with
> referential transparency; things get murkier when the called Clean
> function gets a C proc ptr for an argument... or an object with
> methods).
>

I am so a richtiger Hirsch.

I think (or hope a little bit) that I am grasping now (consulting also the post from  J.K.) how they
make the distinction. Function call is not necessarily a call to an excetuable program.

Digression: why I have asked here on the list. I think my problem is common and not specific for one
tool or visualization program. Lets take the case I have written a Clean program which reads in from a
file into a Clean array, performs some calculations and now I have only the option to save my
calculations in another file and post-process this file with a visualization tool. But wouldn't it be
nice I can circumvent the file saving process and pass my array directly for plotting to a tool like
GNU-plot or Matlab (only to mention a few without any specific meaning)?

This is the usual cycle in Matlab: arrays -> calculation -> plotting. And now I have to decide, if is
it worth to code in Clean? Surely, one does not bother if the calculation takes 3hours; then the file
saving and post-processing cycle is negligible.

Has anybody ever tried to glue Clean with a plotting tool? Yes I know, it would be really a nice plan
to start a plotting library in Clean (I/O) itself. But this takes menpower (I mean not
Nijmengen-power; they should concentrate on Clean). But in the meantime? I really would like to know
how Python does it? How is it possible that they include without any problems GNU-plot?

Believe me Clean has the potential to supersede (okay, this is only a dream) Fortran 90 (not to
confuse with 77). I do not know, but they resemble each other at least at arrays. I often hear people
would move to Clean but they are intimidated by the lack of gluing? Okay, it is not really super to
look at Python and the abuse there. Okay, maybe the world is not perfect and it is no shame to glue
together programs and paradigms.


I think it is  4:00am and time for starting a project called: Clean as a strong competitor  to Matlab,
NumPython, PerIDL (yes, even Perl cloned IDL like feeling),Yorick. This is no joke. If you are
interested in and do not like Python or Perl and want to contribute something (forget for this moment
open source; who on earth says that you may only contribute to open-source?), please consider to jump
onto the train. I would be on the boat, but we need people (menpower!).

I am not drunken and do not joking, contact me off the list if you would be interested in. I have no
training in GUI programming and no concept how to implement a plotting library in Clean (or even steal
one from another language or tool) but if there are enough people I think such a project can succeed!


S. Gonzi