Re: [Caml-list] conjunctive type in polymorphic variants

2008-10-09 Thread Olivier Andrieu
Hi, On Thu, Oct 9, 2008 at 06:15, Conglun Yao [EMAIL PROTECTED] wrote: Sorry, I can't fully understand the source code, but it seems we can only define a polymorphic variant with only one additional type declaration, like `A of int or `A of (int * int) rather than `A of int

Re: [Caml-list] conjunctive type in polymorphic variants

2008-10-09 Thread Conglun Yao
Nicolas and Olivier, Thanks for your quick reply, it makes sense! Conglun On Thu, Oct 9, 2008 at 9:43 AM, Olivier Andrieu [EMAIL PROTECTED] wrote: Hi, On Thu, Oct 9, 2008 at 06:15, Conglun Yao [EMAIL PROTECTED] wrote: Sorry, I can't fully understand the source code, but it seems we can

[Caml-list] Writing to argv[0]

2008-10-09 Thread Dave Benjamin
Hi, Is there any way for an OCaml program to change its name in the process table? Assigning to Sys.argv.(0) has no effect. Thanks, Dave ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list

Re: [Caml-list] Writing to argv[0]

2008-10-09 Thread Savanni D'Gerinel
One possibility is setproctitle. It appears to be non-standard, but maybe a bit more standard than overwriting argv[0]. I know it works on Linux, and I see a FreeBSD man page for it. The setproctitle() function is implicitly non-standard. Other methods of causing the ps(1) command line

Re: [Caml-list] camlp4 module dependencies

2008-10-09 Thread Nicolas Pouillard
Excerpts from John Harrison's message of Sun Sep 21 20:05:36 +0200 2008: I'm trying once again to make some code work under the new camlp4. I don't want to make any real syntax modifications, but just enable quotations performing a simple string transformation on the body of the quotation,

Re: [Caml-list] - Convert Caml to C/C++, C#, PHP, etc -

2008-10-09 Thread Kuba Ober
On Friday 03 October 2008, Erik de Castro Lopo wrote: axllaruse wrote: I would like to convert all the MTASC open source project to C/C++ or PHP. Sorry, but you're crazy. MTASC is a compiler and compilers are one of the tasks that Ocaml does better that all of the languages you mention.

Re: [Caml-list] - Convert Caml to C/C++, C#, PHP, etc -

2008-10-09 Thread Erik de Castro Lopo
Kuba Ober wrote: Um, since Ocaml can be compiled to bytecode and said bytecode executed by an interpreter written in C, that's sorta-kinda el-cheapo conversion right there. One can work backwards. I'm pretty sure the original poster's intent was to convert the MTASC compiler to C, C++ or PHP

Re: [Caml-list] - Convert Caml to C/C++, C#, PHP, etc -

2008-10-09 Thread Jon Harrop
On Thursday 09 October 2008 22:57:41 Erik de Castro Lopo wrote: Side note: is there an Ocaml bytecode-compiler written in Ocaml somewhere? I'm pretty sure the vast majority of the standard Ocaml bytecode compiler is written in Ocaml. The same is probably not true for the bytecode VM. You

Re: [Caml-list] - Convert Caml to C/C++, C#, PHP, etc -

2008-10-09 Thread Erik de Castro Lopo
Jon Harrop wrote: You mean the program that generates OCaml's bytecodes is written in OCaml. Commonly known as a compiler. the program that executes OCaml's bytecodes Commonly known as a virtual machine. Erik -- - Erik de

Re: [Caml-list] - Convert Caml to C/C++, C#, PHP, etc -

2008-10-09 Thread Jon Harrop
On Friday 10 October 2008 04:30:53 Erik de Castro Lopo wrote: Jon Harrop wrote: You mean the program that generates OCaml's bytecodes is written in OCaml. Commonly known as a compiler. One of the compilers, yes. the program that executes OCaml's bytecodes Commonly known as a virtual

Re: [Caml-list] Writing to argv[0]

2008-10-09 Thread Dave Benjamin
Basile STARYNKEVITCH wrote: Dave Benjamin wrote: Hi, Is there any way for an OCaml program to change its name in the process table? Assigning to Sys.argv.(0) has no effect. Write a C wrapper for that. And this trick seems Linux specific (it has no sense in Posix) -maybe working on few

Re: [Caml-list] Writing to argv[0]

2008-10-09 Thread Dave Benjamin
Savanni D'Gerinel wrote: One possibility is setproctitle. It appears to be non-standard, but maybe a bit more standard than overwriting argv[0]. I know it works on Linux, and I see a FreeBSD man page for it. Thanks, this was an interesting idea, though apparently setproctitle is not