[Issue 18957] extern(C++) doesn't mangle 'std' correctly on posix systems

2018-06-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18957 Manu changed: What|Removed |Added Keywords||C++ Severity|enhancement

[Issue 18957] New: extern(C++) doesn't mangle 'std' correctly on posix systems

2018-06-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18957 Issue ID: 18957 Summary: extern(C++) doesn't mangle 'std' correctly on posix systems Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW

Re: Confusion/trying to understand CTFE keywords

2018-06-07 Thread H. S. Teoh via Digitalmars-d-learn
All this talk of CTFE and "compile-time", along with the confusion that arises from conflating everything done by the compiler into the blanket term "compile-time" makes me want to scream: https://wiki.dlang.org/User:Quickfur/Compile-time_vs._compile-time ;-) tl;dr: D's "compile-time"

[Issue 18956] New: latest experimental build crashing a lot

2018-06-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18956 Issue ID: 18956 Summary: latest experimental build crashing a lot Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: critical

Is DWT busted?

2018-06-07 Thread TheGag96 via Digitalmars-d-learn
I'm sorry about bringing this into here instead of DWT's subforum, but it's somewhat dead and hasn't been getting a lot of attention. I decided to finally play around with DWT today and tried to build the example. I got this: Performing "debug" build using /usr/bin/dmd for x86_64. dwt:base

Re: GitHub could be acquired by Microsoft

2018-06-07 Thread H. S. Teoh via Digitalmars-d-announce
On Thu, Jun 07, 2018 at 05:11:40PM -0700, Walter Bright via Digitalmars-d-announce wrote: > On 6/7/2018 10:17 AM, H. S. Teoh wrote: > > Exactly!!! Git was built precisely for decentralized, distributed > > development. Anyone should be (and is, if they bothered to put just > > a tiny amount of

[Issue 18955] extern(C++) default struct mangling is overridden when interacting with a `cppmangle = class` tamplate

2018-06-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18955 Manu changed: What|Removed |Added Keywords||C++, industry --- Comment #1 from Manu --- This

[Issue 18955] New: extern(C++) default struct mangling is overridden when interacting with a `cppmangle = class` tamplate

2018-06-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18955 Issue ID: 18955 Summary: extern(C++) default struct mangling is overridden when interacting with a `cppmangle = class` tamplate Product: D Version: D2 Hardware: x86_64

[Issue 18954] extern(C++) ICE when `cppmangle` is used

2018-06-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18954 Manu changed: What|Removed |Added Keywords||C++, industry --- Comment #1 from Manu --- I don't

[Issue 18954] New: extern(C++) ICE when `cppmangle` is used

2018-06-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18954 Issue ID: 18954 Summary: extern(C++) ICE when `cppmangle` is used Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: major

[Issue 18582] C++ namespace mangling from multiple modules doesn't use sequence ids

2018-06-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18582 Mathias LANG changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Issue 18922] dmd doesn't do substitutions for C++ namespaces in different module/file

2018-06-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18922 Mathias LANG changed: What|Removed |Added CC||schvei...@yahoo.com --- Comment #2 from

Re: Confusion/trying to understand CTFE keywords

2018-06-07 Thread David Bennett via Digitalmars-d-learn
On Thursday, 7 June 2018 at 04:58:40 UTC, Jonathan M Davis wrote: It would be trivial enough to create a wrapper template so that you can do something like immutable n = ctfe!(foo()); e.g. template ctfe(alias value) { enum ctfe = value; } Would this be equivalent to using static

Re: Using stdin/out in a windows application bugs only when compiled to 64bit.

2018-06-07 Thread Mike Franklin via Digitalmars-d-learn
On Thursday, 7 June 2018 at 19:19:55 UTC, realhet wrote: Hi, The following narrow test program works fine when compiled with DMD to 32bit target: import std.stdio, core.sys.windows.windows, core.runtime; extern(Windows) int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR

Re: Passing C++ class to DLL for callbacks from D (Steam)

2018-06-07 Thread Mike Parker via Digitalmars-d-learn
On Friday, 8 June 2018 at 00:55:35 UTC, cc wrote: class CImpl : CCallbackBase { extern(C++) { If anyone has any insight to provide it would be greatly appreciated, thanks! I've not used any of the C++ interfacing features yet, but my understanding is the extern(C++) has to apply

Re: Using stdin/out in a windows application bugs only when compiled to 64bit.

2018-06-07 Thread Mike Parker via Digitalmars-d-learn
On Thursday, 7 June 2018 at 19:19:55 UTC, realhet wrote: Hi, The following narrow test program works fine when compiled with DMD to 32bit target: import std.stdio, core.sys.windows.windows, core.runtime; extern(Windows) int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR

[Issue 16623] Support C++ Name Mangling

2018-06-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16623 Mathias LANG changed: What|Removed |Added Status|NEW |RESOLVED CC|

Re: Interaction of inheritance with property functions

2018-06-07 Thread Adam D. Ruppe via Digitalmars-d
On Friday, 8 June 2018 at 01:07:17 UTC, Luís Marques wrote: Shouldn't the property functions' resolution logic take into account the inherited functions? I had assumed that was the case (and I was confused by misleading error messages), and that seems like the more intuitive semantics to me.

Interaction of inheritance with property functions

2018-06-07 Thread Luís Marques via Digitalmars-d
I had something like this: class Bits { int width() { return _width; } void width(int _width) { this._width = _width; } int _width; } class Bool : Bits { // make sure a Boolean is always 1 bit override int width() { assert(_width

Passing C++ class to DLL for callbacks from D (Steam)

2018-06-07 Thread cc via Digitalmars-d-learn
Hello, I'm attempting to interface with the Steam API DLL in D and running into some trouble working with callbacks. I'm aware there's already a project here http://derelict-steamworks.dub.pm/ but it seems to have not yet addressed the same issue. Steam provides ways to poll for whether an

[Issue 18821] DMD segfault when doing unsafe operation outside of any function

2018-06-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18821 --- Comment #9 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/b1aa95ffa6d99816c8d574af39371719e64a97be Merge pull request #8251 from WalterBright/fix18821 fix Issue

Re: GitHub could be acquired by Microsoft

2018-06-07 Thread Walter Bright via Digitalmars-d-announce
On 6/7/2018 10:17 AM, H. S. Teoh wrote: Exactly!!! Git was built precisely for decentralized, distributed development. Anyone should be (and is, if they bothered to put just a tiny amount of effort into it) able to set up a git server and send the URL to prospective collaborators. Anyone is

Re: Using stdin/out in a windows application bugs only when compiled to 64bit.

2018-06-07 Thread realhet via Digitalmars-d-learn
On Thursday, 7 June 2018 at 23:25:45 UTC, Steven Schveighoffer wrote: ... The WinMain exported function works alone well and on 32bit it also does the console. On 64 I also tried AllocConsole, but fail. I get the Console handle with GetConsoleHandle, it sends back a nonzero value. But as I

Re: GitHub could be acquired by Microsoft

2018-06-07 Thread Walter Bright via Digitalmars-d-announce
On 6/7/2018 4:00 PM, Nick Sabalausky (Abscissa) wrote: Yea, it certainly does have that going for it. And I have no real big objections to bugzilla. It would be nice, though, if it were better (and more cleanly) integrated with GitHub/GitLab/BitBucket/etc., and if its data were all

Re: stride in slices

2018-06-07 Thread DigitalDesigns via Digitalmars-d
On Wednesday, 6 June 2018 at 14:23:29 UTC, Steven Schveighoffer wrote: On 6/5/18 6:28 PM, DigitalDesigns wrote: Once you do that then I will be able to make an informed decision rather than doing what you really want, which is except your world as authority regardless of the real truth. It's

Re: Using stdin/out in a windows application bugs only when compiled to 64bit.

2018-06-07 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/7/18 7:16 PM, realhet wrote: On Thursday, 7 June 2018 at 19:42:05 UTC, Steven Schveighoffer wrote: Are you just compiling the 32-bit dmd version with default flags? Yes, no flags at all and it defaults to a 32bit target. I can use the console and able to make windows, and able to setup an

Re: Using stdin/out in a windows application bugs only when compiled to 64bit.

2018-06-07 Thread realhet via Digitalmars-d-learn
On Thursday, 7 June 2018 at 19:42:05 UTC, Steven Schveighoffer wrote: Are you just compiling the 32-bit dmd version with default flags? Yes, no flags at all and it defaults to a 32bit target. I can use the console and able to make windows, and able to setup an opengl window too. The console

Re: pure functions cannot be removed, actually: pure vs. total

2018-06-07 Thread Steven Schveighoffer via Digitalmars-d
On 6/7/18 6:57 PM, Stefan Koch wrote: On Thursday, 7 June 2018 at 22:23:09 UTC, Steven Schveighoffer wrote: {...} That a function could return does not mean it will. int fn (int arg) /*strongly*/ pure {   if (arg == 42)     return 42;   else (arg < 43)     return fn(--arg);   else    

Re: WTF! new in class is static?!?!

2018-06-07 Thread DigitalDesigns via Digitalmars-d-learn
On Thursday, 7 June 2018 at 23:08:22 UTC, Steven Schveighoffer wrote: On 6/7/18 6:58 PM, DigitalDesigns wrote: On Thursday, 7 June 2018 at 21:57:17 UTC, Steven Schveighoffer wrote: On 6/7/18 5:07 PM, DigitalDesigns wrote: class A; class B {     A a = new A(); } auto b1 = new B(); auto b2 =

Re: WTF! new in class is static?!?!

2018-06-07 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/7/18 6:58 PM, DigitalDesigns wrote: On Thursday, 7 June 2018 at 21:57:17 UTC, Steven Schveighoffer wrote: On 6/7/18 5:07 PM, DigitalDesigns wrote: class A; class B {     A a = new A(); } auto b1 = new B(); auto b2 = new B(); assert(b1.a == b2.a)!! Yep, long-standing issue:

Re: GitHub could be acquired by Microsoft

2018-06-07 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-announce
On 06/07/2018 04:36 AM, Walter Bright wrote: On 6/6/2018 10:28 PM, Nick Sabalausky (Abscissa) wrote: Keep in mind, if we had been commoditizing and decentralizing repository hosting, issue tracking, PRs, user accounts, etc. right from the start like we should've been, then this MS buyout of

Re: pure functions cannot be removed, actually: pure vs. total

2018-06-07 Thread Stefan Koch via Digitalmars-d
On Thursday, 7 June 2018 at 22:23:09 UTC, Steven Schveighoffer wrote: {...} That a function could return does not mean it will. int fn (int arg) /*strongly*/ pure { if (arg == 42) return 42; else (arg < 43) return fn(--arg); else return fn(++arg); } do you see the problem?

Re: WTF! new in class is static?!?!

2018-06-07 Thread DigitalDesigns via Digitalmars-d-learn
On Thursday, 7 June 2018 at 21:57:17 UTC, Steven Schveighoffer wrote: On 6/7/18 5:07 PM, DigitalDesigns wrote: class A; class B {    A a = new A(); } auto b1 = new B(); auto b2 = new B(); assert(b1.a == b2.a)!! Yep, long-standing issue: https://issues.dlang.org/show_bug.cgi?id=2947

Re: WTF! new in class is static?!?!

2018-06-07 Thread aliak via Digitalmars-d-learn
On Thursday, 7 June 2018 at 21:32:54 UTC, Jonathan M Davis wrote: struct S { int* ptr = new int(42); } Is that supposed to compile? -> https://run.dlang.io/is/SjUEOu Error: cannot use non-constant CTFE pointer in an initializer &[42][0]

Re: pure functions cannot be removed, actually: pure vs. total

2018-06-07 Thread Steven Schveighoffer via Digitalmars-d
On 6/7/18 5:04 PM, Jonathan M Davis wrote: On Thursday, June 07, 2018 20:14:19 Johan Engelen via Digitalmars-d wrote: On Tuesday, 5 June 2018 at 14:48:23 UTC, FeepingCreature wrote: I'm just posting to clear up the misunderstanding that a call to a pure function can be removed. Actually, even

Re: WTF! new in class is static?!?!

2018-06-07 Thread ag0aep6g via Digitalmars-d-learn
On 06/07/2018 11:26 PM, Ethan wrote: The spec isn't clear on this but it uses the same rules as struct field initialisation, ie it's defined once and copied to each instance on creation. https://dlang.org/spec/struct.html#default_struct_init It says there that "The default initializers may

Re: WTF! new in class is static?!?!

2018-06-07 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/7/18 5:07 PM, DigitalDesigns wrote: class A; class B {    A a = new A(); } auto b1 = new B(); auto b2 = new B(); assert(b1.a == b2.a)!! Yep, long-standing issue: https://issues.dlang.org/show_bug.cgi?id=2947 Almost a decade old! -Steve

[Issue 18706] Documentation on default class member initializers could be improved

2018-06-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18706 Steven Schveighoffer changed: What|Removed |Added CC||schvei...@yahoo.com See

[Issue 2947] Static initializer stored in mutable non-TLS global

2018-06-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2947 Steven Schveighoffer changed: What|Removed |Added See Also||https://issues.dlang.org/sh

Re: WTF! new in class is static?!?!

2018-06-07 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 7 June 2018 at 21:07:26 UTC, DigitalDesigns wrote: I'm glad I finally found this out! This is not typical behavior in most languages is it? I don't think most languages allow this, and D used to not allow it either, but then CTFE got class support and it got enabled. If you

Re: WTF! new in class is static?!?!

2018-06-07 Thread Cym13 via Digitalmars-d-learn
On Thursday, 7 June 2018 at 21:07:26 UTC, DigitalDesigns wrote: class A; class B { A a = new A(); } auto b1 = new B(); auto b2 = new B(); assert(b1.a == b2.a)!! I'm glad I finally found this out! This is not typical behavior in most languages is it? I'd expect it to be translated to

Re: WTF! new in class is static?!?!

2018-06-07 Thread Stefan Koch via Digitalmars-d-learn
On Thursday, 7 June 2018 at 21:07:26 UTC, DigitalDesigns wrote: class A; class B { A a = new A(); } auto b1 = new B(); auto b2 = new B(); assert(b1.a == b2.a)!! I'm glad I finally found this out! This is not typical behavior in most languages is it? I'd expect it to be translated to

Re: WTF! new in class is static?!?!

2018-06-07 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, June 07, 2018 21:07:26 DigitalDesigns via Digitalmars-d-learn wrote: > class A; > > class B > { > A a = new A(); > } > > auto b1 = new B(); > auto b2 = new B(); > > assert(b1.a == b2.a)!! > > > I'm glad I finally found this out! This is not typical behavior > in most languages is

Re: WTF! new in class is static?!?!

2018-06-07 Thread Ethan via Digitalmars-d-learn
On Thursday, 7 June 2018 at 21:07:26 UTC, DigitalDesigns wrote: assert(b1.a == b2.a)!! The spec isn't clear on this but it uses the same rules as struct field initialisation, ie it's defined once and copied to each instance on creation.

Re: Confusion/trying to understand CTFE keywords

2018-06-07 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, June 07, 2018 11:31:13 jmh530 via Digitalmars-d-learn wrote: > On Wednesday, 6 June 2018 at 22:19:58 UTC, Jonathan M Davis wrote: > > On Wednesday, June 06, 2018 18:18:16 jmh530 via > > > > Digitalmars-d-learn wrote: > >> On Monday, 4 June 2018 at 03:18:05 UTC, Jonathan M Davis wrote:

WTF! new in class is static?!?!

2018-06-07 Thread DigitalDesigns via Digitalmars-d-learn
class A; class B { A a = new A(); } auto b1 = new B(); auto b2 = new B(); assert(b1.a == b2.a)!! I'm glad I finally found this out! This is not typical behavior in most languages is it? I'd expect it to be translated to something like class B { A a; this() { a = new

[Issue 18886] Explicitly invoking super.__ctor in a constructor does not count as calling a super constructor

2018-06-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18886 --- Comment #6 from Ethan Watson --- The code I'm invoking in my current codebase extracts type data from the template parameter for object management. Another workaround would probably be to have a templated this( Type )( ref Type val ) in the

Re: pure functions cannot be removed, actually: pure vs. total

2018-06-07 Thread Jonathan M Davis via Digitalmars-d
On Thursday, June 07, 2018 20:14:19 Johan Engelen via Digitalmars-d wrote: > On Tuesday, 5 June 2018 at 14:48:23 UTC, FeepingCreature wrote: > > I'm just posting to clear up the misunderstanding that a call > > to a pure function can be removed. Actually, even calls to > > strongly pure functions

[Issue 18847] std.allocator: Region uses .parent before it can be set

2018-06-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18847 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/72b2128e6e5dbbc99464d0345fcd4c6692b078c3 Fix Issue 18847 - std.allocator: Region uses .parent

[Issue 18847] std.allocator: Region uses .parent before it can be set

2018-06-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18847 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: GitHub could be acquired by Microsoft

2018-06-07 Thread Jonathan M Davis via Digitalmars-d-announce
On Thursday, June 07, 2018 20:02:31 Russel Winder via Digitalmars-d-announce wrote: > On Thu, 2018-06-07 at 10:17 -0700, H. S. Teoh via Digitalmars-d-announce > > wrote: > > […] > > > > Exactly!!! Git was built precisely for decentralized, distributed > > development. Anyone should be (and is,

[Issue 18886] Explicitly invoking super.__ctor in a constructor does not count as calling a super constructor

2018-06-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18886 --- Comment #5 from Adam D. Ruppe --- errr and also while we're at it, perhaps calling `this!(args)` as well, for forwarding to another ctor in the same class. --

[Issue 18886] Explicitly invoking super.__ctor in a constructor does not count as calling a super constructor

2018-06-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18886 --- Comment #4 from Adam D. Ruppe --- yeah i agree. --

[Issue 18886] Explicitly invoking super.__ctor in a constructor does not count as calling a super constructor

2018-06-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18886 --- Comment #3 from Andrei Alexandrescu --- Then we should allow that call. --

[Issue 18886] Explicitly invoking super.__ctor in a constructor does not count as calling a super constructor

2018-06-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18886 Adam D. Ruppe changed: What|Removed |Added CC||destructiona...@gmail.com --- Comment #2

[Issue 18886] Explicitly invoking super.__ctor in a constructor does not count as calling a super constructor

2018-06-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18886 Andrei Alexandrescu changed: What|Removed |Added CC||and...@erdani.com --- Comment #1 from

Re: pure functions cannot be removed, actually: pure vs. total

2018-06-07 Thread Johan Engelen via Digitalmars-d
On Tuesday, 5 June 2018 at 14:48:23 UTC, FeepingCreature wrote: I'm just posting to clear up the misunderstanding that a call to a pure function can be removed. Actually, even calls to strongly pure functions cannot always be removed. This is because there is one thing that a pure function can

Re: Using stdin/out in a windows application bugs only when compiled to 64bit.

2018-06-07 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/7/18 3:19 PM, realhet wrote: Hi, The following narrow test program works fine when compiled with DMD to 32bit target: import std.stdio, core.sys.windows.windows, core.runtime; extern(Windows) int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int iCmdShow) {   

Using stdin/out in a windows application bugs only when compiled to 64bit.

2018-06-07 Thread realhet via Digitalmars-d-learn
Hi, The following narrow test program works fine when compiled with DMD to 32bit target: import std.stdio, core.sys.windows.windows, core.runtime; extern(Windows) int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int iCmdShow) { Runtime.initialize;

Re: GitHub could be acquired by Microsoft

2018-06-07 Thread Russel Winder via Digitalmars-d-announce
On Thu, 2018-06-07 at 10:17 -0700, H. S. Teoh via Digitalmars-d-announce wrote: > […] > > Exactly!!! Git was built precisely for decentralized, distributed > development. Anyone should be (and is, if they bothered to put just a > tiny amount of effort into it) able to set up a git server and

Re: Tired by deprecation message for unary operators on 8/16 bit vars ? A simple solution

2018-06-07 Thread H. S. Teoh via Digitalmars-d
On Thu, Jun 07, 2018 at 05:02:09PM +, Johan Engelen via Digitalmars-d wrote: > On Thursday, 7 June 2018 at 15:18:49 UTC, H. S. Teoh wrote: > > > > Now all you have to do is to add operator overloading to make the > > wrapper type infectious, and a convenience function that can be > > easily

Re: GitHub could be acquired by Microsoft

2018-06-07 Thread H. S. Teoh via Digitalmars-d-announce
On Thu, Jun 07, 2018 at 01:28:26AM -0400, Nick Sabalausky (Abscissa) via Digitalmars-d-announce wrote: [...] > In any case, I've always thought it was absolutely sick that that even > though GitHub/BitBucket/GitLab/Launchpad/etc. all provide basically > the same features on top of the standard

Re: Tired by deprecation message for unary operators on 8/16 bit vars ? A simple solution

2018-06-07 Thread Johan Engelen via Digitalmars-d
On Thursday, 7 June 2018 at 15:18:49 UTC, H. S. Teoh wrote: Now all you have to do is to add operator overloading to make the wrapper type infectious, and a convenience function that can be easily typed, and you get: [...] I'd like to have this in the stdlib, what are the chances? -Johan

Re: Tired by deprecation message for unary operators on 8/16 bit vars ? A simple solution

2018-06-07 Thread H. S. Teoh via Digitalmars-d
On Thu, Jun 07, 2018 at 03:52:10PM +, Basile B. via Digitalmars-d wrote: > On Thursday, 7 June 2018 at 15:18:49 UTC, H. S. Teoh wrote: > > On Thu, Jun 07, 2018 at 01:42:17PM +, Basile B. via Digitalmars-d > > wrote: > > > [...] > > [...] > > > > You're on the right track. Now all you have

Re: Tired by deprecation message for unary operators on 8/16 bit vars ? A simple solution

2018-06-07 Thread Basile B. via Digitalmars-d
On Thursday, 7 June 2018 at 15:18:49 UTC, H. S. Teoh wrote: On Thu, Jun 07, 2018 at 01:42:17PM +, Basile B. via Digitalmars-d wrote: [...] [...] You're on the right track. Now all you have to do is to add operator overloading to make the wrapper type infectious, and a convenience

Re: Tired by deprecation message for unary operators on 8/16 bit vars ? A simple solution

2018-06-07 Thread H. S. Teoh via Digitalmars-d
On Thu, Jun 07, 2018 at 01:42:17PM +, Basile B. via Digitalmars-d wrote: > I don't know if this is a bug but this works: > > ``` > module runnable; > > struct Byte { byte value; alias value this;} > > void main() > { > {Byte b; auto c = ~b;} // no message > {byte b; auto c = ~b;} //

Re: IOS support status

2018-06-07 Thread Joakim via Digitalmars-d
On Thursday, 7 June 2018 at 11:58:58 UTC, makedgreatagain wrote: On Thursday, 7 June 2018 at 07:58:19 UTC, Joakim wrote: [...] Thanks for you suggestion Joakim. I try follow your suggestion, get all commit from origin branch (116 commit by Dan Olson fro IOS brnach). When I try cherry

Re: GitHub could be acquired by Microsoft

2018-06-07 Thread Basile B. via Digitalmars-d-announce
On Thursday, 7 June 2018 at 05:28:26 UTC, Nick Sabalausky (Abscissa) wrote: On 06/03/2018 11:51 PM, Anton Fediushin wrote: What's your opinion about that? Will you continue using GitHub? The obvious question is "Will MS use evil/strongarm shenanigans with GitHub?" In any case, I've

Tired by deprecation message for unary operators on 8/16 bit vars ? A simple solution

2018-06-07 Thread Basile B. via Digitalmars-d
I don't know if this is a bug but this works: ``` module runnable; struct Byte { byte value; alias value this;} void main() { {Byte b; auto c = ~b;} // no message {byte b; auto c = ~b;} // deprecation... } ``` --- Baz

Re: Runtime introspection, or how to get class members at runtime Fin D

2018-06-07 Thread evilrat via Digitalmars-d-learn
On Thursday, 7 June 2018 at 12:32:26 UTC, Arafel wrote: Thanks for all the answers! Is it possible to register, say, a base class, and have all the subclasses then registered automatically? My idea would be to make it as transparent as possible for the plugin implementation, and also not

std.signals non-object delegates

2018-06-07 Thread Jacob Shtokolov via Digitalmars-d
Hello, I'd like to start a discussion about the standard std.signals library. Currently it has a strange limitation - you can't pass delegates that don't belong to an object. I reviewed the source code an came to conclusion that it can be easily fixed. However, the thing that concerns

Re: Why does using zlib without pragma(lib, ...) work?

2018-06-07 Thread rikki cattermole via Digitalmars-d-learn
On 08/06/2018 12:25 AM, tipdbmp wrote: What other libraries (if any) are part of Phobos? That is pretty much it.

Re: Runtime introspection, or how to get class members at runtime Fin D

2018-06-07 Thread Arafel via Digitalmars-d-learn
Thanks for all the answers! Is it possible to register, say, a base class, and have all the subclasses then registered automatically? My idea would be to make it as transparent as possible for the plugin implementation, and also not having to depend on it. A. There is a library that

Re: Why does using zlib without pragma(lib, ...) work?

2018-06-07 Thread tipdbmp via Digitalmars-d-learn
What other libraries (if any) are part of Phobos?

Re: GitHub could be acquired by Microsoft

2018-06-07 Thread rikki cattermole via Digitalmars-d-announce
On 08/06/2018 12:03 AM, drug wrote: isn't it a niche for THE application that could be written in D? I don't think D brings anything to the table when it comes to VCS. It'll be nicer code, but it won't be noticed by users kind of nice. On the other hand, Weka.IO does bring a lot to the

Re: Why does using zlib without pragma(lib, ...) work?

2018-06-07 Thread rikki cattermole via Digitalmars-d-learn
On 07/06/2018 11:47 PM, tipdbmp wrote: The following compiles without pragma(lib, ...): extern(C) {     const(char)* zlibVersion(); } void main() {     const(char)* sz = zlibVersion(); } It has already been compiled in as part of Phobos.

Re: GitHub could be acquired by Microsoft

2018-06-07 Thread drug via Digitalmars-d-announce
07.06.2018 14:12, Vladimir Panteleev пишет: On Thursday, 7 June 2018 at 05:28:26 UTC, Nick Sabalausky (Abscissa) wrote: I've always felt GitLab was better than GitHub (in large part because they're sensible enough to support self-hosting), so it's tempting to use this as a great reason to move

Re: IOS support status

2018-06-07 Thread makedgreatagain via Digitalmars-d
On Thursday, 7 June 2018 at 07:58:19 UTC, Joakim wrote: On Thursday, 7 June 2018 at 05:58:48 UTC, makedgreatagain wrote: The last IOS cross compiler https://github.com/smolt/ldc-iphone-dev/releases based on 0.17.0-alpha1, which is 3 years old. I want to ask for suggestion, how can i build a

Why does using zlib without pragma(lib, ...) work?

2018-06-07 Thread tipdbmp via Digitalmars-d-learn
The following compiles without pragma(lib, ...): extern(C) { const(char)* zlibVersion(); } void main() { const(char)* sz = zlibVersion(); }

Re: Runtime introspection, or how to get class members at runtime Fin D

2018-06-07 Thread evilrat via Digitalmars-d-learn
On Wednesday, 6 June 2018 at 13:28:02 UTC, Arafel wrote: I know it might not be the most idiomatic D, but as somebody with mostly a Java background (with some C and just a bit of C++) it seems something really straightforward to me: myObject.getClass().getFields() [2]. Also, I know I could

Re: Confusion/trying to understand CTFE keywords

2018-06-07 Thread jmh530 via Digitalmars-d-learn
On Wednesday, 6 June 2018 at 22:19:58 UTC, Jonathan M Davis wrote: On Wednesday, June 06, 2018 18:18:16 jmh530 via Digitalmars-d-learn wrote: On Monday, 4 June 2018 at 03:18:05 UTC, Jonathan M Davis wrote: > [snip] > > If you haven't yet, I'd suggest reading Would make a good blog series?

Re: GitHub could be acquired by Microsoft

2018-06-07 Thread Vladimir Panteleev via Digitalmars-d-announce
On Thursday, 7 June 2018 at 05:28:26 UTC, Nick Sabalausky (Abscissa) wrote: I've always felt GitLab was better than GitHub (in large part because they're sensible enough to support self-hosting), so it's tempting to use this as a great reason to move to GitLab. I've been following the

Re: Help with semaphoreci issue?

2018-06-07 Thread Goran via Digitalmars-d
On Wednesday, 6 June 2018 at 15:15:39 UTC, Seb wrote: On Wednesday, 6 June 2018 at 06:33:08 UTC, Manu wrote: I have 2 DMD PR's that show this issue with semaphoreci: https://semaphoreci.com/dlang/dmd-2/branches/pull-request-8336/builds/1 I don't understand what's wrong, and whether or not

[Issue 15589] extern(C++) virtual destructors are not put in vtbl[]

2018-06-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15589 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 15589] extern(C++) virtual destructors are not put in vtbl[]

2018-06-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15589 --- Comment #4 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/41151beba9fdd3a649729f2fae1ef51fd71c725e Fix issue 15589 - extern(C++) virtual destructors are not put

Re: GitHub could be acquired by Microsoft

2018-06-07 Thread Walter Bright via Digitalmars-d-announce
On 6/6/2018 10:28 PM, Nick Sabalausky (Abscissa) wrote: Keep in mind, if we had been commoditizing and decentralizing repository hosting, issue tracking, PRs, user accounts, etc. right from the start like we should've been, then this MS buyout of GitHub would've been entirely irrelevant to

Re: IOS support status

2018-06-07 Thread Joakim via Digitalmars-d
On Thursday, 7 June 2018 at 05:58:48 UTC, makedgreatagain wrote: The last IOS cross compiler https://github.com/smolt/ldc-iphone-dev/releases based on 0.17.0-alpha1, which is 3 years old. I want to ask for suggestion, how can i build a cross LDC2 compiler with just betterC function to work.

[Issue 8161] give an error for invalid property functions

2018-06-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8161 --- Comment #13 from anonymous4 --- (In reply to bitwise from comment #11) > enum Accessibility { Read, Write, ReadWrite } > > template isUseableAsFieldOf(T, F, Accessibility access = > Accessibility.Both)(F fun) {...} std.traits should provide

Re: DIP 1013--The Deprecation Process--Final Review

2018-06-07 Thread Mike Franklin via Digitalmars-d
On Thursday, 7 June 2018 at 06:22:04 UTC, Mike Parker wrote: @@@DEPRECATED_[version]@@@ This is still ambiguous to me. Deprecations are done in stages. For example: Stage 1 (version 2.081) - Compiler emits deprecation warning Stage 2 (version 2.086 = 2.081 + 5) - Compiler emits error

Re: Orange serializer/deserializer

2018-06-07 Thread Jacob Carlborg via Digitalmars-d-learn
On Wednesday, 6 June 2018 at 20:46:22 UTC, InfiniteDimensional wrote: I did register the main derived type and everything seems to work. Why do I have to reset the registered types? Do you have to reset the registered types? What happens otherwise? I still can't have a void* in my class

DIP 1013--The Deprecation Process--Final Review Begins

2018-06-07 Thread Mike Parker via Digitalmars-d-announce
The last chance for community feedback on DIP 1013, "The Deprecation Process", is now underway. Please do not leave any feedback in this thread, but rather in the review thread in the General forum: https://forum.dlang.org/post/hwscnvmtrzfcfnppd...@forum.dlang.org Also, please be sure to

DIP 1013--The Deprecation Process--Final Review

2018-06-07 Thread Mike Parker via Digitalmars-d
DIP 1013, "The Deprecation Process", is now ready for final review. This is a last chance for community feedback before the DIP is handed off to Walter and Andrei for the Formal Assessment. Please read the procedures document for details on what is expected in this review stage:

[Issue 18953] Win32: extern(C++) struct destructor not called correctly through runtime

2018-06-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18953 Manu changed: What|Removed |Added CC||turkey...@gmail.com

IOS support status

2018-06-07 Thread makedgreatagain via Digitalmars-d
The last IOS cross compiler https://github.com/smolt/ldc-iphone-dev/releases based on 0.17.0-alpha1, which is 3 years old. I want to ask for suggestion, how can i build a cross LDC2 compiler with just betterC function to work. Thanks in advance.