[Teaching] Fw: [wg-windows] Minimal virtual machine for OCaml
thranur at gmail.com
Tue Sep 1 15:18:48 BST 2015
Thank you for the advice.
To clarify what I'm looking for: I'm trying to make Linux usage as
transparent as possible, exactly to avoid requiring much unix literacy,
hence why I mentioned disk space usage. It's not so much an issue in
itself, but if I wanted to distribute a static VM image with everything
already installed, its size might become an issue.
For instance, Eclipse, which used to be a quite large application, has a
download size of 270 MB. It does not include the JVM, but after
decompressing I'd estimate it (Eclipse + JVM) at about 1 GB.
I don't know the exact size of Xcode, but some websites estimate it at 2-4
Visual Studio is probably the largest one, at about 6 GB.
Certainly, installing a Linux via a VM includes much more than an IDE +
compiler + runtime, but if it requires 7GB, it's still a hard pill to
This brings me to another point: disk usage anxiety. Even with dynamic disk
images, I'm afraid to give them a large size, so I end up worrying that it
will run out of space. And the kinds of errors that happen in such
situations are much less obvious to understand, especially for linux
newbies. Should I just lose my fear and allow my disk images to dynamically
grow to be as large as they want to be?
For those reasons, I asked about a minimalistic Linux with the lightest
possible UI, to save on disk space as much as possible. It's not so much
about CPU, which for the intended purposes should be mostly fine.
Finally, on the issue of transparency, another major difficulty I have when
using a Linux VM is that the file systems are separate, so even if I tell
the students to "just download that file and open it on your
<Linux/OCaml-based application>", they'll either:
a) Download it using Windows, then not be able to find the file using the
Linux application (or have to move it to a shared folder, which they often
b) Be forced to use a browser inside Linux, which requires more disk space,
setting up the browser, etc.
I never found it very easy to configure Samba shares on Linux or to set up
the filesystem in a way that maximum sharing could be achieved with minimal
user intervention, especially without knowing in advance some parameters
such as host/username, etc. Which would make it even more complicated to
set up in advance in a static VM image for that purpose.
Is there a better solution concerning transparency between Windows and
Linux for OCaml usage purposes? E.g. using a Merlin-configured Emacs from
Linux that could open a file downloaded via Windows and then compile an
OCaml application that could easily read the files in a Windows directory
to perform some action on them? It sounds almost like Cygwin, but that's
another can of worms...
Any partial solutions or tips you can give me about each of these issues is
already greatly useful to me. I usually end up finding some solutions
myself, but it takes a lot of time searching and trying, and if someone had
already done exactly the same thing before, well, I'd be glad to learn from
On Tue, Sep 1, 2015 at 3:27 PM, Mr. Herr <misterherr at freenet.de> wrote:
> Caveat: this is a general answer, my point of view, and not done with OCaml
> It certainly is technically feasible, depending on your desktop hardware
> even easy to do.
> You need a VM software. I had good experiences with Virtualbox. With MS
> solutions you must find the right product for your Win version
> (Virtual PC or Hyperv ) - I don't think it will beat Virtualbox in your
> Disk space: starting from 3G for the OS and ~4G for the opam directory,
> this all depends directly on what you install.
> You need quite some compilers, make and tools, and devel packages. Do a
> pilot install, of course.
> Linux distro: any current distribution will do. Performance will not be
> much of an issue unless you have very weak desktops. I am using virtualbox
> on my old notebook. But some ocaml package compile times are quite long
> even on beefy machines (coq comes to mind).
> As for the desktop environment: lighter is better, but not an issue
> either, even on KDE you can turn off effects and background tasks to speed
> it up.
> Take what you and your students know.
> skipping "... usual software ... coq ..." - is it an ocaml introduction ?
> There is a big risk of wasting time with subjects not in the centre of
> your course, especially Linux setup and use.
> This depends directly on the "unix/linux literacy" of your students.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Teaching