Re: DStep - Bindings Generator 0.0.1

2015-02-04 Thread Jacob Carlborg via Digitalmars-d-announce
On 2015-02-03 11:01, Chris wrote: And still nobody knows what DStep is all about? BTW, this is a three year old thread someone answered to. It was the initial announcement of DStep. -- /Jacob Carlborg

Re: DStep - Bindings Generator 0.0.1

2015-02-03 Thread FG via Digitalmars-d-announce
On 2015-02-03 at 14:05, Mike Parker wrote: On 2/3/2015 7:01 PM, Chris wrote: And still nobody knows what DStep is all about? Define nobody. I've known about it for quite a while now. Well, there is someone called nobody on the D forums... :) He might know about DStep, and that would make

Re: DStep - Bindings Generator 0.0.1

2015-02-03 Thread Mike Parker via Digitalmars-d-announce
On 2/3/2015 7:01 PM, Chris wrote: On Tuesday, 3 February 2015 at 01:35:16 UTC, Paul O'Neil wrote: On 02/02/2015 04:21 AM, Chris wrote: On Saturday, 31 January 2015 at 19:40:49 UTC, Jacob Carlborg wrote: On 2015-01-31 19:38, Chris wrote: At version 0.0.1? :) At version 0.1.0:

Re: DStep - Bindings Generator 0.0.1

2015-02-03 Thread Chris via Digitalmars-d-announce
On Tuesday, 3 February 2015 at 01:35:16 UTC, Paul O'Neil wrote: On 02/02/2015 04:21 AM, Chris wrote: On Saturday, 31 January 2015 at 19:40:49 UTC, Jacob Carlborg wrote: On 2015-01-31 19:38, Chris wrote: At version 0.0.1? :) At version 0.1.0:

Re: DStep - Bindings Generator 0.0.1

2015-02-02 Thread Paul O'Neil via Digitalmars-d-announce
On 02/02/2015 04:21 AM, Chris wrote: On Saturday, 31 January 2015 at 19:40:49 UTC, Jacob Carlborg wrote: On 2015-01-31 19:38, Chris wrote: At version 0.0.1? :) At version 0.1.0: https://github.com/jacob-carlborg/dstep/releases/tag/v0.1.0 Still loads of time to change the name. If you

Re: DStep - Bindings Generator 0.0.1

2015-02-02 Thread Chris via Digitalmars-d-announce
On Saturday, 31 January 2015 at 19:40:49 UTC, Jacob Carlborg wrote: On 2015-01-31 19:38, Chris wrote: At version 0.0.1? :) At version 0.1.0: https://github.com/jacob-carlborg/dstep/releases/tag/v0.1.0 Still loads of time to change the name. If you wanna do it, do it now. I like C.h D :)

Re: DStep - Bindings Generator 0.0.1

2015-01-31 Thread Chris via Digitalmars-d-announce
On Friday, 30 January 2015 at 20:27:22 UTC, Jacob Carlborg wrote: On 2015-01-30 15:19, Chris wrote: I see what you mean, I'm tired of clever backronyms [1] too. However, DStep is not a product or a company like Apple but a tool with a very specific use. If I look for a tool, I prefer it to

Re: DStep - Bindings Generator 0.0.1

2015-01-31 Thread Jacob Carlborg via Digitalmars-d-announce
On 2015-01-31 19:38, Chris wrote: At version 0.0.1? :) At version 0.1.0: https://github.com/jacob-carlborg/dstep/releases/tag/v0.1.0 -- /Jacob Carlborg

Re: DStep - Bindings Generator 0.0.1

2015-01-30 Thread Jacob Carlborg via Digitalmars-d-announce
On 2015-01-30 15:19, Chris wrote: I see what you mean, I'm tired of clever backronyms [1] too. However, DStep is not a product or a company like Apple but a tool with a very specific use. If I look for a tool, I prefer it to have what it does in the name, simply because it's easier to find it

Re: DStep - Bindings Generator 0.0.1

2015-01-30 Thread Jacob Carlborg via Digitalmars-d-announce
On 2015-01-30 13:50, Chris wrote: I do understand where the name is coming from, but (as has been pointed out by others already) it offers no clue as to what it is doing. Looking at the name it's anybody's guess what it is. It's easier to remember a tool, if it has a reference to what it's all

Re: DStep - Bindings Generator 0.0.1

2015-01-30 Thread Chris via Digitalmars-d-announce
On Friday, 30 January 2015 at 13:46:11 UTC, Jacob Carlborg wrote: On 2015-01-30 13:50, Chris wrote: I do understand where the name is coming from, but (as has been pointed out by others already) it offers no clue as to what it is doing. Looking at the name it's anybody's guess what it is.

Re: DStep - Bindings Generator 0.0.1

2015-01-30 Thread data man via Digitalmars-d-announce
Thank you! I'm working on an adaptation of 7-zip for Phobos, and I very hope that DStep help me with this! P.S. Sorry for my runglish! On Friday, 30 January 2015 at 07:48:40 UTC, Jacob Carlborg wrote: On 2015-01-30 03:32, data man wrote: Please, compile for Win32. This issue has been

Re: DStep - Bindings Generator 0.0.1

2015-01-30 Thread Jacob Carlborg via Digitalmars-d-announce
On 2015-01-30 13:01, Chris wrote: Just brain storming (i.e. some output may be nonsense): - dimp [1] (D + import) [2] - dimpc (pronounced dimps) - dimplink - cimport - cimpleD - DiCe (D importing C external / extensions - you would want the 'e' at the end ;)) - CeeD (as in seed) - CeDe I

Re: DStep - Bindings Generator 0.0.1

2015-01-30 Thread Chris via Digitalmars-d-announce
On Friday, 30 January 2015 at 12:43:14 UTC, Jacob Carlborg wrote: On 2015-01-30 13:01, Chris wrote: Just brain storming (i.e. some output may be nonsense): - dimp [1] (D + import) [2] - dimpc (pronounced dimps) - dimplink - cimport - cimpleD - DiCe (D importing C external / extensions - you

Re: DStep - Bindings Generator 0.0.1

2015-01-30 Thread Chris via Digitalmars-d-announce
On Sunday, 8 July 2012 at 20:01:07 UTC, Jacob Carlborg wrote: Do you have a suggestion? Just brain storming (i.e. some output may be nonsense): - dimp [1] (D + import) [2] - dimpc (pronounced dimps) - dimplink - cimport - cimpleD - DiCe (D importing C external / extensions - you would want

Re: DStep - Bindings Generator 0.0.1

2015-01-29 Thread data man via Digitalmars-d-announce
Please, compile for Win32.

Re: DStep - Bindings Generator 0.0.1

2015-01-29 Thread Jacob Carlborg via Digitalmars-d-announce
On 2015-01-30 03:32, data man wrote: Please, compile for Win32. This issue has been libclang. Might be easier now that DMD supports Win32 COFF. -- /Jacob Carlborg

Re: DStep - Bindings Generator 0.0.1

2012-07-22 Thread Jacob Carlborg
On 2012-07-20 16:58, Andrej Mitrovic wrote: Cool, this will come in handy. Thanks. If your interested you can help out with DStep, add C++ support or similar :) -- /Jacob Carlborg

Re: DStep - Bindings Generator 0.0.1

2012-07-22 Thread Andrej Mitrovic
On 7/22/12, Jacob Carlborg d...@me.com wrote: On 2012-07-20 16:58, Andrej Mitrovic wrote: Cool, this will come in handy. Thanks. If your interested you can help out with DStep, add C++ support or similar :) -- /Jacob Carlborg Well I'm already working on my own code generator. It's based

Re: DStep - Bindings Generator 0.0.1

2012-07-20 Thread Andrej Mitrovic
On 7/7/12, Jacob Carlborg d...@me.com wrote: snip Nice work! Can I ask you something? Do you know if (lib)clang exports typeinfo for default values? For example: namespace Foo { enum En { Val1, Val2 }; } void test(int x = Foo::Val1) { } 'x' has typeinfo (it's an

Re: DStep - Bindings Generator 0.0.1

2012-07-20 Thread Jacob Carlborg
On 2012-07-20 15:04, Andrej Mitrovic wrote: Nice work! Thanks. Can I ask you something? Do you know if (lib)clang exports typeinfo for default values? For example: namespace Foo { enum En { Val1, Val2 }; } void test(int x = Foo::Val1) { } 'x' has typeinfo

Re: DStep - Bindings Generator 0.0.1

2012-07-20 Thread Jacob Carlborg
On 2012-07-20 15:04, Andrej Mitrovic wrote: On 7/7/12, Jacob Carlborg d...@me.com wrote: snip Nice work! Can I ask you something? Do you know if (lib)clang exports typeinfo for default values? For example: namespace Foo { enum En { Val1, Val2 }; } void

Re: DStep - Bindings Generator 0.0.1

2012-07-20 Thread Andrej Mitrovic
On 7/20/12, Jacob Carlborg d...@me.com wrote: In libclang, the kind of Foo::Val1 in the above example is: CXCursor_FirstExpr - CXCursor_DeclRefExpr - CXCursor_NamespaceRef. What I did here was I checked the kind of Foo::Val1 cursor, drilled down into the cursor children as far as possible.

Re: DStep - Bindings Generator 0.0.1

2012-07-20 Thread Andrej Mitrovic
On 7/7/12, Walter Bright newshou...@digitalmars.com wrote: so you could do things like: import stdio.h; and the D compile would fork/exec Dstep, generate the corresponding .d file, and import the .d file. Personally I think this is heading in the wrong direction. A D user shouldn't

Re: DStep - Bindings Generator 0.0.1

2012-07-10 Thread Andrea Fontana
On Monday, 9 July 2012 at 19:24:52 UTC, Jacob Carlborg wrote: On 2012-07-09 17:49, Andrea Fontana wrote: - struct gives error if used on function ( is used as a type) I'm not sure I understand what you mean. Do you have an example of the C code and the generated D code. Ok that was a

Re: DStep - Bindings Generator 0.0.1

2012-07-10 Thread Andrea Fontana
On Monday, 9 July 2012 at 19:24:52 UTC, Jacob Carlborg wrote: On 2012-07-09 17:49, Andrea Fontana wrote: - struct gives error if used on function ( is used as a type) I'm not sure I understand what you mean. Do you have an example of the C code and the generated D code. Ok that was a

Re: DStep - Bindings Generator 0.0.1

2012-07-10 Thread Jacob Carlborg
On 2012-07-10 09:57, Andrea Fontana wrote: struct test { int var; }; struct test* first(); Dstep translate first() = first(...) in this case. As far as I know that is legal C code is a variadic function. It's the old KR style which is discouraged now but still legal:

Re: DStep - Bindings Generator 0.0.1

2012-07-10 Thread Jakob Ovrum
On Saturday, 7 July 2012 at 21:20:53 UTC, Walter Bright wrote: If it can be made complete enough, I'd like to add support into D for it, so you could do things like: import stdio.h; I don't think this syntax makes it clear enough. The following has been making rounds in the community

Re: DStep - Bindings Generator 0.0.1

2012-07-10 Thread Jonathan Andrew
On Monday, 9 July 2012 at 06:30:39 UTC, Jacob Carlborg wrote: On 2012-07-08 23:22, Jonathan Andrew wrote: Jacob, The only disadvantage to the single-file limitation is that in the case of GTK at least, it has preprocessor directives to keep you from just #include-ing the single file you

Re: DStep - Bindings Generator 0.0.1

2012-07-10 Thread Jonathan Andrew
--- If the .h has: typedef struct _Booger Booger; struct Booger { int a; }; Oops, typo! should be: typedef struct _Booger Booger; struct _Booger { int a; };

Re: DStep - Bindings Generator 0.0.1

2012-07-09 Thread Jacob Carlborg
What do people do in OC makefiles? With Clang you can use the -ObjC or -x objective-c flags. But I guess most people use Xcode and not makefiles. CtoD ? I'll have to think about it. -- /Jacob Carlborg

Re: DStep - Bindings Generator 0.0.1

2012-07-09 Thread Jacob Carlborg
On 2012-07-08 23:22, Jonathan Andrew wrote: Jacob, The only disadvantage to the single-file limitation is that in the case of GTK at least, it has preprocessor directives to keep you from just #include-ing the single file you want to convert, so I just used sed to strip out all the #error

Re: DStep - Bindings Generator 0.0.1

2012-07-09 Thread Christophe Travert
Jacob Carlborg , dans le message (digitalmars.D.announce:23893), a écrit : What do people do in OC makefiles? With Clang you can use the -ObjC or -x objective-c flags. But I guess most people use Xcode and not makefiles. CtoD ? I'll have to think about it. -- /Jacob Carlborg

Re: DStep - Bindings Generator 0.0.1

2012-07-09 Thread Andrea Fontana
On Monday, 9 July 2012 at 07:27:35 UTC, trav...@phare.normalesup.org (Christophe Travert) wrote: Jacob Carlborg , dans le message (digitalmars.D.announce:23893), a écrit : What do people do in OC makefiles? With Clang you can use the -ObjC or -x objective-c flags. But I guess most people

Re: DStep - Bindings Generator 0.0.1

2012-07-09 Thread Jacob Carlborg
On 2012-07-09 09:27, Christophe Travert wrote: CtoDi ? I suppose the tool translates interface only, not the code. Yes, only declarations. -- /Jacob Carlborg

Re: DStep - Bindings Generator 0.0.1

2012-07-09 Thread Andrea Fontana
Ok I know it's v 0.0.1, but I think this bugs are not so difficult to fix: - d keywords should be escaped = (for example int f(int out) should become int f(int _out) or something similar...) - self alias should be removed = typedef test { int a; } test; generate alias test test; struct

Re: DStep - Bindings Generator 0.0.1

2012-07-09 Thread Jacob Carlborg
On 2012-07-09 17:49, Andrea Fontana wrote: Ok I know it's v 0.0.1, but I think this bugs are not so difficult to fix: - d keywords should be escaped = (for example int f(int out) should become int f(int _out) or something similar...) - self alias should be removed = typedef test { int a; }

Re: DStep - Bindings Generator 0.0.1

2012-07-08 Thread Walter Bright
On 7/7/2012 7:59 PM, Andrei Alexandrescu wrote: On 7/7/12 5:20 PM, Walter Bright wrote: In fact, we could make it a general facility, where if D sees: import filename.ext; that it fork/exec's the program: ext_to_D filename.ext tmpfile.d and them imports tmpfile.d. (Aside) This has an

Re: DStep - Bindings Generator 0.0.1

2012-07-08 Thread Walter Bright
On 7/7/2012 8:40 PM, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/w7hbg/dstep_tool_for_translating_c_and_objc_headers/ Gotta change the name: http://www.reddit.com/r/programming/comments/w7hbg/dstep_tool_for_translating_c_and_objc_headers/c5az51y

Re: DStep - Bindings Generator 0.0.1

2012-07-08 Thread Bernard Helyer
On Sunday, 8 July 2012 at 08:36:34 UTC, Walter Bright wrote: On 7/7/2012 8:40 PM, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/w7hbg/dstep_tool_for_translating_c_and_objc_headers/ Gotta change the name:

Re: DStep - Bindings Generator 0.0.1

2012-07-08 Thread Jacob Carlborg
On 2012-07-07 23:20, Walter Bright wrote: I think this is potentially a big deal. If it can be made complete enough, I'd like to add support into D for it, so you could do things like: import stdio.h; and the D compile would fork/exec Dstep, generate the corresponding .d file, and

Re: DStep - Bindings Generator 0.0.1

2012-07-08 Thread Jacob Carlborg
On 2012-07-08 04:59, Andrei Alexandrescu wrote: On 7/7/12 5:20 PM, Walter Bright wrote: In fact, we could make it a general facility, where if D sees: import filename.ext; that it fork/exec's the program: ext_to_D filename.ext tmpfile.d and them imports tmpfile.d. (Aside) This has an

Re: DStep - Bindings Generator 0.0.1

2012-07-08 Thread Walter Bright
On 7/8/2012 4:15 AM, Jacob Carlborg wrote: Don't know if it helps but the tool can be easily used as a library and wrapped in a C API. Then DMD can used the tool directory like a library. No need for creating a new process and writing temporary files. Creating a new process has its advantages:

Re: DStep - Bindings Generator 0.0.1

2012-07-08 Thread Walter Bright
On 7/8/2012 4:13 AM, Jacob Carlborg wrote: How is this going to work, is it going to be an optional feature? I mean, this will add DStep (D and Clang) as dependencies to DMD. I think that implicitly using the feature will depend on those programs being available. It also means that any 3rd

Re: DStep - Bindings Generator 0.0.1

2012-07-08 Thread Leandro Lucarella
Jacob Carlborg, el 8 de July a las 13:13 me escribiste: On 2012-07-07 23:20, Walter Bright wrote: I think this is potentially a big deal. If it can be made complete enough, I'd like to add support into D for it, so you could do things like: import stdio.h; and the D compile

Re: DStep - Bindings Generator 0.0.1

2012-07-08 Thread Andrei Alexandrescu
On 7/8/12 3:05 PM, Leandro Lucarella wrote: Jacob Carlborg, el 8 de July a las 13:13 me escribiste: On 2012-07-07 23:20, Walter Bright wrote: I think this is potentially a big deal. If it can be made complete enough, I'd like to add support into D for it, so you could do things like:

Re: DStep - Bindings Generator 0.0.1

2012-07-08 Thread Jacob Carlborg
On 2012-07-08 20:42, Walter Bright wrote: I think that implicitly using the feature will depend on those programs being available. It also means that any 3rd party can supply such a feature, to import a file in any format. I see. I think there are many advantages to DStep being a separate

Re: DStep - Bindings Generator 0.0.1

2012-07-08 Thread Jonathan Andrew
On Saturday, 7 July 2012 at 14:47:49 UTC, Jacob Carlborg wrote: DStep is a tool for translating C and Objective-C headers to D modules. It uses libclang for lexing/parsing and AST traversal. This means it handles everything that Clang itself can handle, although this doesn't mean it will

Re: DStep - Bindings Generator 0.0.1

2012-07-08 Thread Roman D. Boiko
On Sunday, 8 July 2012 at 20:01:07 UTC, Jacob Carlborg wrote: On 2012-07-08 20:42, Walter Bright wrote: Since OC is a proper superset of C, this shouldn't be a problem. Just run the OC converter as your C compiler. That is not completely true if one is picky. The following code is legal C,

Re: DStep - Bindings Generator 0.0.1

2012-07-08 Thread Roman D. Boiko
On Sunday, 8 July 2012 at 22:13:27 UTC, Roman D. Boiko wrote: What about using the something like this: mixin convertImport!header.h; with ability to specify a particular converter as second template parameter? Oh, completely forgot to mention that inside mixin there could be a pragma for

Re: DStep - Bindings Generator 0.0.1

2012-07-08 Thread Dmitry Olshansky
On 09-Jul-12 02:13, Roman D. Boiko wrote: On Sunday, 8 July 2012 at 20:01:07 UTC, Jacob Carlborg wrote: On 2012-07-08 20:42, Walter Bright wrote: Since OC is a proper superset of C, this shouldn't be a problem. Just run the OC converter as your C compiler. That is not completely true if one

Re: DStep - Bindings Generator 0.0.1

2012-07-08 Thread Jonathan M Davis
On Sunday, July 08, 2012 01:36:14 Walter Bright wrote: On 7/7/2012 8:40 PM, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/w7hbg/dstep_tool_for_translat ing_c_and_objc_headers/ Gotta change the name: c2d? - Jonathan M Davis

Re: DStep - Bindings Generator 0.0.1

2012-07-08 Thread Walter Bright
On 7/8/2012 1:01 PM, Jacob Carlborg wrote: That is not completely true if one is picky. The following code is legal C, but not legal Objective-C : int id; int nil; In Objective-C id is a type. What do people do in OC makefiles? The name makes more sense now, but for marketing reasons it

Re: DStep - Bindings Generator 0.0.1

2012-07-08 Thread Walter Bright
On 7/8/2012 3:27 PM, Dmitry Olshansky wrote: I think extra syntax could be added easily WHEN the need arrives, so far 1:1 converters to extension feels fine. I don't think CTFE is good enough to parse C code in all its complex glory - and it would be 1000 times too slow if it did.

Re: DStep - Bindings Generator 0.0.1

2012-07-08 Thread Jonathan M Davis
On Sunday, July 08, 2012 18:39:54 Walter Bright wrote: On 7/8/2012 3:27 PM, Dmitry Olshansky wrote: I think extra syntax could be added easily WHEN the need arrives, so far 1:1 converters to extension feels fine. I don't think CTFE is good enough to parse C code in all its complex glory -

Re: DStep - Bindings Generator 0.0.1

2012-07-08 Thread Andrei Alexandrescu
On 7/8/12 9:39 PM, Walter Bright wrote: On 7/8/2012 3:27 PM, Dmitry Olshansky wrote: I think extra syntax could be added easily WHEN the need arrives, so far 1:1 converters to extension feels fine. I don't think CTFE is good enough to parse C code in all its complex glory disagree - and

DStep - Bindings Generator 0.0.1

2012-07-07 Thread Jacob Carlborg
DStep is a tool for translating C and Objective-C headers to D modules. It uses libclang for lexing/parsing and AST traversal. This means it handles everything that Clang itself can handle, although this doesn't mean it will correctly translate everything. I would consider this release alpha

Re: DStep - Bindings Generator 0.0.1

2012-07-07 Thread Walter Bright
On 7/7/2012 7:47 AM, Jacob Carlborg wrote: DStep is a tool for translating C and Objective-C headers to D modules. It uses libclang for lexing/parsing and AST traversal. This means it handles everything that Clang itself can handle, although this doesn't mean it will correctly translate

Re: DStep - Bindings Generator 0.0.1

2012-07-07 Thread so
Wow at long last! On Saturday, 7 July 2012 at 21:20:53 UTC, Walter Bright wrote: On 7/7/2012 7:47 AM, Jacob Carlborg wrote: DStep is a tool for translating C and Objective-C headers to D modules. It uses libclang for lexing/parsing and AST traversal. This means it handles everything that

Re: DStep - Bindings Generator 0.0.1

2012-07-07 Thread Artur Skawina
On 07/07/12 23:20, Walter Bright wrote: In fact, we could make it a general facility, where if D sees: import filename.ext; that it fork/exec's the program: ext_to_D filename.ext tmpfile.d and them imports tmpfile.d. import extern (C) stdio.h; which execs dimport_C

Re: DStep - Bindings Generator 0.0.1

2012-07-07 Thread Andrei Alexandrescu
On 7/7/12 5:20 PM, Walter Bright wrote: In fact, we could make it a general facility, where if D sees: import filename.ext; that it fork/exec's the program: ext_to_D filename.ext tmpfile.d and them imports tmpfile.d. (Aside) This has an obvious security risk. Andrei

Re: DStep - Bindings Generator 0.0.1

2012-07-07 Thread Andrei Alexandrescu
On 7/7/12 10:47 AM, Jacob Carlborg wrote: DStep is a tool for translating C and Objective-C headers to D modules. Awesome! On reddit: http://www.reddit.com/r/programming/comments/w7hbg/dstep_tool_for_translating_c_and_objc_headers/ Andrei