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 78EAC7EC6E for ; Mon, 30 Dec 2013 09:43:43 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of torkvema@gmail.com) identity=pra; client-ip=209.85.220.52; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="torkvema@gmail.com"; x-sender="torkvema@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of torkvema@gmail.com designates 209.85.220.52 as permitted sender) identity=mailfrom; client-ip=209.85.220.52; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="torkvema@gmail.com"; x-sender="torkvema@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-pa0-f52.google.com) identity=helo; client-ip=209.85.220.52; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="torkvema@gmail.com"; x-sender="postmaster@mail-pa0-f52.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjUDAMwxwVLRVdw0lGdsb2JhbABYg0NVpmqKJIhUgRAIFg4BAQEBBwsLCRIqgiUBAQEDAUABGxILAQMBCwYFCw0NCBkhAQERAQUBChIGExKHXQEDCQgNoj6MXIMJkCAKGScDCmSEexEBBQyMfoIPBAcKhCwEiT2MboFsgTCLKgODShgphF43 X-IPAS-Result: AjUDAMwxwVLRVdw0lGdsb2JhbABYg0NVpmqKJIhUgRAIFg4BAQEBBwsLCRIqgiUBAQEDAUABGxILAQMBCwYFCw0NCBkhAQERAQUBChIGExKHXQEDCQgNoj6MXIMJkCAKGScDCmSEexEBBQyMfoIPBAcKhCwEiT2MboFsgTCLKgODShgphF43 X-IronPort-AV: E=Sophos;i="4.95,573,1384297200"; d="scan'208";a="42846410" Received: from mail-pa0-f52.google.com ([209.85.220.52]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 30 Dec 2013 09:43:41 +0100 Received: by mail-pa0-f52.google.com with SMTP id ld10so11462135pab.39 for ; Mon, 30 Dec 2013 00:43:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=mGxZLhqtwFgLCKKHYoNpXdL9VASwp360PszbtgGADIM=; b=TRIwxXiowpl4XXabTlDAfFOR0QNZvrn4jg/FnsBcGmypr939cbkuu+gPteyoVQCWMR deYFnWeEmGSLKgExFL5IAQ53gs9NufHlPORfCZAu1mPvMQxF2QrdHTsuyPtLOBtbEzuk QYCtIU8hkZLfndOy4YKriJtGQ3OGVhpxc//WoCTj2WdIchYvTXOC+MOkiWjqUnQZ+uqU gVoqk8yGrf77qMKkijVjwtE89x+YcMGithMSasQfHy4ZJaohjD90RikhX2bGo6QzT86N 5gI71DelI6IYfsfrweOoMEanvtp6aT5oRhOkiXEJbfuibKFOB/HpzLTFFnpd5DHr07su G3jA== X-Received: by 10.66.180.200 with SMTP id dq8mr67318466pac.104.1388393019728; Mon, 30 Dec 2013 00:43:39 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.123.69 with HTTP; Mon, 30 Dec 2013 00:43:18 -0800 (PST) In-Reply-To: References: From: Vsevolod Velichko Date: Mon, 30 Dec 2013 12:43:18 +0400 Message-ID: To: Kakadu Cc: Paolo Donadeo , OCaml mailing list Content-Type: multipart/alternative; boundary=047d7ba972c2bfe7b604eebc70d3 Subject: Re: [Caml-list] [ANN] Lablqt --047d7ba972c2bfe7b604eebc70d3 Content-Type: text/plain; charset=ISO-8859-1 Hello, As I was the beta-tester of the lablqml, I can share some of my experience :) I've written an example[1] that creates a couple of views on top of OCaml-created data models, emits signals from OCaml, calls OCaml callbacks from QML and so on. It can be taken into account as some proof of concept. At first, as Dmitry said there's some simple hardcoded startup, but it was added on behalf of my request (I wanted one to be able to use GUI without writing any line of C++ code). However one can still put their own startup in C++. Second, the developer still must deal with C++ compilation and linking OCaml object files with C++ ones. AFAIK, Dmitry intends to improve the process in some future, but currently it a bit tricky. I haven't tried native OCaml build systems (such as ocamlbuild or omake) with it yet, but using the Makefile one can see, that they have to manually resolve all the Qt libraries to link with. Third, there're still some issues. E.g. creating the data item object used in view, I was unable to create a mutable property that can be used on top level of delegate[2] so I had to expose[3] the object itself and access its property, otherwise property changes weren't revealed to QML. But anyway while lablqt is still to be considered as some beta release, I claim that it is already more usable than e.g. lablgtk. [1] https://github.com/torkve/melange-seawar [2] https://github.com/torkve/melange-seawar/blob/master/gui.qml#L85 [3] https://github.com/torkve/melange-seawar/blob/master/gui.ml#L43 Best wishes and have a nice day, Vsevolod Velichko 2013/12/19 Kakadu > Paolo, > > At the moment I have tested main use case of C++ in QtQuick: > implementing business logic which expected to work fast. > > I can name three limitations: > > 1) If you need complex GUI control (that doesn't suit well into > QtQuick paradigm) you will probably need to implement it in C++ by > subclassing QQuickItem. The only example of this I have seen is pie > chart using QPainter from Qt Docs. > Reason: I don't clearly understand when this complex controls are > needed. QML itself is rather powerful one. > > 2) At this moment startup process is a little bit hardcoded in one C++ > function. i.e. some features are unavailable. It was made for > simplicity but I don't see any theoretical reason against rewriting it > in more verbose way in 1 weekend. > > 3) I have working demo with main GUI thread and some OCaml threads > that do some work and report changes in main thread. It seems that it > works OK but I'm not sure what will happen if we construct more > interesting examples. > > Kind regards, > Kakadu > > > On Thu, Dec 19, 2013 at 7:53 AM, Paolo Donadeo > wrote: > > At present, what are the limitation in using OCaml/QT compared to using > > C++/QT? > > > > > > -- > > Paolo Donadeo, sent with Gmail on Android > > > > Il 15/dic/2013 22:12 "Kakadu" ha scritto: > >> > >> Salut, > >> > >> From today lablqt is available in opam. With it you can create user > >> interfaces in declarative manner in QML and connect it with OCaml > >> using `mocml` code generator and `lablqml` ocamlfind package. Qt 5.2 > >> is required for compilation > >> > >> More information you can get at [1]. There is mine opam repo where > >> demo application is included. It is called QOCamlBrowser -- > >> application similar to default ocamlbrowser. > >> > >> All comments will be appreciated. > >> > >> Kind regards, > >> Dmitrii Kosarev aka Kakadu > >> > >> [1] http://kakadu.github.io/lablqt > >> > >> -- > >> Caml-list mailing list. Subscription management and archives: > >> https://sympa.inria.fr/sympa/arc/caml-list > >> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > >> Bug reports: http://caml.inria.fr/bin/caml-bugs > --047d7ba972c2bfe7b604eebc70d3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hello,

As I was the beta= -tester of the lablqml, I can share some of my experience :)

I= 've written an example[1] that creates a couple of views on top of=20 OCaml-created data models, emits signals from OCaml, calls OCaml=20 callbacks from QML and so on. It can be taken into account as some proof of concept.

At first, as Dmitry said there's some simple hardco= ded startup, but it was added on behalf of my request (I wanted one to be a= ble to use GUI without writing any line of C++ code). However one can still= put their own startup in C++.

Second, the developer still must deal with C++ compilation and li= nking OCaml object files with C++ ones. AFAIK, Dmitry intends to improve th= e process in some future, but currently it a bit tricky. I haven't trie= d native OCaml build systems (such as ocamlbuild or omake) with it yet, but= using the Makefile one can see, that they have to manually resolve all the= Qt libraries to link with.

Third, there're still some issues. E.g. creating the dat= a item object used in view, I was unable to create a mutable property that = can be used on top level of delegate[2] so I had to expose[3] the object it= self and access its property, otherwise property changes weren't reveal= ed to QML.

But anyway while lablqt is still to be considered= as some beta release, I claim that it is already more usable than e.g. lab= lgtk.

[1] https://github.com/torkve/melange-seawar
[2] https://github.com/torkve/melange-seawar/blob/master/gui.qml#L85<= br>
[3] https://github.com/torkve/mela= nge-seawar/blob/master/gui.ml#L43

Best wishes and have a nice day,
Vsevolod Velichko


2013/12/19 Kakadu <= kakadu.hafan= ana@gmail.com>
Paolo,

At the moment I have tested main use case of C++ in QtQuick:
implementing business logic which expected to work fast.

I can name three limitations:

1) If you need complex GUI control (that doesn't suit well into
QtQuick paradigm) you will probably need to implement it in C++ by
subclassing QQuickItem. The only example of this I have seen is pie
chart using QPainter from Qt Docs.
Reason: I don't clearly understand when this complex controls are
needed. QML itself is rather powerful one.

2) At this moment startup process is a little bit hardcoded in one C++
function. i.e. some features are unavailable. It was made for
simplicity but I don't see any theoretical reason against rewriting it<= br> in more verbose way in 1 weekend.

3) I have working demo with main GUI thread and some OCaml threads
that do some work and report changes in main thread. It seems that it
works OK but I'm not sure what will happen if we construct more
interesting examples.

Kind regards,
Kakadu


On Thu, Dec 19, 2013 at 7:53 AM, Paolo Donadeo <p.donadeo@gmail.com> wrote:
> At present, what are the limitation in using OCaml/QT compared to usin= g
> C++/QT?
>
>
> --
> Paolo Donadeo, sent with Gmail on Android
>
> Il 15/dic/2013 22:12 "Kakadu" <kakadu.hafanana@gmail.com> ha scritto:
>>
>> Salut,
>>
>> From today lablqt is available in opam. With it you can create use= r
>> interfaces in declarative manner in QML and connect it with OCaml<= br> >> using `mocml` code generator and `lablqml` ocamlfind package. Qt 5= .2
>> is required for compilation
>>
>> More information you can get at [1]. There is mine opam repo where=
>> demo application is included. It is called QOCamlBrowser --
>> application similar to default ocamlbrowser.
>>
>> All comments will be appreciated.
>>
>> Kind regards,
>> Dmitrii Kosarev aka Kakadu
>>
>> [1] h= ttp://kakadu.github.io/lablqt
>>
>> --
>> Caml-list mailing list. =A0Subscription management and archives: >> https://sympa.inria.fr/sympa/arc/caml-list
>> Beginner's list: http://groups.yahoo.com/group/ocaml_beginner= s
>> Bug reports: http://caml.inria.fr/bin/caml-bugs

--047d7ba972c2bfe7b604eebc70d3--