caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Adrien <camaradetux@gmail.com>
To: Andrej.Bauer@andrej.com
Cc: OCaml <caml-list@inria.fr>,
	"David Teller" <David.Teller@univ-orleans.fr>
Subject: Re: [Caml-list] Which syntax to teach ?
Date: Wed, 24 Oct 2007 21:05:25 +0200	[thread overview]
Message-ID: <666572260710241205x19edbd4ar840811b1d7a7315f@mail.gmail.com> (raw)
In-Reply-To: <471F7F7B.9040905@fmf.uni-lj.si>

Hi,

I'm currently a student (prépa 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 <Andrej.Bauer@fmf.uni-lj.si> 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 = function <cases>
>
> 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 = function <cases>
>
> So I always start strictly with the form
>
> let f x =
>   match x with
>    <cases>
>
> let g x y =
>   match y with
>    <cases>
>
> Then I teach "shorthands"
>
> let f = function ...
>
> let g x = 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  "=function <cases>" 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. =P


 ---

Adrien Nader


  reply	other threads:[~2007-10-24 19:05 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-24 11:36 David Teller
2007-10-24 13:18 ` [Caml-list] " Loup Vaillant
2007-10-24 13:24 ` Peng Zang
2007-10-24 13:54   ` Julien Moutinho
2007-10-24 17:23 ` Andrej Bauer
2007-10-24 19:05   ` Adrien [this message]
2007-10-25  5:14     ` Aleks Bromfield
2007-10-30 16:26     ` Chung-chieh Shan
2007-10-30 16:38       ` [Caml-list] " Brian Hurt
2007-10-30 16:59         ` Chung-chieh Shan
2007-10-30 17:08         ` [Caml-list] " Edgar Friendly
2007-10-30 17:56           ` skaller
2007-10-30 19:02             ` Vincent Aravantinos
2007-10-30 18:50           ` William D. Neumann
2007-10-30 21:45           ` Eliot Handelman
2007-10-30 18:56       ` Daniel Bünzli
2007-10-25  9:43   ` [Caml-list] " Richard Jones
2007-10-24 22:52 ` Nathaniel Gray
2007-10-24 23:10   ` Jon Harrop
2007-10-25  1:48     ` skaller
2007-10-25  2:02       ` Jon Harrop
2007-10-25  9:49       ` Richard Jones
2007-10-25 11:32         ` Stefano Zacchiroli
2007-10-25 11:52           ` Daniel Bünzli
2007-10-25 12:39           ` Richard Jones
2007-10-25 12:59         ` Michael Ekstrand
2007-10-25 13:39           ` Loup Vaillant
2007-10-25 20:32             ` Andrej Bauer
2007-10-25 22:11               ` Loup Vaillant
2007-10-25 15:14           ` Richard Jones
2007-10-25 18:47             ` Re : " Adrien
2007-11-02 16:08       ` Nathaniel Gray
2007-10-26 11:11     ` David Teller
2007-10-24 23:02 ` Jon Harrop
2007-10-26 11:09   ` David Teller

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=666572260710241205x19edbd4ar840811b1d7a7315f@mail.gmail.com \
    --to=camaradetux@gmail.com \
    --cc=Andrej.Bauer@andrej.com \
    --cc=David.Teller@univ-orleans.fr \
    --cc=caml-list@inria.fr \
    /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;
as well as URLs for NNTP newsgroup(s).