[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running OCaml scripts from the command line



> On my machine:
> 
> sjc187n36:test seb$ cat m1.ml 
> let hello () = Printf.printf "Hello from m1\n"
> 
> sjc187n36:test seb$ cat m2.ml 
> let _ = M1.hello ()
> print_endline "Hello world\n"
> 
> sjc187n36:test seb$ ocaml m1.ml m2.ml 
> sjc187n36:test seb$ 
> 
> :(
> 

don't know if it is related, but you may need to flush the buffers by either 
adding %! after \n in your strings.

> Yes. That is what I have been doing so far, but the builds, even for my small 
> projects are rather slow, and really slow down my development process. I want 
> to just quickly run my code to see if I have introduced errors, or done 
> anything wrong.
> Maybe my build is broken, or maybe I am just spoilt by how fast ruby 
> launches. Hah, how ironic :D People complain about ruby being slow, but 
> quickly running something in OCaml seems to take me way more time :D

it's weird because usually bytecode compilation is quick, ie "ocamlbuild 
foo.byte --" should compile and run your program almost immediately on small 
projects.

--
Thomas




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.