4 ms·
Anyone have experience using OCaml on Windows? I do some development for a cross-platform project where researchers wrote one of the components in OCaml. Instal
by ahelwer 6y ago
Anyone have experience using OCaml on Windows? I do some development for a cross-platform project where researchers wrote one of the components in OCaml. Installing this particular component on Windows is a giant pain requiring the user to first install Cygwin + a couple Cygwin tools. Is this typical for OCaml projects on Windows or do you think it'd be easy/possible to streamline this install process?
- lnaej 6y agoStarted to learn Ocaml with the help of a friend with professional level OCaml, and from his own words, the experience on Windows is terrible and I can confirm! However, I found this link very useful to have something working using WSL: https://www.cosmiccode.blog/blog/vscode-for-ocaml/ https://www.cosmiccode.blog/blog/vscode-for-ocaml/
- avsm 6y agoOCaml can generate binaries that do not depend on Cygwin runtimes, and that's a common way to ship binaries. There are a number of development shops who have been doing that for years. For development on Windows, Cygwin is commonly used for "casual" use, and can be tricky to get working if you're not familiar with the quirks of that toolchain. That's going to improve quite rapidly though: I just announced that our development focus from the OCaml Platform for opam (our package manager) is to get Windows support working end-to-end. There aren't any real blockers to Windows support except for building a critical mass of developers to smooth out the thousands of details that get in the way right now: you can find more here: https://github.com/ocaml/opam/wiki/opam-2.2-slides.pdf https://github.com/ocaml/opam/wiki/opam-2.2-slides.pdf From a compiler developer's perspective, the number of variations of toolchains available on modern Windows is absolutely mindboggling. I'm looking forward to switching to Windows 10 from my OpenBSD desktop and getting familiar with all of this. Last time I seriously used Windows (95), the desktop eSheep app all the rage. I'm informed that it is now available for Windows 10: https://www.microsoft.com/en-us/p/esheep-64bit/9mx2v0tqt6rm https://www.microsoft.com/en-us/p/esheep-64bit/9mx2v0tqt6rm
- osener 6y agoopam-repository-mingw does need Cygwin for development, but the resulting binaries won't depend on it. I was able to port a CLI application with a lot of dependencies without much trouble. Alternatively, Esy supports Windows and might provide you with a smoother experience. Esy is an alternative to opam cli tool that feels more like npm and supports OCaml projects and opam packages. https://fdopen.github.io/opam-repository-mingw/ https://fdopen.github.io/opam-repository-mingw/ https://esy.sh/en/ https://esy.sh/en/ https://github.com/esy-ocaml/hello-ocaml https://github.com/esy-ocaml/hello-ocaml
- fspeech 6y agoOn Windows the easiest is probably through reasonml. You get two runtimes out of the box but you are a few releases behind (depending on Bucklescript). The alternative is to use WSL. Ubuntu stock opam is out of date though. The distribution side of ocaml is definitely less than desirable, which is why I only use it to target js. Reasonml as js frontend is hard to beat experience wise.
- prezjordan 6y agoProbably a non-answer but I do all of my OCaml programming on my windows desktop using Windows Subsystem for Linux [1] I have a bash shell, launch VSCode from it (with `code`), and all my extensions (ocp-indent, merlin) run in the linux subsystem and talk to VSCode. [1] https://docs.microsoft.com/en-us/windows/wsl/install-win10 https://docs.microsoft.com/en-us/windows/wsl/install-win10