Version française
Home     About     Download     Resources     Contact us    
Browse thread
Does LablTk have a future?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] Does LablTk have a future?
On Thursday 01 September 2005 05:17, Matt Gushee wrote:
> Jon Harrop wrote:
> > I meant that the topic "GUI programming using lablTK" is too specific for
> > a book.
>
> Okay, I thought that was probably what you meant. And you're probably
> right.

There may well be a market for a book on GUI programming in OCaml (including 
OpenGL).

I've managed to get my database app up and running with lablgtk but it 
required a lot of weirdness (e.g. lots of mutual recursion, a strange 
"memoizing" wrapper for window creation functions to let me hide and show 
windows by destroying and recreating them). Having a book on the subject 
could have saved me a lot of time. The problem is, does anyone know how such 
things should be written?

> Yes, using Text for a spreadsheet is pushing the envelope quite a bit.
> It's certainly possible with Canvas. The other option would be to have a
> bunch of Text or Entry widgets laid out with the Grid geometry manager.

I think GTK will let me do this without too much difficulty. The more I use it 
and the more hassle I have (most of yesterday was spent making fundamental 
changes to my implementation, e.g. to let me hide windows) the more I think 
it would be easier to just start from scratch using OpenGL.

> > Yes. As OCaml gains popularity it will be commercially viable to publish
> > cheaper books. In the mean time, if you're interested in making money,
> > perhaps educational software would be better?
>
> Okay, you've got my attention. I've had vague thoughts in that direction
> myself, and it happens that I taught English as a Second Language for a
> few years before getting into geekery. What thoughts do you have about
> the opportunities in that field?

Vast. Educational software can be cheap because there are no overheads for 
making and shipping the product. Dispatch is O(1) for the human (you don't 
have to do anything per order, it is all automated). So it has the moral 
benefit of letting you help a lot more people whilst also being economically 
viable.

I'm aiming Presenta at the metamarket above this. Ultimately, I hope Presenta 
will let users write technical slideshow presentations that they can then 
sell. It will include an embedded (typeset!) OCaml-like DSL that allows users 
to create and manipulate vector graphics that will be rendered via OpenGL 
using Smoke, as well as a "manual" vector graphics editor (e.g. like a 
cut-down version of Corel DRAW).

As Presenta is written entirely in OCaml, I may even try to support dynamic 
loading of code. However, the core (e.g. the renderer) is performance 
critical and needs to be compiled to native code to achieve good performance.

> > Incidentally, OpenGL is extremely important for us. So a GUI toolkit must
> > be able to handle OpenGL widgets. Indeed, this begs the question: why not
> > do the whole thing in OpenGL?
>
> It might be a good idea. My starting point was enlightened
> self-interest: I know Tk and LablTk fairly well, and I perceive that
> LablTk needs some help if it is to remain (become?) useful. Whereas I'm
> almost totally ignorant of OpenGL. It's one of the many things I think I
> ought to learn, but haven't found time.

Have you seen all of the demos on our site?

  http://www.ffconsultancy.com/products/ocaml_for_scientists/visualisation
  http://www.ffconsultancy.com/free/maze
  http://www.ffconsultancy.com/free/ray_tracer
  http://www.ffconsultancy.com/free/ray_tracer/comparison.html

Also, my book has a chapter describing the basics of OpenGL and its use via 
LablGL.

I've already done a lot of work on OpenGL-based GUIs written in OCaml, of 
course, and I'm willing to help create a decent toolkit. I think we should 
start with a scene graph and picking. I am particularly interested in peer 
review of my scene graph design. Perhaps we could use polymorphic variants to 
make the scene graph extensible?

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Objective CAML for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists