News for hackers. Stuff that matters.
Re:OCaml Workshop 2020 Online Conference is live now by ahelwer on Friday August 28, 2020 @09:16AM (#24304438)
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?
Re:OCaml Workshop 2020 Online Conference is live now by avsm on Friday August 28, 2020 @09:39AM (#24304671)
OCaml 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

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

Re:OCaml Workshop 2020 Online Conference is live now by osener on Friday August 28, 2020 @09:42AM (#24304695)
opam-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://esy.sh/en/

https://github.com/esy-ocaml/hello-ocaml

Re:OCaml Workshop 2020 Online Conference is live now by fspeech on Friday August 28, 2020 @02:51PM (#24308613)
On 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.
Re:OCaml Workshop 2020 Online Conference is live now by prezjordan on Friday August 28, 2020 @03:05PM (#24308753)
Probably 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

Re:OCaml Workshop 2020 Online Conference is live now by lnaej on Friday August 28, 2020 @09:24AM (#24304534)
Started 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/