Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    O

    OCamlPro Blog

    ocamlpro.com · Company blog · on HN since 2011

    OCamlPro is a company of OCaml specialists whose blog covers the language, compiler internals, garbage collection and tooling.

    Visit blogHN submissions
    Languages & CompilersProgrammingOpen Source & Linux
    What HN says

    HN commenters link it for the OCaml type-system Sudoku solver, the language cheatsheet, and its experience moving COBOL projects to GnuCOBOL.

    Stats for nerds
    30HN people shared it
    37linked in comments
    633story points
    Aug 2024last shared
    2014people per year2024

    Top posts on HN

    1. 1
      An in-depth look at OCaml’s new “best-fit” garbage collector strategy
      1 person · 176 points · first shared 2020 · 41 comments on HN
    2. 2
      A look back on OCaml since 2011
      2 people · 131 points · first shared 2019 · 28 comments on HN
    3. 3
      2021 at OCamlPro
      1 person · 104 points · first shared 2022 · 23 comments on HN
    4. 4
      2020 at OCamlPro
      1 person · 60 points · first shared 2021 · 9 comments on HN
    5. 5
      Flambda2 Ep. 2: Loopifying Tail-Recursive Functions
      1 person · 51 points · first shared 2024 · 7 comments on HN
    6. 6
      New Ocaml Cheat Sheets from OcamlPro
      1 person · 28 points · first shared 2011 · 1 comments on HN
    7. 7
      Reduced Memory Allocations with ocp-memprof
      1 person · 9 points · first shared 2015 · Discussion on HN
    8. 8
      Let's Encrypt Wildcard Certificates Made Easy with Agnos
      1 person · 8 points · first shared 2022 · Discussion on HN
    9. 9
      ASM.OCaml
      2 people · 6 points · first shared 2016 · Discussion on HN
    10. 10
      Autofonce, GNU Autotests Revisited
      2 people · 5 points · first shared 2023 · Discussion on HN

    What HN people wrote when they linked it

    • yawaraminJun 2020

      > I don’t think you understand how F# implements units of measure. It’s not just another data type, they’re fully inferred and checked and work with generics

      Yes, units of measure are really cool, and I understand they support dimensional analysis out of the box. It's quite unique, and I fully agree that abstract types don't fully replace them. Just saying that that's what people do in OCaml.

      > I don’t think anyone would say Haskell does multicore the “wrong” way

      And it certainly is not something that I said.

      > OCaml as you say has had decades to solve these problems.

      The 'problems' being the lack of multicore support? As I said, this is not really stopping people from getting real work done in industry–see everyone using OCaml currently in highly concurrent and multi-process parallelized applications, or in fact even people using NodeJS, Python, Ruby.

      > the community is very small

      Correct, but it is definitely growing.

      > and the language evolution has been extremely conservative for the most part.

      Not so correct. There have been massive amounts of changes in the last few years: https://www.ocamlpro.com/2019/09/20/a-look-back-on-ocaml/

      And this is not even taking into account the features which OCaml had before then beyond F#:

      - Polymorphic variant types
      - Structural subtyped object types
      - Named arguments
      - Optional arguments
      - Functors

    • jallmannAug 2014

      #5 of Build Tools and Runtime would cover that (encapsulating all global state into a runtime context). The ongoing multicore work at OCamlPro is taking this approach [1].

      Erlang-style actors or lightweight processes would be my dream multicore scenario (no more monads for concurrent IO!), but that's likely too difficult to graft onto the current runtime, which is otherwise extremely well-done.

      Also, I'd really like checked exceptions. The omission of checked exceptions has always struck me as strange, given the emphasis on compile-time checking. Considering how fast exceptions are in OCaml, it seems like a bit of a missed opportunity -- it is faster to use exceptions for control flow [2] than matching on variants (such as Option), which usually involve an extra allocation + dereference, IIRC.

      [1] http://www.ocamlpro.com/pub/multi-runtime.pdf.tar.gz

      [2] Odd as it may sound, it's encouraged to use exceptions as a control-flow construct in OCaml, but that is falling out of favor in modern code as far as I can tell.

    • tom_melliorFeb 2018

      Not saying it's the closest to what you have in mind, but you could look at the Emacs Tuareg mode for OCaml. Here is a reference card: http://www.ocamlpro.com/files/tuareg-mode.pdf

      If you are a SLIME fan, you might notice that some of the key bindings to interact with the toplevel (the OCaml word for "REPL") are identical in Tuareg.

      That said, although this will sound tongue-in-cheek: Having used Isabelle and Coq with their interactive editors, I find their approach better than a REPL. In these systems, you execute code directly from your source file, as opposed to (conceptually) sending snippets of code to a REPL. There is no concept of code you have written in the source (or the REPL) which is not synced up with the state of the REPL (or the source code, respectively). I wish other languages had modes like this. There seems to be one for Prolog, but I've never used it and don't know how well it works in practice: https://www.metalevel.at/ediprolog/

    • beckfordAug 2024

      > The goal is that we can play Sudoku in TypeScript while the type checker complains about mistakes. This is not about implementing a Sudoku solver.

      That goal could be extended to implement a Sudoku solver in the type system. One such solver was described at https://ocamlpro.com/blog/2017_04_01_ezsudoku/ for OCaml. TLDR: Your compiler can report the solution as an error message if your language supports refutation and has enough type machinery to accurately model Sudoku.

      Having said that, I don’t think a Sudoku solver implementation embedded in a type system is practical (maybe fun for educational purposes though!)

    • mega_deanOct 2023

      Here's a similar article that I read recently about using Ocaml's type system to implement a sudoku solver: https://ocamlpro.com/blog/2017_04_01_ezsudoku/ The author defines types to represent a valid sudoku board, and then uses the obscure syntax `-> .` to tell the compiler that a pattern should be unreachable.

      There is no compiler error when he compiles an unsolvable input. But when there is a solution, the compiler provides it:

      ```
      Error: This match case could not be refuted.
      Here is an example of a value that would reach it:
      Grid (A, B, C, D, C, D, A, B, B, A, D, C, D, C, B, A)
      ```

    • progmanMar 2019

      Companies using OCaml: https://ocaml.org/learn/companies.html

      What is OCaml used for? https://www.quora.com/What-is-OCaml-used-for?share=1

      Further infos:

      awesome-ocaml - A curated collection of awesome OCaml tools, frameworks, libraries and articles: https://github.com/ocaml-community/awesome-ocaml

      OCamlPro Research and Development: https://www.ocamlpro.com/research-and-development/

      OCaml Weekly News (RSS): http://alan.petitepomme.net/cwn/cwn.rss

    Related

    MirageOSmirage.io84 people

    MirageOS 4.0 – Self-managed internet infrastructure with unikernels

    MirageOS
    Company · last shared 2026
    Jane Street Blogblog.janestreet.com221 people

    A better build system for OCaml

    Jane Street Blog
    Company · last shared 2026
    OPAM Blogopam.ocaml.org40 people

    Signing the OPAM Repository: TUF Meets Git

    OPAM Blog
    Company · last shared 2026
    KC Sivaramakrishnankcsrk.info44 people

    OCaml on Baremetal Shakti RISC-V Processor

    KC Sivaramakrishnan
    Personal · last shared 2026
    Chris Kohlheppchriskohlhepp.wordpress.com22 people

    Modern C++ and Lisp Programming Style

    Chris Kohlhepp
    Personal · last shared 2021
    gccrs Blogrust-gcc.github.io17 people

    (Re)Using rustc components in gccrs

    gccrs Blog
    Company · last shared 2026
    Anil Madhavapeddyanil.recoil.org46 people

    Compiling OCaml directly to a new cloud operating system

    Anil Madhavapeddy
    Personal · last shared 2026
    Thomas Leonardroscidus.com82 people

    Python to OCaml: Retrospective

    Thomas Leonard
    Personal · last shared 2026