caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Opam use for teaching lab infrastructure
@ 2013-09-19  9:38 Dagnat Fabien
  2013-09-19  9:52 ` Francois Berenger
  2013-09-19 10:50 ` Roberto Di Cosmo
  0 siblings, 2 replies; 6+ messages in thread
From: Dagnat Fabien @ 2013-09-19  9:38 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 1175 bytes --]

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. : (0 | 33) 2 29 00 14 09 Technopôle Brest-Iroise, CS 83818
29238 Brest Cedex 3, France 

Une école de l'Institut Mines-Télécom     


[-- Attachment #2: Type: text/html, Size: 2866 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] Opam use for teaching lab infrastructure
  2013-09-19  9:38 [Caml-list] Opam use for teaching lab infrastructure Dagnat Fabien
@ 2013-09-19  9:52 ` Francois Berenger
  2013-09-19 10:50 ` Roberto Di Cosmo
  1 sibling, 0 replies; 6+ messages in thread
From: Francois Berenger @ 2013-09-19  9:52 UTC (permalink / raw)
  To: caml-list

On 09/19/2013 06:38 PM, 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.

Mine is 2.8G, mostly due to several compiler switches installed, I guess.

> - What kind of ocaml libs do you introduce to the students? I was
> thinking of utop, ounit, core / batteries, menhir.

Maybe Parmap to have fun on multi-core computers.

Also, I would recommend dolog (it's in OPAM of course) for a simple 
logger. ;)

> Thanks in advance
> Fabien
>
> Télécom Bretagne <http://www.telecom-bretagne.eu> 	
> *Fabien DAGNAT*
> Maître de conférences au département informatique
> Responsable de la filière Systèmes Logiciels et Réseaux
> 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 Bretagne <http://www.telecom-bretagne.eu>Blog Télécom
> Bretagne <http://www.telecom-bretagne.eu/lexians/>
> Une école de l'Institut Mines-Télécom <http://www.mines-telecom.fr>
>
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] Opam use for teaching lab infrastructure
  2013-09-19  9:38 [Caml-list] Opam use for teaching lab infrastructure Dagnat Fabien
  2013-09-19  9:52 ` Francois Berenger
@ 2013-09-19 10:50 ` Roberto Di Cosmo
  2013-09-20  9:40   ` David MENTRE
  1 sibling, 1 reply; 6+ messages in thread
From: Roberto Di Cosmo @ 2013-09-19 10:50 UTC (permalink / raw)
  To: Dagnat Fabien; +Cc: caml-list

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                        

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] Opam use for teaching lab infrastructure
  2013-09-19 10:50 ` Roberto Di Cosmo
@ 2013-09-20  9:40   ` David MENTRE
  2013-09-20  9:50     ` Anil Madhavapeddy
  0 siblings, 1 reply; 6+ messages in thread
From: David MENTRE @ 2013-09-20  9:40 UTC (permalink / raw)
  To: Roberto Di Cosmo; +Cc: Dagnat Fabien, caml-list

Hello,


2013/9/19 Roberto Di Cosmo <roberto@dicosmo.org>:
>
>       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 :-(

I am trying this approach: installing opam on a fresh Debian virtual
machine for "students". With opam, how do you guess the needed
external libraries?

With tarballs, I am usually reading the INSTALL or README file and
install needed Debian packages. But how do I access to this
information for opam packages? Is there a list somewhere of external
(to opam) dependencies?

Best regards,
david

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] Opam use for teaching lab infrastructure
  2013-09-20  9:40   ` David MENTRE
@ 2013-09-20  9:50     ` Anil Madhavapeddy
  2013-09-20 12:12       ` David MENTRE
  0 siblings, 1 reply; 6+ messages in thread
From: Anil Madhavapeddy @ 2013-09-20  9:50 UTC (permalink / raw)
  To: David MENTRE, opam-devel; +Cc: Roberto Di Cosmo, Dagnat Fabien, caml-list

On 20 Sep 2013, at 10:40, David MENTRE <dmentre@linux-france.org> wrote:
> 
> 
> 2013/9/19 Roberto Di Cosmo <roberto@dicosmo.org>:
>> 
>>      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 :-(
> 
> I am trying this approach: installing opam on a fresh Debian virtual
> machine for "students". With opam, how do you guess the needed
> external libraries?
> 
> With tarballs, I am usually reading the INSTALL or README file and
> install needed Debian packages. But how do I access to this
> information for opam packages? Is there a list somewhere of external
> (to opam) dependencies?

I maintained a rough set of monolithic dependencies in the jenkins/ source
directory of OPAM:
https://github.com/OCamlPro/opam/blob/master/jenkins/10-opam-prepare.sh

This is temporary, as OPAM 1.1dev has better support for describing external
dependencies within the package description via the `depexts` field.
The design of this is sketched out in:

http://anil.recoil.org/2013/09/09/ocamlot-autotriaging.html
(look for 'external system dependencies')

I'm still gluing together a sample version of this on Debian/OpenBSD, so
I'll mail this list requesting maintainers to help describe their external
dependencies when I have a working local setup with some sample packages.

For now, contributing to the monolithic install script above is welcome,
as I can use that as a reference when porting dexpexts over.

cheers,
Anil

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] Opam use for teaching lab infrastructure
  2013-09-20  9:50     ` Anil Madhavapeddy
@ 2013-09-20 12:12       ` David MENTRE
  0 siblings, 0 replies; 6+ messages in thread
From: David MENTRE @ 2013-09-20 12:12 UTC (permalink / raw)
  To: Anil Madhavapeddy; +Cc: opam-devel, Roberto Di Cosmo, Dagnat Fabien, caml users

Hello,

2013/9/20 Anil Madhavapeddy <anil@recoil.org>:
> I maintained a rough set of monolithic dependencies in the jenkins/ source
> directory of OPAM:
> https://github.com/OCamlPro/opam/blob/master/jenkins/10-opam-prepare.sh

Thanks!

david

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-09-20 12:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-19  9:38 [Caml-list] Opam use for teaching lab infrastructure Dagnat Fabien
2013-09-19  9:52 ` Francois Berenger
2013-09-19 10:50 ` Roberto Di Cosmo
2013-09-20  9:40   ` David MENTRE
2013-09-20  9:50     ` Anil Madhavapeddy
2013-09-20 12:12       ` David MENTRE

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).