Posts

Showing posts from August, 2016

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 make a clickable label in Gtk2/ruby

Image
Sometimes, you need a Gtk label, styled like a web link that opens an URL when you click. I need this widget for the  todo-summarizer  Gtk2 GUI and I don't like the look and feel of the Gtk LinkButton widget. So, I wrote a custom ClickableLabel widget that handle the URL, opens your system's default web browser, shows the destination URL either in a tooltip or a status label and change the mouse cursor change when you hover it.

RainbruRPG switched to revision 250

Image
The rainbrurpg's revision 249 is over and the building part of the transition to cmake is done. Original news During this revision, all sources moved to a single top-level src/ directory. The build process is now cmake -powered and after configuration, building only takes a 'make'. Next revision will also be focused on the switch to git / cmake . For example, the translation files aren't correctly handled at this time (the msgmerge step is missing) and the continuous integration builds are still failing on clang compiler. We also have to build unit tests using  cmake. You can download this release here . 2022 Update As said in other news, RainbruRPG is not hosted at github anymore. The new repository can be found here . Even if the last commit is a bit old, the project receives regular updates and it should correctly build on any modern linux-based systems.

How to use sdl2 on travis-ci

Image
If you're using Continuous Integration to improve your code quality, maybe you're using  travis-ci.org  to test each commit and report errors. To build  rainbrurph , I need SDL2 libraries and headers, unfortunately, the build fail with the following error message : E: Unable to locate package libsd2-dev

How to search for the readline library with cmake

Image
I'm currently using GNU readline for a RainbruRPG's server tool . Unfortunately, this library isn't shipped with a pkg-config file. We have to create our own cmake file.