On Fri, Mar 16, 2012 at 7:29 PM, Andrej Mitrovic <span dir="ltr"><<a href="mailto:andrej.mitrovich@gmail.com">andrej.mitrovich@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 2/11/12, Andrej Mitrovic <<a href="mailto:andrej.mitrovich@gmail.com">andrej.mitrovich@gmail.com</a>> wrote:<br>
</div><div class="im">> The D classes<br>
> are not yet generated until I get wxc done, but wxc is 95% of the<br>
> source of difficulty. Generating wxd should be easy after that.<br>
<br>
</div>Sorry for the long wait. Turns out I was *extremely* wrong about this.<br>
Generating the D side turned out to be a hell of a lot more work then<br>
I initially thought (mostly due to C++ and D type incompatibilities<br>
and scoping issues).<br>
<br>
I could have tried to generate SWIG interfaces, however I wasn't<br>
impressed with wxPython which used thousands of lines of hand-crafted<br>
interfaces. I'm also really not sure just how stable SWIG is for D,<br>
especially for a large library like wxD. And then I saw that the new<br>
wxPython codebase (the Phoenix project) uses over 11000 lines of<br>
manually edited files that help the SIP generator do its work. I find<br>
maintaining 11K lines of code to be a huge burden, so I stayed away<br>
from that codebase alltogether. I want as much code to be<br>
autogenerated as possible. Note that I didn't base my codgenerator on<br>
wxPhp either, that codebase is very specific to php and so I've had to<br>
go from scratch. I've initially used wxPhp just to figure out which<br>
xml info I had to extract (I'm extracting a lot more info now compared<br>
to wxPhp).<br>
<br>
I've recently had a major refactoring of the autogenerator to make it<br>
easier to generate wxd. However I have to re-edit the wxc generator<br>
due to this new refactor (it shouldn't be too much work). On the<br>
upside of things the autogenerator can now generate around 85000 lines<br>
of compileable D code (that's the actual wxD library). That's around<br>
300 files and 643 classes that compile. This is not linkable yet,<br>
since wxc has to be recreated again. Another cool statistic is that<br>
generating all of this takes about 4 seconds. (I can regenerate<br>
individual files as well which only takes a split second). The xml<br>
parser is a bit slow right now and takes some ~24 seconds to parse<br>
around 1500 XML files. This can be optimized later. But it too can<br>
re-parse single classes/headers which takes only a split second to do.<br>
<br>
So now I'm starting to work on wxc generation again. Once that's done,<br>
I have to test linking between wxd and wxc. Then, I have to fix any<br>
runtime segfaults I might run into (there's bound to be a few codegen<br>
issues). Once I have a few wxD samples working on the major platforms,<br>
I'll release an alpha of wxD (+ the codegenerator) and then we can<br>
start testing the library more thoroughly before any official release.<br>
<br>
So, stay tight! Good times ahead. :)<br>
</blockquote></div><br><div>As a heavy user of wxWidgets (in C++) I'm very excited about this.  I'll definitely be one of your alpha testers when it comes out.</div><div><br></div><div>Could the wxc generator be be used as a base for building bindings for other libraries? How about the XML D generator?</div>
<div><br></div><div>Regards,</div><div>Brad Anderson</div>