Posts

Showing posts from October, 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...

RainbruRPG switched to revision 252

Image
RainbruRPG officially switched to revision 252, closing and releasing the revision 251. This post follows the revision 251 announcement . RainbruRPG is a GPLv3-licensed free and open suruce 3D MMORPG project mainly written in C++. The announcement With this new revision, we added a (ugly) logo, a version overlay and started to implement a Not Yet Implemented dialog. This version also fixes several client segfaults. The next revision will have to fully handle the NyiDialog (based on the brand new CeguiDialog  class) and maybe start to implement local test , a way to test the game without an external server. You can download this release here . Dead links update As of 2022, this project is no more hosted at github. Tags are lost and the development is not halted but very slow as I'm currently on another projects. The full repo is now hosted at bitbucket and can be found here . RainbruRPG , as its sub-projects and reimplementation, is licensed under GPLv3 so you ca...

How to generate a pkg-config file with cmake

Image
pkg-config is a great way to get compiler flags for a given library. Since I'm currently implementing the rainbrurpg's meta as a library (see  libwsmeta's annoucement  and repository ) I would like to generate a pkg-config file using cmake .

Introducing libwsmeta

Image
I would like to speak about a new project :  libwsmeta , a C metaserver library intended to be used for several projects including rainbrurpg and rainbrurph . This library will have to search for a server list. I've designed it to be included in cmake -based project. The design The library will use a   peer to peer  approach to find and propagate new game servers. The server download the entry-point and contact it. The entry-point is the main server(s) of the game. Its IP:port pair is publicly available from a public URL; The server directly contact the entry-point server and add itself to the server list before it returns the new list; It will then contact next server in the list with the same effects. Using libwsmeta as a git submodule As a developper If you want to add this library in the ext/ directory : mkdir ext cd ext git submodule add https://github.com/rainbru/libwsmeta and add this line to the top-level CMakeFiles.txt include("${PROJECT_SOU...

RainbruRPG switched to revision 251

Image
RainbruRPG's revision 250  is over and the CEGUI  part of the client is back. The main change in this revision is a dependency upgrade : the client now depends on CEGUI 0.8, not 0.7. That's a major dependency upgrade and unfortunately this version isn't available as official Debian package, so you have to manually build it. CEGUI (Crazy Eddie's GUI) is a fully themable free and open source graphical user interface ( GUI ) library written in C++ licensed under GNU LGPL . It is used to draw the client's GUI using its Ogre3D backend. On arch-based distributions, CEGUI can be found in the AUR and the package itself is the definition of dependency hell. For more informations on how to install packages from AUR , see the official documentation . The next revision will have to handle GUI events from layout files and fix some segfaults, especially due to the OGRE  configuration. You can download this release here . 2022 update RainbruRPG is no longer h...

Using a JQuery datepicker in meteorjs

Image
Today's work on mrt-manager was to add a JQuery datepicker widget to the news addition modal dialog.

Introducting the todoSummarizer's help viewer

Image
Today's commit was about a help viewer for todoSummarizer . All this code resides in the  lib/MainWindow.rb Since this project uses GTK , I decided to use an external help viewer : yelp . The project already have a texinfo manual, so it's all about generating HTML from info and pass the corrcet URI to yelp. Generating HTML manual To generate HTML from an info file you only need to run the following command : makeinfo --html todoSummarizer.texinfo It will create a new directory containing some HTML files. Calling yelp from ruby I also have some issues with Dir.pwd() so I didn't use it. Instead I used the __dir__ ruby function. Appart for the error checking code, calling yelp from ruby is only three lines away : yelp = find_executable("yelp") uri = "file://#{dir.to_path}/../doc/todoSummarizer/index.html" Thread.new { cmd = system("#{yelp} #{uri}") } Result You now have a great manual/help viewer for your GTK-based GUI appl...