digitalmars.D - HTOD: Low hanging fruit
- Andre (11/11) Dec 06 2013 Hi,
- Dicebot (4/15) Dec 06 2013 htod is old and unsupported. I recommend dstep
- Dicebot (3/3) Dec 06 2013 To be honest I'd love htod to be completely removed from
- Andrei Alexandrescu (4/7) Dec 06 2013 I agree. Please send a pull request.
- Jacob Carlborg (7/10) Dec 06 2013 DStep doesn't currently support any preprocessor handling, except for
- Dicebot (4/13) Dec 06 2013 Does it simply ignores preprocessor tokens or actually makes
- Jacob Carlborg (6/8) Dec 06 2013 It does substitutions. I guess using libclang would be just like
- Jacob Carlborg (5/8) Dec 06 2013 This also has the unfortunate consequences that you can only generate
- Andrej Mitrovic (3/9) Dec 06 2013 I guess libtooling (http://clang.llvm.org/docs/LibTooling.html) would
- Jacob Carlborg (6/8) Dec 06 2013 I don't see what this would give me. libclang already handles command
- Jacob Carlborg (7/9) Dec 06 2013 What would be better is to use the Clang C++ libraries since they
- Andre (8/8) Dec 07 2013 If DStep is the prefered solution would it be possible to also
- Jacob Carlborg (9/15) Dec 08 2013 To build DStep you need Tango, a couple of my libraries (mambo, dstack)
- John Colvin (2/4) Dec 09 2013 How is that going?
- Jacob Carlborg (6/7) Dec 09 2013 I just haven't done it yet. I don't think it should be any problems.
- John Colvin (7/12) Dec 09 2013 Could you not use one of the pre/post build options to pull in
- Jacob Carlborg (5/9) Dec 09 2013 Yeah, I was think doing something like that. I just haven't had the time...
- Jacob Carlborg (6/7) Dec 11 2013 I just hit some issues with Dub. I'm considering it a blocker, hopefully...
Hi, HTOD is not able to translate a #define if the value is in brackets like here: #define SQL_STILL_EXECUTING 2 #define SQL_ERROR (-1) #define SQL_INVALID_HANDLE (-2) #define SQL_NEED_DATA 99 (Example from ODBC header file sql.h) This seems like a low hanging fruit. Kind regards André
Dec 06 2013
On Friday, 6 December 2013 at 15:04:18 UTC, Andre wrote:Hi, HTOD is not able to translate a #define if the value is in brackets like here: #define SQL_STILL_EXECUTING 2 #define SQL_ERROR (-1) #define SQL_INVALID_HANDLE (-2) #define SQL_NEED_DATA 99 (Example from ODBC header file sql.h) This seems like a low hanging fruit. Kind regards Andréhtod is old and unsupported. I recommend dstep (https://github.com/jacob-carlborg/dstep) which is based on libclang and thus naturally up to date with current C state.
Dec 06 2013
To be honest I'd love htod to be completely removed from dlang.org (and possibly replaced with dstep) as it does more harm than good.
Dec 06 2013
On 12/6/13 7:15 AM, Dicebot wrote:To be honest I'd love htod to be completely removed from dlang.org (and possibly replaced with dstep) as it does more harm than good.I agree. Please send a pull request. Thanks, Andrei
Dec 06 2013
On 2013-12-06 16:14, Dicebot wrote:htod is old and unsupported. I recommend dstep (https://github.com/jacob-carlborg/dstep) which is based on libclang and thus naturally up to date with current C state.DStep doesn't currently support any preprocessor handling, except for some simple includes. The C interface for libclang need to be extended to support handling the preprocessor as well. Contributions are always welcome. -- /Jacob Carlborg
Dec 06 2013
On Friday, 6 December 2013 at 17:02:18 UTC, Jacob Carlborg wrote:On 2013-12-06 16:14, Dicebot wrote:Does it simply ignores preprocessor tokens or actually makes substitutions (but there is no D-ification)? I thought it is the latter.htod is old and unsupported. I recommend dstep (https://github.com/jacob-carlborg/dstep) which is based on libclang and thus naturally up to date with current C state.DStep doesn't currently support any preprocessor handling, except for some simple includes. The C interface for libclang need to be extended to support handling the preprocessor as well. Contributions are always welcome.
Dec 06 2013
On 2013-12-06 18:10, Dicebot wrote:Does it simply ignores preprocessor tokens or actually makes substitutions (but there is no D-ification)? I thought it is the latter.It does substitutions. I guess using libclang would be just like compiling with Clang but stop the process somewhere after the AST is created and before the code generating phase has started. -- /Jacob Carlborg
Dec 06 2013
On 2013-12-06 18:13, Jacob Carlborg wrote:It does substitutions. I guess using libclang would be just like compiling with Clang but stop the process somewhere after the AST is created and before the code generating phase has started.This also has the unfortunate consequences that you can only generate bindings for one platform. -- /Jacob Carlborg
Dec 06 2013
On 12/6/13, Jacob Carlborg <doob me.com> wrote:On 2013-12-06 18:13, Jacob Carlborg wrote:I guess libtooling (http://clang.llvm.org/docs/LibTooling.html) would be a better fit for a codegenerator, but it's a C++ library.It does substitutions. I guess using libclang would be just like compiling with Clang but stop the process somewhere after the AST is created and before the code generating phase has started.This also has the unfortunate consequences that you can only generate bindings for one platform.
Dec 06 2013
On 2013-12-06 19:35, Andrej Mitrovic wrote:I guess libtooling (http://clang.llvm.org/docs/LibTooling.html) would be a better fit for a codegenerator, but it's a C++ library.I don't see what this would give me. libclang already handles command line parsing. DStep handles, in addition to those specified, all flags that Clang handles. -- /Jacob Carlborg
Dec 06 2013
On 2013-12-06 19:35, Andrej Mitrovic wrote:I guess libtooling (http://clang.llvm.org/docs/LibTooling.html) would be a better fit for a codegenerator, but it's a C++ library.What would be better is to use the Clang C++ libraries since they already provide all the functionality needed. Although they are not stable and are C++ libraries. I'm actually quite satisfied I've come this far without needing to change a single thing in libclang itself. -- /Jacob Carlborg
Dec 06 2013
If DStep is the prefered solution would it be possible to also provide a pre compiled binary for windows? This would make DStep more user friendly. => Just trying to find out what is needed to compile DStep on a windows machine, whether I need mambo/tango/s.th. else and praying libclang is available for MS Windows... :) Kind regards André
Dec 07 2013
On 2013-12-07 18:53, Andre wrote:If DStep is the prefered solution would it be possible to also provide a pre compiled binary for windows? This would make DStep more user friendly. => Just trying to find out what is needed to compile DStep on a windows machine, whether I need mambo/tango/s.th. else and praying libclang is available for MS Windows... :)To build DStep you need Tango, a couple of my libraries (mambo, dstack) and libclang. I plan to make it available through Dub. libclang is available for Windows. They provide experimental binaries for MinGW for version 3.1 and 3.2. I have already tried to build it on Windows, unfortunately it fails to pass the DStep tests. I think it was a segfault or similar. I haven't investigated any further. -- /Jacob Carlborg
Dec 08 2013
On Sunday, 8 December 2013 at 17:25:44 UTC, Jacob Carlborg wrote:To build DStep you need Tango, a couple of my libraries (mambo, dstack) and libclang. I plan to make it available through Dub.How is that going?
Dec 09 2013
On 2013-12-09 10:15, John Colvin wrote:How is that going?I just haven't done it yet. I don't think it should be any problems. Although I'm not too happy I need to put my two utility libraries in Dub. They're not ready for that yet. -- /Jacob Carlborg
Dec 09 2013
On Monday, 9 December 2013 at 15:33:22 UTC, Jacob Carlborg wrote:On 2013-12-09 10:15, John Colvin wrote:Could you not use one of the pre/post build options to pull in the necessary github zip files? It's a bit of a hack but i think it could work. Then again, you could just add a -alpha suffix to the package names or similar to be absolutely clear they aren't polished products.How is that going?I just haven't done it yet. I don't think it should be any problems. Although I'm not too happy I need to put my two utility libraries in Dub. They're not ready for that yet.
Dec 09 2013
On 2013-12-09 17:34, John Colvin wrote:Could you not use one of the pre/post build options to pull in the necessary github zip files? It's a bit of a hack but i think it could work. Then again, you could just add a -alpha suffix to the package names or similar to be absolutely clear they aren't polished products.Yeah, I was think doing something like that. I just haven't had the time yet. -- /Jacob Carlborg
Dec 09 2013
On 2013-12-09 10:15, John Colvin wrote:How is that going?I just hit some issues with Dub. I'm considering it a blocker, hopefully there will be a solution: http://forum.rejectedsoftware.com/groups/rejectedsoftware.dub/thread/652/ -- /Jacob Carlborg
Dec 11 2013