Judicael Courant | 2 Jan 1998 09:12
Picon
Picon

Re: logiciels libres


[Quick english summary:

In a previous message, Pierre Weis was stating that Caml was a free
software. I disagree with this opinion, since its license contains
restrictions regarding the redistribution.
I claim that this causes harm to the spread of O'Caml, and suggest
instead to put O'Caml under a license following the guidelines of
http://www.debian.org/social_contract.html#guidelines
]

Bonjour,

>Comme vous le savez Caml est un logiciel libre, ce qui fait que nous
>avons une certaine tendresse pour ces logiciels.

A mon avis, Caml n'est pas totalement un logiciel libre.  Par exemple,
on trouve la phrase suivante dans la license d'OCaml
(http://pauillac.inria.fr/ocaml/LICENSE.html) :

"As regards any other type of distribution, the user undertakes to
apply to obtain the express approval of INRIA."

(question : "undertakes to apply to obtain" signifie-t-il la meme
chose que "undertakes to obtain" ? cette phrase voudrait-elle dire que
l'on doit seulement s'appliquer a obtenir l'accord de l'INRIA, et pas
necessairement l'obtenir ?)

Ces restrictions me semblent prejudiciables au developpement de Caml :
des distributions de Linux comme la Debian considerent mettent Caml
(Continue reading)

Ching-Tsun Chou | 6 Jan 1998 01:03
Picon

Re: What exactly can be GC'ed?


Damien Doligez <Damien.Doligez <at> inria.fr> wrote:

   ># let x = String.make 3 'a' ;;
   >val x : string = "aaa"
   ># let w = Weak.create 1 ;;
   >val w : '_a Weak.t = <abstr>
   ># Weak.set w 0 (Some (x)) ;;
   >- : unit = ()
   ># Weak.get w 0 ;;
   >- : string option = Some "aaa"
   ># let x = "bbb" ;;
   >val x : string = "bbb"
   ># Gc.full_major () ;;
   >- : unit = ()
   ># Weak.get w 0 ;;
   >- : string option = Some "aaa"

   >It seems to me that since x has been re-bound to "bbb", its old value
   >"aaa" is no longer reachable and hence can be GC'ed.  But clearly I
   >was wrong.  Where did I go wrong?  What exactly can be GC'ed?

   Caml is a language with static binding.  The new definition of x does
   not replace the old one in any way, except in the table that maps
   names to slots in the table of globals.  When you define the second x,
   the first one only loses its name.  It still exists as a global
   variable.

But an inaccessible global variable!  Indeed, since the new definition
replaces the old one "in the table that maps names to slots in the
(Continue reading)

Damien Doligez | 6 Jan 1998 14:28
Picon
Picon
Favicon

Re: What exactly can be GC'ed?


This messages gives some details on the current implementation of
O'Caml.  Most users do not need to know such details and can skip this
message.

I wrote:
>   Caml is a language with static binding.  The new definition of x does
>   not replace the old one in any way, except in the table that maps
>   names to slots in the table of globals.  When you define the second x,
>   the first one only loses its name.  It still exists as a global
>   variable.

>From: Ching-Tsun Chou <ctchou <at> mipos2.intel.com>

>But an inaccessible global variable!  Indeed, since the new definition
>replaces the old one "in the table that maps names to slots in the
>table of globals", why is it difficult to figure out that the value
>object pointed to by the old definition is no longer reachable?

Each global binding is given a number by the compiler, its global
index.

There are two tables.  One (the global environment) maps variable
names to indices, the other (the table of globals) maps indices to
values (the value of the corresponding binding).

The global environment is a data structure of the compiler and
linker.  It doesn't exist in stand-alone programs.  It does exist in
the toplevel system because the compiler and linker are included in
the toplevel.
(Continue reading)

Xavier Leroy | 7 Jan 1998 17:08
Picon
Picon
Favicon

Re: logiciels libres

[English summary: the licensing terms for Objective Caml 1.07 and Caml
Light 0.74 definitely make it "free software" according to the Debian
guidelines.  All it does is request that modifications to the sources
be distributed as unmodified sources + patches, so as to establish a
trail of authorship.  Debian explicitely allows this in their "free"
software.  More generally, you can't seriously claim that the current
Caml licence prevents its wide dissemination.]

> A mon avis, Caml n'est pas totalement un logiciel libre.  Par exemple,
> on trouve la phrase suivante dans la license d'OCaml
> (http://pauillac.inria.fr/ocaml/LICENSE.html) :
> 
> "As regards any other type of distribution, the user undertakes to
> apply to obtain the express approval of INRIA."

Attention aux citations hors contexte.  Les paragraphes precedents de
la license permettent explicitement:
- la redistribution sous forme source ou binaire du logiciel non modifie;
- la modification sans redistribution de versions modifiees;
- la distribution de version modifiees sous forme de "patches".

La seule chose qui demande donc permission de l'INRIA est la
redistribution de versions modifiees sous d'autres forme que des patches. 
Le but de cette restriction est d'etablir clairement qui est l'auteur
de quoi.

Une telle restriction est parfaitement compatible avec la definition
de logiciel libre de Debian (point 4 de leur blabla).

> (question : "undertakes to apply to obtain" signifie-t-il la meme
(Continue reading)

Michel Quercia | 11 Jan 1998 10:52
Picon
Picon

bibliotheque arbres, graphes, automates

-------------------------------------------------------------------------
Bonjour,

J'ai le plaisir d'annoncer la mise a disposition de bibliotheques
ecrites en caml-light permettant la manipulation et l'affichage
d'arbres,
de graphes et d'automates finis.

fichier : automatx.tgz

serveurs : ftp://ftp.ac-dijon.fr\carnot1\info\index.html
           http://pauillac.inria.fr/~quercia

Decompactez l'archive et consultez le fichier manuel.ps pour
l'installation
et l'utilisation.

-------------------------------------------------------------------------
Hello everybody,

It is my pleasure to announce the availibility of libraries written in
caml-light to help build and draw trees, graphs and finite automata.

All is included in the file : automatx.tgz
which can be found through the URL: http://pauillac.inria.fr/~quercia

The documentation is (in french, sorry) in the file : manuel.ps

--------------------------------------------------------------------------
Michel Quercia
(Continue reading)

T. Kurt Bond | 14 Jan 1998 02:55

Treating arguments that start with `-' as anonymous arguments

[I apologize for the lack of a French version of this message.]

When using the standard module Arg, I would sometimes like to be able
to define an keyword like the POSIX getopt keyword `--', which causes
all the rest of the command line arguments to be treated as anonymous
arguments.  The following patch (against 1.07) adds to the Arg.spec
type a constructor, Arg.End, which allows the user to specify this.
For instance, if the following

    let speclist = [
      ("-a", Arg.Unit (fun () -> prerr_endline "this was -a"), "a keyword");
      ("--", Arg.End, "Stop interpreting keywords")
    ] in
    Arg.parse speclist (fun s -> prerr_endline ("anon arg: " ^ s))
      "usage info goes here."

is compiled into a.out and run as follows

    $ ./a.out -a anon -- -a
    this was -a
    anon arg: anon
    anon arg: -a

the second -a gets treated as an anonymous argument.

--- arg.ml.orig	Tue Jan 13 20:10:08 1998
+++ arg.ml	Tue Jan 13 20:21:11 1998
 <at>  <at>  -18,6 +18,7  <at>  <at> 
   | String of (string -> unit) (* Call the function with a string argument *)
   | Int of (int -> unit)       (* Call the function with an int argument *)
(Continue reading)

Damien Doligez | 14 Jan 1998 12:14
Picon
Picon
Favicon

Re: Treating arguments that start with `-' as anonymous arguments

I think this is a good idea, but I would make it a little bit more
versatile.  Let's define a constructor Arg.Rest of (string -> void).
It causes the remaining of the command line to be sent to its
argument.

Your example becomes:

    let anon s = prerr_endline ("anon arg: " ^ s);;

    let speclist = [
      "-a", Arg.Unit (fun () -> prerr_endline "this was -a"), "a keyword";
      "--", Arg.Rest anon, "Stop interpreting keywords";
    ];;

    Arg.parse speclist anon "usage info goes here.";;

And is is also possible to distinguish between anonymous arguments and
arguments following the "--".

I'm including my own patch at the end of this mail.  Could you please
test it and tell me if it works for you ?  This will be in the next
release of O'Caml unless you have some objection.

-- Damien

===================================================================
RCS file: /net/pauillac/caml/repository/csl/stdlib/arg.mli,v
retrieving revision 1.12
diff -c -r1.12 arg.mli
*** arg.mli     1997/11/05 19:44:08     1.12
(Continue reading)

Andrew Kay | 16 Jan 1998 10:58
Picon
Favicon

Research Vacancy at Sharp in Oxford

(functional programmer required for hardware compilation)

Sharp Laboratories of Europe Ltd was established at Oxford 
in 1990 as Sharp Corporation's first overseas basic R&D Centre.  
The total number of staff is currently about 70 and the plan 
is to increase the number to 120 in the next few years.  
Located in a prime location on the Oxford Science Park, 
Sharp Laboratories undertake research in liquid crystal 
displays, optoelectronics, imaging and information systems 
technologies.

You will be working as part of a growing team which is 
working on hardware design and hardware / software co-design 
using a hardware compilation approach.  Ideally you will 
have an excellent first degree in Computer Science or other 
relevant fields; further postgraduate research and/or 
industrial experience would be preferred.  The successful 
candidate will have a strong track record and interest in 
some of the following areas :

- - functional languages such as ML and CAML
- - compiler technology
- - software / hardware co-design
- - EDA (electronic design automation) tools, eg VHDL

The position is available immediately.  Please send your
application (ref : ACIS-903) together with your CV, your 
long term research interest and the names of 2 referees to :

Vee Reid, Personnel Administrator
(Continue reading)

Christophe Raffalli | 18 Jan 1998 18:35
Picon
Favicon

Bindlib-2.1 library for binders under OCaml available


I am please to announce the release 2.1 of the bindlib library for
Objective-Caml.

This is a completely rewritten library with no more strange restrictions 
and a wider variety of examples. Have a try !

THE BINLIB PACKAGE
------------------

  This is a library for the Objective-Caml (and NJSML if someone
  really wants a port) providing reasonable tools to write programs
  manipulating data structures with binders (like lambda-terms or 
  quantified formulae). It is quite efficient and not too difficult 
  to use (at least for me).

  I do not know of any available alternative to this package resulting
  in a code as small, and as efficient (both in memory and speed) ! 
  So give it a try !

Availability:
-------------

It is available from my URL:

http://www.logique.jussieu.fr/www.raffalli/index.html#examples

Or by ftp:

ftp://ftp.logique.jussieu.fr/pub/distrib/raffalli/
(Continue reading)

David Monniaux | 22 Jan 1998 18:57
Picon
Picon

polymorphic methods in O'Caml (fwd)

[ J'aimerais des methodes polymorphes dans le systeme d'objets. ]

Hi all,

I'm currently implementing bindings in O'Caml for gtk+, which is the
graphic toolkit used by the (very nice) painting program GIMP
(http://www.gimp.org) and the GNOME project (GNU graphic environment).

The implementation method is the following:

gtk+
 |
very simple C layer of interface
 |
Caml bindings (not safe with respect to the gtk hierarchy of type)
 |
hierarchy of O'Caml classes (provides type safety)

I try to minimize the overhead, so each layer is very simple. Most
functions are simple wrappers over the C functions; only callbacks are a
little more complicated to handle.

The problem I have is the following: I have methods that can be invoked on
container widgets to add a widget into them. As methods can be
polymorphic, and more specifically can't have a parameter of type
#someclass, use of those methods has to include a cast onto the type
"widget". This is inelegant (watch for the (xxx :> widget) expressions in
the sample code included).

Therefore, I'd like polymorphic methods to be implemented (even if it
(Continue reading)


Gmane