Status of Deimos bindings

2015-05-25 Thread FreeSlave via Digitalmars-d
What's the current status of Deimos? I don't think that this kind 
of bindings is useless, since not everyone always wants dynamic 
bindings. E.g. for the sake of simplicity or static linking. 
Actually Walter even fixes issues in these bindings time by time, 
so I guess the idea is still alive. But I see some problems now:


1. Some of Deimos bindings are not made into the dub packages. 
Also not all of those which have dub.json (or package.json) are 
presented in dub registry.
2. No consistency on names. There're repos named with lib prefix 
and without it either.
3. I could not find information on how to propose new binding to 
Deimos.
Currently we have some bindings in dub registry which are not in 
D-Programming-Deimos. Would be better to keep these things in the 
same place. One can filter dub registry by choosing the 
Development library -> D language bindings -> Deimos header-only 
binding, but some bindings (for example, flac) are not assigned 
to this section, so you will not see them.


Thoughts?


Re: Status of Deimos bindings

2015-05-25 Thread rsw0x via Digitalmars-d

On Monday, 25 May 2015 at 21:33:15 UTC, FreeSlave wrote:
What's the current status of Deimos? I don't think that this 
kind of bindings is useless, since not everyone always wants 
dynamic bindings. E.g. for the sake of simplicity or static 
linking. Actually Walter even fixes issues in these bindings 
time by time, so I guess the idea is still alive. But I see 
some problems now:


1. Some of Deimos bindings are not made into the dub packages. 
Also not all of those which have dub.json (or package.json) are 
presented in dub registry.
2. No consistency on names. There're repos named with lib 
prefix and without it either.
3. I could not find information on how to propose new binding 
to Deimos.
Currently we have some bindings in dub registry which are not 
in D-Programming-Deimos. Would be better to keep these things 
in the same place. One can filter dub registry by choosing the 
Development library -> D language bindings -> Deimos 
header-only binding, but some bindings (for example, flac) are 
not assigned to this section, so you will not see them.


Thoughts?


I like how nim approaches this by making important C bindings 
such as SDL, Lua, etc first class members of the language. I 
believe that they ship directly with the nim implementation as 
ported headers barely take up any space. These are libraries that 
pretty much any language is expected to support.

Bye.


Re: Status of Deimos bindings

2015-05-25 Thread Laeeth Isharc via Digitalmars-d

On Monday, 25 May 2015 at 21:43:18 UTC, rsw0x wrote:

On Monday, 25 May 2015 at 21:33:15 UTC, FreeSlave wrote:
What's the current status of Deimos? I don't think that this 
kind of bindings is useless, since not everyone always wants 
dynamic bindings. E.g. for the sake of simplicity or static 
linking. Actually Walter even fixes issues in these bindings 
time by time, so I guess the idea is still alive. But I see 
some problems now:


1. Some of Deimos bindings are not made into the dub packages. 
Also not all of those which have dub.json (or package.json) 
are presented in dub registry.
2. No consistency on names. There're repos named with lib 
prefix and without it either.
3. I could not find information on how to propose new binding 
to Deimos.
Currently we have some bindings in dub registry which are not 
in D-Programming-Deimos. Would be better to keep these things 
in the same place. One can filter dub registry by choosing the 
Development library -> D language bindings -> Deimos 
header-only binding, but some bindings (for example, flac) are 
not assigned to this section, so you will not see them.


Thoughts?


I like how nim approaches this by making important C bindings 
such as SDL, Lua, etc first class members of the language. I 
believe that they ship directly with the nim implementation as 
ported headers barely take up any space. These are libraries 
that pretty much any language is expected to support.

Bye.


+1

Anything without much cost one can do to make it easy for people 
to get started with D will pay off, because small frictions in 
life cumulatively have large consequences.


(Not cost-free given maintenance and desire to sync them with dmd 
releases, but if the bindings are clearly identified as not part 
of core D then it's better to make it easy than force people to 
hunt them down).


Re: Status of Deimos bindings

2015-05-25 Thread lobo via Digitalmars-d

On Monday, 25 May 2015 at 21:33:15 UTC, FreeSlave wrote:
What's the current status of Deimos? I don't think that this 
kind of bindings is useless, since not everyone always wants 
dynamic bindings. E.g. for the sake of simplicity or static 
linking. Actually Walter even fixes issues in these bindings 
time by time, so I guess the idea is still alive. But I see 
some problems now:


1. Some of Deimos bindings are not made into the dub packages. 
Also not all of those which have dub.json (or package.json) are 
presented in dub registry.
2. No consistency on names. There're repos named with lib 
prefix and without it either.
3. I could not find information on how to propose new binding 
to Deimos.
Currently we have some bindings in dub registry which are not 
in D-Programming-Deimos. Would be better to keep these things 
in the same place. One can filter dub registry by choosing the 
Development library -> D language bindings -> Deimos 
header-only binding, but some bindings (for example, flac) are 
not assigned to this section, so you will not see them.


Thoughts?


If you submit a PR adding dub support for to a Deimos repo it 
will be pulled.


It just needs someone with enough time (and interest) to write 
and test the dub.json files for all the repos then register those 
packages with code.dlang.


bye,
lobo


Re: Status of Deimos bindings

2015-05-25 Thread Rikki Cattermole via Digitalmars-d

On 26/05/2015 9:33 a.m., FreeSlave wrote:

What's the current status of Deimos? I don't think that this kind of
bindings is useless, since not everyone always wants dynamic bindings.
E.g. for the sake of simplicity or static linking. Actually Walter even
fixes issues in these bindings time by time, so I guess the idea is
still alive. But I see some problems now:

1. Some of Deimos bindings are not made into the dub packages. Also not
all of those which have dub.json (or package.json) are presented in dub
registry.
2. No consistency on names. There're repos named with lib prefix and
without it either.
3. I could not find information on how to propose new binding to Deimos.
Currently we have some bindings in dub registry which are not in
D-Programming-Deimos. Would be better to keep these things in the same
place. One can filter dub registry by choosing the Development library
-> D language bindings -> Deimos header-only binding, but some bindings
(for example, flac) are not assigned to this section, so you will not
see them.

Thoughts?


Really what needs to happen is getting Derelict-Util into phobos.
And some CTFE magic to create static bindings from those (if wanted).

From there its just port the derelict libraries and deimos ones to it 
and PR for phobos.


Perhaps bindings shouldn't go through the review process. After all 
there isn't exactly bugs that can be introduced from it.


Re: Status of Deimos bindings

2015-05-25 Thread weaselcat via Digitalmars-d

On Tuesday, 26 May 2015 at 03:51:22 UTC, Rikki Cattermole wrote:

On 26/05/2015 9:33 a.m., FreeSlave wrote:
What's the current status of Deimos? I don't think that this 
kind of
bindings is useless, since not everyone always wants dynamic 
bindings.
E.g. for the sake of simplicity or static linking. Actually 
Walter even
fixes issues in these bindings time by time, so I guess the 
idea is

still alive. But I see some problems now:

1. Some of Deimos bindings are not made into the dub packages. 
Also not
all of those which have dub.json (or package.json) are 
presented in dub

registry.
2. No consistency on names. There're repos named with lib 
prefix and

without it either.
3. I could not find information on how to propose new binding 
to Deimos.
Currently we have some bindings in dub registry which are not 
in
D-Programming-Deimos. Would be better to keep these things in 
the same
place. One can filter dub registry by choosing the Development 
library
-> D language bindings -> Deimos header-only binding, but some 
bindings
(for example, flac) are not assigned to this section, so you 
will not

see them.

Thoughts?


Really what needs to happen is getting Derelict-Util into 
phobos.
And some CTFE magic to create static bindings from those (if 
wanted).


From there its just port the derelict libraries and deimos ones 
to it and PR for phobos.


Perhaps bindings shouldn't go through the review process. After 
all there isn't exactly bugs that can be introduced from it.


Please no, derelict bindings are incredibly heavyweight. I cut my 
application's size from ~6mb to 200kb by using glad openGL loader 
over derelict GL3.


Re: Status of Deimos bindings

2015-05-25 Thread Rikki Cattermole via Digitalmars-d

And some CTFE magic to create static bindings from those (if wanted).




Re: Status of Deimos bindings

2015-05-25 Thread Jacob Carlborg via Digitalmars-d

On 2015-05-25 23:33, FreeSlave wrote:

What's the current status of Deimos? I don't think that this kind of
bindings is useless, since not everyone always wants dynamic bindings.
E.g. for the sake of simplicity or static linking. Actually Walter even
fixes issues in these bindings time by time, so I guess the idea is
still alive. But I see some problems now:

1. Some of Deimos bindings are not made into the dub packages. Also not
all of those which have dub.json (or package.json) are presented in dub
registry.
2. No consistency on names. There're repos named with lib prefix and
without it either.
3. I could not find information on how to propose new binding to Deimos.
Currently we have some bindings in dub registry which are not in
D-Programming-Deimos. Would be better to keep these things in the same
place. One can filter dub registry by choosing the Development library
-> D language bindings -> Deimos header-only binding, but some bindings
(for example, flac) are not assigned to this section, so you will not
see them.

Thoughts?


I don't think Deimos should be used. The biggest problem is that it's 
the D core team that owns the repositories, instead of those how 
maintain it. This will disturb the already busy core team with pull 
requests and other things related to maintaining the repository.


It's much better to have Dub be the collection where one can kind 
bindings. It's also easier to include the bindings if they use Dub.


--
/Jacob Carlborg


Re: Status of Deimos bindings

2015-05-26 Thread ketmar via Digitalmars-d
On Tue, 26 May 2015 15:51:20 +1200, Rikki Cattermole wrote:

> Really what needs to happen is getting Derelict-Util into phobos. And
> some CTFE magic to create static bindings from those (if wanted).
> 
>  From there its just port the derelict libraries and deimos ones to it
> and PR for phobos.

actually, converting Derelict back to "header bindings" is fairly easy, 
and can be done with sed. i did that for SDL and some others.

> Perhaps bindings shouldn't go through the review process. After all
> there isn't exactly bugs that can be introduced from it.

ah... Xlib bindings was all the way wrong both with `wchar_t` functions 
and with enum types. first took me the whole day to understand why i see 
no text at all, and second took me even more days to understand why XIM 
calls doesn't fail, but not doing what they should. mechanically 
translated defines with L becomes longs instead of c_longs (ints, 
actually, on my x86), and that broke variadic args XIM call.

so i believe that bindings should be reviewed *very* carefully. actually, 
bindings is the last place where people look for possible bugs, 
especially if those are "officially blessed bindings".

signature.asc
Description: PGP signature


Re: Status of Deimos bindings

2015-05-26 Thread Rikki Cattermole via Digitalmars-d

On 26/05/2015 7:24 p.m., ketmar wrote:

On Tue, 26 May 2015 15:51:20 +1200, Rikki Cattermole wrote:


Really what needs to happen is getting Derelict-Util into phobos. And
some CTFE magic to create static bindings from those (if wanted).

  From there its just port the derelict libraries and deimos ones to it
and PR for phobos.


actually, converting Derelict back to "header bindings" is fairly easy,
and can be done with sed. i did that for SDL and some others.


Perhaps bindings shouldn't go through the review process. After all
there isn't exactly bugs that can be introduced from it.


ah... Xlib bindings was all the way wrong both with `wchar_t` functions
and with enum types. first took me the whole day to understand why i see
no text at all, and second took me even more days to understand why XIM
calls doesn't fail, but not doing what they should. mechanically
translated defines with L becomes longs instead of c_longs (ints,
actually, on my x86), and that broke variadic args XIM call.

so i believe that bindings should be reviewed *very* carefully. actually,
bindings is the last place where people look for possible bugs,
especially if those are "officially blessed bindings".


What I meant was the normal review queue process. It still should be 
reviewed, but more on pull request type of deal.




Re: Status of Deimos bindings

2015-05-26 Thread Mike Parker via Digitalmars-d

On Tuesday, 26 May 2015 at 04:09:09 UTC, weaselcat wrote:

Please no, derelict bindings are incredibly heavyweight. I cut 
my application's size from ~6mb to 200kb by using glad openGL 
loader over derelict GL3.


One of my goals for the current iteration of DerelictGL was to 
keep the size down, which is why I initially only included 
bindings for ARB extensions. Over time, the number of extensions 
supported has increased, and so has the size. But to be fair, I 
doubt that 6mb is what you would see in a release build, nor is 
it DerelictGL3 alone.


DerelictGL3 by itself in debug (dub build) is 2.2mb, in release 
(dub build -b=release) it's 986kb; DerelictUtil 2.0 is 1.6mb 
->173kb; DerelictSDL2 1.9 is 1.8mb -> 382kb -- only with that do 
we approach 6mb in a debug build.


Is that 200kb for glad a debug or release build? I realize it can 
be configured to generate bindings for only the extensions you 
need, whereas Derelict includes quite a lot of them. Does that 
200kb include a binding for GLFW3 or SDL2 or something else?