Re: Release D 2.084.1

2019-02-10 Thread evilrat via Digitalmars-d-announce

On Sunday, 10 February 2019 at 19:21:10 UTC, Martin Nowak wrote:

Glad to announce D 2.084.1, ♥ to the 6 contributors.



For some reason Windows installer is not signed, UAC shows this 
warning screen and there is no publisher specified.




Re: New Blog Post: Writing a D Wrapper for a C Library

2019-02-10 Thread Walter Bright via Digitalmars-d-announce

On 2/10/2019 6:19 AM, Mike Parker wrote:
Victor Porton decided to port an app he developed for a research project from 
Ada to D. In the process, he created a bindings and a wrapper for a C library, 
librdf. In this post, he shares the approach he took to translating the C API 
into the D wrapper.


The blog:
https://dlang.org/blog/2019/02/10/writing-a-d-wrapper-for-a-c-library/


Reddit:
https://www.reddit.com/r/programming/comments/ap47uf/writing_a_d_wrapper_for_a_c_library/ 



It's on the front page (number 8) of Hacker News.

https://news.ycombinator.com/news


Release D 2.084.1

2019-02-10 Thread Martin Nowak via Digitalmars-d-announce

Glad to announce D 2.084.1, ♥ to the 6 contributors.

http://dlang.org/download.html

This point release fixes a few issues over 2.084.0, see the 
changelog for more details.


http://dlang.org/changelog/2.084.1.html

-Martin


The DDOC generator Harbored-mod - version 0.3.0 available

2019-02-10 Thread Basile B. via Digitalmars-d-announce

The documentation generator harborded-mod just got second life.

Version 0.3.0 comes notably with
- a better default style that looks more like the official doc 
[1].

- many bug fixes.

check [2] and [3] to get the sources and build it.
Offer me free coffee or support my involvement in the dlang 
tooling [4]


[1] https://basile-z.github.io/new-hmod-preview/iz.html
[2] 
https://github.com/dlang-community/harbored-mod/releases/tag/v0.3.0

[3] https://code.dlang.org/packages/harbored-mod
[4] 
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick_button_id=AQDJVC39PJF7J


Re: New Blog Post: Writing a D Wrapper for a C Library

2019-02-10 Thread ag0aep6g via Digitalmars-d-announce

On 10.02.19 15:19, Mike Parker wrote:

https://dlang.org/blog/2019/02/10/writing-a-d-wrapper-for-a-c-library/


As far as I see, `context` shouldn't be const.

You cast a const `this` to non-const void* and then "back" to non-const 
UserIOStream. Then doWriteBytes is called on this seemingly mutable 
object that's actually const.


If I implement doWriteBytes in a way that mutates the object, I'm 
violating const.


New Blog Post: Writing a D Wrapper for a C Library

2019-02-10 Thread Mike Parker via Digitalmars-d-announce
Victor Porton decided to port an app he developed for a research 
project from Ada to D. In the process, he created a bindings and 
a wrapper for a C library, librdf. In this post, he shares the 
approach he took to translating the C API into the D wrapper.


The blog:
https://dlang.org/blog/2019/02/10/writing-a-d-wrapper-for-a-c-library/


Reddit:
https://www.reddit.com/r/programming/comments/ap47uf/writing_a_d_wrapper_for_a_c_library/


Re: DIP 1016--ref T accepts r-values--Formal Assessment

2019-02-10 Thread Daniel N via Digitalmars-d-announce

On Saturday, 9 February 2019 at 01:31:05 UTC, H. S. Teoh wrote:


Using lowering to lambdas as a way of defining semantics is not 
the same thing as actually using lambdas to implement a feature 
in the compiler!


While it can be convenient to do the latter as a first stab, 
I'd expect that the optimizer could make use of special 
knowledge available in the compiler to implement this more 
efficiently. Since the compiler will always use a fixed pattern 
for the lowering, the backend could detect this pattern and 
optimize accordingly.  Or the compiler implementation could 
lower it directly to something more efficient in the first 
place.



T


The lambda even correctly handles "@disable this(this);", I like 
it!


struct One { @disable this(this); }
void fun(ref One one) { }

One gun() { return One.init; }

void main()
{
  One one; one.fun();
  (One __temp0){ return fun( __temp0 ); }(gun()); // OK
}