From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 126A2BDCB for ; Wed, 31 Aug 2005 10:48:08 +0200 (CEST) Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.204]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j7V8m7HT021685 for ; Wed, 31 Aug 2005 10:48:07 +0200 Received: by nproxy.gmail.com with SMTP id x4so17179nfb for ; Wed, 31 Aug 2005 01:48:07 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=XcaVd95Lf36jiMBR32F9cwsyfnOG1OgwzcANJlxKf+ADjgEqvWVOUsu1GidvHrSiGa4OBH3WH381ycYw2c2wVbjWNv5sMq0Hd1a1hUqUspIR3nqgirUECZXLf+ZAtHEUS13vqGWJ7CamsrlLsmHjcgc0VYybzjM1gsOMG6LTmPc= Received: by 10.48.248.10 with SMTP id v10mr29673nfh; Wed, 31 Aug 2005 01:48:06 -0700 (PDT) Received: by 10.48.42.9 with HTTP; Wed, 31 Aug 2005 01:48:07 -0700 (PDT) Message-ID: <3d13dcfc05083101487092acd5@mail.gmail.com> Date: Wed, 31 Aug 2005 10:48:07 +0200 From: David MENTRE Reply-To: To: Jon Harrop Subject: Feeding the OCaml GUI troll (was: Re: [Caml-list] Does LablTk have a future?) Cc: caml-list@yquem.inria.fr In-Reply-To: <200508302001.58080.jon@ffconsultancy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050830174757.99765.qmail@web30510.mail.mud.yahoo.com> <200508302001.58080.jon@ffconsultancy.com> X-Miltered: at nez-perce with ID 43156EC7.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocaml:01 caml-list:01 labltk:01 ocaml:01 bindings:01 guis:01 widget:01 intersection:01 guis:01 underlined:01 gtk:01 gtk:01 macos:01 macos:01 doable:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.4 required=5.0 tests=RCVD_BY_IP,REPLY_TO_EMPTY autolearn=disabled version=3.0.3 Hello Jon, 2005/8/30, Jon Harrop : > I had better clarify before continuing. I see two viable approaches here: >=20 > 1. Write OCaml bindings to the native GUIs and then an OCaml wrapper that > abstracts the nativeness away. >=20 > 2. Write a new widget toolkit designed to render via OpenGL. >=20 > If we do (1) then it will handle skinning and the intersection of the set= s of > functionality of the native GUIs. >=20 > If we do (2) then customisation and skinning will be ignored but you have= the > advantage of real time 2D and 3D graphics. >=20 > Option (2) seems much easier and more useful to me. I've never cared abou= t > skinning... Well, in option (1), as somebody else underlined it, it is a lot more than just skinning. How do you handle i18n and l10n issues? How to display bidirectionnal languages? How to write Arabic, Hebrew or Chinese characters? How to take input in Japanese or Tamil? How to handle copy/paste and drag & drop with other applications of the platform? Or to print PDF with Arabic and Indian characters in the same document? Maybe you don't have those issues for you local market, Jon. But as soon as you are writting graphical applications to be used worldwide, those issues are coming out pretty quickly. This is at least a requirement for my application. I really fear your under estimate the amount of work needed to accomplish such a job. And the OCaml community seems pretty fragmented on this GUI front. To improve on the situation, I see following options: 1. improve Labgtk2 documentation and use Gtk2 on all patforms. As our try on Win32 have shown, compiling Gtk2 on Windows seems pretty complicated and a moving target, albeit not impossible to do. I don't know for MacOS X. And Gtk2 behaviour is different on Win32 than native Win32 applications; 2. write a *simple* GUI front end, in OCaml, with only simple modules and/or simple objects. No fancy use of OCaml type system. Stay close to ML core. Use Labgtk2, native Win32 and MacOS X libraries to render the GUI. However I don't know the complexity of handling gory details, like encoding of strings; 3. (Jon option) write a pure GUI from scratch, in pure OCaml. A project similar to Qt or WxWidgets for C++. It seems doable to have a basic GUI but handling all i18n and desktop interoperability issues seems pretty complicated; 4. Use Labltk. I can't really comment on it, as I have never used it and can't say about its graphical behaviour or desktop integration (copy/paste and drag&drop); 5. drop OCaml to write GUI. Use other languages (usually C++) to make front-ends and use OCaml code only as backend, communicating through sockets or shared memory. Maybe the most viable long term solution. Personnally, I don't know what decision to take. My current GUI code is in Lablgtk2 but, as stated in other emails, use of Gtk2 is too difficult for me. And I don't want to go into another reinvent the wheel syndrom. (sigh) Yours, d.