What Linux distribution are you using?


#1

Hey!

I was curious what Linux distributions you all use for ReasonML development, both targeting BuckleScript and Reason Native/OCaml. I was a heavy Linux user before my recent job where I got a Mac to work on. Before that it was mostly Arch Linux for me, but that was not always the most reliable system.

So what distribution does the average Linux ReasonML dev use nowadays? It should be somewhat stable but still pretty current (that already rules out Debian/Ubuntu/Mint imho).


#2

I use NixOS, exclusively, although it’s not available in GH actions (there I use Ubuntu and install the Nix package manager).

You can choose to install packages from different channels (there’s a stable release every 6 months — March and September), and even mix and match between stable and unstable. The focus is on reproducibility, which enables really aggressive caching (my CI builds are generally 1 minute total, and that involves installing the package manager too).


#3

Not sure how average I am, and I rarely do anything in native OCaml, but for BuckleScript Mint works fine for me.


#4

There is also this list: https://github.com/ocaml/infrastructure/wiki/Containers#selecting-linux-distributions
of distributions which are tested in opam’s CI, but those are the usual suspects, like

  • Debian
  • CentOS
  • Fedora
  • OpenSuse

Lot’s of OCamlers seem to rely on the RPM-based distributions (RHEL / Fedora / CentOS), as seen in this thread: https://discuss.ocaml.org/t/linux-distro-of-choice-for-ocaml-deployment-and-development/2531/7

I am really a bit hesitant concerning NixOS, maybe I’ll give it a try and if I fail install Fedora instead.


#5

+1 NixOS user. Though expect NixOS is very opinionated about many things. For instance even for buckle script you should use nix package manager rather then NPM. Luckily @anmonteiro does a great job on keeping bs-platform up to date in nixpkgs so it’s actually a win compare to npm in my opinion.


#6

Weeeell.

https://github.com/NixOS/nixpkgs/blob/aaa8fe26d166720c42588637f12b54615fcd5fc7/pkgs/development/compilers/bs-platform/default.nix#L7 tells me the current version on nix is 7.0.1 while the current bs-platform version on npm is 7.2.2 :wink:

I often test BuckleScript dev releases and also use the most current version if there are no blocking bugs. But I also do not understand why I would not just use npm with a locally (not globally) installed bs-platform either. I need to use npm for other dependencies anyway.

If you talk about keeping the OS clean of global npm modules, then I agree.


#7

Update is in progress, you can follow it here https://github.com/NixOS/nixpkgs/pull/82068

As with using master locally with nix it’s easy enough to define overlay and use overrideAttrs to change the src attribute to point in commit in master.

The main advantages are that built is deterministic, we provide binary caches for more architectures than official npm installation does and also we make it easier to have multiple versions of same package installed locally. There is also idiomatic way of applying custom patches within built.


#8

Because this generally doesn’t work in NixOS. It doesn’t adhere to the FHS Standard by design so prebuilts don’t generally work out of the box.


#9

I use Manjaro for development, it’s fine. I tentatively use alpine for Docker containers for deployment but I’m not convinced this is the best choice (I worry a bit about using musl rather than glibc).


#10

I use Ubuntu 19.04 - it is quite stable. If I had to setup a new PC, I probably would go for Manjaro + ArchLinux.


#11

Thank you all for your answers. I decided to give Manjaro a shot, since I love the Arch package manager.