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=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 6DE5ABB84 for ; Sat, 11 Oct 2008 17:58:53 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwDAF9q8EjAXQImiGdsb2JhbACBcpFpAQEBFSKmSYFs X-IronPort-AV: E=Sophos;i="4.33,393,1220220000"; d="scan'208";a="18589534" Received: from discorde.inria.fr ([192.93.2.38]) by mail1-smtp-roc.national.inria.fr with ESMTP; 11 Oct 2008 17:58:53 +0200 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id m9BFwqj7021796 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Sat, 11 Oct 2008 17:58:53 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4CALBp8EhDWxLCYGdsb2JhbACBcpFfHiqmR4Fs X-IronPort-AV: E=Sophos;i="4.33,393,1220220000"; d="scan'208";a="30215573" Received: from ip67-91-18-194.z18-91-67.customer.algx.net (HELO server1.bertec.net) ([67.91.18.194]) by mail4-smtp-sop.national.inria.fr with ESMTP; 11 Oct 2008 17:58:51 +0200 Received: from kuba.bertec.net (kuba.bertec.net [192.168.2.16]) by server1.bertec.net (Postfix) with ESMTP id 954AF105761; Sat, 11 Oct 2008 11:58:49 -0400 (EDT) From: Kuba Ober To: Andrej.Bauer@andrej.com Subject: Re: [Caml-list] Teaching ocaml programming Date: Sat, 11 Oct 2008 11:58:47 -0400 User-Agent: KMail/1.9.10 References: <48DCC7B8.4070700@fmf.uni-lj.si> <200810091741.40794.kuba@mareimbrium.org> <48EF8BF8.4050102@andrej.com> In-Reply-To: <48EF8BF8.4050102@andrej.com> Cc: caml-list@inria.fr MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810111158.49053.kuba@mareimbrium.org> X-Miltered: at discorde with ID 48F0CD3C.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 andrej:01 toplevel:01 toplevel:01 emacs:01 syntax:01 ocaml's:01 installers:01 ocaml's:01 ocaml:01 bytecode:01 masm:01 cygwin:01 mingw:01 cygwin:01 On Friday 10 October 2008, Andrej Bauer wrote: > Kuba Ober wrote: > >> The requirements are very simple: 1. easy access to toplevel (with > >> line-editing) 2. editor which can send stuff to toplevel, points to > >> errors in source code, and is not Emacs. > > > > I've been reading through this thread and it all seems like a > > 300-liner in Qt/C++ (yes, it's that powerful) (excluding syntax > > definition for Qt's editor widget, if one doesn't exist somewhere for > > grabs). > > I should have added a 0-th requirement: > > 0. easy to install on Windows. > > This means that anything which requires more than clicking on setup.exe > and following some instructions is out of the question (which is why, > for example, drocaml is out of question). I don't think I want to get involved in wrapping Ocaml's installation, but all you'd need is to run two installers: Ocaml's, followed by the IDE's. Due to the way Ocaml works under Windows, it seems that the only option you have is to use the bytecode, as compiled code requires either an implementation of MASM and a linker, or Cygwin (or rather, fixes to mingw so that it can do what Cygwin does for Ocaml). > >> > Python has IDLE. Scheme has drscheme. Java has drjava. What does > >> > Haskell have? > > > > If IDLE is an IDE, then I'm Santa Claus ;) > > So where exactly did I claim it was an IDE? I just said "easy to use > interface". Yup, definitely Santa Claus. ;) OK, I'm off to work on tonight and tomorrow. My minimal goals are: 1. Editor with at least skeleton syntax highligting 2. Output window so that you can see results of your program running 3. Toplevel window so that you can run interactive sessions. The toplevel initially won't have "readline" support, as I have to code it from scratch, but since it's all clickable and selectable, it should be a good first approximation to readline. I'm still thinking how to organize the windows: should there be tabs and an SDI-like interface? Here's how I'll do it initially: 1. One window, with a menu and a tabbed area. 2. On startup, there's a tab for toplevel. 3. If you edit a file and choose to run it, the output tab will appear, showing the output. If there are errors, they will be highlighted in the source. I have to check how easy it is to capture errors from Windows version of Ocaml, and whether there should be a separate Error sub-window under the tabbed area. I also need to think about how to support the debugger, even though I admit I have never used Ocaml's debugger. This would be for another weekend, though. The goal is to have something where you can edit your sources and run them, with errors being handled "intuitively enough". The thing will be written in C++, as getting the necessary Ocaml bindings generated for Qt would take too much time initially. Maybe later I'd port it to Ocaml, as long as I can get the bindings to work well on Windows. In the long run I'd need to patch mingw as appropriate so that Ocaml could use it without subjecting people to Cygwin, and so that the whole thing could be actually easily built once you install Ocaml, Mingw and Qt's sources. Mingw toolchain needs relatively few files to run, and is rather trivial to set up (just copy a bunch of files into a directory, and set up the path). Cheers, Kuba