www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - What's the problem in opensourcing htod?

reply Mariusz =?utf-8?q?Gliwi=C5=84ski?= <alienballance gmail.com> writes:
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: quoted-printable

Hello,
Why don't You make htod opensource? I don't think it has commercial potenti=
al,=20
or I'm wrong? I'm asking, because it's a shame that people who wants publis=
h D=20
bindings have to make their own scripts for that (so bindings can be genera=
ted=20
on !windows too).
If there are no chances for getting htod, maybe someone know decent binding=
=20
generators (scripting languages preferred)? The ones, which I've been using=
=20
are too bad (i.e. stripping out const from various places).

Cheers,
Mariusz Gliwi=C5=84ski
Dec 21 2010
next sibling parent reply Michel Fortin <michel.fortin michelf.com> writes:
On 2010-12-21 16:58:02 -0500, Mariusz Gliwiński <alienballance gmail.com> said:

 Hello,
 Why don't You make htod opensource?

If I remember well, Walter said it includes parts of his C++ compiler (DMC), which he sells, is closed source, and has a long history. It's possible he does not have the right to license it as open source, or perhaps he just doesn't want to disclose the source for DMC. -- Michel Fortin michel.fortin michelf.com http://michelf.com/
Dec 21 2010
parent Walter Bright <newshound2 digitalmars.com> writes:
Michel Fortin wrote:
 If I remember well, Walter said it includes parts of his C++ compiler 
 (DMC), which he sells, is closed source, and has a long history. It's 
 possible he does not have the right to license it as open source, or 
 perhaps he just doesn't want to disclose the source for DMC.

You can buy the source to DMC!
Dec 21 2010
prev sibling next sibling parent reply Walter Bright <newshound2 digitalmars.com> writes:
Mariusz Gliwiński wrote:
 Why don't You make htod opensource?

htod is built out of the C and C++ compiler front end, the source of which Digital Mars sells.
Dec 21 2010
parent Walter Bright <newshound2 digitalmars.com> writes:
Mariusz Gliwiński wrote:
 Thanks, I understand that. Why htod strips out const?
 1)
 in: const int var = 2;
 out: null
 
 2)
 in: DLL const char *func( int arg );
 out: char * func(int arg);
 
 3)
 in: DLL void func( int arg, const char *arg2 );
 out: void  func(int arg, const char *arg2);
 
 4) there is
 const int * const
 and void func() const
 too, of course
 
 a) Are there any chances to fix it?
 b) If no, someone of You have seen tool that implements const's properly? (as 
 I said, scripting language would be preferred, but anything appreciated)

htod was built for D1, and hasn't been updated for D2. Hence, there are some issues. But it cannot work perfectly, there'll usually be a bit of hand editing of the result.
Dec 21 2010
prev sibling next sibling parent Mariusz =?utf-8?q?Gliwi=C5=84ski?= <alienballance gmail.com> writes:
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: quoted-printable

22.12.2010   03:17:31 Walter:
 htod is built out of the C and C++ compiler front end, the source of which
 Digital Mars sells.

Thanks, I understand that. Why htod strips out const? 1) in: const int var =3D 2; out: null 2) in: DLL const char *func( int arg ); out: char * func(int arg); 3) in: DLL void func( int arg, const char *arg2 ); out: void func(int arg, const char *arg2); 4) there is const int * const and void func() const too, of course a) Are there any chances to fix it? b) If no, someone of You have seen tool that implements const's properly? (= as=20 I said, scripting language would be preferred, but anything appreciated) Cheers, Mariusz Gliwi=C5=84ski
Dec 21 2010
prev sibling next sibling parent Jacob Carlborg <doob me.com> writes:
On 2010-12-21 22:58, Mariusz Gliwiński wrote:
 Hello,
 Why don't You make htod opensource? I don't think it has commercial potential,
 or I'm wrong? I'm asking, because it's a shame that people who wants publish D
 bindings have to make their own scripts for that (so bindings can be generated
 on !windows too).
 If there are no chances for getting htod, maybe someone know decent binding
 generators (scripting languages preferred)? The ones, which I've been using
 are too bad (i.e. stripping out const from various places).

 Cheers,
 Mariusz Gliwiński

I'm working on a tool that creates bindings for Objective-C which of course have to work for plain C as well. It's built using the Clang libraries (it really helps having a complete frontend) and would work on any platforms supported by Clang. Even if Clang's support for Windows my not be complete I think it's enough for this tool, I mean it doesn't generate any binaries. -- /Jacob Carlborg
Dec 22 2010
prev sibling parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
Well, Clang can build binaries on Windows. AFAIK the only problem is
exceptions on Windows.

On 12/22/10, Jacob Carlborg <doob me.com> wrote:
 On 2010-12-21 22:58, Mariusz Gliwi=C5=84ski wrote:
 Hello,
 Why don't You make htod opensource? I don't think it has commercial
 potential,
 or I'm wrong? I'm asking, because it's a shame that people who wants
 publish D
 bindings have to make their own scripts for that (so bindings can be
 generated
 on !windows too).
 If there are no chances for getting htod, maybe someone know decent
 binding
 generators (scripting languages preferred)? The ones, which I've been
 using
 are too bad (i.e. stripping out const from various places).

 Cheers,
 Mariusz Gliwi=C5=84ski

I'm working on a tool that creates bindings for Objective-C which of course have to work for plain C as well. It's built using the Clang libraries (it really helps having a complete frontend) and would work on any platforms supported by Clang. Even if Clang's support for Windows my not be complete I think it's enough for this tool, I mean it doesn't generate any binaries. -- /Jacob Carlborg

Dec 22 2010