Posts

Showing posts from March, 2017

How to fix the Unbound module Graphics in an ocaml project

Image
From ~/pr/gitl/ocaml-gol In a constant effort to learn new programming languages, I'm currently trying to use ocaml , a free and open-source general-purpose, multi-paradigm programming language maintained at the Inria . It's basically an extension of Caml with object-oriented features. I'm mostly interested by its functionnal and pattern matching features but the module part of the language can be a bit difficult to understand for someone with little to none ML (Meta Language) background.   The error When trying to use the graphics module to create a graphical window and go just a little further than the simplest helloworld program, here is the result : If the project uses dune : (executable (name ocaml_project) (libraries lwt.unix graphics) ) with this code : let () = Printf.printf "Hello, world!\n";; Lwt_io.printf "Hello, world!\n";; Graphics.open_graph " 800x600";; The first times I built this project running the du...

How to use MongoDB on travis-ci

Image
Using continuous integration for rainbrurph , I need the mongodb database and C libraries. Unfortunately, I had issue using it on Ubuntu Precise 12.04 LTS, the distribution used on travis-ci. To make it work, we'll have to : install database components from the official MongoDB repositories; manually build the latest release of the official C libraries; add /usr/local/ to ld.conf to make your build system discover the newly installed library.