OCaml Weekly News
Hello
Here is the latest OCaml Weekly News, for the week of March 11 to 18, 2025.
Table of Contents
- Upgrading Semgrep from OCaml 4 to OCaml 5 + dynamic_gc utility
- Open source OCaml algotrading with longleaf 1.0.0
- Neocaml - a TreeSitter-powered Emacs package for OCaml programming
- Senior Software Engineer at Bloomberg. New York
- Upcoming Cmdliner 2.0 changes that need your attention
- Dune dev meeting
- New release of Monolith (20250314)
- dream_middleware_ext v0.1.0
- Learn Programming with OCaml (new book)
- Other OCaml News
- Old CWN
Upgrading Semgrep from OCaml 4 to OCaml 5 + dynamic_gc utility
Archive: https://discuss.ocaml.org/t/upgrading-semgrep-from-ocaml-4-to-ocaml-5-dynamic-gc-utility/16256/1
Nat Mote announced
I've written up my experience upgrading Semgrep to OCaml 5. The main barrier we faced was increased memory consumption, but I was able to tune the garbage collector to address this problem. We have also open-sourced the utility I wrote to adjust the space_overhead
GC parameter based on heap size. We are looking forward to taking advantage of all the great new features in OCaml 5!
Open source OCaml algotrading with longleaf 1.0.0
adventure announced
Recently, I have been working on a project called longleaf for algorithmic trading of US stocks with OCaml. The project has reached a point where it may be interesting to others, so I thought I would share it here and write a simple README, although there could be a lot more documentation. I would be curious to hear if anyone has any ideas for this! If you try to use it or have any feedback or questions, feel free to leave a post here, make a github issue, or make a github discussion.
In a nutshell, the idea is that strategies are functors that are instantiated with a "backend" for backtesting, live, or paper trading. That way, whether you are testing your strategy or running it live, it is exactly the same strategy other than how the execution of orders is handled. In order to use it, you will need to set up some accounts and there are likely bugs. Of course, if you use this program with real money and something bad happens, it is entirely your responsibility!
Neocaml - a TreeSitter-powered Emacs package for OCaml programming
Archive: https://discuss.ocaml.org/t/neocaml-a-treesitter-powered-emacs-package-for-ocaml-programming/16268/1
Bozhidar Batsov announced
In a different topics I wrote about about my recent work on neocaml, and I thought it might be a good idea to post something separately as well. Check out the project's GitHub repo and the short blog post.
Contributions and feedback are most welcome, and I hope neocaml
will be useful to some of you either a tool or as a source of inspiration.
Senior Software Engineer at Bloomberg. New York
Maxim Grankin announced
Hi everyone! 👋
Bloomberg is looking for a full-time Senior Software Engineer in New York:
- Gain experience applying functional programming to real production financial systems
- Use OCaml to develop a robust template system to assist users in creating a wide range of financial instruments across various asset classes
- Help shape the strategy for growth of OCaml at Bloomberg by contributing to the various OCaml infrastructure projects across the company
- Opportunity to learn some of the financial domain that's at the core of the extensive derivative functionality
Please see more details and/or apply at (Senior Software Engineer - Functional Programming).
Feel free to reach out to me directly by email (mgrankin@bloomberg.net) if you have any questions. Thank you!
Upcoming Cmdliner 2.0 changes that need your attention
Continuing this thread, Daniel Bünzli announced
Other changes you may want to pay attention to is that cmdliner 2.0 will:
- Remove deprecated identifiers.
- Make the
Arg.conv
type abstract[^1].
If you happen to be walking around your cmdliner
usage or making a new cli these days, pay particular attention to 2. as the concrete type has been deprecated since 2017 but sadly it was never possible to make it a visible deprecation (OCaml compiler help us! :man_bowing:).
Note that both 1. and 2. can be resolved now by using cmdliner.1.3.0, there are a few instructions here. It's no guaranteed, but if you are on opam
I may have filed an issue in your issue tracker :waving_hand:.
P.S. I think there's not a single occurence where I did not eventually regret making a public type concrete.
[^1]: So that completion behaviours can be defined at that level; aswell as the documentation metavariable which you could specify with Arg.conv
constructors for ages but would simply be dropped to return the concrete pair.
Dune dev meeting
Etienne Marais announced
Hi! The next Dune Dev Meeting will be on Wednesday, March, 19th at 16:00 CET. This is going to be a one-hour-long meeting.
Whether you are a maintainer, a regular contributor, a new joiner or just curious, you are welcome to join: these discussions are opened! The goal of these meetings is to provide a place to discuss the ongoing work together and synchronize with the Dune developers :+1:
The agenda is available on the meeting dedicated page. Feel free to add more items in it.
- Meeting link: zoom
- Calendar event: google calendar
- Wiki with information and previous notes: dune wiki on GitHub
New release of Monolith (20250314)
François Pottier announced
I am pleased to announce a new "Pi Day" release of Monolith.
Monolith is an OCaml library that helps perform black-box testing of OCaml libraries, either via purely random testing, or via grey-box fuzzing.
This new release adds new command-line options to the executable program that Monolith produces by default. Furthermore, it extends Monolith's API with a new function, run
, so the user can invoke Monolith's engine as part of their own application, without letting Monolith parse the command line. These improvements make it easier to use a Monolith-based test as part of a continuous integration (CI) system. Thanks to Gabriel Scherer for suggesting these improvements.
opam update opam install monolith.20250314
Happy testing!
dream_middleware_ext v0.1.0
Geoffrey Borough announced
A collection of middleware utilities for Dream framework, Initial release v0.1.0
Currently supporting the following functionalities:
CORS: Cross-Origin Resource Sharing
Delay: simulates delayed request
Rate Limiter: supports Fixed Window and Token Bucket algorithms
Traffic Filter: supports IP, header and cookie based traffic filters
Learn Programming with OCaml (new book)
Continuing this thread, Jean Christophe Filliatre announced
A preliminary EPUB version of the book is now available. Feedback is most welcome (preferably by submitting an issue here).
Big thanks to @Chet_Murthy who spent weeks working this out from our LaTeX sources.
Other OCaml News
From the ocaml.org blog
Here are links from many OCaml blogs aggregated at the ocaml.org blog.
Old CWN
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 to the caml-list.