From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA29029; Fri, 17 Sep 2004 09:13:17 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA00668 for ; Fri, 17 Sep 2004 09:13:16 +0200 (MET DST) Received: from smtp-vbr13.xs4all.nl (smtp-vbr13.xs4all.nl [194.109.24.33]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id i8H7DF5h007446 for ; Fri, 17 Sep 2004 09:13:15 +0200 Received: from [127.0.0.1] (a80-126-42-165.adsl.xs4all.nl [80.126.42.165]) (authenticated bits=0) by smtp-vbr13.xs4all.nl (8.12.11/8.12.11) with ESMTP id i8H7DAAk075542; Fri, 17 Sep 2004 09:13:12 +0200 (CEST) (envelope-from daan@cs.uu.nl) Message-ID: <414A8E8B.9040005@cs.uu.nl> Date: Fri, 17 Sep 2004 09:13:15 +0200 From: Daan Leijen User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: SooHyoung Oh CC: Caml Mailing List , "chris.danx" Subject: Re: [Caml-list] WxWidgets? References: <4149F2D0.7040408@ntlworld.com> <20040916202511.GA24789@annexia.org> <414A05A5.7080603@ntlworld.com> <20040916213937.GA25981@annexia.org> <414A0CED.5070502@cs.uu.nl> <002801c49c4a$265dc910$1501a8c0@hama> In-Reply-To: <002801c49c4a$265dc910$1501a8c0@hama> Content-Type: multipart/alternative; boundary="------------080502050601080402090803" X-Virus-Scanned: by XS4ALL Virus Scanner X-Miltered: at nez-perce with ID 414A8E8B.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; daan:01 daan:01 caml-list:01 implemented:01 widgets:01 widgets:01 systematic:01 haskell:01 marshalling:01 pointers:01 pointers:01 didier:01 wxocaml:01 caml-list:01 2004:99 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk This is a multi-part message in MIME format. --------------080502050601080402090803 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit SooHyoung Oh wrote: >I've followed wxHaskell method and implemented some of widgets >with Ocaml. >Implementing all of widgets of wxEiffel C wrapper requires much time, >so I'm finding more systematic method. > >Can you give me more hints about your comments about >how to generate Ocaml binding using wxDirect? > > Well, I think I would rewrite wxDirect -- it is not that much work to do this for OCaml (maybe 3 days?). Anyway, wxDirect takes a C header file that contains *all* wxWidgets wrapper declarations and creates Haskell signatures from them. As described in the paper, the C header file is somewhat special as it contains a lot of extra type information (in the form of macros) that you need to generate a proper marshaller. The C header is thus a poor-mans IDL. We can get away with this, as the number of types and marshalling required is really simple for wxWidges, it is basically integers and pointers to objects: no structures, arrays, general pointers, or nested types. Anyway, I would also advice you to contact the student I mentioned in my previous mail -- unfortunately I forgot his name (Francois ?) I think he is a student of Didier Remy? (or at least another well-known French computer scientist). Anyhow, he made a lot of progress with a wxOCaml binding and from his mails I got the impression that he did a thorough job. I think it can save a lot of work to start from his library. All the best, Daan Leijen. >Thanks. > >----- Original Message ----- >From: "Daan Leijen" >To: "Caml Mailing List" >Sent: Friday, September 17, 2004 7:00 AM >Subject: Re: [Caml-list] WxWidgets? > > > > >>Hi all, >> >>I have created a binding from Haskell to wxWidgets, called wxHaskell. >>You can find more information (and nice screenshots) at >> >>There is also a paper about it at >> >>I also know that there is a student in France that has made a lot of >>progress >>on an O'Caml binding to wxWidgets (as he contacted me a few times >>about technical issues). He also used the wxEiffel C wrapper (that >> >> >wxHaskell > > >>uses) >> >>Personally, I am very impressed with wxWidgets: wxHaskell works >>very well across the main platforms (MacosX, Windows, and GTK) >>and is quite stable. It is also nice that wxWidgets uses native controls >>on each platform, giving an application native look-and-feel. >> >>A particularly pragmatic route to implementing a wxWidgets binding >>to wxHaskell would adapt the wxDirect program of wxHaskell to generate >>O'Caml bindings and just copy the wxHaskell model -- it would fit O'Caml >>quite well, especially when OCaml objects are used to model the C++ >> >> >classes. > > >>Anyway, I hope this helps, >>All the best, >> Daan Leijen. >> >>[ps. I probably won't respond to this thread anymore as I am going to >>ICFP.] >> >>------------------- >>To unsubscribe, mail caml-list-request@inria.fr Archives: >> >> >http://caml.inria.fr > > >>Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: >> >> >http://caml.inria.fr/FAQ/ > > >>Beginner's list: http://groups.yahoo.com/group/ocaml_beginners >> >> >> >> > >------------------- >To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr >Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ >Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > > > > --------------080502050601080402090803 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit SooHyoung Oh wrote:
I've followed wxHaskell method and implemented some of widgets
with Ocaml.
Implementing all of widgets of wxEiffel C wrapper requires much time,
so I'm finding more systematic method.

Can you give me more hints about your comments about
how to generate Ocaml binding using wxDirect?
  
Well,  I think I would rewrite wxDirect -- it is not that much work to do this
for OCaml  (maybe 3 days?).  Anyway, wxDirect takes a C header file that
contains *all* wxWidgets wrapper declarations and creates Haskell signatures
from them. As described in the paper, the C header file is somewhat special
as it contains a lot of extra type information (in the form of macros) that you
need to generate a proper marshaller. The C header is thus a poor-mans IDL.

We can get away with this, as the number of types and marshalling required is
really simple for wxWidges, it is basically integers and pointers to objects: no
structures, arrays, general pointers, or nested types.

Anyway, I would also advice you to contact the student I mentioned in my
previous mail -- unfortunately I forgot his name (Francois ?)  I think he is a
student of Didier Remy? (or at least another well-known French computer scientist).
Anyhow, he made a lot of progress with a wxOCaml binding and from his mails I
got the impression that he did a thorough job. I think it can save a lot of work to start
from his library.

All the best,
  Daan Leijen.


Thanks.

----- Original Message ----- 
From: "Daan Leijen" <daan@cs.uu.nl>
To: "Caml Mailing List" <caml-list@inria.fr>
Sent: Friday, September 17, 2004 7:00 AM
Subject: Re: [Caml-list] WxWidgets?


  
Hi all,

I have created a binding from Haskell to wxWidgets, called wxHaskell.
You can find more information (and nice screenshots) at
<wxhaskell.sourceforge.net>
There is also a paper about it at <www.cs.uu.nl/~daan/pubs.html>

I also know that there is a student in France that has made a lot of
progress
on an O'Caml binding to wxWidgets (as he contacted me a few times
about technical issues). He also used the wxEiffel C wrapper (that
    
wxHaskell
  
uses)

Personally, I am very impressed with wxWidgets: wxHaskell works
very well across the main platforms (MacosX, Windows, and GTK)
and is quite stable. It is also nice that wxWidgets uses native controls
on each platform, giving an application native look-and-feel.

A particularly pragmatic route to implementing a wxWidgets binding
to wxHaskell would adapt the wxDirect program of wxHaskell to generate
O'Caml bindings and just copy the wxHaskell model -- it would fit O'Caml
quite well, especially when OCaml objects are used to model the C++
    
classes.
  
Anyway, I hope this helps,
All the best,
 Daan Leijen.

[ps. I probably won't  respond to this thread anymore as I am going to
ICFP.]

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives:
    
http://caml.inria.fr
  
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ:
    
http://caml.inria.fr/FAQ/
  
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


    

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  

--------------080502050601080402090803-- ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners