Re: [Caml-list] stl?

2009-03-05 Thread Richard Jones
On Thu, Mar 05, 2009 at 07:22:28AM +0100, yoann padioleau wrote: Qemu is written in C, because I guess indeed C struct and union and bitfields makes it easy to match directly to the hardware (no marshalling, there is direct mapping). I was hacking on qemu last week, and wishing it wasn't

Re: [Caml-list] stl?

2009-03-05 Thread Richard Jones
On Thu, Mar 05, 2009 at 01:06:34AM +, Jon Harrop wrote: Indeed. Which raises the question of how I should put an OCaml front end onto HLVM... Use the output of camlp4 (the AST). It's reasonably well documented in the camlp4 wiki. Rich. -- Richard Jones Red Hat

Re: [Caml-list] stl?

2009-03-05 Thread malc
On Thu, 5 Mar 2009, Richard Jones wrote: On Thu, Mar 05, 2009 at 07:22:28AM +0100, yoann padioleau wrote: Qemu is written in C, because I guess indeed C struct and union and bitfields makes it easy to match directly to the hardware (no marshalling, there is direct mapping). I was

Re: [Caml-list] stl?

2009-03-05 Thread malc
On Thu, 5 Mar 2009, Richard Jones wrote: On Thu, Mar 05, 2009 at 12:34:54PM +0300, malc wrote: On Thu, 5 Mar 2009, Richard Jones wrote: On Thu, Mar 05, 2009 at 07:22:28AM +0100, yoann padioleau wrote: Qemu is written in C, because I guess indeed C struct and union and bitfields

Re: [Caml-list] stl?

2009-03-05 Thread Richard Jones
On Thu, Mar 05, 2009 at 01:49:01PM +0300, malc wrote: You lost me here. Look at the patch I linked to [1]. - (Possibly) handling 32 and 64 bit quantities. Not possibly, definitely (in case of better being applied to current implementation of OCaml) I'm not sure I mentioned OCaml, just a

Re: [Caml-list] stl?

2009-03-05 Thread Wolfgang Lux
Brian Hurt wrote: [...] Here are two real problems I've hit with type classes, in only a few weeks banging around in Haskell. For example, you can't have more than one instance of a type class for any given type. So let's say you want to have a type class for things that can be

Re: [Caml-list] stl?

2009-03-05 Thread malc
On Thu, 5 Mar 2009, Richard Jones wrote: On Thu, Mar 05, 2009 at 01:49:01PM +0300, malc wrote: You lost me here. Look at the patch I linked to [1]. - (Possibly) handling 32 and 64 bit quantities. Not possibly, definitely (in case of better being applied to current implementation

[Caml-list] ocaml ast to machine at runtime

2009-03-05 Thread Joel Reymont
I would like to compile trading systems written in a pascal-like programming language to OCaml AST at runtime, convert it to machine code and use it from the same running OCaml program (natdynlink?). Is it possible to do this without having gcc installed? The code I'm generating will need

[Caml-list] building 64bit ocaml from cvs on mac osx leopard

2009-03-05 Thread Joel Reymont
Does it actually work? ./configure -cc gcc -m64 ./build/fastworld.sh ... boot/ocamlrun ./ocamlopt -nostdlib -c -nopervasives -I stdlib -o stdlib/pervasives.cmx stdlib/pervasives.ml /var/folders/pc/pcNEaYn32RW2i++8ZQvErU+++TM/-Tmp-/camlasmce9dc3.s: 602:junk `...@plt' after expression ...

[Caml-list] using a camlp4 man filter with my own type

2009-03-05 Thread Joel Reymont
I looked at the Camlp4 filter wiki [1] but still can't figure this out. + ocamlfind ocamlc -package 'oUnit, dyp, extlib' -c -I +camlp4 -g -w a -pp 'camlp4of -I src -filter map' -I src -o src/easy_type_check.cmo src/easy_type_check.ml File src/easy_type_check.ml, line 45, characters 10-15:

Re: [Caml-list] using a camlp4 man filter with my own type

2009-03-05 Thread Nicolas Pouillard
Excerpts from Joel Reymont's message of Thu Mar 05 16:04:09 +0100 2009: I looked at the Camlp4 filter wiki [1] but still can't figure this out. + ocamlfind ocamlc -package 'oUnit, dyp, extlib' -c -I +camlp4 -g -w a -pp 'camlp4of -I src -filter map' -I src -o src/easy_type_check.cmo

Re: [Caml-list] stl?

2009-03-05 Thread Kuba Ober
Of course, you can always say that you can use the foreign function interface, but then you lose inlining and speed. The same is true of C/C++. You can get much better performance from assembler but calling assembler from C or C++ not only costs inlining and speed but even functionality

[Caml-list] Re: ocaml ast to machine at runtime

2009-03-05 Thread Sylvain Le Gall
On 05-03-2009, Joel Reymont joe...@gmail.com wrote: I would like to compile trading systems written in a pascal-like programming language to OCaml AST at runtime, convert it to machine code and use it from the same running OCaml program (natdynlink?). Is it possible to do this without

Re: [Caml-list] building 64bit ocaml from cvs on mac osx leopard

2009-03-05 Thread Andres Varon
I don't think that it compiles the way it is now. It seems to me that there was a version merge error and asmcomp/amd64/emit.mlp has repeated definitions of emit_call and emit_jump. Andres On Mar 5, 2009, at 10:39 AM, Joel Reymont wrote: On Mar 5, 2009, at 3:10 PM, David Allsopp wrote:

Re: [Caml-list] Re: ocaml ast to machine at runtime

2009-03-05 Thread Joel Reymont
On Mar 5, 2009, at 3:55 PM, Sylvain Le Gall wrote: Why not using the LLVM OCaml binding? It is directly shipped with LLVM. So you can write the entire generator in OCaml... I would love to use LLVM. My concern is the overhead of calling from LLVM into OCaml, though. The code I'll be

Re: [Caml-list] building 64bit ocaml from cvs on mac osx leopard

2009-03-05 Thread Joel Reymont
On Mar 5, 2009, at 4:08 PM, Andres Varon wrote: I don't think that it compiles the way it is now. It seems to me that there was a version merge error and asmcomp/amd64/emit.mlp has repeated definitions of emit_call and emit_jump. I wonder if the OCaml team will move to git at some point

Re: [Caml-list] stl?

2009-03-05 Thread Raoul Duke
This is the sort of thing that OCaml-bitstring might be adapted to do. ditto lisp bit vectors? still, seems sorta not close enough. ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives:

Re: [Caml-list] building 64bit ocaml from cvs on mac osx leopard

2009-03-05 Thread Ashish Agarwal
I just did a fresh install and it is working fine for me when I use the normal method. The ocamlbuild method seems to compile fine, but make install gives some error. I checked ocamlbuild's log file and the last line says Compilation successful, but when I do make install it says cp: ocamlc: No

Re: [Caml-list] building 64bit ocaml from cvs on mac osx leopard

2009-03-05 Thread Joel Reymont
Ashish, I'm not getting the previous error anymore and my issue is the same as yours now. Reason? SANITIZE: a total of 749 files that should probably not be in your source tree has been found. A script shell file _build/sanitize.sh is being created. Check this script and run it to

Re: [Caml-list] loading all modules of a cma at once

2009-03-05 Thread Yoann Padioleau
Joel Reymont joe...@gmail.com writes: I have a cma that I built and I'm trying to interactively test some functions. ocaml seems to require me to individually #load cmo-s, including dependencies. Is there a way to load all modules of a cma in one fell swoop? Do I resign to creating

Re: [Caml-list] loading all modules of a cma at once

2009-03-05 Thread Joel Reymont
On Mar 5, 2009, at 6:58 PM, Yoann Padioleau wrote: Joel Reymont joe...@gmail.com writes: ocaml seems to require me to individually #load cmo-s, including dependencies. I'm sorry for the noise. The cma was missing the required cmos. Foot in mouth! --- http://tinyco.de Mac, C++, OCaml

Re: [Caml-list] stl?

2009-03-05 Thread Jon Harrop
On Thursday 05 March 2009 06:22:28 yoann padioleau wrote: Come on, can you stop all those stuff about LLVM. The guy works in a game company with people knowing C/C++ for decades, with quite a lot of legacy code I guess, and you arrive with your hey you should use LLVM that almost nobody knows

Re: [Caml-list] stl?

2009-03-05 Thread Jake Donham
On Thu, Mar 5, 2009 at 12:44 PM, Jon Harrop j...@ffconsultancy.com wrote: Is this [the lambda IL] format documented anywhere? The ocamljs backend compiles Javascript from the lambda intermediate language. I haven't found documentation of it, but most of it is pretty easy to understand (a few

Re: [Caml-list] OCaml's intermediate representations

2009-03-05 Thread Jon Harrop
On Thursday 05 March 2009 20:50:58 Jake Donham wrote: On Thu, Mar 5, 2009 at 12:44 PM, Jon Harrop j...@ffconsultancy.com wrote: Is this [the lambda IL] format documented anywhere? The ocamljs backend compiles Javascript from the lambda intermediate language. I haven't found documentation of

Re: [Caml-list] stl?

2009-03-05 Thread Richard Jones
On Thu, Mar 05, 2009 at 01:10:18PM -0800, Pal-Kristian Engstad wrote: During the PlayStation 2 era, Naughty Dog used its own proprietary language called Goal - an imperative variant of Scheme. I thought I'd heard of you guys before ... http://www.gamasutra.com/features/20020710/white_01.htm