From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id BDAEBBC57 for ; Sun, 28 Nov 2010 08:40:23 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap4EAKqV8UxQDPIvYGdsb2JhbACjDQsXCwgGFAMfwXyFRwSEXIkU X-IronPort-AV: E=Sophos;i="4.59,269,1288566000"; d="scan'208";a="80333875" Received: from smtp21.orange.fr ([80.12.242.47]) by mail4-smtp-sop.national.inria.fr with ESMTP; 28 Nov 2010 08:40:23 +0100 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2109.orange.fr (SMTP Server) with ESMTP id B85111C00086; Sun, 28 Nov 2010 08:40:22 +0100 (CET) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2109.orange.fr (SMTP Server) with ESMTP id A8DB51C0008B; Sun, 28 Nov 2010 08:40:22 +0100 (CET) Received: from [192.168.1.114] (c-67-188-213-250.hsd1.ca.comcast.net [67.188.213.250]) by mwinf2109.orange.fr (SMTP Server) with ESMTP id B29981C00086; Sun, 28 Nov 2010 08:40:21 +0100 (CET) X-ME-UUID: 20101128074021731.B29981C00086@mwinf2109.orange.fr X-ME-User-Auth: padator@wanadoo.fr Subject: Re: [Caml-list] Desktop GUI toolkits - current state of the art? Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: Yoann Padioleau In-Reply-To: Date: Sat, 27 Nov 2010 23:40:20 -0800 Cc: OCaml List Content-Transfer-Encoding: quoted-printable Message-Id: References: <299CA113-601F-4C96-B012-E092F14EEEE6@wanadoo.fr> <4EF2E0B5-58C9-4F1D-ABBF-630863619E17@wanadoo.fr> To: Martin DeMello X-Mailer: Apple Mail (2.1081) X-Spam: no; 0.00; gtk:01 lablgtk:01 ocaml:01 ocaml:01 lablgtk:01 gtk:01 higher-level:01 wiki:01 notation:01 pfff:01 sourceforge:01 wrote:01 wrote:01 syntactic:01 syntactic:01 On Nov 27, 2010, at 10:38 PM, Martin DeMello wrote: > On Sat, Nov 27, 2010 at 12:39 AM, Yoann Padioleau = wrote: >> On Nov 24, 2010, at 1:38 AM, Martin DeMello wrote: >>>=20 >>> Both ruby and vala make an effort to provide nice syntactic support >>> for gtk code, so that it looks like a natural part of the language. >>=20 >> Could you give some example of code explaining that ? >> Code in vala/ruby vs same code in lablgtk. >=20 > Here's the table packing example in ruby and ocaml: >=20 > = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-packing-tables-demo > = http://plus.kaist.ac.kr/~shoh/ocaml/lablgtk2/lablgtk2-tutorial/x509.html I honestly don't see any difference. Where do you see "nice syntactic = support for gtk code" in the ruby version ? >=20 > They both more or less follow the C API, but the ruby code looks like > natural ruby (perhaps because ruby has a more imperative flavour than > OCaml does), whereas the OCaml code looks there should be a more > declarative, higher-level way of doing things. >=20 > Vala is currently experimenting with gtkon, a declarative layout > language that embeds vala code "islands", and is compiled into pure > vala by a preprocessor. >=20 > http://code.google.com/p/gtkaml/wiki/Gtkon >=20 > This seems like a very promising direction, Again, I don't see the advantage of this JSON notation vs doing the same = in plain OCaml. > though I don't know how > well an equivalent approach would work in OCaml. In https://github.com/facebook/pfff/blob/master/commons/gui.ml I've modified slightly the lablgtk API to be more compositional. >=20 > martin