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=1.1 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id CBA92BC69 for ; Wed, 24 Oct 2007 21:05:28 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAE80H0dA6aa0lGdsb2JhbACOWgIBAQcEBAsIEQWBKQ X-IronPort-AV: E=Sophos;i="4.21,326,1188770400"; d="scan'208";a="3567207" Received: from concorde.inria.fr ([192.93.2.39]) by mail2-smtp-roc.national.inria.fr with ESMTP; 24 Oct 2007 21:05:28 +0200 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l9OJ5Sqs004382 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Wed, 24 Oct 2007 21:05:28 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAE80H0dA6aa0lGdsb2JhbACOWgIBAQcEBAsIEQWBKQ X-IronPort-AV: E=Sophos;i="4.21,326,1188770400"; d="scan'208";a="3567205" Received: from py-out-1112.google.com ([64.233.166.180]) by mail2-smtp-roc.national.inria.fr with ESMTP; 24 Oct 2007 21:05:27 +0200 Received: by py-out-1112.google.com with SMTP id u52so288957pyb for ; Wed, 24 Oct 2007 12:05:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=aVtX0Nf2+TdW0InY6JDCD4TNvUxmX/c1dEJwReQqczM=; b=Gc/80u46dWSxxQFlV8WlufdjNINS62b4+Br93mHBJkL4v5hQspg8IulDAJ9Rh35BOt96tBd5JHwsxVacrXP+bYE3UDiGU8pkMfftsECiZy3ehyR8c2eCMW8CsIA9jt7IoehH/w145f/gzIjxXvgPXq0u5LDF0kLe+XKqfKIQuTQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=k+QN+flfHZExZr79waOzbh7sQ6lOPKmUEC81L5+GrOBpn3jFYv3RVhHP7w953cYjp1bcjg7SZMSwcF/aDx6TEY9qGOVem25zHEkd8NlifhntpjIOpVnMAklSbK8Mi2KY+SLOzqO0cgnSg6NlGSRxTIgqjFfRcXTsw60F6rB6L+A= Received: by 10.35.103.6 with SMTP id f6mr1034311pym.1193252725511; Wed, 24 Oct 2007 12:05:25 -0700 (PDT) Received: by 10.35.118.19 with HTTP; Wed, 24 Oct 2007 12:05:25 -0700 (PDT) Message-ID: <666572260710241205x19edbd4ar840811b1d7a7315f@mail.gmail.com> Date: Wed, 24 Oct 2007 21:05:25 +0200 From: Adrien To: Andrej.Bauer@andrej.com Subject: Re: [Caml-list] Which syntax to teach ? Cc: OCaml , "David Teller" In-Reply-To: <471F7F7B.9040905@fmf.uni-lj.si> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <1193225773.3612.27.camel@Blefuscu> <471F7F7B.9040905@fmf.uni-lj.si> X-Miltered: at concorde with ID 471F9778.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; syntax:01 andrej:01 developpment:01 andrej:01 ocaml:01 ocaml:01 emacs:01 toplevel:01 emacs:01 cygwin:01 cygwin:01 tuareg:01 cameleon:01 afaik:01 functors:01 Hi, I'm currently a student (pr=E9pa MP, 3/2) and I've been doing (o)caml for less than one year. I've recognized my personnal situation or some of my friend's one in what Andrej wrote. As such I thought I could contribute a bit. ;) A quick note first : for many of us this was our first programming language (not for me though) and we only have two hours per week ; the focus is not application developpment (i.e. we're light-years before ocamlbuild and other refinements). On 2007/10/24, Andrej Bauer wrote: > 1. Students want to use Microsoft Windows They don't *want* to use windows. They just don't get why they should use linux with its command-lines, its new interfaces, its availability when windows seems alright especially with the availability of binaries for both caml-light and ocaml (they think everything works under windows and nothing under linux which is just an operating system for geeks [nearly quoting]). As far as I'm concerned, I've had some bad experiences with \r\n translations for ocaml under windows and vim simply r0x but this won't convert many people to linux. > 2. Students HATE Emacs because its basic behavior regarding selections, > cut & paste is counter-intuitive to them. I agree and there are other reasons too : I still don't know how to properly create, open, save a file or run the toplevel in emacs (I now bring my own laptop with vim ;p ). In fact you can easily understand vim's :w (*w*rite), :q (*q*uit), :n (*n*ew), :e (*e*dit) but I am under the impression there is no such logic under emacs. Plus menus for the gui don't help as they use abbrevations and sequences I still don't get (and it's not very pretty). Last emacs is made for qwerty keyboards, not azerty ones. For instance ctrl+w is hard to do on such keyboards and if you need a percent sign you're stuck. I don't want to say vim is better than emacs. Both have a different logic which are different from anything your students probably know. Teaching ocaml is often enough on its own not to have to teach emacs/vim. > 3. Students think Make is an archaic nuisance (and they're right). > > So this year we switched to Eclipse + OcaIDE + ocamlbuild. As long as > you instruct your students to install (in this order!) > > Cygwin > Ocaml 3.10 (not from cygwin package manager!) > Java 1.6 > Eclipse 3.2 > OcaIDE > > on their home computers, they should be fine. This year students have > much less initial trouble. (The combination cygwin + XEmacs + tuareg + > ocaml + Make was a real nightmare in previous years.) You can probably use a livecd with ocaml preinstalled and distribute it to your students. This is a viable solution especially since ntfs-3g is now stable so they can write on their hard disks. Moreover there is now camelia, cameleon2 and a third one which name I've forgotten. They should all be simpler than emacs. >>From camelia's website : http://camelia.sourceforge.net/ "Camelia started out as a tool to help students in Brown University's CS17 have an easier time making the leap from Scheme to OCaml. It's meant to make writing in OCaml relatively painless without having to learn the nuances of a powerful editor like Emacs or VI." Last for the future, dromedary's "types as you type" is particularly appealing but not ready yet afaik ( http://lprousnth.files.wordpress.com/2007/08/dromedary.pdf ). The one available now is quite old but I'm doing one myself from scratch. In fact I've already done one but this was my first try and though it worked pretty well it could be better. I want to have it run on machines with 256MB of memory, including macs (the intel-based ones but which have an EFI instead of a BIOS). I'd like to have it ready in two weeks (I have some holidays starting on saturday). > [...] > 3. The following is confusing to beginners: > > let f x =3D function > > They think it's a function of one variable. When asked to define a > function of two variables, they might write > > let g x y =3D function > > So I always start strictly with the form > > let f x =3D > match x with > > > let g x y =3D > match y with > > > Then I teach "shorthands" > > let f =3D function ... > > let g x =3D function ... I can perfectly back this up : our teacher had a simple solution not to confuse us : not teach it. When I learned this, I asked him for details and in turn a girl asked me about this ; she did not get it. The first solution is longer and less sexy but safer especially for beginners (now I read the "=3Dfunction " better since it can be read just like in mathematics). > 7. They easily understand how the standard library is used (but not the > functors), the open statement, the fact that a program may be in several > .ml files. The .mli files are a bit more mysterious. Functors are _very_ > mysterious. I have to say I'm in this situation (theorically i should know nothing about functors but I'm curious ;) ). I'm curious but functors seem to be a big chunk and I really wonder why they are so good. I enjoy functionnal programming, I understand why it is interesting to prove programs and can sometimes do this on my own, I want the mathematical background but I just don't get the importance of functors. I'm not representative of all students but I need to understand the necessity or the use of something to understand it. Otherwise I just say "ok, we have this, and ... next ?". Good luck with your students, these youngs are all evil. =3DP --- Adrien Nader