From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 5E4C2BC0A for ; Sun, 7 Jan 2007 23:37:53 +0100 (CET) Received: from ipmail02.adl2.internode.on.net (ipmail02.adl2.internode.on.net [203.16.214.141]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l07MbpTc012051 for ; Sun, 7 Jan 2007 23:37:52 +0100 Received: from ppp14-213.lns2.syd7.internode.on.net (HELO rosella) ([59.167.14.213]) by ipmail02.adl2.internode.on.net with ESMTP; 08 Jan 2007 09:07:49 +1030 X-IronPort-AV: i="4.13,158,1167571800"; d="scan'208"; a="68512145:sNHT21082712" Subject: Re: [Caml-list] Before teaching OCaml From: skaller To: David Teller Cc: OCaml In-Reply-To: <1168193722.6133.38.camel@Blefuscu> References: <1168193722.6133.38.camel@Blefuscu> Content-Type: text/plain Date: Mon, 08 Jan 2007 09:37:44 +1100 Message-Id: <1168209464.8650.36.camel@rosella.wigram> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 45A1763F.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 0100,:01 ocaml:01 emacs:01 emacs:01 notepad:01 gedit:01 compiler:01 makefile:01 ocamlc:01 mli:01 ocamlc:01 mli:01 ocamlopt:01 ocamlopt:01 On Sun, 2007-01-07 at 19:15 +0100, David Teller wrote: > Dear list, > > I'm going to start teaching OCaml soon and I'm fishing for ideas and > suggestions. I hope this list is the right place to ask. > Right now, I see the following difficulties: > > * the environment -- under Windows, is there any viable alternative to > Emacs + the MinGW-based port ? Emacs? Gak! You want them to waste the whole semester learning an editor? Notepad is perfectly acceptable. There's probably a version of gedit that runs on Windows. The Windows native port is fine, but you do need the MS assembler and compiler executables (and ml.err, the assembler error file). > * the Makefile Why not just show them how to write out a script by giving them a simple example to edit, something like: ocamlc -c file1.mli ocamlc -c file2.mli ocamlopt -c file1.ml ocamlopt -c file2.ml ocamlopt file1.cmx file2.cmx -o program and explain the ordering requirements. There are several auto-makers for Ocaml (as mentioned in other emails) .. but using these hides understanding of how the ocaml tools work. > * the task -- for the moment, I have no interesting idea of OCaml-based > projects. Perhaps something like finding the shortest path along > subway/train lines ? I would tend to provide a simple but not trivial problem, and get them to write it in a familiar procedural style .. then show how to convert it to a functional style, and what the advantages are. So you'd want to pick a problem which is amenable to both kinds of solution. EG .. convert loops to tail recursions, convert inner recursions to tail recursions, replace variables with arguments, continuation passing, HOFs, etc. One possible project is a small interpreter .. it has plenty of scope for variations, and has the advantage of being interactive without requiring graphics. -- John Skaller Felix, successor to C++: http://felix.sf.net