OCaml Weekly News

Previous Week Up Next Week


Here is the latest OCaml Weekly News, for the week of February 07 to 14, 2023.

Table of Contents

Could merlin be compiled with js_of_ocaml and work in the browser

Haochen Kotoi-Xie asked

As the title asks: could merlin be compiled with js_of_ocaml and work in the browser? Has anyone attempted it?

Background: we’d like to make a real web only editor for simple ocaml projects. The features we are looking to provide with merlin is acurate type aware completion and display of module signatures.

Patrick Ferris replied

Yes! See the great work here: https://github.com/voodoos/merlin-js with an example https://voodoos.github.io/merlin-js/. I’ve used it with https://patricoferris.github.io/try-eio/ too.

Patrick Ferris then said

Thank you, glad you like it! We’ve ended up where we are thanks to various bits of hacking from @tmattio, @jonludlam, @voodoos (and I’m sure others!) and of course the jsoo contributors. This is how the OCaml.org playground works (although I think it lost merlin.js in the switch to OCaml 5).

Another nice feature (thanks to @jonludlam!) that might not be immediately apparent is that all of the OCaml evaluation is happening in a browser worker meaning it never blocks the UI (the adventurous can try while true do () done ^^), which has nice story if we compiled notebook style exercises to the browser or something like that.

Later on, Louis Gesbert said

Not exactly what you are asking for, but learn-ocaml does that kind of stuff, taking user-supplied ml code, applying some custom validations to its AST, then compiling and running it against a pre-defined solution. This and its sibling try-ocaml have had evaluation in a worker for a long time too — you can’t really ask students to reload the page after an accidental infinite recursion.

They lack the merlin integration though :slight_smile:

Opine 0.1.0 - Python source code transformations in OCaml

Arul announced

pyre-ast is an OCaml library that provides python AST representation in OCaml.

I had a need to do python source code transformations in OCaml. So, I made Opine to do transformations on the AST and convert it back to python. So, in OCaml, you can write python code now, if you ever need to.

P.S. It still doesn’t support the entire python syntax 100%. I haven’t added support for things like for-comprehension but it should be fairly easy to add it. I plan to add support for the missing ones as I need it for my projects.

Paul Biggar on Darklang

Claude Jager-Rubinson announced

You may remember Paul Biggar’s series of blog posts on the process and decision to rewrite his Dark programming language in F#, which was originally written in OCaml:

Paul will be speaking about Dark at next week’s meeting of the Houston Functional Programming Users’ Group. Although he’s not planning to specifically focus on the OCaml -> F# rewrite; I’m certainly planning to ask him about the experience, costs and benefits, etc. :wink: If you’re in the Houston area, please join us in person at Improving. Everybody else can join us online, via Zoom. Complete details and connection info are available on our website at https://hfpug.org.

Seppo.Social v0.1 and Request for Comments

🌍 Marcus Rohrmoser announced

I am happy to announce the premiere release of #Seppo!, Personal Social Media under funding of NLnet.nl.

Find it at https://seppo.social/downloads/

It has no notable user facing ActivityPub features so far, but

  • easy setup of instance & account,
  • webfinger discoverability (from e.g. mastodon search),
  • a welcoming, long-term reliable website.

I made this embarrassingly limited release to build awareness for low-barrier-entry internet services in general and especially in the field of personal communication as well as letting the #fediverse and permacomputing communities know.

Your comments are very much appreciated.

List your open OCaml positions on the OCaml.org job board

Sabine Schmaltz announced

Job postings for OCaml programmers are welcome on the official OCaml website at https://ocaml.org/jobs.

  1. Postings must be for jobs that primarily involve working with the OCaml language and should link to a detailed job description.
  2. Postings by outside recruiters are not permitted under any circumstances. You may only post jobs at your own firm.
  3. It is permitted to have one “spontaneous application” listing per company.

To add a job listing, edit https://github.com/ocaml/ocaml.org/blob/main/data/jobs.yml and make a pull request.

Alternatively, for the time being, you can fill in the template and reply to this thread. Here’s an example:

title: Spontaneous Application
link: https://tarides.com/jobs/spontaneous-application
location: Remote
publication_date: 2021-10-17
company: Tarides
company_logo: https://tarides.com/static/logo_tarides-52f91b59a8657d768e013129896b63e0.png


We shamelessly took inspiration from the jobs category description at https://discuss.ocaml.org/t/about-the-jobs-category/1120. :)

Sabine Schmaltz later added

It’s fine to advertise paid projects aimed at contractors or freelancers on the job board. You don’t need to offer full-time or even part-time employment. (I’ll mention that in the guidelines above.)

I would suggest to use “Contract”, “Project”, or “Freelance” in the job title, depending on the exact nature of the work - to make it obvious to people looking for opportunities that it’s not a long-term position.

Fabrice Le Fessant announced

Here is an offer for OCamlPro:

title: Jobs at OCamlPro
link: https://ocamlpro.com/jobs/
location: France
publication_date: 2023-02-10
company: OCamlPro
company_logo: https://ocamlpro.com/assets/img/logo_ocamlpro.png

Thanks a lot !

Available for Hire - Q1 2023

Sabine Schmaltz announced

Here’s a thread to announce your availability as an OCaml developer looking for an OCaml job. :rocket:

Freelancers, contractors and job-seekers, do advertise your services and experience here.

Let’s start this off with quarterly threads. If we find it gets too spammy, we can always switch to a monthly format later. :smile:

Axel Baudot

Software engineer with experience in Backend development.

Looking for a position as Backend or Fullstack Engineer using OCaml or related tech. Happy to work on tooling or R&D subjects projects too.

I wish to work remotely and will be located in Montreal soon. No problem with async or partial workday overlap on my side.

Professional experience: Essentially backend development in Python/Django. Some system design and integration on autonomous drones and blimps at Airbus.

Functional experience: I have taught Elm to high schoolers and used SML, Caml Lite in academic settings. Working on the capstone project of the Scala specialization on Coursera these days.

Timedesc 1.0.0 - modern date time handling

Darren announced

I’m pleased to announce the release of Timedesc 1.0.0

Timedesc is a very comprehensive date time handling library with good support of time zones.


Features (before 1.0.0)

  • Timestamp and date time handling with platform independent time zone support
    • Subset of the IANA time zone database is built into this library
  • Supports Gregorian calendar date, ISO week date, and ISO ordinal date
  • Supports nanosecond precision
  • ISO8601 parsing and RFC3339 printing

New feature in 1.0.0

  • RFC9110 (HTTP) date time parsing and printing

Major updates to kcas in 0.1.8 and 0.2.0

Vesa Karvonen announced

I’m happy to announce that the kcas library has received major updates.

What is kcas?

kcas provides an implementation of atomic lock-free multi-word compare-and-swap (MCAS), which is a powerful tool for designing concurrent algorithms.

First, kcas now uses a new lock-free algorithm that improves performance of kcas significantly over the previously used algorithm. The new algorithm is provided in kcas version 0.1.8 with an API compatible with previous versions of kcas.

Second, the latest version of kcas, 0.2.0, went through a major API redesign. The same functionality as can be found in previous versions is now available through cleaned-up modules. Additionally, the latest library offers a new transactional API, essentially a basic form of STM or Software Transactional Memory, that can make it significantly easier to program lock-free algorithms.

Third, documentation has also been overhauled and there is now both an introduction to the use of the library as well as a reference manual.

So, click here, check out the new documentation, the new transactional API, and enjoy the performance!

Last, there is still more to come. The are plans to extend the range of the library further via a brand-new algorithm and extended support for transactions.


If you happen to miss a CWN, you can send me a message and I’ll mail it to you, or go take a look at the archive or the RSS feed of the archives.

If you also wish to receive it every week by mail, you may subscribe online.