caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Re: [Caml-list] Cross-platform "Hello, World" graphical application in OCaml
       [not found] <20050223054011.3414.28936.Mailman@yquem.inria.fr>
@ 2005-03-02  6:36 ` Ken Rawlings
  2005-03-02  6:56   ` Nicolas Cannasse
  2005-03-02 11:40   ` Richard Jones
  0 siblings, 2 replies; 8+ messages in thread
From: Ken Rawlings @ 2005-03-02  6:36 UTC (permalink / raw)
  To: caml-list

On Wednesday 23 February 2005 03:57, Jon Harrop wrote:
>I'd suggest sticking to lablglut and writing your own GUI entirely using
>OpenGL though, as I have found this to be much more stable. I don't really
>think users will be too bothered by a slightly-different-looking GUI though
>especially if it looks better. :-)

I've been down this road myself. I posted an OCaml version of Conway's
Game of Life on my webpage [1] a while back that uses "Kog", an OCaml
OpenGL based GUI I've been working on. The Life application only uses
the label, checkbox and button controls, but Kog also supports
spinners and drop-down listboxes.

My experiences building Kog were overall positive. However, writing a
full-featured GUI from scratch is a lot of work, so Kog is likely to
remain a toy implementation for the foreseeable future. If there's
much interest in the OCaml community for this sort of thing though,
I'd love to work with a group on a project getting a full-featured
lightweight GUI up and running with OCaml, whether it be on OpenGL
directly, or one of the higher level vector libraries.

Speaking of GUI libraries, I'm looking into writing a higher-level
wrapper around the GUI parts of Harry Chomsky's OCaml-Win32
library[2]. If anyone has already done this (and made it available
under a LGPL or BSD like license) and I've somehow missed it, please
let me know and I'll contribute to your project rather than
reinventing the wheel.

Thanks,
Ken Rawlings

[1] http://www.kenrawlings.com/archives/2004/10/06/life/
[2] http://www.speakeasy.org/~hchomsky/ocaml-win32.html


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Caml-list] Cross-platform "Hello, World" graphical application in OCaml
  2005-03-02  6:36 ` [Caml-list] Cross-platform "Hello, World" graphical application in OCaml Ken Rawlings
@ 2005-03-02  6:56   ` Nicolas Cannasse
  2005-03-02 11:40   ` Richard Jones
  1 sibling, 0 replies; 8+ messages in thread
From: Nicolas Cannasse @ 2005-03-02  6:56 UTC (permalink / raw)
  To: Ken Rawlings, caml-list

> Speaking of GUI libraries, I'm looking into writing a higher-level
> wrapper around the GUI parts of Harry Chomsky's OCaml-Win32
> library[2]. If anyone has already done this (and made it available
> under a LGPL or BSD like license) and I've somehow missed it, please
> let me know and I'll contribute to your project rather than
> reinventing the wheel.

Osiris is available ! http://tech.motion-twin.com/osiris
However it required some Api C "extensions" that I wrote.
BTW I think a more up-to-date version is avaible here :
http://ocaml-win32.sourceforge.net/ , but it's currently not developped.

Regards,
Nicolas Cannasse


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Caml-list] Cross-platform "Hello, World" graphical application in OCaml
  2005-03-02  6:36 ` [Caml-list] Cross-platform "Hello, World" graphical application in OCaml Ken Rawlings
  2005-03-02  6:56   ` Nicolas Cannasse
@ 2005-03-02 11:40   ` Richard Jones
  2005-03-02 12:06     ` Nicolas Cannasse
                       ` (2 more replies)
  1 sibling, 3 replies; 8+ messages in thread
From: Richard Jones @ 2005-03-02 11:40 UTC (permalink / raw)
  Cc: caml-list

On Wed, Mar 02, 2005 at 12:36:53AM -0600, Ken Rawlings wrote:
> My experiences building Kog were overall positive. However, writing a
> full-featured GUI from scratch is a lot of work, so Kog is likely to
> remain a toy implementation for the foreseeable future. If there's
> much interest in the OCaml community for this sort of thing though,
> I'd love to work with a group on a project getting a full-featured
> lightweight GUI up and running with OCaml, whether it be on OpenGL
> directly, or one of the higher level vector libraries.

I think this would be the wrong direction to go.

What I think would be useful is an OCaml wrapper around Gtk, Win32 and
Aqua/COCOA.  The idea would be for the OCaml wrapper to abstract away
the differences, allowing cross-platform programming with native
widgets.  WxWidgets fits the bill here, but the actual API is clunky.
I have a feeling that something could be done better with a functional
programming approach.

Of course it's a lot of tedious engineering work.  I'm not
volunteering!

Rich.

-- 
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Team Notepad - intranets and extranets for business - http://team-notepad.com


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Caml-list] Cross-platform "Hello, World" graphical application in OCaml
  2005-03-02 11:40   ` Richard Jones
@ 2005-03-02 12:06     ` Nicolas Cannasse
  2005-03-02 14:30     ` Vincenzo Ciancia
  2005-03-05 12:51     ` [Caml-list] " Sven Luther
  2 siblings, 0 replies; 8+ messages in thread
From: Nicolas Cannasse @ 2005-03-02 12:06 UTC (permalink / raw)
  To: Richard Jones; +Cc: caml-list

> I think this would be the wrong direction to go.
>
> What I think would be useful is an OCaml wrapper around Gtk, Win32 and
> Aqua/COCOA.  The idea would be for the OCaml wrapper to abstract away
> the differences, allowing cross-platform programming with native
> widgets.  WxWidgets fits the bill here, but the actual API is clunky.
> I have a feeling that something could be done better with a functional
> programming approach.
>
> Of course it's a lot of tedious engineering work.  I'm not
> volunteering!

This is the thing I was trying to do with Osiris. I wrote an abstract layer
that is implemented with Win32 API, and I was looking for someone willing to
do the lablgtk port in order to get a cross-platform gui system but didn't
find any interest in the topic.

Regards,
Nicolas Cannasse


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Cross-platform "Hello, World" graphical application in OCaml
  2005-03-02 11:40   ` Richard Jones
  2005-03-02 12:06     ` Nicolas Cannasse
@ 2005-03-02 14:30     ` Vincenzo Ciancia
  2005-03-05 12:51     ` [Caml-list] " Sven Luther
  2 siblings, 0 replies; 8+ messages in thread
From: Vincenzo Ciancia @ 2005-03-02 14:30 UTC (permalink / raw)
  To: caml-list

Richard Jones wrote:

> 
> What I think would be useful is an OCaml wrapper around Gtk, Win32 and
> Aqua/COCOA.  The idea would be for the OCaml wrapper to abstract away
> the differences, allowing cross-platform programming with native
> widgets.  WxWidgets fits the bill here, but the actual API is clunky.
> I have a feeling that something could be done better with a functional
> programming approach.

This has been proposed, discussed and forgotten more than one time on the
haskell-gui mailing list (of course, s/ocaml/haskell/). The most promising
projects for haskell in this area are htoolkit and wxhaskell:

http://htoolkit.sourceforge.net/
http://wxhaskell.sourceforge.net/

I think that to do a serious effort in this direction involves both
designing the abstracted interface, which is nontrivial and perhaps can't
be done much better than wxwidgets, and implementing it - in a way, IMHO,
that can be used by more than one language. 

Wx fails in that direction, since it's written in C++ - there are wxcaml and
wxhaskell of course, but they seem to require lots of manual tuning to
complete the bindings (don't take this too seriously, I might be plain
wrong). Since XML user interfaces are in vogue these days, maybe the best
thing to do is to implement one of these, fulfilling the required
properties, and then binding for any language will be easy. Of course, it
won't be too efficient but when I see web pages that render faster and look
smarter than my "efficient" desktop I think that this is a non-issue.

Vincenzo

-- 
Please note that I do not read the e-mail address used in the from field but
I read vincenzo_ml at yahoo dot it
Attenzione: non leggo l'indirizzo di posta usato nel campo from, ma leggo
vincenzo_ml at yahoo dot it



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Caml-list] Cross-platform "Hello, World" graphical application in OCaml
  2005-03-02 11:40   ` Richard Jones
  2005-03-02 12:06     ` Nicolas Cannasse
  2005-03-02 14:30     ` Vincenzo Ciancia
@ 2005-03-05 12:51     ` Sven Luther
  2 siblings, 0 replies; 8+ messages in thread
From: Sven Luther @ 2005-03-05 12:51 UTC (permalink / raw)
  To: Richard Jones; +Cc: caml-list

On Wed, Mar 02, 2005 at 11:40:25AM +0000, Richard Jones wrote:
> On Wed, Mar 02, 2005 at 12:36:53AM -0600, Ken Rawlings wrote:
> > My experiences building Kog were overall positive. However, writing a
> > full-featured GUI from scratch is a lot of work, so Kog is likely to
> > remain a toy implementation for the foreseeable future. If there's
> > much interest in the OCaml community for this sort of thing though,
> > I'd love to work with a group on a project getting a full-featured
> > lightweight GUI up and running with OCaml, whether it be on OpenGL
> > directly, or one of the higher level vector libraries.
> 
> I think this would be the wrong direction to go.
> 
> What I think would be useful is an OCaml wrapper around Gtk, Win32 and
> Aqua/COCOA.  The idea would be for the OCaml wrapper to abstract away
> the differences, allowing cross-platform programming with native
> widgets.  WxWidgets fits the bill here, but the actual API is clunky.
> I have a feeling that something could be done better with a functional
> programming approach.
> 
> Of course it's a lot of tedious engineering work.  I'm not
> volunteering!

And then you could do a fully native implementation of the API, over the linux
framebuffer or directfb for example.

Friendly,

Sven Luther


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Cross-platform "Hello, World" graphical application in OCaml
  2005-02-22 12:03 Richard Jones
@ 2005-02-22 13:36 ` Vincenzo Ciancia
  0 siblings, 0 replies; 8+ messages in thread
From: Vincenzo Ciancia @ 2005-02-22 13:36 UTC (permalink / raw)
  To: caml-list

Richard Jones wrote:

> On Windows, it comes with an installer, an uninstaller, a
> desktop icon and menu entries.  It has the native Windows look and
> feel on Windows.


Do you mean that gtk has the native look and feel on windows, including
e.g. font selection or file open dialog? 

Bye

Vincenzo

-- 
Please note that I do not read the e-mail address used in the from field
but I read vincenzo_ml at yahoo dot it
Attenzione: non leggo l'indirizzo di posta usato nel campo from, ma
leggo vincenzo_ml at yahoo dot it


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Cross-platform "Hello, World" graphical application in OCaml
@ 2005-02-22 12:03 Richard Jones
  2005-02-22 13:36 ` Vincenzo Ciancia
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Jones @ 2005-02-22 12:03 UTC (permalink / raw)
  To: caml-list

http://merjis.com/developers/xphelloworld

This is something I've been meaning to do for over a year now, and
I've finally got around to it.  In 2003 I worked on a project where we
wrote a complex graphical (Gtk-based) application for Windows.  The
program was primarily written on Linux, and we developed a
cross-platform Makefile and installer allowing us to target both
Windows and Unix platforms.  The managers of this project have kindly
allowed me to release the Makefile, NSIS installer script, and
supporting code into the public domain.

This is a "Hello, World"-type program which shows how it is possible
to write a cross-platform graphical application which targets Windows
and Unix.  On Windows, it comes with an installer, an uninstaller, a
desktop icon and menu entries.  It has the native Windows look and
feel on Windows.  On Linux/Unix it has the ordinary Gtk look and feel.

License is public domain.  You can do whatever you like with the
Makefile and installer script, including writing proprietary packages.

I need help documenting how to install all the many extra development
packages required under Windows.  Let me know if you can help me
document this.  At the moment I have a Windows box here which works,
but I'll need to reverse engineer exactly what I installed and where I
got each component from.

Rich.

-- 
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Team Notepad - intranets and extranets for business - http://team-notepad.com


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-03-05 13:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20050223054011.3414.28936.Mailman@yquem.inria.fr>
2005-03-02  6:36 ` [Caml-list] Cross-platform "Hello, World" graphical application in OCaml Ken Rawlings
2005-03-02  6:56   ` Nicolas Cannasse
2005-03-02 11:40   ` Richard Jones
2005-03-02 12:06     ` Nicolas Cannasse
2005-03-02 14:30     ` Vincenzo Ciancia
2005-03-05 12:51     ` [Caml-list] " Sven Luther
2005-02-22 12:03 Richard Jones
2005-02-22 13:36 ` Vincenzo Ciancia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).