caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* libplot for OCaml?
@ 2000-11-25 10:42 Markus Mottl
  2000-11-27  8:56 ` Sven LUTHER
       [not found] ` <14891.28540.612485.383571@akasha.ijm.jussieu.fr>
  0 siblings, 2 replies; 5+ messages in thread
From: Markus Mottl @ 2000-11-25 10:42 UTC (permalink / raw)
  To: OCAML

Hello,

has anybody already considered implementing an interface to the
libplot-library?

  http://www.gnu.org/software/plotutils

It is very portable, knows many target "plotters" (from X-windows to
various image formats), has lots of functionality and is thread-safe
(i.e. you can have several independent "plotters" at once).

ADA, Python and Perl already have interfaces so it may already be
considered as a kind of standard in this field.

I don't have time to do it right now, but if anybody wants to give it a
try, I could imagine helping a bit. It doesn't look terribly difficult
and may be a good exercise to try out camlidl...

Best regards,
Markus Mottl

-- 
Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: libplot for OCaml?
  2000-11-25 10:42 libplot for OCaml? Markus Mottl
@ 2000-11-27  8:56 ` Sven LUTHER
  2000-11-27 10:57   ` Markus Mottl
       [not found] ` <14891.28540.612485.383571@akasha.ijm.jussieu.fr>
  1 sibling, 1 reply; 5+ messages in thread
From: Sven LUTHER @ 2000-11-27  8:56 UTC (permalink / raw)
  To: Markus Mottl; +Cc: OCAML

On Sat, Nov 25, 2000 at 11:42:56AM +0100, Markus Mottl wrote:
> Hello,
> 
> has anybody already considered implementing an interface to the
> libplot-library?
> 
>   http://www.gnu.org/software/plotutils
> 
> It is very portable, knows many target "plotters" (from X-windows to
> various image formats), has lots of functionality and is thread-safe
> (i.e. you can have several independent "plotters" at once).
> 
> ADA, Python and Perl already have interfaces so it may already be
> considered as a kind of standard in this field.
> 
> I don't have time to do it right now, but if anybody wants to give it a
> try, I could imagine helping a bit. It doesn't look terribly difficult
> and may be a good exercise to try out camlidl...

Also notice, ...

I have been working on c2caml, which should become an automatic or
semi-automatic bindings generator from a C header file.

I have not really had time to work on it anymore, so the current status is
that it correctly parses C headers (even some of the GNU extension, it
correctly parses all of the gtk+ headers), but doesn't generate anything yet.

I had a TER student working on it last year, but it didn't go as far as i
hoped, and i proposed it again this year.

If anybody is interrested in working on it, i could try to setup a public cvs
repository of it, or even have it hosted at sourceforge ?

Friendly,

Sven Luther



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: libplot for OCaml?
  2000-11-27  8:56 ` Sven LUTHER
@ 2000-11-27 10:57   ` Markus Mottl
  2000-11-27 11:42     ` Sven LUTHER
  0 siblings, 1 reply; 5+ messages in thread
From: Markus Mottl @ 2000-11-27 10:57 UTC (permalink / raw)
  To: Sven LUTHER; +Cc: OCAML

On Mon, 27 Nov 2000, Sven LUTHER wrote:
> I have been working on c2caml, which should become an automatic or
> semi-automatic bindings generator from a C header file.

Sounds like a very useful tool! If I am not mistaken, there have been other
efforts, too. Does anybody know what happened to them? Has anybody already
tried SWIG or similar?

> If anybody is interrested in working on it, i could try to setup a
> public cvs repository of it, or even have it hosted at sourceforge ?

It is probably less effort and gives the OCaml-community more visibility if
we put projects on SourceForge - I'll also do this in the near future.
Furthermore, if the initial author does not have time to maintain them
anymore, others can take over more easily: the hurdle of joining or taking
over a SourceForge project is much lower than for e.g. public cvs only.

Best regards,
Markus Mottl

-- 
Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: libplot for OCaml?
  2000-11-27 10:57   ` Markus Mottl
@ 2000-11-27 11:42     ` Sven LUTHER
  0 siblings, 0 replies; 5+ messages in thread
From: Sven LUTHER @ 2000-11-27 11:42 UTC (permalink / raw)
  To: Markus Mottl; +Cc: Sven LUTHER, OCAML

On Mon, Nov 27, 2000 at 11:57:16AM +0100, Markus Mottl wrote:
> On Mon, 27 Nov 2000, Sven LUTHER wrote:
> > I have been working on c2caml, which should become an automatic or
> > semi-automatic bindings generator from a C header file.
> 
> Sounds like a very useful tool! If I am not mistaken, there have been other
> efforts, too. Does anybody know what happened to them? Has anybody already
> tried SWIG or similar?
> 
> > If anybody is interrested in working on it, i could try to setup a
> > public cvs repository of it, or even have it hosted at sourceforge ?
> 
> It is probably less effort and gives the OCaml-community more visibility if
> we put projects on SourceForge - I'll also do this in the near future.
> Furthermore, if the initial author does not have time to maintain them
> anymore, others can take over more easily: the hurdle of joining or taking
> over a SourceForge project is much lower than for e.g. public cvs only.

Ok, i just registered it at sourceforge, it will need 24hours or so for it to
take place, but after that, it should be available at :

http://c2caml.sourceforge.net

Friendly,

Sven Luther



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: libplot for OCaml?
       [not found] ` <14891.28540.612485.383571@akasha.ijm.jussieu.fr>
@ 2000-12-04 11:32   ` Markus Mottl
  0 siblings, 0 replies; 5+ messages in thread
From: Markus Mottl @ 2000-12-04 11:32 UTC (permalink / raw)
  To: Olivier Andrieu; +Cc: OCAML

On Mon, 04 Dec 2000, Olivier Andrieu wrote:
> Markus Mottl writes:
>  > has anybody already considered implementing an interface to the
>  > libplot-library?
>  > [ ...]	
>  > I don't have time to do it right now, but if anybody wants to give
>  > it a try, I could imagine helping a bit. It doesn't look terribly
>  > difficult and may be a good exercise to try out camlidl...

> I had never heard of both libplot and camlidl, so your post was a
> revelation for me ! So, I tried to generate stub code for the libplot
> header with camlidl. Seems to work fine, but I have a little problem :
> some functions in libplot take FILE* arguments. Since that's not a
> `basic' type, it is not handled by camlidl. Nevertheless, I guess it
> could be possible to map an in_channel (or out_channel) CAML type to
> a FILE struct. 

Unfortunately, there does not seem to be a basic type for this in camlidl
- yet. Maybe the developers can tell us which would be the best way to
do it with camlidl?

Otherwise, it is always possible to use "c2ml" and"ml2c" for conversions.

I haven't tried it, but the following might work:

Use the conversion macros and functions defined in "byterun/io.{h,c}":

The "Channel"-macro gives you access to the C-representation of
OCaml-channels. Then you can get at the Unix file descriptor with:

  int fd = Channel(some_channel)->fd;

Now you can use "fdopen" (see man page for details):

  FILE *file = fdopen(fd, some_mode);

It doesn't look terribly difficult, but some support for this in camlidl
would be very nice! Or maybe there are already other (better) ways to do it?

Best regards,
Markus Mottl

-- 
Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2000-12-04 22:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-25 10:42 libplot for OCaml? Markus Mottl
2000-11-27  8:56 ` Sven LUTHER
2000-11-27 10:57   ` Markus Mottl
2000-11-27 11:42     ` Sven LUTHER
     [not found] ` <14891.28540.612485.383571@akasha.ijm.jussieu.fr>
2000-12-04 11:32   ` Markus Mottl

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).