[Caml-list] Camlp5 6.04 - configurable name

2012-03-01 Thread Daniel de Rauglaudre
Hi,

New release of Camlp5 (6.04) where:

The *names* of all what are built (executables, library) are now
configurable, allowing to have 'strict' and 'transitional' modes
both installed in the same computer in different places.

Example:
./configure --strict
make world.opt
make install
./configure --transitional name=camlp5t
make world.opt
make install

In that case, executables in transitional mode are camlp5t, camlp5to,
camlp5tr and so on... and the library is installed in a directory
named camlp5t instead of camlp5. No conflict between the two modes.

Download at:
  http://pauillac.inria.fr/~ddr/camlp5/

Thanks.

-- 
Daniel de Rauglaudre
http://pauillac.inria.fr/~ddr/

-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs



Re: [Caml-list] camlp5 pa_pragma

2012-02-20 Thread Daniel de Rauglaudre
Hi,

On Tue, Feb 21, 2012 at 12:56:10AM +0100, bob zhang wrote:

> I noticed that camlp5 has a pretty nice extension pa_pragma, would
> you like shed some light on this?

It allows to execute code at syntactic analysis phase and, therefore,
to do syntactic extensions without having to previously compile a file,
containing these extensions.

I am not very satisfied of it, because the evaluation supposes to type
expressions, or to try to type them, what, normally, Camlp* are not
supposed to do. It is complicated, incomplete and perhaps dangerous.
To be correct, it should embark the OCaml toplevel and, therefore, the
whole OCaml compiler, what is not a good idea.

I tried to limit it to evaluation of syntax extensions but it remains
complicated. Probably we should define a precise sub-language for it.

> (I mean the design issue, and the its defect) I would be happy to
> port it to camlp4 if it's not too difficult

I am afraid it is.

-- 
Daniel de Rauglaudre
http://pauillac.inria.fr/~ddr/

-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs



[Caml-list] Camlp5 new rel 6.03 -> compat with OCaml trunk

2012-01-09 Thread Daniel de Rauglaudre
Hello everybody!

For the ones who want to use Camlp5 with the current OCaml SVN development
(the 'trunk' directory), you can download the new version 6.03 of Camlp5
at:
 http://pauillac.inria.fr/~ddr/camlp5/

The gadt new feature is parsed but may not work. If you use it, please
let me know. I made it work with OCaml gadt branch, but I did not check
for the 'trunk' directory.

Camlp5 is a pre-processor-pretty-printer for OCaml.

-- 
Daniel de Rauglaudre
http://pauillac.inria.fr/~ddr/

-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs



Re: [Caml-list] Priority queues, reloaded

2011-06-30 Thread Daniel de Rauglaudre
Hi,

Not sure what I am going to say is relevant or not, but in my software
GeneWeb, I implemented a priority queue a very simple way, and where
insertion and get are in constant time.

But... my problem is very specific: my priorities are always integers
between zero and a relatively small integer number (namely 100 or 150)
and will very not likely become larger (and if it does, the queue can
be easily dynamically extended).

In that situation, my priority queue is just an array of that size (let's
say 150) of lists of items.

Insertion queue item =
  let p = item.priority in
  queue.(p) := item :: queue.(p)

Get queue :=
  let p = first_index_with_not_empty_list queue in
  let r = List.hd queue.(p) in
  queue.(p) := List.tl queue.(p);
  r

-- 
Daniel de Rauglaudre
http://pauillac.inria.fr/~ddr/

-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs