• en

OCaml Planet

The OCaml Planet aggregates various blogs from the OCaml community. If you would like to be added, read the Planet syndication HOWTO.

OCaml 4.01 for iOS 8 Simulator — Psellos, Dec 19, 2014

December 19, 2014

OCamlXARM compiles for an iOS device, but OCamlXSim compiles for an iOS Simulator. The same ocamloptrev script that compiles OCaml for iOS 8 can also get OCamlXSim to compile OCaml for the iOS 8 Simulator. The only thing that changes is the location of the compiler.

If you want to try out OCaml on the iOS 8 Simulator, here is an update to the script that compiles for either an iOS device or an iOS Simulator (ocamloptrev):

#!/bin/bash
#
# ocamloptrev     ocamlopt for specifie…
Read more...

Become a BST Ninja - Genin Level — @typeocaml, Dec 19, 2014

bst_ninja

Binary Search Tree (BST) is one of the most classic data structures. The definition for its structure is shown as below:

  • It consists of Nodes and Leaves.
  • A Node has a child bst on the left side, a key (, a data), and a child bst on the right side. Note here a node's left or right child is not a node, instead, is indeed another binary search tree.
  • A Leaf has nothing but act only as a STOP sign.
type 'a bst_t =  
  | Leaf
  | Node of 'a bst_t * 'a * 'a bst_t (* Node (left, key, right) *)
(…
Read more...

Compiling regular expressions (I) — Shayne Fletcher, Dec 18, 2014

This post picks up from here which was concerned with parsing - obtaining representations of regular expressions as abstract syntax trees. The ultimate goal is, given a string representation of a regular expression $e$ , produce a 'recognizer' for the expression (referred to as compiling a regular expression). That is, a function string -> bool that can be used to categorize strings as either belonging to the language $\mathcal{L_{e}}$ or not.

Having produced an abstract syntax tree for a re…

Read more...

OPAM 1.2 and Travis CI — OCaml Platform, Dec 18, 2014

The new pinning feature of OPAM 1.2 enables new interesting workflows for your day-to-day development in OCaml projects. I will briefly describe one of them here: simplifying continuous testing with Travis CI and GitHub.

Creating an opam file

As explained in the previous post, adding an opam file at the root of your project now lets you pin development versions of your project directly. It's very easy to create a default template with OPAM 1.2:

$ opam pin add <my-project-name> . --edit
[..…
Read more...

Weekly News — Caml Weekly News, Dec 16, 2014

  1. m17n: multilingualization for OCaml source code
  2. ppx_include 1.0
  3. Other OCaml News

OCaml App for iOS 8.1 (Sources) — Psellos, Dec 14, 2014

December 14, 2014

I coded up a simple OCaml iOS app to run in iOS 8.1. Instructions for downloading, building, and running the app are here:

Portland: Which Way Is Up on iOS?

You can download the sources directly here:

Portland 2.0.3, OCaml app for iOS 8.1 (29 KB)

This is a revamped version of Portland, the first example OCaml iOS app I made a few years ago. For maximum clarity it doesn’t do anything particularly impressive. It really just shows how to code an iOS app in OCaml.

H…

Read more...

OCaml EFL 1.12.0 released — OCamlCore Forge News, Dec 13, 2014

Major changes: - Moved to version 1.12 of the EFL/Elementary - Rewriting of the build toolchain (although ocamlbuild still do the compilation part) - The package adapts to the EFL/Elementary version of the user: An archive for each version of the EFL is not necessary any more. For example, if version 1.11 is installed, the interfaces to 1.12 specific functions will not be built but the library obtained will still be usable. - An experimental interraction with Lwt (available in an example) - Comp…Read more...

Recognizers — Shayne Fletcher, Dec 13, 2014

In my last post, I gave an OCaml program to parse regular expressions. I intend however to show you, over the coming weeks, not just how to parse them, but how to compile them to recognizers too. Doing so will require me to share quite a lot of code that I gleaned from the book The Functional Approach to Programming by Guy Cousineau and Michel Mauny from which I learned how to do this. In doing so, I will along the way, provide updated code in modern OCaml as the book is presented in the Caml la…

Read more...

Weekly News — Caml Weekly News, Dec  9, 2014

  1. What are people using when writing distributed applications in OCaml?
  2. Other OCaml News

Full Time: Software Developer (Functional Programming) at Jane Street in New York, NY; London, UK; Hong Kong — Github OCaml jobs, Dec  8, 2014

Software Developer (Functional Programming)

Jane Street is looking to hire great software developers with an interest in functional programming. OCaml, a statically typed functional programming with similarities to Haskell, Scheme, Erlang, F# and SML, is our language of choice. We've got the largest team of OCaml developers in any industrial setting, and probably the world's largest OCaml codebase. We use OCaml for running our entire business, supporting everything from research to systems admi…

Read more...