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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 4165ABC57 for ; Sun, 28 Nov 2010 07:38:19 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhwBAB+H8UzRVaE0k2dsb2JhbACjBQgVAQEBAQkJCgkRAx+oWolkghiDZy6IVgEBAwWFQgSEWoYH X-IronPort-AV: E=Sophos;i="4.59,269,1288566000"; d="scan'208";a="89501419" Received: from mail-fx0-f52.google.com ([209.85.161.52]) by mail1-smtp-roc.national.inria.fr with ESMTP; 28 Nov 2010 07:38:19 +0100 Received: by fxm5 with SMTP id 5so2521117fxm.39 for ; Sat, 27 Nov 2010 22:38:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=bof5iKswgh+rrTfDCmqk04FvEh0tOQUSOZrjgt4GWLU=; b=ObPMXm0KlZPiUzlPzcCOyWHOsiiJi3fDmk7a63zUknReUb3MgQalio0xvCsDiVwntP vkrcyIF630ngLUIDr30lC/+UAi/wnDFobIoW5qjgfAibaO7r/Zs/6/XeBR/IpxuZ7h5t knMr8+D71aWVfsGpnzXnU150m80Hgh65W8WQQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=bFml4qgrAUCYCv7yI/o7qdYGWJOc97e5Tkhc7Mp2hMo7qneOjjsmNgcLHjoHTFJAew xDzgj9ahJGBMnrxtQtHjko6dmVZOMpPztTG1sg01zRb/WR53YJ30B0Yt+ckZqegQbaxK DDQax2ceKjpjgnAeKmPxERvzjA2jZETTtIaUA= MIME-Version: 1.0 Received: by 10.223.78.140 with SMTP id l12mr3799443fak.147.1290926296920; Sat, 27 Nov 2010 22:38:16 -0800 (PST) Received: by 10.223.75.196 with HTTP; Sat, 27 Nov 2010 22:38:16 -0800 (PST) In-Reply-To: <4EF2E0B5-58C9-4F1D-ABBF-630863619E17@wanadoo.fr> References: <299CA113-601F-4C96-B012-E092F14EEEE6@wanadoo.fr> <4EF2E0B5-58C9-4F1D-ABBF-630863619E17@wanadoo.fr> Date: Sun, 28 Nov 2010 12:08:16 +0530 Message-ID: Subject: Re: [Caml-list] Desktop GUI toolkits - current state of the art? From: Martin DeMello To: Yoann Padioleau Cc: OCaml List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; gtk:01 lablgtk:01 ocaml:01 ocaml:01 lablgtk:01 higher-level:01 wiki:01 sourceforge:01 wrote:01 wrote:01 syntactic:01 preprocessor:01 caml-list:01 imperative:01 api:02 On Sat, Nov 27, 2010 at 12:39 AM, Yoann Padioleau wrot= e: > On Nov 24, 2010, at 1:38 AM, Martin DeMello wrote: >> >> 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. > > Could you give some example of code explaining that ? > Code in vala/ruby =A0vs same code in lablgtk. Here's the table packing example in ruby and ocaml: http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-packing-tables-demo http://plus.kaist.ac.kr/~shoh/ocaml/lablgtk2/lablgtk2-tutorial/x509.html 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. Vala is currently experimenting with gtkon, a declarative layout language that embeds vala code "islands", and is compiled into pure vala by a preprocessor. http://code.google.com/p/gtkaml/wiki/Gtkon This seems like a very promising direction, though I don't know how well an equivalent approach would work in OCaml. martin