Re: variable _param_0 cannot be read at compile time

2018-08-09 Thread learnfirst1 via Digitalmars-d-learn
On Thursday, 9 August 2018 at 13:42:03 UTC, Kagamin wrote: struct M { int i; S*[100] s; } struct S { M* mp; bool x; } S* add(A...)() { alias m = A[0]; __gshared s = S(,A[1..$]); m.s[m.i++] = return } void main(){

[Issue 19152] 2.081.1 Regression compiler bug

2018-08-09 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19152 --- Comment #3 from Mike Franklin --- Attempted fix: https://github.com/dlang/dmd/pull/8553 --

[Issue 19152] 2.081.1 Regression compiler bug

2018-08-09 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19152 Mike Franklin changed: What|Removed |Added Hardware|x86 |All OS|Windows

[Issue 19152] 2.081.1 Regression compiler bug

2018-08-09 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19152 Mike Franklin changed: What|Removed |Added Keywords||pull --

[Issue 19152] 2.081.1 Regression compiler bug

2018-08-09 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19152 --- Comment #2 from Mike Franklin --- Further reduction to something that will compile successfully when the bug is fixed. class TBasicAction { int OnExecute() { auto name = __traits(getOverloads, this, "OnExecute").stringof;

[Issue 19148] Alignment of section does not reflect the maximum alignment of its contents

2018-08-09 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19148 --- Comment #3 from Yuxuan Shui --- I found the actual bug in codegen. In elfobj.c data_start(), when a symbol doesn't have a explicit alignment (Salignment <= 0), the symbol itself is aligned, but its section's alignment is not updated. To

[Issue 19152] 2.081.1 Regression compiler bug

2018-08-09 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19152 Mike Franklin changed: What|Removed |Added CC||slavo5...@yahoo.com --- Comment #1 from

[Issue 19148] Alignment of section does not reflect the maximum alignment of its contents

2018-08-09 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19148 Yuxuan Shui changed: What|Removed |Added Priority|P4 |P1 --

[Issue 19148] Alignment of section does not reflect the maximum alignment of its contents

2018-08-09 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19148 Yuxuan Shui changed: What|Removed |Added Priority|P3 |P4 --

[Issue 19148] Alignment of section does not reflect the maximum alignment of its contents

2018-08-09 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19148 Yuxuan Shui changed: What|Removed |Added Priority|P1 |P3 Severity|enhancement

[Issue 19148] Alignment of section does not reflect the maximum alignment of its contents

2018-08-09 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19148 Yuxuan Shui changed: What|Removed |Added Summary|ldc compiled with dmd and |Alignment of section does

Re: How do you put log calls in constructors when they may be created in a static context?

2018-08-09 Thread aliak via Digitalmars-d-learn
On Thursday, 9 August 2018 at 20:02:41 UTC, Jonathan M Davis wrote: On Thursday, August 9, 2018 7:15:58 AM MDT aliak via Digitalmars-d-learn wrote: [...] It's failing, because you got the condition backwards. __ctfe is true during CTFE and false during runtime. Your code has if(__ctfe)

Re: Give DLS a try

2018-08-09 Thread tide via Digitalmars-d
On Thursday, 9 August 2018 at 13:02:47 UTC, Laurent Tréguier wrote: On Thursday, 9 August 2018 at 12:42:45 UTC, Domain wrote: I just give it a try in visual studio code, but I got errors: [Error - 20:39:54] Starting client failed Error: Unsupported server configuration { "command": "" }

Re: DIP 1017--Add Bottom Type--Community Review Round 1

2018-08-09 Thread Timon Gehr via Digitalmars-d
On 09.08.2018 05:02, Mike Parker wrote: This is the feedback thread for the first round of Community Review for DIP 1017, "Add Bottom Type": https://github.com/dlang/DIPs/blob/8274b0f600075e4553b41c31f4b77be2d917bb40/DIPs/DIP1017.md All review-related feedback on and discussion of the DIP

vibe.d: Finding out if currently in webinterface request

2018-08-09 Thread Johannes Loher via Digitalmars-d-learn
I already posted this in the vibe.d forums (https://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/thread/58891/), but it seems, there is not a lot of activity over there, so I am cross posting this here: Is there a way to find out, if we are currently in a webinterface request? My

Re: How do you put log calls in constructors when they may be created in a static context?

2018-08-09 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, August 9, 2018 7:15:58 AM MDT aliak via Digitalmars-d-learn wrote: > On Thursday, 9 August 2018 at 12:01:42 UTC, Jonathan M Davis > > wrote: > > On Thursday, August 9, 2018 2:37:49 AM MDT aliak via > > > > Digitalmars-d-learn wrote: > >> On Wednesday, 8 August 2018 at 23:47:22 UTC,

[Issue 19152] New: 2.081.1 Regression compiler bug

2018-08-09 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19152 Issue ID: 19152 Summary: 2.081.1 Regression compiler bug Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: regression Priority:

Re: More fun with autodecoding

2018-08-09 Thread Jon Degenhardt via Digitalmars-d
On Wednesday, 8 August 2018 at 21:01:18 UTC, Steven Schveighoffer wrote: Not trying to give too much away about the library I'm writing, but the problem I'm trying to solve is parsing out tokens from a buffer. I want to delineate the whole, as well as the parts, but it's difficult to get back

Re: Give DLS a try

2018-08-09 Thread Laurent Tréguier via Digitalmars-d
On Thursday, 9 August 2018 at 12:42:45 UTC, Domain wrote: I just give it a try in visual studio code, but I got errors: [Error - 20:39:54] Starting client failed Error: Unsupported server configuration { "command": "" } at _getServerWorkingDir.then.serverWorkingDir

Re: sumtype 0.5.0

2018-08-09 Thread Paul Backus via Digitalmars-d-announce
On Wednesday, 8 August 2018 at 20:54:13 UTC, Paul Backus wrote: SumType is a generic sum type for modern D. It is meant as an alternative to `std.variant.Algebraic`. Version 0.5.2, with fixes for the bugs reported in this thread, is now available. Thanks to vit for their detailed feedback!

Re: DIP 1017--Add Bottom Type--Community Review Round 1

2018-08-09 Thread w0rp via Digitalmars-d
On Thursday, 9 August 2018 at 10:37:36 UTC, Andrea Fontana wrote: On Thursday, 9 August 2018 at 04:10:47 UTC, Nicholas Wilson wrote: The DIP makes the claim that: * "[@noreturn] has the awkward result of a function specifying it has a return type T, but never returns that type". When it is

Re: DIP 1017--Add Bottom Type--Community Review Round 1

2018-08-09 Thread w0rp via Digitalmars-d
A better name for this type is `never`, which is the name of the TypeScript type with similar semantics. https://www.typescriptlang.org/docs/handbook/basic-types.html#never `nothing` is also a decent name, used in some other languages, but `never` makes it more obvious that a function never

Re: sumtype 0.5.0

2018-08-09 Thread Paul Backus via Digitalmars-d-announce
On Thursday, 9 August 2018 at 07:52:12 UTC, vit wrote: SumType without initialization doesn't fail if first type has @disabled this(). It did fail for me, but it also failed *with* initialization too, so there was definitely a bug there. method toString is not template. (why is there in the

Re: DIP 1017--Add Bottom Type--Community Review Round 1

2018-08-09 Thread bachmeier via Digitalmars-d
On Thursday, 9 August 2018 at 13:45:54 UTC, Stefan Koch wrote: I hope there is a better name than Tbottom. A name like that is not consistent with the rest of the language. Why not Bottom? according to the DIP, the name can be chosen arbitrarily as the type is retrieved via matching the

Re: DIP 1017--Add Bottom Type--Community Review Round 1

2018-08-09 Thread bachmeier via Digitalmars-d
On Thursday, 9 August 2018 at 13:56:05 UTC, Gary Willoughby wrote: perhaps this should actually be an attribute `@bottom`, or more a documenting: `@noreturn`? Yes, it should.

Re: DIP 1017--Add Bottom Type--Community Review Round 1

2018-08-09 Thread Kagamin via Digitalmars-d
On Thursday, 9 August 2018 at 10:47:37 UTC, Stefan Koch wrote: There is no explanation of when the additional optimizations would be actually relevant, Usually functions that don't return abort the program anyway. Maybe total code size. OT: as for microoptimizations, what bugged me is a

Re: Alignment of symbol is not kept during linking

2018-08-09 Thread Yuxuan Shui via Digitalmars-d
On Thursday, 9 August 2018 at 13:50:00 UTC, Kagamin wrote: On Thursday, 9 August 2018 at 13:30:38 UTC, Yuxuan Shui wrote: I searched around, and there seems to be no way to specify alignment on symbol, so I don't think the linker is in the wrong here. The alignment should be specified for

Re: DIP 1017--Add Bottom Type--Community Review Round 1

2018-08-09 Thread Gary Willoughby via Digitalmars-d
On Thursday, 9 August 2018 at 13:42:57 UTC, bachmeier wrote: On Thursday, 9 August 2018 at 03:02:55 UTC, Mike Parker wrote: This is the feedback thread for the first round of Community Review for DIP 1017, "Add Bottom Type": I hope there is a better name than Tbottom. A name like that is not

Re: Alignment of symbol is not kept during linking

2018-08-09 Thread Kagamin via Digitalmars-d
On Thursday, 9 August 2018 at 13:30:38 UTC, Yuxuan Shui wrote: I searched around, and there seems to be no way to specify alignment on symbol, so I don't think the linker is in the wrong here. The alignment should be specified for section.

Re: DIP 1017--Add Bottom Type--Community Review Round 1

2018-08-09 Thread Stefan Koch via Digitalmars-d
On Thursday, 9 August 2018 at 13:42:57 UTC, bachmeier wrote: On Thursday, 9 August 2018 at 03:02:55 UTC, Mike Parker wrote: This is the feedback thread for the first round of Community Review for DIP 1017, "Add Bottom Type": I hope there is a better name than Tbottom. A name like that is not

Re: DIP 1017--Add Bottom Type--Community Review Round 1

2018-08-09 Thread bachmeier via Digitalmars-d
On Thursday, 9 August 2018 at 03:02:55 UTC, Mike Parker wrote: This is the feedback thread for the first round of Community Review for DIP 1017, "Add Bottom Type": I hope there is a better name than Tbottom. A name like that is not consistent with the rest of the language. Why not Bottom?

Re: variable _param_0 cannot be read at compile time

2018-08-09 Thread Kagamin via Digitalmars-d-learn
struct M { int i; S*[100] s; } struct S { M* mp; bool x; } S* add(A...)() { alias m = A[0]; __gshared s = S(,A[1..$]); m.s[m.i++] = return } void main(){ __gshared M m = M(0); __gshared S s = S(, false);

Re: Alignment of symbol is not kept during linking

2018-08-09 Thread Yuxuan Shui via Digitalmars-d
Clarifications: On Thursday, 9 August 2018 at 13:30:38 UTC, Yuxuan Shui wrote: I'm trying to build LDC with dmd and Musl, but the result ldc will always crash. I track that down to an unalignment SIMD access to a global variable. Apparently C++ compiler thinks the variable should be aligned

Alignment of symbol is not kept during linking

2018-08-09 Thread Yuxuan Shui via Digitalmars-d
I'm trying to build LDC with dmd and Musl, but the result ldc will always crash. I track that down to an unalignment SIMD access to a global variable. Apparently C++ compiler thinks the variable should be aligned to 16 bytes, but it's only aligned to 8 bytes. After some more digging, I find

Re: How do you put log calls in constructors when they may be created in a static context?

2018-08-09 Thread aliak via Digitalmars-d-learn
On Thursday, 9 August 2018 at 12:01:42 UTC, Jonathan M Davis wrote: On Thursday, August 9, 2018 2:37:49 AM MDT aliak via Digitalmars-d-learn wrote: On Wednesday, 8 August 2018 at 23:47:22 UTC, Jonathan M Davis wrote: > On Wednesday, August 8, 2018 3:54:34 PM MDT aliak via > >

Re: Give DLS a try

2018-08-09 Thread Laurent Tréguier via Digitalmars-d
On Thursday, 9 August 2018 at 12:42:45 UTC, Domain wrote: I just give it a try in visual studio code, but I got errors: [Error - 20:39:54] Starting client failed Error: Unsupported server configuration { "command": "" } at _getServerWorkingDir.then.serverWorkingDir

Re: DIP 1017--Add Bottom Type--Community Review Round 1

2018-08-09 Thread 12345swordy via Digitalmars-d
On Thursday, 9 August 2018 at 03:02:55 UTC, Mike Parker wrote: This is the feedback thread for the first round of Community Review for DIP 1017, "Add Bottom Type": [...] How does this DIP interact with constructors and deconstructors as they are glorified void functions? -Alexander

Re: Give DLS a try

2018-08-09 Thread Domain via Digitalmars-d
On Thursday, 9 August 2018 at 11:48:55 UTC, Laurent Tréguier wrote: On Thursday, 9 August 2018 at 10:37:32 UTC, IM wrote: I've always had issues with Code-d! I filed several issues on its GitHub repo, but my experience with the Code-d author was that those issues are likely to remain open and

Re: How do you put log calls in constructors when they may be created in a static context?

2018-08-09 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, August 9, 2018 2:37:49 AM MDT aliak via Digitalmars-d-learn wrote: > On Wednesday, 8 August 2018 at 23:47:22 UTC, Jonathan M Davis > > wrote: > > On Wednesday, August 8, 2018 3:54:34 PM MDT aliak via > > > > Digitalmars-d-learn wrote: > >> I'm trying to debug stuff, so I want to add

Re: Give DLS a try

2018-08-09 Thread Laurent Tréguier via Digitalmars-d
On Thursday, 9 August 2018 at 10:37:32 UTC, IM wrote: I've always had issues with Code-d! I filed several issues on its GitHub repo, but my experience with the Code-d author was that those issues are likely to remain open and unaddressed. Since he is a student (or at least he was some time

[Issue 19108] Unknown pragmas not ignored inside body

2018-08-09 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19108 Mike Franklin changed: What|Removed |Added Keywords||pull CC|

Re: DIP 1017--Add Bottom Type--Community Review Round 1

2018-08-09 Thread Nicholas Wilson via Digitalmars-d
On Thursday, 9 August 2018 at 10:47:37 UTC, Stefan Koch wrote: Regarding the rationale: It should be pointed out that this is a further complication of the type-system (which is already more complex than what c++ has). That does impact generic code. My own experience with generic code has

Re: DIP 1017--Add Bottom Type--Community Review Round 1

2018-08-09 Thread Stefan Koch via Digitalmars-d
On Thursday, 9 August 2018 at 03:02:55 UTC, Mike Parker wrote: This is the feedback thread for the first round of Community Review for DIP 1017, "Add Bottom Type": [ ... ] Regarding the rationale: It should be pointed out that this is a further complication of the type-system (which is

Re: DIP 1017--Add Bottom Type--Community Review Round 1

2018-08-09 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Thursday, 9 August 2018 at 04:16:45 UTC, Uknown wrote: I would like to point out that C++ does this with attributes instead[0]. If this was an attribute instead (like `@noreturn`), it would simplify interfacing with C++. It would also avoid the breaking change. [0]:

Re: DIP 1017--Add Bottom Type--Community Review Round 1

2018-08-09 Thread Andrea Fontana via Digitalmars-d
On Thursday, 9 August 2018 at 04:10:47 UTC, Nicholas Wilson wrote: The DIP makes the claim that: * "[@noreturn] has the awkward result of a function specifying it has a return type T, but never returns that type". When it is deliberate (such as annotating a fatal error function) the is

Re: Give DLS a try

2018-08-09 Thread IM via Digitalmars-d
On Wednesday, 8 August 2018 at 20:56:51 UTC, tide wrote: On Wednesday, 8 August 2018 at 07:57:49 UTC, Laurent Tréguier wrote: [...] Code-d overcomplicates things I find though. I can't even build it, there's so many dependencies attached to it that it isn't worth looking through to even

[Issue 19148] ldc compiled with dmd and musl segment faults on unaligned SIMD instruction.

2018-08-09 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19148 --- Comment #2 from Yuxuan Shui --- Looks like dmd mis-aligned a __gshared variable. .alignof reports an alignment of 16 bytes, while the variable is aligned only to 8 bytes. --

Re: autowrap v0.0.1 - Automatically wrap existing D code for use in Python and Excel

2018-08-09 Thread Nicholas Wilson via Digitalmars-d-announce
On Monday, 6 August 2018 at 00:47:12 UTC, Nicholas Wilson wrote: Sure https://github.com/thewilsonator/jupyterd The echo interpreter now works, and the dmd one is there. I've got no idea if it works because I'm on OSX (yay no shared library support) if someone wants to test it that would be

Re: How do you put log calls in constructors when they may be created in a static context?

2018-08-09 Thread aliak via Digitalmars-d-learn
On Wednesday, 8 August 2018 at 23:47:22 UTC, Jonathan M Davis wrote: On Wednesday, August 8, 2018 3:54:34 PM MDT aliak via Digitalmars-d-learn wrote: I'm trying to debug stuff, so I want to add verbose logging struct S(T) { this() { writeln("created S(T) with properties and ID"); }

Re: Give DLS a try

2018-08-09 Thread Andrea Fontana via Digitalmars-d
On Wednesday, 8 August 2018 at 07:25:57 UTC, Tab wrote: I find DLS [1] to be very stable, updated more often [2], and it just works without issues (vs. Code-d) ~~ at least for me. I think we should give it a chance. I agree. I created a long list of features [3] I'd like to see in D IDE.

Re: sumtype 0.5.0

2018-08-09 Thread vit via Digitalmars-d-announce
On Thursday, 9 August 2018 at 01:04:43 UTC, Paul Backus wrote: On Thursday, 9 August 2018 at 00:11:22 UTC, Seb wrote: On Thursday, 9 August 2018 at 00:07:05 UTC, Seb wrote: (It uses the version from DUB and updates itself once daily, but somehow dub still lists 0.4.1 at the moment) It looks

[Issue 19151] New: std.utf.toUTF16z() can not be used for LPWSTR

2018-08-09 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19151 Issue ID: 19151 Summary: std.utf.toUTF16z() can not be used for LPWSTR Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: normal

Re: sumtype 0.5.0

2018-08-09 Thread vit via Digitalmars-d-announce
On Thursday, 9 August 2018 at 01:04:43 UTC, Paul Backus wrote: ... @safe opAssign can call @system postblit: bool moved = false; struct S{ this(this)@system{ moved = true; } } void main()@safe{ auto st = SumType!(S).init; st = S.init; assert(moved == true); }

Re: sumtype 0.5.0

2018-08-09 Thread vit via Digitalmars-d-announce
On Thursday, 9 August 2018 at 01:04:43 UTC, Paul Backus wrote: On Thursday, 9 August 2018 at 00:11:22 UTC, Seb wrote: On Thursday, 9 August 2018 at 00:07:05 UTC, Seb wrote: (It uses the version from DUB and updates itself once daily, but somehow dub still lists 0.4.1 at the moment) It looks

Re: Give DLS a try

2018-08-09 Thread Laurent Tréguier via Digitalmars-d
On Wednesday, 8 August 2018 at 20:56:51 UTC, tide wrote: DLS took no time at all to build, nice and simple. The only thing built is a small bootstrap program that downloads a prebuilt binary release, that's why it's fast. Before v0.5.0, DLS was always compiled, and that took some time, as

Re: More fun with autodecoding

2018-08-09 Thread Walter Bright via Digitalmars-d
On 8/8/2018 2:01 PM, Steven Schveighoffer wrote: Here's where I'm struggling -- because a string provides indexing, slicing, length, etc. but Phobos ignores that. I can't make a new type that does the same thing. Not only that, but I'm finding the specializations of algorithms only work on the