Archive

Archive for June, 2011

OCaml .ocamlinit

June 2nd, 2011 No comments

??Here handy trick I didn’t know about launching OCaml:

$ cat >> .ocamlinit
#use "topfind";;
#require "sdl";;
#require "sdlvideo";;

open Sdl
open Sdlvideo;;
open Str;;

.ocamlinit is sourced from the current directory, falling back to /home/user/.ocamlinit. you can explicitly override it via ocaml -init <filename>

 

Categories: Uncategorized Tags: