Posted in 2017
Extension Points - 3 Years Later
- 04 December 2017
UPDATE: 2017-12-05 smondet pointed out that the extension doesn’t work quite as the original. ppx_getenv should fetch the environment variable at compile time rather than at runtime. The extension and the snippets in this post have been updated to reflect this.
Creating Static Linux Binaries in OCaml
- 03 November 2017
Creating truly static binaries for Linux like golang is a capability that is occasionally useful. I’ve seen questions about it on IRC a few times, and I’ve personally found this approach is particularly useful when deploying to environments where installing libraries isn’t easy, such as AWS Lambda. Unfortunately for me, the approach that I will explain in this article wasn’t as approachable. So I’ve prepared a quick tutorial on how to easily create a static binary in OCaml and test it.
Monadic Generators in OCaml
- 25 July 2017
Generators are one of those features that have been heavily popularized by today’s fashionable languages such as Python and ES6. So it’s not the first time I’ve encountered programmers who are curious about OCaml bring up with questions along the lines of:
Cohttp Packaging Breakage Ahead
- 14 May 2017
As a follow up to my previous post regarding optional dependencies, I’d like to expand on how my advice will be followed in practice in the context of the cohttp library.
Optional Dependencies Considered Harmful
- 22 April 2017
This will be a short PSA to opam package maintainers to avoid spurious optional dependencies. At this point, I think this is all relatively common knowledge. But open source maintainers are as a rule busy people, and without much encouragement, they end up dragging their feet. Therefore I hope this post can be a useful reminder of the negative effects of optional dependencies and what can be done to avoid them.
Searching the load-path
- 06 February 2017
Here’s another tip for taming your Emacs config. In particular, how to search
the huge body of elisp that is present with most Emacs installs - the
load-path
. While the load-path
is a very important collection of
directories, searching it isn’t as easy and accessible as it should be. As
usual, Emacs compensates with plugins:
Spacemacs Useful Buffers Gotcha
- 14 January 2017
I’ve ran into a little spacemacs annoyance that took me a while to resolve, and it seems like it could pop up under a variety of different contexts. I figured that a few words about it here might save others some time.