Previous week   Up   Next week
Hello,

Here is the latest Caml Weekly News, weeks 09 to 16 july, 2002. 

1) Which solution for a fast powerfull drawing area ?
2) Array.resize ?
3) stdclass 1.0
4) PXP development

======================================================================
1) Which solution for a fast powerfull drawing area ?
----------------------------------------------------------------------
Matthieu Dubuget asked:

I'm looking at ocaml as the language to make ultrasonic programs.
The difficult part for me is the scientific imaging.
I will have to show waveforms (typically 1024 points long) and colormaps
(1024 * 100 * 256 levels of color for example) at comfortable
speed (I mean more than 20 Hz).

I tried to use lablgtk and camlimage starting from the examples, but
didn't achieve to get a area in wich I can draw all what I want...
Starting from the lablgtk drawing.ml example, I was not able to
chose/create RGB colors. My feeling is that there is something to do  
to have the right colormap or extend it ?   

I would appreciate any suggestion to progress.

I would need:
* to be able to draw and change the colors,
* a very nice point would be to have transparency, in order to be able
  to implement layers in graphical widgets (composite widgets in ocaml,
  or gtk widget in C + binding ?)
* the ability to manipulate some decorations on the graphic with the
  mouse (event handling)
* and certainly a lot more...

Well, all this is not so far from the canvas widget (Tk, Gnome).

and Jean-Christophe Filliātre answered:

You may  have a  look at the  SDL library  (http://www.libsdl.org/), a
powerful  cross-platform  2D   graphics  library.  Many  Linux  games,
including commercial ones, use this library.

There are (at least) two ocaml interfaces for this library:

- one I did some time ago, no more developped, but suitable for
  relatively simple programs;
  see http://www.lri.fr/~filliatr/ftp/ocaml/ocamlsdl/

- another on SourceForge, probably much more developped than mine;
  see http://ocamlsdl.sourceforge.net/

======================================================================
2) Array.resize ?
----------------------------------------------------------------------
Oleg asked and Markus Mottl answered:

> Is there an efficient way in O'Caml to append an element to an array ref?

You might want to try my RES-library, which provides for automatically
resizing arrays and strings (the resizing strategies can be
parameterized):

  http://www.oefai.at/~markus/home/ocaml_sources.html

======================================================================
3) stdclass 1.0
----------------------------------------------------------------------
Issac Trotts announced:

Here is an OCaml 3.04 port of Jacques Garrigue's ocaml-classes-3.00
library (which was for OCaml 3.00):

http://www.issactrotts.net/libs/stdclass-1.0.tgz

======================================================================
4) PXP development
----------------------------------------------------------------------
Gerd Stolpmann announced:

I have recently started to continue the development of PXP, the
Polymorphic XML Parser. There is a new development version:

http://www.ocaml-programming.de/packages/documentation/pxp/index_dev.html

Changes:
- There is now an event-based interface (similar to SAX).
- There is very preliminary support for "escape parsers". The symbols
  {, {{, }}, } can be handled specially, e.g. it is possible to include
  foreign syntax inside {...}: <A> { foreign non-XML expression } </A>

======================================================================
Old cwn
----------------------------------------------------------------------

If you happen to miss a cwn, you can send me a message
(alan.schmitt@inria.fr) and I'll mail it to you. If you also wish to
receive it every week by mail, just tell me so.

======================================================================

Alan Schmitt