Hello OCAML people!
I am wondering, is there a resource describing the history of Ocaml tooling, or would somebody mind describing that history?
My background is mostly self taught Python and data engineering, but I am really enjoying playing around with OCAML. I am trying to both learn the language and also learn some fundamentals of functional programming. I have played around with some Ruby, elisp, Go, and Zig, but OCAML has kind of clicked for me in a great way, though I must admit I am perhaps not super productive with it. I generally feel like I don’t have a great understanding of typing, async, compilers, preprocessors, algorithms, or other functional concepts.
I am definitely in tutorial hell, and many of the books, videos, and blogposts which I’ve encountered have a lot of different tooling chains, and I’m doing my best to learn the ecosystem. I apologize for an incredibly broad and open ended question, but I’m interested to ask if anybody can help me summarize some of the tooling, or check my understanding here.
Build systems and packages - OPAM, Dune, lower level compiler libraries - My understanding is that OPAM is the de facto package manager and Dune is a project management dependency and build tool. I don’t really understand how package management worked before these tools existed. It seems like pretty much everybody is using Dune.
Database - PG’Ocaml seems like a lower level library than I’ve used before. Caqti seems closer to an ORM, or tooling which I’ve used in Python, particularly when used in tandem with ppx-wrapper. I don’t think Caqti is considered a proper ORM, but I’m not sure then what exactly it is, or what would qualify something as a fully fledged ORM. Generally speaking, I’ve had a very hard time interacting with databases, but I continue chugging along. I don’t mind using raw SQL at all. What are the advantages of lower level database systems?
Utop - runtime environment and interpreter. I don’t really understand how this works “behind the scenes". Is it compiling commands as it runs?
Merlin, ocaml-lsp-server, tree-sitter-ocaml - I generally understand LSP architecture and how treesitter functions. I don’t understand the history of these toolings and what stack people are using in their editors.
Web Frameworks - I have primarily used Dream. I know that Dream is based on Opium, but I do not know what Dream offers that Opium does not. I am pretty amazed by what I’ve seen from the Ocsigen ecosystem, although I found Ocsigen-start difficult to set up. Coming from Python, I naturally have a deep rooted fear of JS frameworks and tooling, and I love the architecture of htmx, and generally prefer server side rendering for its simplicity.
Async - It seems like most projects are still using lwt for async, but many are interested in or switching to eio. I do not really understand what the distinction is.
PPX - I don’t have much experience with metaprogramming other than a rudimentary understanding of Lisp macros. It took me a minute to understand metaprogramming in terms of preprocessors, but I think I understand at a basic level how these work, and I’m amazed at what people have developed particularly as it relates to generating JavaScript. Melange and js_of_ocaml are very interesting, but I don’t understand the advantages and disadvantages of each library or when they are used. I don’t know what other languages use ppx-type systems, and I don’t understand what is unique about OCAML preprocessing that has allowed such an amazing ecosystem to thrive here.
Match statements - I understand them as a sort of high powered if - elif syntax, but I have seen allusions to suggest they are much more powerful than this, and I do not understand how.
Sorry for dumping a wall of text, and for not really asking any clear questions. Please let me know if my understanding is off, or if you have suggestions for ways that I can further explore topics. I am continuing to try and build out little apps, and understand the lambda calculus. Thank you!


