mos87 6 hours ago

The only program written in OCaml that I think I've used is WeiDU mod installer for Infinity Engine games. Took a quick look under the bonnet too. Suffice to say, my only thought has been that should the author had chosen a sane language like say Perl (which seems to be ideally suited to what WeiDu does), the software could have been improved by many, many people.

  • _flux 5 hours ago

    Unison could be one of the more popular programs written in OCaml.

    This sort of lead into trouble at one time, as the author chose to use the OCaml serialization of data as the protocol, so synchronization between 32- and 64-bit platforms or even binaries compiled with different versions of OCaml was not possible. Eventually this was fixed, though, with custom serialization.

  • mhd 2 hours ago

    Perl? Are there existing modules for the Linux KMS interface? Otherwise this would also be an off-beat language choice, and these days with only marginally more developers… (And I say that as a Perl fan)

    Personally, I'm glad that this isn't yet another Rust post ;)

    • mos87 an hour ago

      No, I haven't meant to imply that Perl should be used for the subj. But doubt it'd have proven any worse than OCaml. All depends on the programmer unsurprisingly.

      • ernst_klim an hour ago

        > But doubt it'd have proven any worse than OCaml

        Unlike Perl, OCaml is AOT compiled in a very efficient machine code, has a good static type system and has a good concurrency support. Both are not very mainstream.

  • antonvs 6 hours ago

    That would have required the author to write Perl. Some sacrifices are not worth making.

    • mos87 5 hours ago

      well then the functionality has been sacrificed - because few people besides the author were willing to brave hacking in OCaml I presume

dlcarrier 15 hours ago

Is OCaml an especially comfortable environment to work in?

One of my favorite programs, an ncurses-based RPN calculator called Orpie, is written in OCaml, but I've never messed around with it.

  • poulpy123 4 hours ago

    > Is OCaml an especially comfortable environment to work in?

    It is one of these small languages that are not completely niche: it is taught and used, you'll be able to do plenty of things, but there is not the community and resources you find in the big ones or even the mid-sized ones

  • Yoric 15 hours ago

    Well, many of the benefits of Rust, but in a simpler and garbage-collected language. Possibly the best language (alongside Haskell) if you need pattern-matching. Not quite as good if you need lots of libraries or interaction with other languages.

  • Crespyl 15 hours ago

    Hey, I've also used and loved Orpie!

    I'm not extremely familiar with any of the ML family, but Eric Lippert had a blog series I followed for a while in which he was writing a Z-Machine in OCaml: https://ericlippert.com/2016/02/01/west-of-house/ I followed along but in Rust for a while, though I think he paused the project at some point and I lost steam.

    I learned more about Rust (which, IIRC was first implemented in OCaml) than I did about OCaml, but it's always seemed like a nice language.

    • yawaramin 7 hours ago

      Lippert started doing that blog series as part of his learning journey when he got hired at Facebook to write OCaml. Just a fun historical fact.