I've recently read an interesting article which shows an example of concurrency implemented in 3 differenet languages, namely Go, Erlang and C++. While the Erlang and Go examples seemed clear and concise, the C++ one looks long and hard to understand. The reason behind this complexity is that C ...read more
Debugging with DOT
I'm starting a PhD on first-order automated theorem proving, which is the reason I'm writing an experimental theorem prover in OCaml. Theorem provers are full of complicated algorithms (that I plan to write on later), and my usual techniques for debugging are twofold:
- Writing a lot of ...
The inside of a curve
Hi, I am shuba, and I'll be using this blog to dicuss various computer graphics topics I find interesting. I might also disgress on C++, which is my main programming language.
For my first article, I'll try and answer a question that's not as simple as it ...read more
Tail-recursive map in OCaml
The List.map function of the OCaml standard lib is not implemented tail-recursively. The current version (as of 4.00 on my computer) is
let rec map f = function  ->  | a::l -> let r = f a in r :: map f l
It's pretty efficient on small lists, but blows up ...read more