From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id DC557BC75 for ; Wed, 23 Feb 2005 02:22:31 +0100 (CET) Received: from ptb-relay01.plus.net (ptb-relay01.plus.net [212.159.14.212]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j1N1MV7t006561 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 23 Feb 2005 02:22:31 +0100 Received: from [80.229.56.224] (helo=chetara) by ptb-relay01.plus.net with esmtp (Exim) id 1D3lEV-000Mm8-0r for caml-list@yquem.inria.fr; Wed, 23 Feb 2005 01:22:31 +0000 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Cross-platform "Hello, World" graphical application in OCaml Date: Wed, 23 Feb 2005 00:05:01 +0000 User-Agent: KMail/1.7.1 References: <20050222120308.GA2975@furbychan.cocan.org> <200502222216.25721.jon@jdh30.plus.com> <4a4478d088d9fa3d5d1d82dd42b163d8@epfl.ch> In-Reply-To: <4a4478d088d9fa3d5d1d82dd42b163d8@epfl.ch> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200502230005.01479.jon@jdh30.plus.com> X-Miltered: at nez-perce with ID 421BDAD7.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 wrote:01 ocaml:01 renderer:01 api:01 widget:01 renderer:01 widget:01 gtk:01 wxwindows:01 imho:01 lambdas:01 syntax:01 inference:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: On Tuesday 22 February 2005 23:30, Daniel B=FCnzli wrote: > One nice thing to have would be a pure ocaml gui system (maybe along > the lines of Fruit [1] or Fudgets) with a functorized renderer > interface so that it can be used with/rendered by different graphic api > (e.g. see cegui [3,4]) or even inside a canvas widget. Input handling > should also be functorized so that it is easy to plug the gui system in > a particular environment. I prefer the idea of implementing a single back-end: a decent vector graphi= cs=20 renderer which uses OpenGL. I can't think of any reason I'd ditch these for= =20 another back-end. > However the big problem of these custom gui systems is the lack of > integration with the native gui system. This may not be an issue for > fullscreen vizualisation tools or games but can be for other > applications like editors (e.g., because you usually have a single=20 > window in which everything occurs (your gl context), you don't have > access to platform specific save dialogs, look and feel, etc., etc.). I disagree. =46irstly, you can have as many GL windows and contexts (and widgets) as yo= u=20 like. You aren't restricted to just having one window with one widget and o= ne=20 context. Secondly, using OpenGL does not prohibit the use of platform-specific look = and=20 feel. There is no reason you shouldn't be able to bring up native menus and= =20 dialogs. Qt, GTK and WxWindows all allow you to do this. Thirdly, Mathematica is one of the "editors" I use most often. It benefits= =20 greatly from embedded vector graphics (although software rendered for now)= =20 for features such as mathematical typesetting, graph generation and=20 visualisation. IMHO, vector graphics based editors are a huge step forward. Imagine having= an=20 OCaml IDE which typeset your program (lambdas, pattern matches, arrows,=20 subscripts etc.) and gave you graphical feedback on syntax, type inference= =20 and type checking, smooth scrolling, a search facility which animated its=20 results. The possibilities are endless. The editors I've seen under Linux are making tentative steps in the right=20 direction but they are still miles away from what could be achieved.=20 OCamlbrowser displays hierarchical lists of module contents graphically.=20 KEdit lets you flatten C++ function definitions, but C++ lacks nested=20 functions. Particularly in OCaml, programming could be so much easier with= =20 more sophisticated editors... =2D-=20 Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://ffconsultancy.com