From: Roberto Di Cosmo <roberto@dicosmo.org>
To: Dagnat Fabien <fabien.dagnat@telecom-bretagne.eu>
Cc: "caml-list@inria.fr" <caml-list@inria.fr>
Subject: Re: [Caml-list] Opam use for teaching lab infrastructure
Date: Thu, 19 Sep 2013 12:50:39 +0200 [thread overview]
Message-ID: <20130919105039.GA27278@voyager> (raw)
In-Reply-To: <F93DEE93-3068-4EC7-BFAB-6646D8D4CFE3@telecom-bretagne.eu>
Hi Fabien,
we have been using opam last year in the advanced functional
programming course here at Paris Diderot, and we were confronted
to issues similar to yours.
Here are some lesson learnt:
On the student laptops
----------------------
The students *love* opam once they have it installed properly on their machines!
But getting opam up and running on a random laptop of a student can
be quite a challenge, though:
- opam packages are not available/up to date for all distros
- the opam binary installer is only available for 64-bit machines,
so one may end up needing to recompile it, but there many things
can go wrong: some machines do not have the proper development
libraries/tools to compile OCaml/opam, and the students need help
when they are left with a failed ./configure; some other students
may install the OCaml package from the GNU/Linux distribution, then
compile opam, and then start using opam with the OCaml installed
globally, which can lead to great confusion when they start mixing
up the ocamlfind from opam with the ocamlfind from the distribution.
- My suggestion is to tell them clearly to compile opam, then perform
an opam switch to (re)compile an opam-local version of OCaml, and then
religiously stick to it, by putting the
eval `opam config -env`
in their bash/chs/whatever init script (opam does a pretty good job
to detect the running shell and exporting the right parameters).
You may need to help them installing the necessary development environment
(gcc, m4, devl libraries, etc.), I do not know how to avoid this on a
random laptop :-(
On the machines in the lab
--------------------------
Unfortunately, our students have a pretty low quota (you might wonder why,
when Seagate is working on 5TB disks that will cost just a few hundred bucks,
but that's another story), so we could not afford a local opam repo for each
student.
Instead, we just use a specific account where opam is installed locally, and
then tell the students to use
eval `opam config -env --root=/path/to/the/shared/.opam/dir`
This way it's easy to add new libraries, visible to all the students, with
no need to bother the sysadmin, but of course, they cannot play with different
libraries by themselves.
You will probably need to carefully set the rights on the shared .opam repo
to make this work.
Hope this helps!
--
Roberto
On Thu, Sep 19, 2013 at 11:38:41AM +0200, Dagnat Fabien wrote:
> Hello,
> I'm teaching (basic) functional programming and (simple) compilation in ocaml
> (to master students). Currently, I ask the system administrators to install a
> basic ocaml package. I'm thinking on switching to opam to make it easier for
> students to experiment various libraries.
>
> Does anyone has used opam for labs with student? I would be glad to hear any
> report on this mainly on the following points:
> - Is opam really usable when you keep changing of machine?
> - Having a .opam for all student accounts seem interesting so that they can
> freely experiment without interfering with others but has the cost of
> duplicating lot of common files. Any thoughts?
> - What is the usual size of an .opam directory? Mine is 1G but I don't know if
> it's usual.
> - What kind of ocaml libs do you introduce to the students? I was thinking of
> utop, ounit, core / batteries, menhir.
>
> Thanks in advance
> Fabien
>
>
> Fabien DAGNAT
> Maître de conférences au département informatique
> Responsable de la filière Systèmes Logiciels et Réseaux
> Télécom Bretagne Tél. : (0 | 33) 2 29 00 14 09
> Technopôle Brest-Iroise, CS 83818
> 29238 Brest Cedex 3, France
> Site web Télécom BretagneBlog Télécom Bretagne
> Une école de l'Institut Mines-Télécom
>
>
--
Roberto Di Cosmo
------------------------------------------------------------------
Professeur En delegation a l'INRIA
PPS E-mail: roberto@dicosmo.org
Universite Paris Diderot WWW : http://www.dicosmo.org
Case 7014 Tel : ++33-(0)1-57 27 92 20
5, Rue Thomas Mann
F-75205 Paris Cedex 13 Identica: http://identi.ca/rdicosmo
FRANCE. Twitter: http://twitter.com/rdicosmo
------------------------------------------------------------------
Attachments:
MIME accepted, Word deprecated
http://www.gnu.org/philosophy/no-word-attachments.html
------------------------------------------------------------------
Office location:
Bureau 3020 (3rd floor)
Batiment Sophie Germain
Avenue de France
Metro Bibliotheque Francois Mitterrand, ligne 14/RER C
-----------------------------------------------------------------
GPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3
next prev parent reply other threads:[~2013-09-19 10:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-19 9:38 Dagnat Fabien
2013-09-19 9:52 ` Francois Berenger
2013-09-19 10:50 ` Roberto Di Cosmo [this message]
2013-09-20 9:40 ` David MENTRE
2013-09-20 9:50 ` Anil Madhavapeddy
2013-09-20 12:12 ` David MENTRE
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130919105039.GA27278@voyager \
--to=roberto@dicosmo.org \
--cc=caml-list@inria.fr \
--cc=fabien.dagnat@telecom-bretagne.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox