From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id C5167820A1 for ; Wed, 11 Sep 2013 03:01:02 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of berenger@riken.jp) identity=pra; client-ip=134.160.33.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="berenger@riken.jp"; x-sender="berenger@riken.jp"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of berenger@riken.jp designates 134.160.33.176 as permitted sender) identity=mailfrom; client-ip=134.160.33.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="berenger@riken.jp"; x-sender="berenger@riken.jp"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of postmaster@postman.riken.jp designates 134.160.33.176 as permitted sender) identity=helo; client-ip=134.160.33.176; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="berenger@riken.jp"; x-sender="postmaster@postman.riken.jp"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmAAAKi/L1KGoCGwmWdsb2JhbABbgz/DNIE1DgEBAQEBCAsLBxQogiUBAQU4NQYFEQsYCRYPCQMCAQIBRRMIAQEQh24MwxWOBxWBRoQdA4k0jkKBL4UAjmuBWQ X-IPAS-Result: AmAAAKi/L1KGoCGwmWdsb2JhbABbgz/DNIE1DgEBAQEBCAsLBxQogiUBAQU4NQYFEQsYCRYPCQMCAQIBRRMIAQEQh24MwxWOBxWBRoQdA4k0jkKBL4UAjmuBWQ X-IronPort-AV: E=Sophos;i="4.90,881,1371074400"; d="scan'208";a="26415733" Received: from postman4.riken.jp (HELO postman.riken.jp) ([134.160.33.176]) by mail3-smtp-sop.national.inria.fr with ESMTP; 11 Sep 2013 03:01:00 +0200 Received: from postman.riken.jp (postman4.riken.jp [127.0.0.1]) by postman.riken.jp (Postfix) with SMTP id 345DD8280C3 for ; Wed, 11 Sep 2013 10:00:57 +0900 (JST) Received: from [172.27.98.103] (rikad98.riken.jp [134.160.214.98]) by postman.riken.jp (Postfix) with ESMTPA id 9BFA57F803F for ; Wed, 11 Sep 2013 10:00:56 +0900 (JST) Message-ID: <522FC0C2.8080600@riken.jp> Date: Wed, 11 Sep 2013 10:00:50 +0900 From: Francois Berenger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 MIME-Version: 1.0 To: caml-list@inria.fr References: <20130910230928.2d51cd39@atmarama.noip.me> In-Reply-To: <20130910230928.2d51cd39@atmarama.noip.me> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2013.9.11.5115 Subject: Re: [Caml-list] OCaml vs Ada and/or GUI options You could also clearly decouple the "engine" of your software from its GUI. As was done in MLDonkey and plan9's sam test editor: http://plan9.bell-labs.com/sys/doc/sam/sam.html On 09/11/2013 06:09 AM, Gour wrote: > Hello, > > TL;DR: Which type-safe language (I'm considering OCaml & Ada) > would you recommend me for writing multi-platform open-source GUI app > using some GUI (except GTK) bindings and why? > > Long version... > Some years ago I was considering which language to use for > writing multi-platform open-source GUI application. Considering it's > meant to be done as hobby project, I wanted to avoid C(++), fiddling > with pointers, memory allocation and other low-level stuff and hoped to > use some more type-safe language to eliminate certain kind of bugs nad > have more fun when programming. > > The idea of FP seemed interesting and I did start learning Haskell which > was fun, but few potential contributors who showed up for the project, > found Haskell's learning curve too steep and I admit that reading too > many papers about category theory, monads everywhere was not too > appealing to me as well. > > Contributors run away and I had to postpone the project. > > Later, when considering to revive idea of doing the project I did > consider D, but found out it still too unstable and GTK bindings are > practically the only choice. > > Some further exploration has brought me to Ada which seems to be very > mature language, has performant compiler GNAT and even Qt bindings. > > Moreover, Ada's 2012 features with contracts & multi-core support look > nice. > > For a short time I did considered OCaml, but although pleased with the > language itself (although, based on my familiarity with both, I consider > Haskell's syntax a bit cleaner), only GTK bindings were not satisfying. > I know the bindings are mature, but GTK itself has poor support on > Windows & Mac OS, small team of core devs, does not look good on > non-Linux etc. and the recent steps with GTK3 & roadmap for GTK4 (where > the GTK devs say that the toolkit is meant for 'small apps only' does > not look promising). On top of that, I only see projects moving from GTK > to Qt... > > For a short time I explored some exotic languages like Nimrod > (interesting, but small community, only GTK bindings), then Cobra & F# - > despite getting encouraging input: "I'd recommend F# hands down. OCaml > is still a 1990s language." > (http://stackoverflow.com/questions/12437792/converting-ocaml-to-f-is-there-an-ocaml-ide-with-gui-debugging-like-visual-stu/13076028#13076028), > somehow I do not like idea of embracing NET/Mono considering that even > do not have Mono installed on my (Debian) machine. > > Go lang is not interested for me, do not like Java stuff, Rust is not > finished... which led me to Ada (or Python+Cython+PyQt as last resort). > Actually, I was thinking to write backend stuff in Ada and then possibly > use PyQt as GUI front-end. > > However, in a recent time when visiting OCaml's web site I could see > that lot of things are going on...compiler is getting improved with > multi-core support, lablQt, wxOCaml bindings, OPAM, editor tools... > > It looks as there is some kind of OCaml revival or am I completely > wrong? > > Whatever it is, now I'm again looking closely to OCaml and although I am > aware that the two languages are meant for programming in quite > different styles/paradigms, I'd be grateful if someone can shed some > comment and/or enhance my observations: > > a) both Ada and OCaml seems to have mature & robust compiler generating > native code and although language-shootout's benchmarks are in favour of > Ada, I believe that in practice OCaml compiler can generate quick-enough > code for 'general GUI app' which is not too behind C(++) code > > b) both Ada & OCaml languages seems to be suitable languages for good > engineering practice writing type-safe code discovering lot of bugs > duing the development/compile phase albeit using different paradigms > (e.g. imperative vs FP) > > c) both languages seems to have decent tools support - I am mostly > satisfied using Vim - Ada has GNAT IDE and gprbuild system, but OCaml > OPAM seems to improve situation a lot. > > d) Ada has mature GTK bindings and two projects with Qt bindings, but > the more mature ones are not certain about Qt5 support. Otoh, OCaml's > GTK bindings seems to be mature, but that does not influence me much > considering general status of GTK's multi-platform support. > > I see that there is labltk project, some work on lablqt as well as > wxOCcaml...Tk could be interesting 'cause I heard that it looks nice in > newer releases and it is not so bloated. > > Lablqt initiative is inspiring, but does not, afaict, enjoy much support > withing community, while wxOCaml project is tempting due to the reason > that for long time (even while playing with Haskell) I was looking at wx > bindings 'cause those are the only ones using native toolkits and > looking good everywhere, although *today* I might be more please if > OCamlPro would be behind lablqt for the simple reason of the state of Qt > project vs wxWidgets. > > Another concern is whether wxOCaml is just a testing prototype or > something one can count on? > > e) both Ada & OCaml are suited for open-source projects, but my > impression is that OCaml's community is larger with much more projects > and things going on while the Ada's open-source community is pretty > limited and/or closed withing proprietary projects only. > > In #ocaml I was told that neither Ada nor OCaml are very suitable for > writing GUI apps, but I still believe there is use-case for classical > desktop apps and that it's not true that everything has to run within > browser. :-) > > Can anyone provide some comments about my (imperfect) analysis and > correct and misunderstanding I might have as well as providing some > points which might be relevant to properly decide which > language/ecosytem might be more suitable for my need of writing > multi-platform open-source app using some GUI bindings? > > Besides that, I also have need for using Sqlite3 as well as 3rd party C > lib providing some calculation functions. Any tool helping generating > bindings for C libs? > > > Sincerely, > Gour >