Tim Lavoie
@tim_lavoie@cosocial.ca · Reply to Glyph's post
@tim_lavoie@cosocial.ca · Reply to Glyph's post
@brab@framapiaf.org
The #OCaml Weekly News for 2025-10-21 si out
@Jose_A_Alonso@mathstodon.xyz
Readings shared October 15, 2025. https://jaalonso.github.io/vestigium/posts/2025/10/16-readings_shared_10-15-25 #AI #CoqProver #FunctionalProgramming #Haskell #ITP #IsabelleHOL #LLMs #LeanProver #LiquidHaskell #Math #OCaml #Rocq
@Jose_A_Alonso@mathstodon.xyz
McTT: A verified kernel for a proof assistant. ~ Junyoung Jang, Antoine Gaulin, Jason Z. S. Hu, Brigitte Pientka. https://dl.acm.org/doi/10.1145/3747511 #ITP #Rocq #OCaml #FunctionalProgramming
@Jose_A_Alonso@mathstodon.xyz
Readings shared October 13, 2025. https://jaalonso.github.io/vestigium/posts/2025/10/14-readings_shared_10-13-25 #Agda #CoqProver #Erlang #FunctionalProgramming #Haskell #ITP #LeanProver #Math #OCaml #PVS #Programming #Python #Rocq
@Jose_A_Alonso@mathstodon.xyz
A tale of two lambdas: A haskeller’s journey into OCaml. ~ Richard A. Eisenberg. https://dl.acm.org/doi/10.1145/3759164.3771264 #Haskell #OCaml #FunctionalProgramming
@ocaml@mastodon.social
One year at Ahrefs: I started working at Ahrefs one year ago. When I applied I had heard of them from OCaml’s discuss amongst other OCaml community spaces and… https://tech.ahrefs.com/one-year-at-ahrefs-065167c61542?source=rss----303662d88bae--ocaml&utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlPlanet
@ocaml@mastodon.social
Ocsigen: A Full OCaml Framework for Websites and Apps: Discover the OCaml web development framework Ocsigen, from its origins to its many helpful features! https://tarides.com/blog/2025-10-02-ocsigen-a-full-ocaml-framework-for-websites-and-apps?utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlPlanet
@ocaml@mastodon.social
File descriptors as integers considered harmful: Continuing the previous foray into file descriptors, and trying to remove Obj.magic both from ocaml-uring’s code itself, and from the recommended way for using it. https://www.dra27.uk/blog/platform/2025/10/01/int-file-descriptors-considered-harmful.html?utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlPlanet
@ocaml@mastodon.social
File descriptors are not integers: There was a flurry of activity on ocaml-multicore/ocaml-uring this month leading to a release (ocaml/opam-repository#28604). ocaml-uring provides bindings to the Linux’s io_uring, which allows batching various syscalls to the kernel for it to execute out-of-order, and in parallel. Its principal use at the moment is for the high-performance Linux backend of Eio. https://www.dra27.uk/blog/platform/2025/09/30/file-descriptors-are-not-integers.html?utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlPlanet
@ocaml@mastodon.social
OCaml Security Team Established: OCaml Security Response Team Established
There is now a dedicated Security Response Team (SRT) to handle vulnerability reports and coordinate security responses. If you discover a security issue in the OCaml compiler, runtime, standard library, or ecosystem tools, you can report it confidentially to the team.
* Report vulnerabilities: Email security@ocaml.org or use a private GitHub issue for high-impact… https://ocaml.org/changelog/2025-10-03-security-team?utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlChangelog
@brab@framapiaf.org
The #OCaml Weekly News for 2025-09-23 is out
@ocaml@mastodon.social
Vulkan graphics in OCaml vs C: I convert my Vulkan test program from C to OCaml and compare the results,
then continue the Vulkan tutorial in OCaml, adding 3D, textures and depth buffering.
Table of Contents
* Introduction
* Running it yourself
* The direct port
* Labelled arguments
* Enums and bit-fields
* Optional fields
* Loading shaders
* Logging
* Error handling
* Refactored version
* Olivine wrappers… https://roscidus.com/blog/blog/2025/09/20/ocaml-vulkan/?utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlPlanet
@ocaml@mastodon.social
Auto-configuration of MirageOS unikernels: Removing tedious manual labor, use basic network protocols instead https://blog.robur.coop/articles/mollymawk-autoconfig.html?utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlPlanet
@ocaml@mastodon.social
OCaml Weekly News, 16 Sep 2025: * Dune dev meeting
* Dune 3.20
* OCaml compiler office hours? (preparation thread)
* Second beta release of OCaml 5.4.0
* Unicode 17.0.0 update for Uucd, Uucp, Uunf and Uuseg
* Scope Image File Viewer
* OCaml security team
* Testo 0.2.0 - test library with support for snapshots, parallel runs, xfails, timeouts
* tinyfiledialogs bindings
* RFC: ~for...in~ construct
* dead_code_analyzer 1.0.0
* Relocatable… https://alan.petitepomme.net/cwn/2025.09.16.html?utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlPlanet
@ocaml@mastodon.social
Relocatable OCaml - from concept to demo to PRs: If you give vapourware long enough, it condenses into an actual ware! An idea hatched between rehearsing Handel arias in the outskirts of Munich just over six years ago to make running OCaml’s programs a little less surprising is now 132 commits of reality.
Relocatable OCaml started out as a solution to a few thorny problems with the darker corners of OCaml. The somewhat grander fast opam switches… https://www.dra27.uk/blog/platform/2025/09/15/relocatable-ocaml.html?utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlPlanet
@ocaml@mastodon.social
Shipping a robust DB migration runner for Chaufr (OCaml + Caqti + Lwt): Implemented a production-minded database migration system for Chaufr: CLI, tracking, checksum validation, rollback, and safe SQL execution. https://fearful-odds.rocks/blog/db-migration-runner-for-chaufr?utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlPlanet
@hannes@social.coop
I know we're late to the party, but finally https://ocaml.org/security is alive #OCaml #security -- so please share your exploits now :) or at least know a way to report the segmentation faults you encounter ;)
@ocaml@mastodon.social
Dynamic Formal Verification in OCaml: An Ortac/QCheck-STM Tutorial: You may have read our recent post discussing our involvement in the Gospel Project. In today's follow-up post, we will focus on Ortac, a tool we have been developing at Tarides as part of the Gospel Project.
What is Ortac?
Ortac aims to give OCaml programmers easy access to dynamic formal verification, also known as specification-driven testing. At its core, it translates… https://tarides.com/blog/2025-09-10-dynamic-formal-verification-in-ocaml-an-ortac-qcheck-stm-tutorial?utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlPlanet
@brab@framapiaf.org
The #OCaml Weekly News for 2025-09-09 is out
@ocaml@mastodon.social
Giving hub.cl an upgrade: Giving hub.cl an upgrade
* published
2025-09-07
For a few years now we've been running hub.cl.cam.ac.uk, a Jupyterhub instance, for the first year course "Foundations of Computer Science". It serves as a hosting site for the lecture notes, which come in the form of Jupyter notebooks, and as a playground where students can try OCaml, and it also is used to run the assessed exercises that are a mandatory part… https://jon.recoil.org/blog/2025/09/giving-hub-cl-an-upgrade.html?utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlPlanet
@ocaml@mastodon.social
Using ocaml-lsp-server via an MCP server: Using ocaml-lsp-server via an MCP server
* published
2025-08-27
* notanotebook
Here's a quick post on how to get the OCaml Language Server (ocaml-lsp-server) working with an MCP server.
We're going to use issacphi's adapter for LSP servers, which is written in go. So install go, and then:
Once that's done, make sure you've got `ocaml-lsp-server` installed in your switch:
Then add the MCP… https://jon.recoil.org/blog/2025/08/ocaml-lsp-mcp.html?utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlPlanet
@ocaml@mastodon.social
Rust for Everyone!: Rust promises to empower everyone to build reliable software, but its unique features create steep learning curves. In this talk, Will Crichton presents four years of research into evidence-based tools that help both novices and experts work more effectively with Rust's complexity, including:
- Ownership visualization: Interactive diagrams showing permissions (read/write/own) that help students understand borrowing better than… https://www.youtube.com/watch/R0dP-QR5wQo?version=3&utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlPlanet
@opencage@en.osm.town
🎉 Two new SDKs to announce for our geocoding API: OCaml and Racket both written by our friend Rome Stone 🙌
Blog post: https://blog.opencagedata.com/post/ocaml-and-racketlang-sdks-for-the-opencage-geocoding-api
and with that we now have more than 40 different SDKs for you to chose from to make your geocoding as simple as possible. See the full list:
https://opencagedata.com/sdks
@ocaml@mastodon.social
Privacy for DNSvizor: The NGI-funded DNSvizor provides core network services on your network; DNS resolution and DHCP. We improved the privacy. https://blog.robur.coop/articles/dnsvizor06.html?utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlPlanet
@ocaml@mastodon.social
Privacy for DNSvizor: The NGI-funded DNSvizor provides core network services on your network; DNS resolution and DHCP. We improved the privacy. https://blog.robur.coop/articles/dnsvizor06.html?utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlPlanet
@ocaml@mastodon.social
Privacy for DNSvizor: The NGI-funded DNSvizor provides core network services on your network; DNS resolution and DHCP. We improved the privacy. https://blog.robur.coop/articles/dnsvizor06.html?utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlPlanet
@ocaml@mastodon.social
Week 33: Week 33
* published
2025-08-19
* libs
cohttp yojson jsonm
More work this week on the OCaml MCP server. Sadiq and I met before I went away on holiday and discussed the next steps to 'park' the work on the MCP server. The final steps are:
* Write a README
* Write and run a small script to fix a problem with module-type names
* Write up and publish a blog post
Not much, right? As always though, writing things up lead to… https://jon.recoil.org/blog/2025/08/week33.html?utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlPlanet
@ocaml@mastodon.social
Week 33: Week 33
* published
2025-08-19
* libs
cohttp yojson jsonm
More work this week on the OCaml MCP server. Sadiq and I met before I went away on holiday and discussed the next steps to 'park' the work on the MCP server. The final steps are:
* Write a README
* Write and run a small script to fix a problem with module-type names
* Write up and publish a blog post
Not much, right? As always though, writing things up lead to… https://jon.recoil.org/blog/2025/08/week33.html?utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlPlanet
@brab@framapiaf.org
The #OCaml Weekly News for 2025-08-19 is out
@xvw@merveilles.town
Here is a rather lengthy write-up (in English) explaining why I chose #OCaml as my main programming language for my personal and professional projects!
https://xvw.lol/en/articles/why-ocaml.html
I hope you find this interesting, and I welcome any feedback!
@xvw@merveilles.town
Here is a rather lengthy write-up (in English) explaining why I chose #OCaml as my main programming language for my personal and professional projects!
https://xvw.lol/en/articles/why-ocaml.html
I hope you find this interesting, and I welcome any feedback!
@Jose_A_Alonso@mathstodon.xyz
Readings shared August 10, 2025. https://jaalonso.github.io/vestigium/posts/2025/08/11-readings_shared_08-10-25 #Agda #CategoryTheory #CoqProver #FunctionalProgramming #Haskell #ITP #IsabelleHOL #Math #OCaml
@Jose_A_Alonso@mathstodon.xyz
@ocaml@mastodon.social
Upcoming OCaml Events: * OCaml Users and Developers Workshop 2025 // Singapore, Singapore // Oct 17, 2025 https://ocaml.org/events?utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlPlanet
@abnv@fantastic.earth
I've got to learn this "weird French programming language that no other company uses" used by this one company named Jane Street so that no other companies will hire their employees. #ocaml
@abnv@fantastic.earth
I've got to learn this "weird French programming language that no other company uses" used by this one company named Jane Street so that no other companies will hire their employees. #ocaml
@tealeg@mastodon.online · Reply to Shriram Krishnamurthi's post
@shriramk Yeah.. #JaneStreet is the #OCaml company, and #Nubank is the #Clojure company. I need to takeover some FinTech and make it the #Racket company, though that might lead to some awkward audit questions ("What's this Racket you're involved in?") .
FWIW, #upvest is very much a #go company, and for good reasons. ;-)
@linux_mclinuxface@fosstodon.org
Is there an #OCaml community on the Fediverse?
I dipped my toes into the language 6-ish years ago and I'm revisiting it now. The curve then was pretty steep, but now going through the initial tutorial there are only a few giant leaps required.
I can't tell if a) I'm unearthing internalized but lost understanding, b) I've grown used to the concepts through other languages in the meantime or c) the info got better.
@linux_mclinuxface@fosstodon.org
Is there an #OCaml community on the Fediverse?
I dipped my toes into the language 6-ish years ago and I'm revisiting it now. The curve then was pretty steep, but now going through the initial tutorial there are only a few giant leaps required.
I can't tell if a) I'm unearthing internalized but lost understanding, b) I've grown used to the concepts through other languages in the meantime or c) the info got better.
@ocaml@mastodon.social
OCaml Weekly News, 24 Jun 2025: * Multi-domain, multi-scheduler Lwt
* 15th MirageOS retreat May 13th - 20th
* opam 2.4.0~beta1
* ML Family Workshop 2025: Call for Presentations
* Migrating OCaml.org to Use Dune (Developer Preview)
* Send us Talk and Workshop Proposals for Fun OCaml 2025 in Warsaw, September 15+16
* A Brief Introduction to Normalization-By-Evaluation
* My Second Outreachy Internship's Blog Post
* Other OCaml News https://alan.petitepomme.net/cwn/2025.06.24.html?utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlPlanet
@ocaml@mastodon.social
A hardware description language using OCaml effects: A hardware description language using OCaml effects
This is an idea proposed in 2025 as a Cambridge Computer Science Part III or MPhil project, and is available for being worked on. It may be co-supervised with KC Sivaramakrishnan and Andy Ray.
Programming FPGAs using functional programming languages is a very good fit for
the problem domain. OCaml has the HardCaml ecosystem to
express… https://anil.recoil.org/ideas/tracing-hdl-with-effects?utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlPlanet
@ocaml@mastodon.social
A hardware description language using OCaml effects: A hardware description language using OCaml effects
This is an idea proposed in 2025 as a Cambridge Computer Science Part III or MPhil project, and is available for being worked on. It may be co-supervised with KC Sivaramakrishnan and Andy Ray.
Programming FPGAs using functional programming languages is a very good fit for
the problem domain. OCaml has the HardCaml ecosystem to
express… https://anil.recoil.org/ideas/tracing-hdl-with-effects?utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlPlanet
@ocaml@mastodon.social
A hardware description language using OCaml effects: A hardware description language using OCaml effects
This is an idea proposed in 2025 as a Cambridge Computer Science Part III or MPhil project, and is available for being worked on. It may be co-supervised with KC Sivaramakrishnan and Andy Ray.
Programming FPGAs using functional programming languages is a very good fit for
the problem domain. OCaml has the HardCaml ecosystem to
express… https://anil.recoil.org/ideas/tracing-hdl-with-effects?utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlPlanet
@Jose_A_Alonso@mathstodon.xyz
Readings shared May 14, 2025. https://jaalonso.github.io/vestigium/posts/2025/05/14-readings_shared_05-14-25 #Arend #CategoryTheory #ITP #LLMs #LeanProver #OCaml #Rocq
@Jose_A_Alonso@mathstodon.xyz
Verified purely functional catenable real-time deques. ~ Jules Viennot, Arthur Wendling, Armaël Guéneau, François Pottier. https://arxiv.org/abs/2505.07681 #ITP #Rocq #OCaml
@ocaml@mastodon.social
Tarides at BOB Konferenz 2025: BOB Konferenz is a 10-year-old
conference whose tagline is: "The software development
conference for everyone dissatisfied with the status quo"! Indeed,
BOB is a conference that focusses on a variety of subjects that
strongly converge with the interests of Tarides (and the OCaml world
in general). It aims to cover topics such as functional programming,
"fancy types" (dependent types, gradual typing, linear types, ...),… https://tarides.com/blog/2025-05-08-tarides-at-bob-konferenz-2025?utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlPlanet
@aj@id1.in
Come join us for another day of geeking out over functional programming! The FPIndia May meetup is here!
https://hasgeek.com/fpindia/bangalore-fp-may-meetup/
#Bangalore #FunctionalProgramming #FPIndia #Meetup #India #Haskell #PureScript #OCaml #Elixir #Clojure #Scala
@aj@id1.in
Come join us for another day of geeking out over functional programming! The FPIndia May meetup is here!
https://hasgeek.com/fpindia/bangalore-fp-may-meetup/
#Bangalore #FunctionalProgramming #FPIndia #Meetup #India #Haskell #PureScript #OCaml #Elixir #Clojure #Scala
@aj@id1.in
Is there any org in #Bangalore that would like to lend their space for an #FPIndia meetup? Please dm
#India #FunctionalProgramming #Meetup #Haskell #PureScript #Erlang #Elixir #OCaml #Scala #Clojure
@aj@id1.in
Is there any org in #Bangalore that would like to lend their space for an #FPIndia meetup? Please dm
#India #FunctionalProgramming #Meetup #Haskell #PureScript #Erlang #Elixir #OCaml #Scala #Clojure
@ocaml@mastodon.social
Bstr, a synthetic library for bigstrings: A small library to manipulate bstr https://blog.osau.re/articles/bstr.html?utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlPlanet
@sanityinc@hachyderm.io
As a fan of both #ocaml and @gasproni, I enjoyed this podcast.
https://mastodon.social/@gasproni/114393113911624949
@compsci_discussions@mastodon.social
Roguetype: The first ever roguelike written in the OCaml type system
https://github.com/Octachron/roguetype
Discussions: https://discu.eu/q/https://github.com/Octachron/roguetype
@hannesm@mastodon.social
Meet Mollymawk, our web UI for orchestrating #MirageOS unikernels, funded by NLnet @NGIZero https://blog.robur.coop/articles/mollymawk-first-milestone.html #OCaml #unikernel
@hannesm@mastodon.social
Meet Mollymawk, our web UI for orchestrating #MirageOS unikernels, funded by NLnet @NGIZero https://blog.robur.coop/articles/mollymawk-first-milestone.html #OCaml #unikernel
@aj@id1.in
Ready to geek out over functional programming? Join us for the upcoming FPIndia Bangalore meetup!
https://hasgeek.com/fpindia/bangalore-fp-april-meetup/
#Bangalore #FunctionalProgramming #FPIndia #Meetup #India #Haskell #PureScript #OCaml #Elixir #Clojure #Scala
@compsci_discussions@mastodon.social
Roguetype: The first ever roguelike written in the OCaml type system
https://github.com/Octachron/roguetype
Discussions: https://discu.eu/q/https://github.com/Octachron/roguetype
@ocaml@mastodon.social
Pushing the opam-repository into a sustainable repository: The main opam-repository was only ever growing by collecting all releases of all packages. We worked hard on reducing the load for all clients by archiving packages. https://blog.robur.coop/articles/2025-03-26-opam-repository-archive.html?utm_source=dlvr.it&utm_medium=mastodon #OCaml #OCamlPlanet
@hannesm@mastodon.social
Dear everyone, we just published an article on our #opam-repository archival work https://blog.robur.coop/articles/2025-03-26-opam-repository-archive.html
Happy reading #OCaml #opam #sustainability
@ELLIOTTCABLE@functional.cafe
Hi! New instance, new pinned post.
Send me cool people to follow (or introduce yourself!)
- leftists
- functional programmers, 'spcly #OCaml folks
- #Queer mfers, #BDSM, or #polyamory
- fans of #SystemicGames (#Factorio, #RimWorld, and the like)
come @ me 
@dinosaure@mastodon.social
I'm really glad to share my last work about μTCP, #unikernels, effects and #OCaml 5. I talk about TCP/IP, #GADTs, and some useful data-structures. https://blog.robur.coop/articles/utcp_and_effects.html

@hongminhee@hollo.social
Just what the internet needed: another attempt to explain #monads! 🙄 But this time I'm comparing #Haskell and #OCaml approaches to show why #typeclasses make all the difference. Turns out those JavaScript Promise analogies only tell half the story…
@hongminhee@hackers.pub
While exploring functional programming languages, I've been reflecting on how different communities approach similar concepts. One pattern that seems particularly fascinating is how Haskell and OCaml communities differ in their embrace of monads as an abstraction tool.
It's common to hear monads explained through analogies to concepts like JavaScript's Promise or jQuery chains. While these comparisons provide an entry point, they might miss what makes monads truly beautiful and powerful in Haskell's ecosystem.
The real strength appears to lie in the Monad typeclass itself. This elegant abstraction allows for creating generic functions and types that work with any type that shares the monad property. This seems to offer a profound unification of concepts that might initially appear unrelated:
Maybe, [], IO, State, etc.)sequence, mapM, and others become available across all monadic typesFor example, a simple conditional function like this works beautifully in any monadic context:
whenM :: Monad m => m Bool -> m () -> m ()
whenM condition action = do
result <- condition
if result then action else return ()
Whether dealing with potentially missing values, asynchronous operations, or state transformations, the same function can be employed without modification. There's something genuinely satisfying about this level of abstraction and reuse.
Interestingly, the OCaml community seems less enthusiastic about monads as a primary abstraction tool. This might stem from several factors related to language design:
OCaml lacks built-in typeclass support, relying instead on its module system and functors. While powerful in its own right, this approach might not make monad abstractions feel as natural or convenient:
(* OCaml monad implementation requires more boilerplate *)
module type MONAD = sig
type 'a t
val return : 'a -> 'a t
val bind : 'a t -> ('a -> 'b t) -> 'b t
end
module OptionMonad : MONAD with type 'a t = 'a option = struct
type 'a t = 'a option
let return x = Some x
let bind m f = match m with
| None -> None
| Some x -> f x
end
OCaml also doesn't offer syntactic sugar like Haskell's do notation, which makes monadic code in Haskell considerably more readable and expressive:
-- Haskell's elegant do notation
userInfo = do
name <- getLine
age <- readLn
return (name, age)
Compared to the more verbose OCaml equivalent:
let user_info =
get_line >>= fun name ->
read_ln >>= fun age ->
return (name, age)
The readability difference becomes even more pronounced in more complex monadic operations.
Beyond syntax, the languages differ in their fundamental approach to effects:
This allows OCaml programmers to write more direct code when appropriate:
(* Direct style in OCaml *)
let get_user_info () =
print_string "Name: ";
let name = read_line () in
print_string "Age: ";
let age = int_of_string (read_line ()) in
(name, age)
OCaml's approach might favor pragmatism and directness in many cases, with programmers often preferring:
option and result typesWhile this directness can be beneficial for immediate readability, it might come at the cost of some of the elegant uniformity that Haskell's monadic approach provides.
These differences highlight how programming language design shapes the idioms and patterns that emerge within their communities. Neither approach is objectively superior—they represent different philosophies about abstraction, explicitness, and the role of the type system.
Haskell's approach encourages a high level of abstraction and consistency across different computational contexts, which can feel particularly satisfying when working with complex, interconnected systems. There's something intellectually pleasing about solving a problem once and having that solution generalize across many contexts.
OCaml often favors more direct solutions that might be easier to reason about locally, though potentially at the cost of less uniformity across the codebase. This approach has its own virtues, particularly for systems where immediate comprehensibility is paramount.
After working with both paradigms, I find myself drawn to the consistent abstractions that Haskell's approach provides, while still appreciating the pragmatic clarity that OCaml can offer in certain situations. The typeclasses and syntactic support in Haskell seem to unlock a particularly elegant way of structuring code that, while perhaps requiring a steeper initial learning curve, offers a uniquely satisfying programming experience.
What patterns have you noticed in how different programming language communities approach similar problems? And have you found yourself drawn to the elegant abstractions of Haskell or the pragmatic approach of OCaml?

@hongminhee@hollo.social
Just what the internet needed: another attempt to explain #monads! 🙄 But this time I'm comparing #Haskell and #OCaml approaches to show why #typeclasses make all the difference. Turns out those JavaScript Promise analogies only tell half the story…
@hongminhee@hackers.pub
While exploring functional programming languages, I've been reflecting on how different communities approach similar concepts. One pattern that seems particularly fascinating is how Haskell and OCaml communities differ in their embrace of monads as an abstraction tool.
It's common to hear monads explained through analogies to concepts like JavaScript's Promise or jQuery chains. While these comparisons provide an entry point, they might miss what makes monads truly beautiful and powerful in Haskell's ecosystem.
The real strength appears to lie in the Monad typeclass itself. This elegant abstraction allows for creating generic functions and types that work with any type that shares the monad property. This seems to offer a profound unification of concepts that might initially appear unrelated:
Maybe, [], IO, State, etc.)sequence, mapM, and others become available across all monadic typesFor example, a simple conditional function like this works beautifully in any monadic context:
whenM :: Monad m => m Bool -> m () -> m ()
whenM condition action = do
result <- condition
if result then action else return ()
Whether dealing with potentially missing values, asynchronous operations, or state transformations, the same function can be employed without modification. There's something genuinely satisfying about this level of abstraction and reuse.
Interestingly, the OCaml community seems less enthusiastic about monads as a primary abstraction tool. This might stem from several factors related to language design:
OCaml lacks built-in typeclass support, relying instead on its module system and functors. While powerful in its own right, this approach might not make monad abstractions feel as natural or convenient:
(* OCaml monad implementation requires more boilerplate *)
module type MONAD = sig
type 'a t
val return : 'a -> 'a t
val bind : 'a t -> ('a -> 'b t) -> 'b t
end
module OptionMonad : MONAD with type 'a t = 'a option = struct
type 'a t = 'a option
let return x = Some x
let bind m f = match m with
| None -> None
| Some x -> f x
end
OCaml also doesn't offer syntactic sugar like Haskell's do notation, which makes monadic code in Haskell considerably more readable and expressive:
-- Haskell's elegant do notation
userInfo = do
name <- getLine
age <- readLn
return (name, age)
Compared to the more verbose OCaml equivalent:
let user_info =
get_line >>= fun name ->
read_ln >>= fun age ->
return (name, age)
The readability difference becomes even more pronounced in more complex monadic operations.
Beyond syntax, the languages differ in their fundamental approach to effects:
This allows OCaml programmers to write more direct code when appropriate:
(* Direct style in OCaml *)
let get_user_info () =
print_string "Name: ";
let name = read_line () in
print_string "Age: ";
let age = int_of_string (read_line ()) in
(name, age)
OCaml's approach might favor pragmatism and directness in many cases, with programmers often preferring:
option and result typesWhile this directness can be beneficial for immediate readability, it might come at the cost of some of the elegant uniformity that Haskell's monadic approach provides.
These differences highlight how programming language design shapes the idioms and patterns that emerge within their communities. Neither approach is objectively superior—they represent different philosophies about abstraction, explicitness, and the role of the type system.
Haskell's approach encourages a high level of abstraction and consistency across different computational contexts, which can feel particularly satisfying when working with complex, interconnected systems. There's something intellectually pleasing about solving a problem once and having that solution generalize across many contexts.
OCaml often favors more direct solutions that might be easier to reason about locally, though potentially at the cost of less uniformity across the codebase. This approach has its own virtues, particularly for systems where immediate comprehensibility is paramount.
After working with both paradigms, I find myself drawn to the consistent abstractions that Haskell's approach provides, while still appreciating the pragmatic clarity that OCaml can offer in certain situations. The typeclasses and syntactic support in Haskell seem to unlock a particularly elegant way of structuring code that, while perhaps requiring a steeper initial learning curve, offers a uniquely satisfying programming experience.
What patterns have you noticed in how different programming language communities approach similar problems? And have you found yourself drawn to the elegant abstractions of Haskell or the pragmatic approach of OCaml?

@hongminhee@hollo.social
Just what the internet needed: another attempt to explain #monads! 🙄 But this time I'm comparing #Haskell and #OCaml approaches to show why #typeclasses make all the difference. Turns out those JavaScript Promise analogies only tell half the story…
@hongminhee@hackers.pub
While exploring functional programming languages, I've been reflecting on how different communities approach similar concepts. One pattern that seems particularly fascinating is how Haskell and OCaml communities differ in their embrace of monads as an abstraction tool.
It's common to hear monads explained through analogies to concepts like JavaScript's Promise or jQuery chains. While these comparisons provide an entry point, they might miss what makes monads truly beautiful and powerful in Haskell's ecosystem.
The real strength appears to lie in the Monad typeclass itself. This elegant abstraction allows for creating generic functions and types that work with any type that shares the monad property. This seems to offer a profound unification of concepts that might initially appear unrelated:
Maybe, [], IO, State, etc.)sequence, mapM, and others become available across all monadic typesFor example, a simple conditional function like this works beautifully in any monadic context:
whenM :: Monad m => m Bool -> m () -> m ()
whenM condition action = do
result <- condition
if result then action else return ()
Whether dealing with potentially missing values, asynchronous operations, or state transformations, the same function can be employed without modification. There's something genuinely satisfying about this level of abstraction and reuse.
Interestingly, the OCaml community seems less enthusiastic about monads as a primary abstraction tool. This might stem from several factors related to language design:
OCaml lacks built-in typeclass support, relying instead on its module system and functors. While powerful in its own right, this approach might not make monad abstractions feel as natural or convenient:
(* OCaml monad implementation requires more boilerplate *)
module type MONAD = sig
type 'a t
val return : 'a -> 'a t
val bind : 'a t -> ('a -> 'b t) -> 'b t
end
module OptionMonad : MONAD with type 'a t = 'a option = struct
type 'a t = 'a option
let return x = Some x
let bind m f = match m with
| None -> None
| Some x -> f x
end
OCaml also doesn't offer syntactic sugar like Haskell's do notation, which makes monadic code in Haskell considerably more readable and expressive:
-- Haskell's elegant do notation
userInfo = do
name <- getLine
age <- readLn
return (name, age)
Compared to the more verbose OCaml equivalent:
let user_info =
get_line >>= fun name ->
read_ln >>= fun age ->
return (name, age)
The readability difference becomes even more pronounced in more complex monadic operations.
Beyond syntax, the languages differ in their fundamental approach to effects:
This allows OCaml programmers to write more direct code when appropriate:
(* Direct style in OCaml *)
let get_user_info () =
print_string "Name: ";
let name = read_line () in
print_string "Age: ";
let age = int_of_string (read_line ()) in
(name, age)
OCaml's approach might favor pragmatism and directness in many cases, with programmers often preferring:
option and result typesWhile this directness can be beneficial for immediate readability, it might come at the cost of some of the elegant uniformity that Haskell's monadic approach provides.
These differences highlight how programming language design shapes the idioms and patterns that emerge within their communities. Neither approach is objectively superior—they represent different philosophies about abstraction, explicitness, and the role of the type system.
Haskell's approach encourages a high level of abstraction and consistency across different computational contexts, which can feel particularly satisfying when working with complex, interconnected systems. There's something intellectually pleasing about solving a problem once and having that solution generalize across many contexts.
OCaml often favors more direct solutions that might be easier to reason about locally, though potentially at the cost of less uniformity across the codebase. This approach has its own virtues, particularly for systems where immediate comprehensibility is paramount.
After working with both paradigms, I find myself drawn to the consistent abstractions that Haskell's approach provides, while still appreciating the pragmatic clarity that OCaml can offer in certain situations. The typeclasses and syntactic support in Haskell seem to unlock a particularly elegant way of structuring code that, while perhaps requiring a steeper initial learning curve, offers a uniquely satisfying programming experience.
What patterns have you noticed in how different programming language communities approach similar problems? And have you found yourself drawn to the elegant abstractions of Haskell or the pragmatic approach of OCaml?
@Jose_A_Alonso@mathstodon.xyz
Readings shared February 21, 2025. https://jaalonso.github.io/vestigium/posts/2025/02/21-readings_shared_02-21-25 #AI #Autoformalization #Coq #FunctionalProgramming #ITP #IsabelleHOL #LLMs #LeanProver #Math #OCaml #Rocq
@Jose_A_Alonso@mathstodon.xyz
Learn programming with OCaml (Algorithms and data structures). ~ Sylvain Conchon, Jean-Christophe Filliâtre. https://usr.lmf.cnrs.fr/lpo/lpo.pdf #OCaml #FunctionalProgramming
@haskell_discussions@mastodon.social
Porting PFP from Haskell to OCaml
https://github.com/lewis-carson/PFPCaml
Discussions: https://discu.eu/q/https://github.com/lewis-carson/PFPCaml
@Jose_A_Alonso@mathstodon.xyz
Readings shared January 3, 2025. https://jaalonso.github.io/vestigium/posts/2025/01/03-readings_shared_01-03-25 #ITP #Lean4 #IsabelleHOL #Coq #Rocq #Math #FunctionalProgramming #OCaml #Haskell #Python #AI #MachineLearning
@Jose_A_Alonso@mathstodon.xyz
Typechecking of overloading in programming languages and mechanized mathematics. ~ Arthur Charguéraud, Martin Bodin, Louis Riboulet. https://inria.hal.science/hal-04859446/document #OCaml #FunctionalProgramming
@Jose_A_Alonso@mathstodon.xyz
Storable types: free, absorbing, custom. ~ Basile Clément, Camille Noûs, Gabriel Scherer. https://inria.hal.science/hal-04859464/file/jfla2025-final54.pdf #OCaml #FunctionalProgramming
@hannesm@mastodon.social
We just published our funding structure and detailed income since the beginning of robur -- https://blog.robur.coop/articles/finances.html #cooperative #mirageos #ocaml #money #transparency -- and why we're doing what we're doing. :)
@soupglasses@hachyderm.io
Heyo!
My name is Sofie, and I love building things so it is nicer and easier to use!
I touch on subjects such as #nixos, #sysadmin, and how to generally make your life easier running servers.
I also love trying out a lot of different programming languages, big ones being #Rust, #Ocaml, and #Ruby right now!
My current pet project is https://github.com/imsofi/phenix
In my free time I also enjoy #boardgames and #radiocontrol.
Good to see you! :ablobfoxbongo:
@AssertionError@types.pl
Hi types.pl,
I am a computer scientist interested in #verification, concurrency theory applied to parallel systems.
My main research project deals with verifying safety and performance properties of #CUDA kernels.
I write code for research mainly in #OCaml and #Coq.
I am passionate about teaching. I am currently using Racket to teach functional programming and Coq to teach Intro to Theory of Computation.
I use this to share my own research findings, papers I like, and software that I find fun.
PS: I just migrated from mathstodon.xyz and I think I lost my posts.
@league@scholar.social
Reactivating — Hello! I’m into:
• Functional programming, especially #haskell, #ocaml, #elmlang, #purescript
• Proof systems & software correctness tools #coq, #idris, #agda, #rustlang
• Scientific data acquisition & analysis, #gpu frameworks
• Reproducible builds, #nixos, #nixpkgs
• Non-traditional families (#queer, interracial)
• #ADHD strategies & other #neurodivergent perspectives
• Black natural hair care, for Ms. 7yo
• #Classical & electronic music, dabbling at piano as a busy adult
@yomimono@wandering.shop
> ./masto.sh
>>> Welcome back to Mastodon!
>>> You are [yomimono]. You are in some sort of wandering shop.
>>> Behind you is a weirder earth (closed), just beyond which is a famous town of witches (also closed).
> inventory
>>> You have:
>>> a computer
>>> regrets
> order coffee
>>> ☕
> program computer
>>> You make a #unikernel in #ocaml using #mirageos .
> program computer
>>> You work on a #secretProject ! it involves #crossStitch and #embroidery.
> look cat
>>> which #cat?
> ALL