January 20, 2012
On 1/20/12, bls <bizprac@orange.fr> wrote:
> Hi, it seems that the idea of using doxygen xml output to generate D
> bindings was not that bad. I am pretty happy to see that exactly this
> happens in wxWidgets 2.9.4,
> https://github.com/wxWidgets/wxWidgets/blob/master/docs/doxygen/scripts/make_bindings.py

All files in that folder are dated July 2009. Is there some newer script you were referring to?

Btw, wxPhp uses doxygen to generate its bindings but it has its own set of parser scripts. They seem to be up to date compared to these python scripts from 2009.
January 20, 2012
On 01/20/2012 09:02 AM, Andrej Mitrovic wrote:
> On 1/20/12, bls<bizprac@orange.fr>  wrote:
>> Hi, it seems that the idea of using doxygen xml output to generate D
>> bindings was not that bad. I am pretty happy to see that exactly this
>> happens in wxWidgets 2.9.4,
>> https://github.com/wxWidgets/wxWidgets/blob/master/docs/doxygen/scripts/make_bindings.py
>
> All files in that folder are dated July 2009. Is there some newer
> script you were referring to?
>

Wish I am able to send you more recent code :(

I have been a bit confused due to the "last changes information" on GIT.

Inspiration comes from
The wxDesigner  Blog  "Documentation in Doxygen"
http://www.wxdesigner-software.de/WoWoW30.html

2.9.3 changes.txt
- Documentation for wxWidgets has been converted from LaTex to C++ headers with Doxygen comments and significantly improved in the process.

SORRY !!!

> Btw, wxPhp uses doxygen to generate its bindings but it has its own
> set of parser scripts. They seem to be up to date compared to these
> python scripts from 2009.

Unti version 2.8 x wxPHP is using GCCXML Output. The author is THINKING about using Doxygen's XML ouput.  Except a small PHP script there is nothing concrete atm.

*Update*---- Just had a look at http://wxphp.org/wxphp/blog/commit-of-new-version.

This means wxWidgets doxygen xml output is reality. And the old Python scripts are sill useful.

Again, sorry for being not careful enough.

Bjoern
January 20, 2012
Hi,

> >
> > All files in that folder are dated July 2009. Is there some newer script you were referring to?
> >
> 
> Wish I am able to send you more recent code :(
> 

check the Phoenix project in wxWidgets SVN. It doesn't generate SWIG though, it generates SIP. But the infrastructure could be reused

-- Auria

January 20, 2012
Hi Andrej,
From : http://wxphp.org/wxphp/blog/commit-of-new-version
"
Theres a new xml parser as I wrote in some older news that extract the details of wxWidgets *doxoygen* documentation.
"

-> The doxygen xml files can be used to create D bindings .
January 20, 2012
I began porting those php scripts to D since yesterday. They are well documented and modularized so I think it's worth having a go at it. Oddly enough I've cloned the wxPhp svn repo yesterday without even knowing they've just merged these new changes in at the same time. Cool.

You've mentioned those python swig generators. I don't know the state of those, but I really doubt that SWIG support for D is mature enough for such a huge project. Additionally wxPython uses SWIG, and SWIG supports Python for many years now, but even so the wxPython author wants to move away from SWIG and use doxygen or some other alternative instead. See: http://wiki.wxpython.org/ProjectPhoenix/ProjectGoals I also took a look at wxPython's SWIG interface files and it's *a lot* of code and workarounds.

So I'm trying to port those php scripts and see if it's usable for D. When I have some scripts done I'll put them on github somewhere. Of course I'm not stopping anyone else from doing the same..
January 20, 2012
On Fri, 20 Jan 2012 22:09:48 +0100
Andrej Mitrovic <andrej.mitrovich@gmail.com> wrote:

> I began porting those php scripts to D since yesterday. They are well documented and modularized so I think it's worth having a go at it. Oddly enough I've cloned the wxPhp svn repo yesterday without even knowing they've just merged these new changes in at the same time.

Thank you for this work...I must admit I wasn't eve naware there is wxPhp project since this thread today.

> You've mentioned those python swig generators. I don't know the state of those, but I really doubt that SWIG support for D is mature enough for such a huge project.

Still, it would be worth exploring that route, right?...and ask for more D support?

> Additionally wxPython uses SWIG, and SWIG
> supports Python for many years now, but even so the wxPython author
> wants to move away from SWIG and use doxygen or some other alternative
> instead. See: http://wiki.wxpython.org/ProjectPhoenix/ProjectGoals I
> also took a look at wxPython's SWIG interface files and it's *a lot*
> of code and workarounds.

Yeah, that's true. Robert wants to use SIP and he told me there is lot of hand-written code for SWIG.

However, let's not forget that wxPython is also,afaik, offering higher-level (aka Pythonic) interface to wx, so I bet we would like to have same with wxD, right?

> So I'm trying to port those php scripts and see if it's usable for D. When I have some scripts done I'll put them on github somewhere.

Thank you very much!

> Of course I'm not stopping anyone else from doing the same..

At the moment, I do not have much time to do anything with (wx)D, even not much with computers, but we hope it will change in a few weeks.



Sincerely,
Gour

-- 
As a strong wind sweeps away a boat on the water, even one of the roaming senses on which the mind focuses can carry away a man's intelligence.

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810


January 20, 2012
On Fri, Jan 20, 2012 at 2:43 PM, Gour <gour@atmarama.net> wrote:

> On Fri, 20 Jan 2012 22:09:48 +0100
> Andrej Mitrovic <andrej.mitrovich@gmail.com> wrote:
>
> > I began porting those php scripts to D since yesterday. They are well documented and modularized so I think it's worth having a go at it. Oddly enough I've cloned the wxPhp svn repo yesterday without even knowing they've just merged these new changes in at the same time.
>
> Thank you for this work...I must admit I wasn't eve naware there is wxPhp project since this thread today.
>
> > You've mentioned those python swig generators. I don't know the state of those, but I really doubt that SWIG support for D is mature enough for such a huge project.
>
> Still, it would be worth exploring that route, right?...and ask for more D support?
>
> > Additionally wxPython uses SWIG, and SWIG
> > supports Python for many years now, but even so the wxPython author
> > wants to move away from SWIG and use doxygen or some other alternative
> > instead. See: http://wiki.wxpython.org/ProjectPhoenix/ProjectGoals I
> > also took a look at wxPython's SWIG interface files and it's *a lot*
> > of code and workarounds.
>
> Yeah, that's true. Robert wants to use SIP and he told me there is lot of hand-written code for SWIG.
>
> However, let's not forget that wxPython is also,afaik, offering
> higher-level
> (aka Pythonic) interface to wx, so I bet we would like to have same with
> wxD, right?
>
>
I occasionally try to think about what sort of changes would be made to the wxWidgets interface to be more idiomatic to D.  Signals come to mind (along with delegates wherever possible).  Range-based access to the items in certain containers is something that would be useful (wxWidget's container item accessing is a particularly bad part of its API).  Probably use D's date/time functionality rather than wxWidget's (or both).  There are some stream classes in wxWidgets which could probably be replaced with a range based interface (which would just serve as an adapter between ranges and the streams).

It's a shame D doesn't have named parameters because wxWidget's usage would benefit greatly from them (wxWindow and subclasses of it often have 4 or more default parameters that I often need to specify to get to the one parameter I actually want to set).  wxSizer's Add method is confusing enough that they added a named parameter idiom version so you could actually read the method call and figure out what is going on.

Regards,
Brad Anderson


> > So I'm trying to port those php scripts and see if it's usable for D. When I have some scripts done I'll put them on github somewhere.
>
> Thank you very much!
>
> > Of course I'm not stopping anyone else from doing the same..
>
> At the moment, I do not have much time to do anything with (wx)D, even not much with computers, but we hope it will change in a few weeks.
>
>
>
> Sincerely,
> Gour
>
> --
> As a strong wind sweeps away a boat on the water,
> even one of the roaming senses on which the mind
> focuses can carry away a man's intelligence.
>
> http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810
>


January 21, 2012
On 01/20/2012 01:09 PM, Andrej Mitrovic wrote:
> So I'm trying to port those php scripts and see if it's usable for D.
> When I have some scripts done I'll put them on github somewhere. Of
> course I'm not stopping anyone else from doing the same..
Cool!!
Out of curiosity. libxml2 for XPath ?
--
I agree with you. Using the doxygen xml files to create the binding is for sure less problematic than using SWIG.

Bjoern
January 21, 2012
On 1/20/12, bls <bizprac@orange.fr> wrote:
> Out of curiosity. libxml2 for XPath ?

I'm porting the JSON scripts first. There are already JSON dumps that the php script makes, so I'd like to take advantage of that. Making a 1to1 port is crucial so I don't introduce any bugs (that php scripts creates 500_000 lines of php!). Then I could start tweaking with the code generator functions to see how D code can be generated instead of php code.
January 22, 2012
On Sat, 21 Jan 2012 22:29:51 +0100
Andrej Mitrovic <andrej.mitrovich@gmail.com> wrote:

Hello Andrej,

> I'm porting the JSON scripts first. There are already JSON dumps that the php script makes, so I'd like to take advantage of that. Making a 1to1 port is crucial so I don't introduce any bugs (that php scripts creates 500_000 lines of php!). Then I could start tweaking with the code generator functions to see how D code can be generated instead of php code.

What do you think or feel, in general, is this approach doable and can produce good-quality wxD bindings?

Using Doxygen output, probably takes care of wrapping C API only, while there would still be work to produce higher-level bindings in the sporit of D language, right?


Sincerely,
Gour

-- 
But a person free from all attachment and aversion and able to control his senses through regulative principles of freedom can obtain the complete mercy of the Lord.

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810