Hi,
I’ve written a little boucing ball program in OCaml with OCamlSDL.
It can be used as a basis to write a Pong game, or any 2D game with a ball bouncing here and there on the screen.
You can download it (images, font, source code and Makefile included) here : bbsdl.tar.gz.
Don’t forget to tell me if you [...]
Hi,
Several days ago, bluestorm and I started working on monads-related stuffs for Batteries, so that we’d be able to provide a good API for writing and using monads in Objective Caml.
Well, we’ve now written the basis of the future monad-related functions and modules in Batteries.
Of course, we’ve introduced two key monads, keeping Batteries’ spirit : [...]
Hi,
Jon Harrop has written many articles in his OCaml Journal, and some of them are related to low-level optimization, which is a very important topic for OCaml developers, as OCaml is a fast functional language and can race against mainstream languages if we help him with our way of writing code, using the compiler, etc.
These [...]
Hi,
I’m writing this post because I want to thank and encourage the OCaml community. Indeed, there are many really *great* news this week that you may have seen if you read either Planet OCaml(Core), the Caml mailing list or both.
OCaml and Debian — The first one is a very good one for making OCaml more [...]
Hi,
It’s been some days I was working on a very interesting project…
Many of you probably know Internet Relay Chat (IRC), in particular the Freenode network. You can access it through an IRC Client, the most known being XChat. The host is irc.freenode.net, on port 6667.
Some of you are used to bots on IRC, often provided [...]
Hi,
Have you ever tried compiling with either ocamlc or ocamlopt with the -dlambda option ?
Compiling the following code :
?View Code OCAML1
2
3
4
5
let f = List.map (fun x -> x+1)
let print_list = List.iter (fun x -> Printf.printf " %d " x)
let _ = print_list ( f [1;2;3;4;5] )
give the following “lambda code” :
?View Code LAMBDA1
2
3
4
5
6
7
8
9
10
11
12
13
(* $ ocamlc [...]
Today, we’ll give a whirl at the Rope module of OCaml Batteries Included.
What are ropes ?
Ropes are better strings (but heavyweight) :
The length of a rope can be determined in constant time
appending or prepending a small rope to an arbitrarily large one in amortized constant time
concat, substring, insert, remove operations in amortized logarithmic time
access [...]
Hi,
I’m back here to introduce a very promising project : OCaml Batteries Included.
It aims at putting together all the things we may need as OCaml developers in a standard library. It has already put together some existing modules (Extlib, etc) and is now growing up with totally new modules.
The first thing you have to know [...]
Hi,
Few days ago, I posted about completion for OCaml programers within Emacs, the best editor ever (Ok, ok, “one of the best”), using YASnippets and tuareg-mode. Remember, it was here.
After some discussions with Laurent Le Brun, I post here with a new version of this work.
Indeed, Laurent liked this work and has worked on [...]
Hi,
Some days ago, I found YASnippet.
I then started using it and extending it.
As I currently develop mainly with OCaml (with tuareg-mode on Emacs), and that TABbing is much better (for me) than tuareg’s shortcut keys, I’ve created some snippets for tuareg-mode.
You can find them here : http://mestan.fr/ocaml/emacs/yasnippet-tuareg-mode.tar.gz
To install my snippets, assuming yasnippet is already [...]