Monday, 29 March 2010

Compiler development: part 2

The OCaml Journal just published an article about HLVM:

"This article is the second in a series describing the design and implementation of a complete compiler using the freely-available HLVM project described in previous articles. This article extends the compiler implemented in part 1 of the series with support for variant types and basic pattern matching. This requires changes to the representation of the compiler's input, the lexer, the parser, the compiler and the REPL. The language implemented by the resulting compiler is substantially more expressive than the previous version and allows monomorphic ML-style programs to be compiled and executed..."

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

Monday, 15 March 2010

Word games

The OCaml Journal just published an article about string-based algorithms:

"String manipulation is a common task in programming and, in particular, when scripting. Solving word puzzles is an excellent way to learn how these kinds of problems can be approached. This article uses the example of word games to develop a series of program that manipulate strings using different techniques in OCaml, including sorting and searching..."

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

Saturday, 6 March 2010

Implementing Hindley-Milner type inference

The OCaml Journal just published an article about type checking:

"This article walks through the design and implementation of the Hindley-Milner type inference algorithm written in OCaml. This algorithm is the foundation of type inference most modern functional programming languages including OCaml. The algorithm acts upon expressions and types using type scheme, substitutions and type environments to infer the type of a given expression..."

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