• 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.

917 blog posts are available. You can read the 30 more recent ones below or view older ones.

Pearls of Algebraic Effects and Handlers — KC Sivaramakrishnan, May 27, 2015

In the previous post, I presented a simple cooperative multithreaded scheduler written using algebraic effects and their handlers. Algebraic effects are of course useful for expressing other forms of effectful computations. In this post, I will present a series of simple examples to illustrate the utility of algebraic effects and handlers in OCaml. Some of the examples presented here were borrowed from the excellent paper on Eff programming language1. All of the examples presented below are avai…

Read more...

Weekly News — OCaml Weekly News, May 26, 2015

  1. GADTs and JSON
  2. Job: Ocaml Engineer in Paris
  3. Other OCaml News

ICFP programming contest 2014: a retrospective (part 2/2) — GaGallium (Damien Doligez), May 25, 2015

This is the second post on the Gagallium participation to the ICFP programming context last year -- 2014. See the first post for the introduction and a link to the source code; this post details the design of the ghost code.

The ghost we submitted is the last of a series of increasingly sophisticated designs, each of which is an incremental enhancement of the previous one. Given the short amount of time available, we did not do a rewrite from scratch, no matter how much we wanted to. This m…

Read more...

Church Numerals — Shayne Fletcher, May 24, 2015

This is just a little fun. Jason Hickey in "Introduction to Objective Caml" poses some little end of chapter problems to define arithmetic operations for a type of unary (base-1) natural numbers. The type is


type num = Z | S of num
where Z represents the number zero and if i is a unary number, then S i is i + 1.

This formulation of Church numerals using a recursive type and pattern matching means in truth, the problems can be solved in less than 5 minutes or so. Of course, the real Church numer…

Read more...

On the book « More OCaml » — Daniel Bünzli, May 23, 2015

I eventually read through John Whitington's latest book « More OCaml. » It's again a very good one, I made a small review here.

ICFP programming contest 2014: a retrospective (part 1/2) — GaGallium (Gabriel Scherer, Thomas Braibant), May 22, 2015

The dates for the 2015 ICFP programming contest have been announced on the contest webpage. This is a good occasion to dig out a summary of our 2014 participation, that had been written over the span of several months (mostly right after the contest), and that we had unexplainably failed to publish before.

In 2013, some Gallium members (Thibaut Balabonski, Thomas Braibant, Jacques-Henri Jourdan and Gabriel Scherer) participated to the ICFP programming contest, and it was a lot of fun. We parti…

Read more...

First month of Haskell — Perpetually Curious (Tim McGilchrist), May 21, 2015

I’ve been excpetionally fortunate in the past month to accomplish a long held goal of mine. As of the 13th of April I’ve been employed full time as a functional programmer. In particular I’ve taken the deepest of dives into Haskell. I thought it might be interesting, at least for me, to write up my thoughts after completing a month of Haskell.

First the depth of the dive has been overwhelming and the learning curve more equivalent to a vertical rock climb. But the entire time,…

Read more...

Effective Concurrency with Algebraic Effects — KC Sivaramakrishnan, May 20, 2015

Algebraic effects and handlers provide a modular abstraction for expressing effectful computation, allowing the programmer to separate the expression of an effectful computation from its implementation. In this post, I will present an extension to OCaml for programming with linear algebraic effects, and demonstrate its use in expressing concurrency primitives for multicore OCaml. The design and implementation of algebraic effects for multicore OCaml is due to Leo White, Stephen Dolan and the mul…

Read more...

The troublesome reflection rule (TYPES 2015 slides) — Andrej Bauer, May 19, 2015

Here are the slides of my TYPES 2015 talk “The troublesome reflection rule” with fairly detailed presenter notes. The meeting is  taking place in Tallinn, Estonia – a very cool country in many senses (it’s not quite spring yet even though we’re in the second half of May, and it’s the country that gave us … Continue reading The troublesome reflection rule (TYPES 2015 slides)

Weekly News — OCaml Weekly News, May 19, 2015

  1. JOB: Software Developer (m/f) - Functional Programming / C++ @ Dassault Systemes 3DEXCITE in Munich
  2. OPAM 1.2.2
  3. OCaml backend developer position at Ahrefs Research (San Francisco)
  4. OCaml release roadmap
  5. Vult language made with Ocaml
  6. Other OCaml News

Sliding Tile OCaml iOS App — Psellos, May 18, 2015

May 18, 2015

I revamped another OCaml iOS app from a few years ago to make it run under iOS 8.3. It implements a sliding tile puzzle that was a fad in the 1880s and was also popular in my childhood a few years after that.

Instructions for downloading, building, and running the app are here:

Slide24: Sliding Tile Puzzle for iOS

You can download the sources directly here:

Slide24 2.0.2, OCaml app for iOS 8.3 (111 KB)

I had a lot of fun with this puzzle as a kid, and I still find …

Read more...

Reduced Memory Allocations with ocp-memprof — OCamlPro (Mohamed Iguernelala, Çagdas Bozman), May 18, 2015

In this blog post, we explain how ocp-memprof helped us identify a piece of code in Alt-Ergo that needed to be improved. Simply put, a function that merges two maps was performing a lot of unnecessary allocations, negatively impacting the garbage collector's activity. A simple patch allowed us to prevent these allocations, and thus speed up Alt-Ergo's execution.

Read more...

Unreliable guide to OCaml modules — Perpetually Curious (Tim McGilchrist), May 16, 2015

Being on the curious side of things I have been interested lately in the dualities between programming languages. Like how one feature say Type Classes in Haskell compares to what is available in Scala or OCaml. This has lead to me reading a substantial amount of academic papers about the subject.

So with that in mind I would like to give a brief introduction to OCaml style modules. Perhaps in another post going into how can you encode something like rank n types from Haskell in OCaml which nat…

Read more...

OCaml server-side developer at Ahrefs Research (Full-time) — Functional Jobs (FunctionalJobs.com), May 14, 2015

Who we are

Ahrefs Research is a San Francisco branch of Ahrefs Pte Ltd (Singapore), which runs an internet-scale bot that crawls whole Web 24/7, storing huge volumes of information to be indexed and structured in timely fashion. On top of that Ahrefs is building analytical services for end-users.

Ahrefs Research develops a custom petabyte-scale distributed storage to accommodate all that data coming in at high speed, focusing on performance, robustness and ease of use. Performance-critical low…

Read more...

Weekly News — OCaml Weekly News, May 12, 2015

  1. Problems with printing MetaOCaml generated code
  2. OCaml release roadmap
  3. Backtraces in toplevel
  4. Other OCaml News

Full Time: Senior C++ Engineer at Ufora in New York, NY — GitHub Jobs, May 08, 2015

Company Description

Join Ufora to develop software for the most advanced data science teams on the planet.

Ufora is a cutting-­edge computational platform that enables data scientists to explore, visualize, and analyze massive amounts of data, automatically utilizing tens or hundreds of computers with ease and flexibility. When they don’t need to worry about the scale of their data or the complexities of distributed computing, they can focus on answering business questions instead of gettin…

Read more...

OPAM 1.2.2 Released — OCaml Platform (Louis Gesbert), May 07, 2015

OPAM 1.2.2 has just been released. This fixes a few issues over 1.2.1 and brings a couple of improvements, in particular better use of the solver to keep the installation as up-to-date as possible even when the latest version of a package can not be installed.

Upgrade from 1.2.1 (or earlier)

See the normal installation instructions: you should generally pick up the packages from the same origin as you did for the last version -- possibly switching from the official repository packages …

Read more...

CPU Registers and OCaml — Jane Street (Vladimir Brankov), May 05, 2015

Even though registers are a low-level CPU concept, having some knowledge about them can help write faster code. Simply put, a CPU register is a storage for a single variable. CPU can keep data in memory or cache or in registers and registers are often much faster. Furthermore, some operations are possible only when the data is in registers. Hence, the OCaml compiler tries to keep as many variables as it can in the registers.

Code with more than 13 variables is slow?

Consider this primitive stati…

Read more...

Permutations — Xinuo Chen, May 05, 2015

hero

In this post, we will talk about producing permuations using OCaml. Generating permutations was actually one of my first self-homeworks when I started to learn OCaml years ago. It can be a good exercise to train our skills on list, recursion, foundamental fold, map, etc, in OCaml. Also it shows the conciseness of the OCaml as a language.

We will first present 2 common approaches for generating all permutations of a list of elements.

Then we introduce the Johnson Trotter algorithm which enab…

Read more...

Haskell Web Engineer at Front Row Education (Full-time) — Functional Jobs (FunctionalJobs.com), May 05, 2015

Position

Haskell web engineer to join fast-growing education startup that changes how over a million young students learn math.

TL;DR - Why you should join Front Row

  • Our mission is important to us, and we want it to be important to you as well: hundreds of thousands of kids learn math using Front Row every month. Our early results show students improve twice as much while using Front Row than their peers who aren’t using the program.
  • You’ll be one of the first engineers on the t…
Read more...

Weekly News — OCaml Weekly News, May 05, 2015

  1. js_of_ocaml with node
  2. OCaml art exhibition in Venice
  3. Albatross 0.1
  4. Safe UTF-8 string literals and pattern matching for OCaml
  5. ocaml-tutorial.org will expire in 60 days
  6. Other OCaml News

Sr. Software Engineer at McGraw-Hill Education (Full-time) — Functional Jobs (FunctionalJobs.com), May 05, 2015

McGraw-Hill Education is a digital learning company that draws on its more than 100 years of educational expertise to offer solutions which improve learning outcomes around the world. McGraw-Hill Education is the adaptive education technology leader with the vision for creating a highly personalized learning experience that prepares students of all ages for the world that awaits. The Company has offices across North America, India, China, Europe, the Middle East and South America, and makes its…

Read more...

Gamut Redivivus: OCaml App in iOS Simulator — Psellos, Apr 29, 2015

April 29, 2015

I recently revitalized an OCaml app from a few years ago, one that runs in the iOS simulator. Instructions for downloading, building, and running the app are here:

Gamut: Explore Colors in iOS Simulator

You can download the sources directly here:

Gamut 2.0.3, OCaml app for iOS Simulator 8.2 (32 KB)

Although the app doesn’t do anything particularly impressive, I still find it mesmerizing and fun. But mostly it just shows how to get an OCaml app running in the…

Read more...

CueKeeper: Gitting Things Done in the browser — Thomas Leonard, Apr 28, 2015

Git repositories store data with history, supporting replication, merging and revocation. The Irmin library lets applications use Git-style storage for their data. To try it out, I’ve written a GTD-based action tracker that runs entirely client-side in the browser.

CueKeeper uses Irmin to handle history and merges, with state saved in the browser using the new IndexedDB standard (requires a recent browser; Firefox 37, Chromium 41 and IE 11.0.9600 all work, but Safari apparently has problems i…

Read more...

Weekly News — OCaml Weekly News, Apr 28, 2015

  1. Suggested way to determine platform specific capabilities in build system?
  2. systemd/journal bindings
  3. New software written in OCaml
  4. gen_js_api: generating Javascript bindings from OCaml interfaces
  5. js_of_ocaml with node
  6. Other OCaml News

Generating Javascript bindings from OCaml interfaces — LexiFi, Apr 27, 2015

LexiFi is currently experimenting with the js_of_ocaml compiler in order to create some browser-side applications in OCaml. In this context, we have started a new project called gen_js_api which aims at simplifying the creation of bindings to Javascript libraries. The approach is quite different from js_of_ocaml's native FFI (which relies on language extensions).

read more

Coq 8.5 beta 2 is out! — Coq, Apr 22, 2015

The second beta release of Coq 8.5 is available for testing. The 8.5 version brings several major features to Coq:
  • asynchronous edition of documents under CoqIDE to keep working on a proof while Coq checks the other proofs in the background (by Enrico Tassi);
  • universe polymorphism making it possible to reuse the same definitions at various universe levels (by Matthieu Sozeau);
  • primitive projections improving space and time efficiency of records, and adding eta-conversion for records (by…
Read more...

Recover the good old C-x C-b (list-buffers) behaviour around Emacs 24.4 and later — Caml Spotting (Jun Furuse), Apr 22, 2015

Something has been changed around Emacs 24.4:  my favorite C-x C-b (list-buffers) no longer works as before.  It displays the buffer menu in a random window.  Which windows is chosen is almost undeterministic and no way to predict.  Sometimes the current window is selected. :-(

This change is awful to me who built a special neuro circuit for Emacs.  I often did:
  • C-x C-b to display the buffer list in another window than the current
  • then immediately C-x o to move the cursor f…
Read more...

Weekly News — OCaml Weekly News, Apr 21, 2015

  1. Suggested way to determine platform specific capabilities in build system?
  2. OCaml-openmaple
  3. Timeout
  4. Other OCaml News

Senior/Principal Software Development Engineer at Lookingglass Cyber Solutions (Full-time) — Functional Jobs (FunctionalJobs.com), Apr 16, 2015

Are you an experienced software engineer in security, networking, cloud and big data? Are you interested in cyber security or improving the security of the Internet? Do you push yourself to be creative and innovative and expect the same of others?

At Lookingglass, we are driven and passionate about what we do. We believe that teams deliver great products not individuals. We inspire each other and our customers every day with technology that improves the security of the Internet and of our custo…

Read more...

View older blog posts.