Sunday, 25 October 2009

LLVM 2.6 support and a new HLVM garbage collector

The OCaml Journal just published an article about LLVM and HLVM:

"This article describes the changes required to bring HLVM up to date with respect to the new LLVM 2.6 release as well as a new garbage collector design. The previous collector mapped pointers onto their mark state via a hash table. This update uses the more conventional design of placing the mark state in the heap, using a mark-sweep garbage collector to reclaim unreachable values. The new collector is simpler and offers different performance characteristics..."

To read this article and more, subscribe to The OCaml Journal today!

OCaml4Multicore (oc4mc)

The OCaml Journal just published an article about the new parallel OCaml implementation:

"OCaml4Multicore is a modified OCaml compiler that allows POSIX threads to run in parallel. This is a major development that makes shared-memory parallel programming much easier and also has the potential to make it far more efficient for many important appications. This article introduces the subject of thread-based parallel programming, explains why it is difficult to facilitate in OCaml-like language implementations and examines the performance characteristics of oc4mc..."

To read this article and more, subscribe to The OCaml Journal today!

Thursday, 24 September 2009

The Graphics module: Pythagoras Tree

The OCaml Journal just published an article about the built-in Graphics module:

"The OCaml distribution includes a Graphics module that provides a set of easy-to-use portable drawing primitives ideal for educational purposes and experimentation. This article describes the recursive construction of some digital art built around Pythagoras' triangle. The results are visualized interactively using the Graphics module..."

To read this article and more, subscribe to The OCaml Journal today!

OCaml finally goes multicore

Philippe Wang made the exciting announcement recently that the first working version of oc4mc, OCaml with a new parallel garbage collector, has been released. This revolutionary development allows threads in OCaml programs to be executed in parallel for the first time, making it possible to leverage multicores efficiently in OCaml programs.

We can confirm that oc4mc is working on one of our 8-core machines and shows excellent speedups for simple multithreaded numerical computations.

The next major developments in this area will doubtless be better libraries for parallel programming in OCaml, the adoption of oc4mc in the major apt repositories used by the majority of Linux programmers and finally the creation of literature describing the design and characteristics of this implementation.

Congratulations to the team (Mathias Bourgoin, Adrien Jonquet, Emmanuel Chailloux, Benjamin Canou and Philippe Wang) for making this happen and thanks to Jane St. Capital for making the project possible!

Stanford Bunny

The OCaml Journal just published an article about mesh visualization:

"The Stanford bunny is a 3D mesh of triangles commonly used as a benchmark for computer graphics applications. This article presents an 85-line OCaml program that uses OpenGL to render the Stanford bunny in real time: the mesh is represented as a vertex array and an index array. The vertex array is a sequence of 3D vertex coordinates. The index array is a sequence of triples of indices into the vertex array referring to the three vertices of each triangle. Normals are generated independently for each vertex as the sum of the normals of every triangular face sharing each vertex, in order to provide smooth shading..."

To read this article and more, subscribe to The OCaml Journal today!

Traversing networks: the nth-nearest neighbor

The OCaml Journal just published an article about graph theory:

"Graph theory has a great many practical applications ranging from compiler internals to the study of the structural characteristics of materials. This article describes the design and implementation of a program that finds the nth-nearest neighbors of a given vertex in an infinite graph. This problem is of interest in the context of atomic structures..."

To read this article and more, subscribe to The OCaml Journal today!

Monday, 24 August 2009

OCaml internals

Richard Jones has written an excellent series of blog posts about the internals of the OCaml implementation: