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 [...]