Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Dan Hipschman <dsh@linux.ucla.edu>
To: David Teller <David.Teller@univ-orleans.fr>
Cc: OCaml <caml-list@inria.fr>
Subject: Re: [Caml-list] Before teaching OCaml
Date: Sun, 7 Jan 2007 12:25:37 -0800	[thread overview]
Message-ID: <20070107202537.GA11975@linux.ucla.edu> (raw)
In-Reply-To: <1168193722.6133.38.camel@Blefuscu>

On Sun, Jan 07, 2007 at 07:15:22PM +0100, David Teller wrote:
> * the environment -- under Windows, is there any viable alternative to
> Emacs + the MinGW-based port ? 

OK, I'm pretty much totally new to OCaml, but maybe that's good
considering you're going to be teaching to people that are new to it,
too.

I've never used any of them, but Googling "OCaml IDE" without the quotes
brings up something called Camelia, Eclipse (they might be used to that
if they used if for Java), and Camelion.  Personally, I use Emacs, but
if you do that make sure they have Tuareg-mode installed.  I've noticed
that a lot of people who haven't used Emacs before find using the
toplevel from Emacs confusing, and usually just run ocaml as a separate
process and copy / paste code into it.  If this is the case, ledit is a
must.

> * the Makefile -- I've found OCamlMakefile [1] but I haven't tried it
> yet, hopefully it's simple enough for my students to use without too
> many arcane manipulations

Using OCamlMakefile is a no-brainer, at least for the smaller projects
I've done.

> * 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've only done a few projects in OCaml so far.  It's very good for
writing compilers / interpreters.  I find ocamllex and ocamlyacc much
friendlier than lex and yacc, and the type system makes building
abstract syntax trees a breeze.  I've been working on a mini-Prolog
interpreter for the past few weeks, and something like that might make a
good project (although, my code is on my website, so I wouldn't do that
exactly as they could easily copy it).  Before that, I implemented a
type inference system as a class project.  The professor gave us a
mini OCaml interpreter that he wrote, but removed the type inference
part of it.  It took a few weeks to do.  Since you mentioned graphics,
and OCaml is so good at writing interpreters, a thought that occurred to
me was that you could have them develop a small GUI description language
and write an interpreter for it that creates the user interface from it.
For example, something like the .rc resource files on Windows, or .glade
files (but XML is kind of boring, IMO).  The next project I am planning
to do is to write a chess playing engine, although I haven't even
decided if I'm going to use OCaml for that.  Still, alpha-beta pruning
and stuff like that should be fun to do in OCaml, although chess is a
bit complicated.  If you came up with something simpler (like checkers),
they could have their programs compete with each other (extra credit for
the winner?).

Anyway, these are just some ideas (which you asked for), that I know can
be done since I'm rather new to OCaml myself and have done or thought
about them already.  If you decide to go with one of them, you can, of
course, simplify or complicate to suit what your students can handle.

HTH :-)


  reply	other threads:[~2007-01-07 20:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-07 18:15 David Teller
2007-01-07 20:25 ` Dan Hipschman [this message]
2007-01-07 21:07 ` Sylvain Le Gall
2007-01-07 21:13 ` [Caml-list] " Aleksey Nogin
2007-01-07 21:20 ` Richard Jones
2007-01-07 22:37 ` skaller
2007-01-08 18:26   ` robert
2007-01-08 18:49     ` Jacques Carette
2007-01-08 19:31       ` robert
2007-01-07 23:17 ` Jacques GARRIGUE
2007-01-08  6:56   ` Oliver Bandel
2007-01-08  2:47 ` Jon Harrop
2007-01-08  6:45 ` Oliver Bandel
2007-01-08  9:33 ` Andrej Bauer

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=20070107202537.GA11975@linux.ucla.edu \
    --to=dsh@linux.ucla.edu \
    --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