Jens Kloecker | 4 Dec 1995 10:20
Picon

a csl program


Hello,

  I ported the syntax diagram generator SYNGEN to 
Caml Special Light 1.12---yes I'm an adventurous soul! Here the README:

----------------------------------------
  This is version 0.4 beta 1 of SYNGEN 

OVERVIEW:

  SYNGEN is a tool for the generation of syntax diagrams in LaTeX
  format from an input language similar to BNF.

REQUIREMENTS:

  You will need Caml Special Light, version 1.12 to compile the program.
  Caml Special Light ca be accessed by anonymous FTP:

        host:       ftp.inria.fr (192.93.2.54)
        directory:  lang/caml-light

CONTENTS:

  example/              the examples from the manual
  src/                  the sources for SYNGEN
  doc/                  user's manual
  INSTALL               instructions for installation
  README                this file

(Continue reading)

Mark C. Chu-Carroll | 4 Dec 1995 20:40
Picon

CSL-1.12 and CamlTK4, text tag problem


Greetings!

I'm working on a TK based text editor/user environment loosely based on
Rob Pike's Acme for Plan9. For some details of how some of the more advanced
features are going to work, CSLs functors are probably going to turn out to
be extremely useful. So when CSL-1.11 came out, I eagerly grabbed it, and
compiled it with Camltk4 libraries that came with the MMM source distribution.

It seems to be working pretty well, with one minor (frustrating) exception.
One very important feature of Acme is the sweeping of text with the middle
and right mouse buttons. To do this, I have an action associated with
mouse motion events which inserts the swept text into a tag, and then
tries to highlight the tag. 

After a lot of hacking, what I seem to have found is that tags are not
being created correctly by Text.tag_add. The following code fragment
demonstrates the problem:

   Text.tag_add textwin "command" t1 t2;
   let str = Text.get textwin (TextIndex(TagFirst("command"), [])) 
                              (TextIndex(TagLast("command"), []))
   in print_string str

In this fragment, "textwin" is a text window, and t1 and t2 are valid
text indices. The indices are definitely not a problem; "Text.get
textwin t1 t2" works correctly. But when the above code fragment is
run, it produces "Fatal error: uncaught exception TkError". 

"Text.tag_allnames textwin" returns a list containing the "command" tag,
(Continue reading)

Tarizzo Martial | 6 Dec 1995 14:46
Picon

For Windows users : Help file and front-end for Caml-Light


Hello,

If you want to use Caml-Light for PC/DOS under MS-Windows, I recently
uploaded at INRIA two files :

1) the Caml-Light (version 0.7) reference manual by Xavier Leroy (thanks to
him for testing !) converted to Windows Help format.

2) a Microsoft-Window front-end for Caml-light/DOS. With it, one can edit
several files at the same time, evaluate code from files or from a command
window, and produce simple mathematical graphics in a window.

Theses files are at ftp.inria.fr, in the following locations :

/lang/caml-light/cl7refman.win.hlp
        Windows Help documentation for Caml-Light 0.7

/lang/caml-light/Usercontribs/gbcmd/*
        Front-end, English version.
        Two files : 
        - install.txt
        - gbcmdcml.exe (self-extracting ZIP archive)

Hope this could help,
*********************************
 Tarizzo Martial
 Prof. Sc Physiques
 Classes preparatoires
 Lycee J MOULIN
(Continue reading)

Bruno Blanchet | 7 Dec 1995 17:47
Picon
Picon

Caml Dim


Caml Dim, extension de Caml Light 0.7 qui gere les types avec dimensions,
est disponible par ftp anonyme :

   host : ftp.ens.fr
   directory : /pub/unix/lang/caml/camldim

Voici une description succinte de ce programme. Vous trouverez plus de
details dans mon rapport inclus dans les archives sur ftp.

Caml Dim est une extension du compilateur Caml Light, pour lui
permettre de contrôler les dimensions des donnees manipulees.
Les verifications de type effectuees par le compilateur
sont donc renforcees, et les erreurs peuvent etre signalees 
à l'utilisateur.
Les seuls constructeurs predefinis qui prennent des arguments
dimensionnels sont int et float.
L'utilisateur peut definir ses propres types dimensionnes a partir de ceux-ci.
Par exemple :
   type ['d] complex = {re : ['d] float; im: ['d] float};;
   type 'a ['d] abbrev == 'a * ['d] complex;;
(les dimensions sont indiquees entre crochets. Voir les details de la syntaxe
dans mon rapport).

Tous les identificateurs de dimension doivent etre declares par l'instruction 
   dimension nom(unite);;
Exemple : dimension length(m);;
L'identificateur m est alors une constante de type [length] float
et qui a pour valeur numerique 1.

(Continue reading)

Unknown | 11 Dec 1995 15:20

A new caml-tex


Hello,

I wrote a new caml LaTeX2e package (it replaces the caml.sty and caml-sl.sty)
for use with caml-tex. This package has many new features, such as boxed
caml texts or controllable prompts on input and output lines.

It comes together with a modified version of the caml-tex filter,
compatible with the old one. You will need this new filter to use the caml 
package.

You can get the package (it is a self-documenting .dtx file), the caml-tex
filter and an example via anonymous ftp from

     host:	sunshine.informatik.uni-wuerzburg.de (132.187.10.1)
     directory:	pub/kloecker/caml-tex

---

-------------------------- _/_/_/_/    _/ ------------------------------------
Jens Kloecker                   _/   _/   
Grombuehlstrasse 24             _/_/_/    kloecker <at> informatik.uni-wuerzburg.de 
97080 Wuerzburg         _/    _/  _/
----------------------- _/   _/    _/ ----------------------------------------
                         _/_/       _/

Leszek.Holenderski | 15 Dec 1995 13:40
Picon

Q: How to call a CSL function from C


Hi Camlers,

Is there any official way to call a CSL function from C? CSL 1.12 manual
doesn't seem to mention anything about the subject.

I need to call some f: 'a -> 'b (in fact, 'a and 'b are some concrete
types, but it doesn't matter here) from my C code linked with CSL 1.12. In
my Caml code, I'll have the function

  external register_callback: ('a -> 'b) -> unit = "register_callback"

such that 'register_callback f' will store, in my C code, enough
information to call f later from the C code.

I suppose the C function for calling f should have the following pattern:

  value invoke_callback (f_info, arg);
    ... f_info;
    value arg;
  {
    value closure;
    closure = ... extract/build f's closure from f_info ...;
    return callback(closure, arg);  /* 'callback' is from interp.h */
  }

A simple solution would be to keep f's closure as f_info:

  static value f_closure = NULL;

(Continue reading)

Didier Remy | 15 Dec 1995 15:21
Picon
Picon
Favicon

Stages de DEA


Chers Collegues,

Une quizaine d'e'tudiants suivent le DEA Semantique, Preuves et
Programmation de l'universite' de Paris 7.  Nous leur pre'senterons les
stages possibles mi-janvier.  Nous souhaitons leur proposer des stages de
DEA aussi varie's que possible.  Si vous souhaitez proposer un stage,
envoyez-moi ou bien envoyez directement a` Guy Cousineau
(Guy.Cousineau <at> ens.fr) une proposition de stage.  Si vous le souhaitez, je
peux vous faire parvenir une brochure de'taille'e du DEA.

Si vous pensez proposer un stage, mais que vous voulez prendre plus de temps
pour e'cr'ire votre proposition de stage, vous pouvez envoyer un message
pour nous le dire en pre'cisant le sujet du stage en quelques lignes, afin
que nous puissions donner de`s maintenant aux e'tudiants une ide'e des
diffe'rents stages possibles.

Amicalement,

   Didier.

Xavier Leroy | 15 Dec 1995 17:33
Picon
Picon

Re: Q: How to call a CSL function from C


> I need to call some f: 'a -> 'b (in fact, 'a and 'b are some concrete
> types, but it doesn't matter here) from my C code linked with CSL 1.12. In
> my Caml code, I'll have the function
> 
>   external register_callback: ('a -> 'b) -> unit = "register_callback"
> 
> such that 'register_callback f' will store, in my C code, enough
> information to call f later from the C code.

The correct way to do this is as follows (modified from your pseudocode):

    static value f_closure = Val_int(0)

    value register_callback (f);
      value f;
    {
      register_global_root(&f_closure);
      f_closure = f;
      return Val_unit;
    }

    value invoke_f (arg)
      value arg;
    {
      return callback(f_closure, arg);
    }

The call to "register_global_root" ensures that the GC will not
deallocate the closure and will update the variable f_closure if the
(Continue reading)

Robbert VanRenesse | 18 Dec 1995 22:57
Picon
Favicon

a few questions for the CAML community


1) would it be really hard to port CSL to Windows NT?  I can't imagine, but
   any hints to what problems one could expect would be very helpful.
2) would it be really hard to have an application that incorporated both
   SmallTalk and CSL code?  I would think so, because there would be two
   garbage collectors in the same memory.  If I'm right about this, I
   would just put the two parts in separate processes talking though some
   form of IPC.  Again, any input would be appreciated.

				Robbert

Emmanuel Engel | 19 Dec 1995 15:34
Picon

Separate compilation


Je suis surpris par les dependance crees par csldep

************ main.ml *******************
let _ = Aux.v
****************************************

************** aux.mli *****************
val v : unit
****************************************

*************** aux.ml *****************
let v = ()
****************************************

csldep *.ml
aux.cmo : aux.cmi
aux.cmx : aux.cmi
main.cmo : aux.cmi
main.cmx : aux.cmx
                 ^????

Les dependances entre fichiers ne passent 
pas par l'interface (ie cmi) ?

Emmanuel Engel


Gmane