From: Alain Frisch <alain.frisch@lexifi.com>
To: Martin DeMello <meartindemello@gmail.com>
Cc: OCaml List <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Desktop GUI toolkits - current state of the art?
Date: Wed, 24 Nov 2010 22:37:59 +0100 [thread overview]
Message-ID: <4CED85B7.30803@lexifi.com> (raw)
In-Reply-To: <AANLkTi=7vLuUgaaT_7uxsTkmH+YJ7OJaaonT_7A0zU8m@mail.gmail.com>
On 11/24/2010 10:47 AM, Martin DeMello wrote:
> No, I'm on linux, but CSML does look very interesting. Does it work
> well with Mono?
Yes, CSML itself has been adapted to work with Mono and I did a few
tests (some of screenshots show Windows Forms GUIs controlled by OCaml
code, under Linux with Mono). External users reported successful uses as
well.
At some point, we tried to run our main application under Mono (the
application is mostly OCaml, plus a very small amount of C#, and a lot
of CSML to make big parts of .Net libraries available to OCaml). We
quickly realized that some widgets which we use a lot in our application
simply don't work very well under Mono. For instance, the
WebBrowser control is quite broken under Mono. This really has nothing
to do with CSML, it's just that relying on Mono only to get nice GUIs
under Linux might not be optimal.
> I'd love to read that when you do. I was surprised not to see much
> interest in GUI DSLs in OCaml. What is generalised recursion?
Being able to write things like:
lazy let rec button1 =
button ~click:(fun () -> button2 # disable) "Button1"
and button2 =
button ~click:(fun () -> button1 # disable) "Button2"
in
...
As the lazy keyword suggests, we rely on lazy evaluation to evaluate
such recursive definitions. The code above is equivalent to:
let rec button1 =
lazy (button ~click:(fun () -> (Lazy.force button2) # disable) "Button1")
and button2 =
lazy (button ~click:(fun () -> (Lazy.force button1) # disable) "Button2"
in
...
(also replacing any instance of button1, resp. button2 in ... by
Lazy.force button1, resp. Lazy.force button1).
The little extension makes it easier to define in a single big
recursive definition several widgets with associated callbacks
and mutual interactions. Without the feature, the natural thing to do
is to create widgets first and then bind events, which looks less
functional (and less local).
Alain
next prev parent reply other threads:[~2010-11-24 21:38 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-23 14:19 Martin DeMello
2010-11-23 23:06 ` [Caml-list] " Jacques Garrigue
2010-11-24 9:33 ` Martin DeMello
2010-11-24 14:06 ` Michael Ekstrand
2010-11-24 15:56 ` Andrei Formiga
2010-11-23 23:28 ` Yoann Padioleau
2010-11-24 9:38 ` Martin DeMello
2010-11-26 19:09 ` Yoann Padioleau
2010-11-28 6:38 ` Martin DeMello
2010-11-28 7:40 ` Yoann Padioleau
2010-11-29 14:21 ` Martin DeMello
2010-11-23 23:32 ` Alain Frisch
2010-11-24 9:47 ` Martin DeMello
2010-11-24 15:57 ` Hezekiah M. Carty
2010-11-28 8:28 ` bluestorm
2010-11-28 22:20 ` Adrien
2010-11-29 13:20 ` Adrien
2010-11-29 14:02 ` Martin DeMello
2010-12-10 6:04 ` Maxence Guesdon
2010-11-29 16:47 ` Hezekiah M. Carty
2010-11-24 21:37 ` Alain Frisch [this message]
2010-11-24 22:32 ` Jeremy Yallop
2010-12-01 11:43 ` Alain Frisch
2010-11-24 10:21 ` Mihamina Rakotomandimby
2010-11-26 18:59 ` Richard Jones
2010-11-28 6:40 ` Martin DeMello
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CED85B7.30803@lexifi.com \
--to=alain.frisch@lexifi.com \
--cc=caml-list@yquem.inria.fr \
--cc=meartindemello@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox