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

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

Opam Switch to Multicore OCaml — KC Sivaramakrishnan, Mar 25, 2015

OPAM has a great compiler switch feature that lets you simultaneously host several OCaml installations, each with its own compiler version and a set of installed packages. I wanted to use the power of opam switch for working with the experimental multicore OCaml compiler. The key advantage of doing this is that it lets you easily install packages from the OPAM repository, while sandboxing it from other OCaml installations on your system. The post will show how to create OPAM compiler switch for …

Read more...

A unikernel experiment: A VM for every URL — Magnus Skjegstad, Mar 25, 2015

I recently wrote a DNS server that can boot unikernels on demand called Jitsu. The following diagram shows a simplified version of how Jitsu works. The client sends a DNS query to a DNS server (Jitsu). The DNS server starts a unikernel and sends a DNS response back to the client while the unikernel is booting. When the client receives the DNS response it opens a TCP connection to the unikernel, which now has completed booting and is ready to respond to the TCP connection.

The unikernels are bui…

Read more...

Weekly News — OCaml Weekly News, Mar 24, 2015

  1. GADT existential asked
  2. TLS-0.4.0 and X.509-0.3.0
  3. Adding support for OCaml in PythonTeX
  4. Mtime 0.8.0
  5. OPAM 1.2.1
  6. Other OCaml News

Mini Cloud/Cluster v2.0 — Richard Jones, Mar 23, 2015

Last year I wrote and rewrote a little command line tool for managing my virtualization cluster. Of course I could use OpenStack RDO but OpenStack is a vast box of somewhat working bits and pieces. I think for a small … Continue reading

A lighter Core — Jane Street (Yaron Minsky), Mar 22, 2015

We recently released a version of our open source libraries with a much anticipated change --- Async_kernel, the heart of the Async concurrent programming library, now depends only on Core_kernel rather than on Core.

This sounds like a dull, technical change, and it kind of is. But it's also part of a larger project to make our libraries more lightweight and portable, and so suitable for a wider array of users and applications.

We've actually been working on these issues for a while now, and thi…

Read more...

Namespace archeology — GaGallium (Gabriel Scherer), Mar 19, 2015

At the very end of 2011, and then at the very beginning of 2013, I worked for some weeks on namespaces for OCaml (what they could be, why would we need them, what would be a good solution). The resulting proposal was too complex to gather steam, so I moved on -- and never got around to making the documents publicly available. Here they are.

In case you are interest in archeology of design proposals (or if you want to work on namespaces for OCaml in the future), you can now access

Read more...

Binomial Heap — Xinuo Chen, Mar 18, 2015

As we described in the previous post, leftist tree is a binary tree based functional heap. It manipulates the tree structure so that the left branches are always the longest and operations follow the right branches only. It is a clever and simple data structure that fulfills the purpose of heap.

In this post, we present another functional heap called Binomial Heap ([1]). Instead of being a single tree strucutre, it is a list of binomial trees and it provides better performance than leftist t…

Read more...

OPAM 1.2.1 Released — OCaml Platform (Louis Gesbert), Mar 18, 2015

OPAM 1.2.1 has just been released. This patch version brings a number of fixes and improvements over 1.2.0, without breaking compatibility.

Upgrade from 1.2.0 (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 to the ones we provide for your distribution, in case the former are lagging behind.

What's new

No huge new features in …

Read more...

Weekly News — OCaml Weekly News, Mar 17, 2015

  1. Core_profiler 112.19.00
  2. ocaml-ctypes 0.4.0, a library for calling C functions directly from OCaml
  3. Adding support for OCaml in PythonTeX
  4. Other OCaml News

Release of Bookaml 2.1 — OCamlCore Forge News (Dario Teixeira), Mar 16, 2015

This release simply brings Bookaml up-to-date with OCamlnet 4. There are no changes to Bookaml's API itself.

OCaml EFL 1.13.0 released — OCamlCore Forge News (Alexis Bernadet), Mar 16, 2015

Like the previous version, only version 1.8 and higher of the EFL and Elementary are required to build this version of OCaml EFL.

ocaml-mysql 1.2.0 released — OCamlCore Forge News (ygrek), Mar 16, 2015

ocaml-mysql provides bindings to libmysqlclient. This release removes dependency on camlp4 and employs mysql_config to detect mysql installation paths

Labeled and optional arguments — Shayne Fletcher, Mar 14, 2015

I don't know why this is, but of all the features of the OCaml language, somehow remembering how to make use of labeled or optional arguments is difficult for me. I find when I need to use them, I have to go back and "relearn" the syntax every time. For that reason, I've written these summary notes for myself (based mostly on Jacques Garrigue's "Labels and Variants" chapter of the OCaml reference) and I hope they might be of help you too!

Labels

I've seen people write this function from time to t…Read more...

Full Time: Software Developer (Functional Programming) at Jane Street in New York, NY; London, UK; Hong Kong — GitHub Jobs, Mar 13, 2015

Software Developer (Functional Programming)

Jane Street is a proprietary quantitative trading firm, focusing primarily on trading equities and equity derivatives. We use innovative technology, a scientific approach, and a deep understanding of markets to stay successful in our highly competitive field. We operate around the clock and around the globe, employing over 380 people in offices in New York, London and Hong Kong.

The markets in which we trade change rapidly, but our intellectual appro…

Read more...

Heap - Leftist Tree — Xinuo Chen, Mar 13, 2015

leftist

Heap is one of most important data structure, where the minimum of all elements can always be easily and efficiently retrieved.

Binary Heap

In imperative world, binary heap (implemented via array) is frequently used. Here is an example:

binary_heap

The (min) heap on the right hand side is a full binary tree indeed. The root is always the min and recursively, a root (of any sub tree) is always smaller than its two children. Note that we just need to keep partial order for heap, not total order like b…

Read more...

Weekly News — OCaml Weekly News, Mar 10, 2015

  1. Dependencies between plugins
  2. CFP: OCaml Workshop 2015
  3. pycaml
  4. Changing precedence and placement of attributes
  5. Firmata v0.1
  6. Other OCaml News

Simple Refinements Types for OCaml — Cedeela (simon), Mar 10, 2015

For more than one year, vulnerabilies in software (especially pervasive C software) have been disclosed at an alarmingly high rate. I love OCaml, which is definitely safer, but still has gaps left open. I believe formal verification, albeit a very powerful tool, is not mature enough for most programmers (too difficult to use, requires too much efforts), so I'm thinking about alternative solutions that would be more lightweight to define and use, but would still increase the confidence in source …

Read more...

Release Sodium 20150201 is available. — Frama-C, Mar 06, 2015

Heap sort — Shayne Fletcher, Mar 06, 2015

Given the existence of a priority queue data structure, the heap sort algorithm is trivially implemented by loading the unsorted sequence into a queue then successively pulling of the minimum element from the queue until the queue is exhausted.

There are many ways to implement a priority queue and so we seek an expression for a function for heap sorting that is polymorphic over those choices.

To begin, a module type for priority queues.


(**Priority queues over ordered types*)
module type PRIORIT…
Read more...

Centralizing distributed version control, revisited — Jane Street (Yaron Minsky), Mar 05, 2015

7 years ago, I wrote a blog post about how we at Jane Street were using our distributed version control system (hg, though the story would be the same for git) in a partially centralized way. Essentially, we built a centralized repo and a continuous integration system whose job was to merge in new changesets. The key responsibility of this system was to make sure that a change was rejected unless it merged, compiled and tested cleanly.

This half-distributed, half-centralized approach let us enjo…

Read more...

Hacker (Node.js, NOSQL, Data Science) at Mobitrans (Full-time) — Functional Jobs (FunctionalJobs.com), Mar 04, 2015

We are looking for exceptional functional developers to join our product research and development team. It's a full stack job that requires more than anything a passion for learning and experimenting with new technologies, creating prototypes and dealing with a few million data points every day. You will be working on any technology between Linux shell scripts, high performance Web servers and beautiful UIs.

We tweak our advertising and targeting algorithms multiple times a day and you sho…

Read more...

Cumulus and ocp-memprof, a love story — OCamlPro (Çagdas Bozman), Mar 04, 2015

In this blog post, we went on the hunt of memory leaks in Cumulus by using our memory profiler: ocp-memprof. Cumulus is a feed aggregator based on Eliom, a framework for programming web sites and client/server web applications, part of the Ocsigen Project.

First, run and get the memory snapshots

To test and run the server, we use ocp-memprof to start the process:

$ ocp-memprof --exec ocsigenserver.opt -c ocsigenserver.opt.conf -v

There are several ways to obtain snapshots:

  • automatical…

Read more...

Weekly News — OCaml Weekly News, Mar 03, 2015

  1. CommonML: An opinionated build/package/develop workflow on top of CommonJS
  2. Match error with abstract types in modules
  3. ocamlnet-4.0.2
  4. CFP: ML Workshop 2015
  5. How to build a library with c++ stubs
  6. Other OCaml News

Weekly News — OCaml Weekly News, Feb 24, 2015

  1. InvarGenT v2.0: Great coverage
  2. OCaml port to IOS for IPhone and IPad released on Cydia alternate app store
  3. 2-year engineer position OCaml/Ocsigen in Paris (Univ Paris Diderot, Inria)
  4. Senior Embedded Linux Engineer position w/OCaml, Montréal
  5. Other OCaml News

Senior Software Engineer at McGraw-Hill Education (Full-time) — Functional Jobs (FunctionalJobs.com), Feb 24, 2015

This Senior Software Engineer position is with the new LearnSmart team at McGraw-Hill Education's new and growing Research & Development center in Boston's Innovation District.

We make software that helps college students study smarter, earn better grades, and retain more knowledge.

The LearnSmart adaptive engine powers the products in our LearnSmart Advantage suite — LearnSmart, SmartBook, LearnSmart Achieve, LearnSmart Prep, and LearnSmart Labs. These products provide a p…

Read more...

Pearl No.2 - The Max Number of Surpassers — Xinuo Chen, Feb 21, 2015

pear-2

In a list of unsorted numbers (not necessarily distinct), such as

problem1

The surpassers of an element are all elements whose indices are bigger and values are larger. For example, the element 1's surpassers are 9, 5, 5, and 6, so its number of surpassers is 4.

problem2

And also we can see that 9 doesn't have any surpassers so its number of surpassers is 0.

So the problem of this pearl is:

Given an unsorted list of numbers, find the max number of surpassers, O(nlogn) is required.

Read more...

Improving the OCaml documentation toolchain — OCaml Platform, Feb 20, 2015

Last week, we published an alpha version of a new OCaml documentation generator, codoc 0.2.0. In the 2014 OCaml workshop presentation (abstract, slides, video), we mentioned the 'module wall' for documentation and this attempts to fix it. To try it out, simply follow the directions in the README on that repository, or browse some samples of the current, default output of the tool. Please do bear in mind codoc and its constituent libraries are still under heavy development and are not fe…

Read more...

ICFP 2015 - a call for sponsorship and how you can help — Anil Madhavapeddy, Feb 18, 2015

The call for papers for this year’s International Conference on Functional Programming is about to close in two weeks, and over a hundred cutting edge research papers will be submitted on the theory, application and experiences behind functional programming and type theory. In addition to the main conference, there are also over 10 big affiliated workshops that run throughout the week on topics ranging from specific languages (Erlang, Haskell, OCaml), the broader commercial community, and ev…

Read more...

Why we use OPAM for XenServer development — OCaml Platform (Dave Scott), Feb 18, 2015

This is a guest post from an OPAM user about how they use it. If you would like to post about your own use, please let us know.

XenServer uses the Xen project's "Xapi toolstack": a suite of tools written mostly in OCaml which

  • manages clusters of Xen hosts with shared storage and networking
  • allows running VMs to be migrated between hosts (with or without storage) with minimal downtime
  • automatically restarts VMs after host failure (High Availability)
  • allows cross-site Disaster …
Read more...

Weekly News — OCaml Weekly News, Feb 17, 2015

  1. Ocveralls 0.1 release
  2. First public release of the OCaml Memory Profiler
  3. Core Suite 112.17.00
  4. Other OCaml News

View older blog posts.