digitalmars.D - wxWidgets good news
- bls (8/8) Jan 20 2012 Hi, it seems that the idea of using doxygen xml output to generate D
- Andrea Fontana (3/14) Jan 20 2012 ake_bindings.py
- Trass3r (1/4) Jan 20 2012 Does SWIG D support static linking by now?
- Andrea Fontana (3/8) Jan 20 2012 I don't think so. I use swig for d, c#, php, python but it always build
- bls (12/16) Jan 20 2012 From the docs
- Gour (11/17) Jan 20 2012 Thank you very much for the news!!
- Jimmy Cao (2/5) Jan 20 2012 Ah, kudos to David Nadlinger.
- bls (3/8) Jan 20 2012 Ya sorry David , I couldn't remember your name.
- bls (16/24) Jan 20 2012 Random thoughts.
- Gour (13/19) Jan 20 2012 I agree.
- Andrej Mitrovic (6/10) Jan 20 2012 All files in that folder are dated July 2009. Is there some newer
- bls (19/29) Jan 20 2012 Wish I am able to send you more recent code :(
- Marianne gagnon (3/10) Jan 20 2012 check the Phoenix project in wxWidgets SVN. It doesn't generate SWIG tho...
- bls (7/7) Jan 20 2012 Hi Andrej,
- Andrej Mitrovic (16/16) Jan 20 2012 I began porting those php scripts to D since yesterday. They are well
- Gour (21/37) Jan 20 2012 Thank you for this work...I must admit I wasn't eve naware there is
- Brad Anderson (18/56) Jan 20 2012 I occasionally try to think about what sort of changes would be made to ...
- torhu (7/22) Jan 22 2012 It's also a great benefit to be able to rely on wxWidgets' available
- Jacob Carlborg (4/31) Jan 22 2012 The only thing DWT adds is using delegates instead of listeners.
- Gour (13/18) Jan 22 2012 I believe it's possible to D-ify C++ API so that it's still easy to
- bls (7/10) Jan 20 2012 Cool!!
- Andrej Mitrovic (7/8) Jan 21 2012 I'm porting the JSON scripts first. There are already JSON dumps that
- Gour (15/21) Jan 21 2012 On Sat, 21 Jan 2012 22:29:51 +0100
- Andrej Mitrovic (4/7) Jan 22 2012 The php generator creates a C API that's built into a DLL and a php
- Gour (11/13) Jan 23 2012 It looks as wonderful base to build upon it in 'phase-2'. ;)
- bls (17/19) Jan 23 2012 Porting the JSON output to ... [please insert target here ]
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 Generating C functional wrappers is already pretty cool, but the fantastic news is SWIG output! As you may have noticed, SWIG has D support. Means : No need to manually re-create C++ classes in D. Holy crap.
Jan 20 2012
!!! Il giorno ven, 20/01/2012 alle 03.24 -0800, bls ha scritto:Hi, it seems that the idea of using doxygen xml output to generate D=20 bindings was not that bad. I am pretty happy to see that exactly this=20 happens in wxWidgets 2.9.4, https://github.com/wxWidgets/wxWidgets/blob/master/docs/doxygen/scripts/m=ake_bindings.py=20 Generating C functional wrappers is already pretty cool, but the=20 fantastic news is SWIG output! As you may have noticed, SWIG has D=20 support. Means : No need to manually re-create C++ classes in D. =20 Holy crap. =20
Jan 20 2012
Generating C functional wrappers is already pretty cool, but the fantastic news is SWIG output! As you may have noticed, SWIG has D support. Means : No need to manually re-create C++ classes in D.Does SWIG D support static linking by now?
Jan 20 2012
shared libraries. Il giorno ven, 20/01/2012 alle 13.51 +0100, Trass3r ha scritto:Generating C functional wrappers is already pretty cool, but the =20 fantastic news is SWIG output! As you may have noticed, SWIG has D =20 support. Means : No need to manually re-create C++ classes in D.=20 Does SWIG D support static linking by now?
Jan 20 2012
On 01/20/2012 04:51 AM, Trass3r wrote:From the docs 20.10 Work in progress and planned features There are a couple of features which are not implemented yet, but would be very useful and might be added in the near future: Static linking: Currently, the C wrapper code is compiled into a dynamic library, out of which the symbol addresses are looked up at runtime by the D part. If statically linking the different languages into one binary was supported, a tool-chain capable of performing IPO at link time could inline the wrapping code, effectively reducing the overhead for simple calls to zero. Maybe someone should send David some cookies :)Generating C functional wrappers is already pretty cool, but the fantastic news is SWIG output! As you may have noticed, SWIG has D support. Means : No need to manually re-create C++ classes in D.Does SWIG D support static linking by now?
Jan 20 2012
On Fri, 20 Jan 2012 03:24:19 -0800 bls <bizprac orange.fr> wrote:Hi, it seems that the idea of using doxygen xml output to generate D=20 bindings was not that bad. I am pretty happy to see that exactly this=20 happens in wxWidgets 2.9.4,Thank you very much for the news!!Generating C functional wrappers is already pretty cool, but the=20 fantastic news is SWIG output! As you may have noticed, SWIG has D=20 support. Means : No need to manually re-create C++ classes in D.Let's see how it would influence wxD. ;) Sincerely, Gour --=20 Those who are on this path are resolute in purpose,=20 and their aim is one. O beloved child of the Kurus,=20 the intelligence of those who are irresolute is many-branched. http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810
Jan 20 2012
2012/1/20 bls <bizprac orange.fr>As you may have noticed, SWIG has D support. Means : No need to manually re-create C++ classes in D. Holy crap.Ah, kudos to David Nadlinger.
Jan 20 2012
On 01/20/2012 05:33 AM, Jimmy Cao wrote:2012/1/20 bls <bizprac orange.fr <mailto:bizprac orange.fr>> As you may have noticed, SWIG has D support. Means : No need to manually re-create C++ classes in D. Holy crap. Ah, kudos to David Nadlinger.Ya sorry David , I couldn't remember your name. Guess David's help is needed anyway to make wxWidgets 4D a success.
Jan 20 2012
On 01/20/2012 03:24 AM, bls 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 Generating C functional wrappers is already pretty cool, but the fantastic news is SWIG output! As you may have noticed, SWIG has D support. Means : No need to manually re-create C++ classes in D. Holy crap.Random thoughts. I think the challege will be to create a reasonable message system. The old WxD projects mimics the MESSAGEMAP() thing. I think a better solution would be to use wxWidgets connect() and to design a D-ish NET like message system. The cleanest D implementation I have seen so far is part of the DGUI project. SWIG : I think we have to modify : https://github.com/wxWidgets/wxWidgets/blob/master/docs/doxygen/s ripts/swig_tools.py a bit, in order to enable SWIG to generate D2 code. Which wxWidget Version ? IMO at least 2.9x to avoid the UNICODE - non UNICODE stress. Probably 2.9.4 is the best choice (doxygen wise) which will arrive AFAIK in February. How to setup the project ? just the modified Python scripts and some docs? Dunno. Thoughts ?
Jan 20 2012
On Fri, 20 Jan 2012 06:10:20 -0800 bls <bizprac orange.fr> wrote:Which wxWidget Version ? IMO at least 2.9x to avoid the UNICODE - non UNICODE stress. Probably=20 2.9.4 is the best choice (doxygen wise) which will arrive AFAIK in February.I agree.How to setup the project ? just the modified Python scripts and some=20 docs? Dunno.wxD is now at github, so there is possibility to fork it...personally I prefer hg over git, but can try to use hg-git for the sake of wxD. :-) Sincerely, Gour --=20 Bewildered by the modes of material nature, the ignorant fully=20 engage themselves in material activities and become attached. But=20 the wise should not unsettle them, although these duties are inferior=20 due to the performers' lack of knowledge. http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810
Jan 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.pyAll 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.
Jan 20 2012
On 01/20/2012 09:02 AM, Andrej Mitrovic wrote:On 1/20/12, bls<bizprac orange.fr> wrote: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 !!!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.pyAll 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.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
Jan 20 2012
Hi,check the Phoenix project in wxWidgets SVN. It doesn't generate SWIG though, it generates SIP. But the infrastructure could be reused -- AuriaAll 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 :(
Jan 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 .
Jan 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..
Jan 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.=20Still, 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.=20Thank 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 --=20 As a strong wind sweeps away a boat on the water,=20 even one of the roaming senses on which the mind=20 focuses can carry away a man's intelligence. http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810
Jan 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 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 AndersonI 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
Jan 20 2012
On 20.01.2012 23:17, Brad Anderson wrote: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.It's also a great benefit to be able to rely on wxWidgets' available examples and documentation, which might outweigh most benefits you can get by improving or D-ifying the API. Adding more convenient ways of doing things on top of the existing API should be fine, though. DWT doesn't add much on top of SWT, but if I recall correctly, the SWT API is already a lot nicer than wxWidgets.
Jan 22 2012
On 2012-01-22 20:00, torhu wrote:On 20.01.2012 23:17, Brad Anderson wrote:The only thing DWT adds is using delegates instead of listeners. -- /Jacob CarlborgI 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.It's also a great benefit to be able to rely on wxWidgets' available examples and documentation, which might outweigh most benefits you can get by improving or D-ifying the API. Adding more convenient ways of doing things on top of the existing API should be fine, though. DWT doesn't add much on top of SWT, but if I recall correctly, the SWT API is already a lot nicer than wxWidgets.
Jan 22 2012
On Sun, 22 Jan 2012 20:00:06 +0100 torhu <no spam.invalid> wrote:It's also a great benefit to be able to rely on wxWidgets' available=20 examples and documentation, which might outweigh most benefits you can get by improving or D-ifying the API. Adding more convenient ways of doing things on top of the existing API should be fine, though. =20I believe it's possible to D-ify C++ API so that it's still easy to consult original wx docs as well as have nice higher-level API. At least, it is possible in e.g. wxhaskell... Sincerely, Gour --=20 It is far better to discharge one's prescribed duties, even though=20 faultily, than another's duties perfectly. Destruction in the course=20 of performing one's own duty is better than engaging in another's duties, for to follow another's path is dangerous. http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810
Jan 22 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
Jan 20 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.
Jan 21 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 --=20 But a person free from all attachment and aversion and able=20 to control his senses through regulative principles of=20 freedom can obtain the complete mercy of the Lord. http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810
Jan 21 2012
On 1/22/12, Gour <gour atmarama.net> wrote: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?The php generator creates a C API that's built into a DLL and a php OOP wrapper. This is what some sample php code looks like: http://paste.pocoo.org/show/538858/
Jan 22 2012
On Sun, 22 Jan 2012 19:38:42 +0100 Andrej Mitrovic <andrej.mitrovich gmail.com> wrote:The php generator creates a C API that's built into a DLL and a php OOP wrapper.=20It looks as wonderful base to build upon it in 'phase-2'. ;) Sincerely, Gour --=20 One who is not connected with the Supreme can have neither=20 transcendental intelligence nor a steady mind, without which=20 there is no possibility of peace. And how can there be any=20 happiness without peace? http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810
Jan 23 2012
On 01/21/2012 01:29 PM, Andrej Mitrovic wrote: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........Porting the JSON output to ... [please insert target here ] Back to XML :) Well, I am not sure about how usable std.json is. Can you tell about your progress, trouble, doubts etc, please ? Bjoern -------------------------------------------------------------------------- IMHO it should be a straight forward task to create constants, enums, globals, and the extern C {} wxWidgets wrapper library. Creating the wxWidgets D class wrappers, well I think it is not exactly rocket science. But heck, maybe it's more difficult than it looks from a first view. ------ Just a few hours ago I found this : http://wxnet.sourceforge.net/apiref/ Move to :Related pages/Notes for contributors... stuff is nevertheless interesting.
Jan 23 2012