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 3E1F4820A2 for ; Tue, 10 Sep 2013 23:10:13 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of gour@atmarama.net) identity=pra; client-ip=80.91.229.3; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gclci-caml-list@m.gmane.org"; x-sender="gour@atmarama.net"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of gclci-caml-list@m.gmane.org designates 80.91.229.3 as permitted sender) identity=mailfrom; client-ip=80.91.229.3; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gclci-caml-list@m.gmane.org"; x-sender="gclci-caml-list@m.gmane.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of postmaster@plane.gmane.org designates 80.91.229.3 as permitted sender) identity=helo; client-ip=80.91.229.3; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gclci-caml-list@m.gmane.org"; x-sender="postmaster@plane.gmane.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoQEAMGJL1JQW+UDf2dsb2JhbABbgz+xEgGTRRYOAQELCwoIFCiCZhsSBgZCNC1Ih3IIohKhAo4HFYVjA48siEmBMJNegWY X-IPAS-Result: AoQEAMGJL1JQW+UDf2dsb2JhbABbgz+xEgGTRRYOAQELCwoIFCiCZhsSBgZCNC1Ih3IIohKhAo4HFYVjA48siEmBMJNegWY X-IronPort-AV: E=Sophos;i="4.90,879,1371074400"; d="scan'208";a="26405908" Received: from plane.gmane.org ([80.91.229.3]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 10 Sep 2013 23:10:12 +0200 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VJVCM-0005FJ-N3 for caml-list@inria.fr; Tue, 10 Sep 2013 23:10:10 +0200 Received: from 78-1-240-181.adsl.net.t-com.hr ([78.1.240.181]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 Sep 2013 23:10:10 +0200 Received: from gour by 78-1-240-181.adsl.net.t-com.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 Sep 2013 23:10:10 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Gour Date: Tue, 10 Sep 2013 23:09:28 +0200 Message-ID: <20130910230928.2d51cd39@atmarama.noip.me> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 78-1-240-181.adsl.net.t-com.hr X-Newsreader: Claws Mail 3.9.1 (GTK+ 2.24.18; x86_64-pc-linux-gnu) X-Validation-by: gour@atmarama.net Subject: [Caml-list] OCaml vs Ada and/or GUI options 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 -- The spirit soul bewildered by the influence of false ego thinks himself the doer of activities that are in actuality carried out by the three modes of material nature. http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810