Berke Durak | 14 Jul 14:25 2002

Statically detecting arrays bound exceptions ?? (was: Universal Serializer)

On Fri, Jul 12, 2002 at 10:41:35PM +1000, John Max Skaller wrote:
[...]
> Ocaml run time errors include array (and string) bounds exceptions and 
> infinite recursions:
> static type checking could detect the first, but not the second.

Hey, wait a minute, how do you plan to statically detect bounds exceptions ?
It's as undecidable as detecting infinite recursions.

	let rec f () =
	   let a = [|1;2|] in
       if compiler_is_gonna_say_that_there_is_gonna_be_a_bounds_error f then
          a.(0)
       else
          a.(3)
--

-- 
Berke Durak
-------------------
To unsubscribe, mail caml-list-request <at> inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

nadji | 15 Jul 18:24 2002
Picon

Re: polymorphic methods

Jacques Garrigue wrote:

> > # let f = (new c)#m ();;
> > val f : '_a -> '_a = <fun>
>
> Unsound. RTFM (polymorphism restricted to values)
> Try "let f x = (new c)#m () x"
>

Oups, sorry. I did'nt recognize this classical problem ...
In fact this example was an attempt to simplify my
next question, but I can see now that they are not related.

> But I don't see why you need ().
>

You're right. It was there for historical reasons and I had
not realized I did'nt need an argument anymore.

> > Can someone give me some hints why I can't coerce subd ?
>
> Sorry, but there is no handling of instanciation via subtyping.
> Currently subtyping and instanciation are orthogonal concepts: you
> cannot subtype in an .mli, and you cannot instanciate an
> explicitly polymorphic type when subtyping.

That's a shame because if one tries to use objects for manipulating
lists :

# exception Emptylist
(Continue reading)

Nicolas FRANCOIS | 1 Jul 03:19 2002
Picon

Re: Objects or modules ?


Thanks for the pointers. Exactly what I was looking for.

\bye

--

-- 

                   Nicolas FRANCOIS
            http://nicolas.francois.free.fr
 A TRUE Klingon programmer does NOT comment his code
-------------------
To unsubscribe, mail caml-list-request <at> inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

Jean-Christophe Filliatre | 1 Jul 10:24 2002
Picon

JFLA 2003 : Premier appel à communications


(This message is intentionally written in French)

* MERCI DE FAIRE CIRCULER * MERCI DE FAIRE CIRCULER * MERCI DE FAIRE CIRCULER *

PREMIER APPEL AUX COMMUNICATIONS       PREMIER APPEL AUX COMMUNICATIONS

                                   JFLA2003
               Journées Francophones des Langages Applicatifs
                        Organisées par l'INRIA

                        27 et 28  janvier 2003

JFLA'2003 est la quatorzième conférence francophone organisée autour des
langages applicatifs et les techniques de certification basées sur la
démonstration. Ces nouvelles journées se tiendront les 27 et 28
janvier 2003. Elles auront lieu à la montagne, à Chamrousse (Isère).

Les JFLA ont pour ambition de couvrir le domaine des langages
applicatifs et les techniques de certification, en réunissant
concepteurs et utilisateurs dans un cadre sympathique.

Les thèmes principaux des JFLA sont traditionnellement la théorie et
les applications pratiques des langages applicatifs; de plus, la
conférence confirme son intérêt pour les systèmes d'assistance à la
démonstration de théorèmes et l'enseignement de la programmation.

C'est pourquoi des contributions sur les thèmes suivants sont
particulièrement recherchées (liste non exclusive) :

(Continue reading)

Jacques Garrigue | 1 Jul 10:56 2002
Picon
Picon

Re: Gdkpixbuf

From: Ketanu <ketanu <at> wanadoo.fr>

> Does anyone know about using gdkpixbuf (from the gdk library) with objective
> caml ? The gdkpixbuf object provides loading/saving images to many common
> file formats, in a way usable altogether with GTK+. 

OK, I've added some kind of support. See the new snapshot 2002-07-01.
To enable GdkPixbuf support, you must configure with USE_GNOME=1.
This is preliminary, but at least you can render any picture supported
by GdkPixbuf.

Another approach is to use the CamlImages library, which also offers
lablgtk compatibility.  I believe it allows more fancy processing.

---------------------------------------------------------------------------
Jacques Garrigue      Kyoto University     garrigue at kurims.kyoto-u.ac.jp
		<A HREF=http://wwwfun.kurims.kyoto-u.ac.jp/~garrigue/>JG</A>
-------------------
To unsubscribe, mail caml-list-request <at> inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

Xavier Leroy | 1 Jul 13:45 2002
Picon
Picon

Re: ocamllex -- ambiguous regex

> What happens if there is an ambiguous regexp in ocamllex input?
> [The manual doesn't say]

That's an oversight in the manual; thanks for reporting it.
If several regexps match a prefix of the input, the regexp selected is
- the one that matches the longest prefix (so-called "longest match rule")
- in case of tie on prefix length, the regexp that occurs first in the
  source .mll lexer.

For instance:
   "kwd"      { rule 1 }
 | ['a'-'z']+ { rule 2 }

The input "kwdkwd" will trigger rule 2 (longest match), but "kwd01"
will trigger rule 1 (first rule among the two that have longest match).

- Xavier Leroy

-------------------
To unsubscribe, mail caml-list-request <at> inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

Ketanu | 1 Jul 12:31 2002
Picon

Re: Gdkpixbuf

Jacques Garrigue <garrigue <at> kurims.kyoto-u.ac.jp> writes:

> From: Ketanu <ketanu <at> wanadoo.fr>
>
>> Does anyone know about using gdkpixbuf (from the gdk library) with objective
>> caml ? The gdkpixbuf object provides loading/saving images to many common
>> file formats, in a way usable altogether with GTK+. 
>
> OK, I've added some kind of support. See the new snapshot 2002-07-01.
> To enable GdkPixbuf support, you must configure with USE_GNOME=1.
> This is preliminary, but at least you can render any picture supported
> by GdkPixbuf.

I'll look around that.

> Another approach is to use the CamlImages library, which also offers
> lablgtk compatibility.  I believe it allows more fancy processing.

This approach may be very convenient, but when i used Camlimages for the
first time (2/3 monthes) i did not notice anything about lablgtk
compatibility (but with Graphics module compatibility), i just check
again http://pauillac.inria.fr/camlimages/ and i fand 

LV -- Labl image Viewer

        This is camlimages+lablgtk image viewer, like `xv', but much
        limited. It works just with True or Direct colormodels.
        No PseudoColor support. And more, it is UNDER CONSTRUCTION.

which provides example code in using camlimages with lablgtk.
(Continue reading)

Alexander V.Voinov | 1 Jul 23:21 2002
Picon

ocamlopt, win32, multithreaded DLL

Hi

I've found the following message in the archive:

http://caml.inria.fr/archives/200011/msg00086.html

which actually states that for this port of OCaml libcmt is preferred
over msvcrt. Did anything changed since then? What is the reason
to retain (and recompile) libunix on win32? Because my perception is that
most of closed-source vendors prefer to link against msvcrt and one
may appear stuck with the library mismatch.

Thank you

Alexander
-------------------
To unsubscribe, mail caml-list-request <at> inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

Alexander V. Voinov | 2 Jul 06:26 2002
Picon

OCaml + wxWindows

Hi,

Did anybody link these two in a native win32 executable?

Thank you

Alexander
-------------------
To unsubscribe, mail caml-list-request <at> inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

Travis Bemann | 2 Jul 06:30 2002
Picon

Where are curses/ncurses bindings for OCaml available

Supposedly curses/ncurses bindings for OCaml are available, at least
according to the "Interfacing C with Objective Caml" section in the
OCaml Documentation and user's manual.  However, I have not been able
to find it, as it is not distributed with OCaml 3.04, and is not
available through The Humps or The Caml Link Database, and also is not
distributed as part of latest CDK.  So therefore, where could I find
curses/ncurses bindings for OCaml?

--

-- 
Yes, I know my enemies.
They're the teachers who tell me to fight me.
Compromise, conformity, assimilation, submission, ignorance,
hypocrisy, brutality, the elite.
All of which are American dreams.

              - Rage Against The Machine

Gmane