Re: Getting the underlying range from std.range.indexed, with elements in swapped order, when Indexed.source.length == Indexed.indices.length

2018-06-27 Thread Uknown via Digitalmars-d-learn
On Wednesday, 27 June 2018 at 14:50:25 UTC, Alex wrote: On Wednesday, 27 June 2018 at 14:29:33 UTC, Uknown wrote: On Wednesday, 27 June 2018 at 14:21:39 UTC, Alex wrote: On Wednesday, 27 June 2018 at 13:27:46 UTC, Uknown wrote: [...] I see. Ok, one possibility is source = indexed(source,

Re: Preferred Alias Declaration Style

2018-06-27 Thread Uknown via Digitalmars-d-learn
On Wednesday, 27 June 2018 at 10:22:38 UTC, Vijay Nayar wrote: Most of the documentation at https://dlang.org/spec/declaration.html#alias uses examples of the form: `alias aliasName = other;`, where `aliasName` becomes the new name to reference `other`. Alternatively, one may write `alias

Augh, nevermind, it's immutable TimeZone

2018-06-27 Thread FeepingCreature via Digitalmars-d
Augh, nevermind, it's immutable TimeZone. TimeZone needs to be immutable for some reason, so it needs Rebindable, so SysTime has opAssign anyways, because there's no native way to specify a tailconst for class references. Augh. Maybe it's finally time to write an emplace-based version of

[Issue 19031] [REG 2.080.0] assert failure when subclassing C++ class with D class

2018-06-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19031 --- Comment #1 from Jacob Carlborg --- Forgot to mention, this gave an compile error compiling with DMD 2.079.0 but fails with 2.080.0 and up to master, currently at 033d324957ff5bee8e25c7335eab2c562d17e2b1. The assertion failure is: DMD

Why does SysTime have opAssign?

2018-06-27 Thread FeepingCreature via Digitalmars-d
The overloaded opAssign in SysTime makes it unusable with Nullable in structs that have invariants that fail on T.init and hence @disable this(). struct S { SysTime st_; int i; invariant { assert(i > 0); } this(int i) { this.i = i; } @disable this(); // S() is not a valid S }

emplace-based version of Nullable

2018-06-27 Thread FeepingCreature via Digitalmars-d
On Wednesday, 27 June 2018 at 12:49:20 UTC, FeepingCreature wrote: Maybe it's finally time to write an emplace-based version of Nullable? Having done so: is it better to have just the moveEmplace Nullable, or use standard opAssign for implicitly constructable types? This would let Nullable

Getting the underlying range from std.range.indexed, with elements in swapped order, when Indexed.source.length == Indexed.indices.length

2018-06-27 Thread Uknown via Digitalmars-d-learn
Title says it all. Is there a trivial way to do this?

[Issue 19031] New: [REG 2.080.0] assert failure when subclassing C++ class with D class

2018-06-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19031 Issue ID: 19031 Summary: [REG 2.080.0] assert failure when subclassing C++ class with D class Product: D Version: D2 Hardware: All OS: All Status:

Re: Getting the underlying range from std.range.indexed, with elements in swapped order, when Indexed.source.length == Indexed.indices.length

2018-06-27 Thread Alex via Digitalmars-d-learn
On Wednesday, 27 June 2018 at 15:07:57 UTC, Uknown wrote: On Wednesday, 27 June 2018 at 14:50:25 UTC, Alex wrote: On Wednesday, 27 June 2018 at 14:29:33 UTC, Uknown wrote: On Wednesday, 27 June 2018 at 14:21:39 UTC, Alex wrote: On Wednesday, 27 June 2018 at 13:27:46 UTC, Uknown wrote: [...]

Re: anyway to pass the context of an inner type to a template so it can be constructed?

2018-06-27 Thread Alex via Digitalmars-d-learn
On Wednesday, 27 June 2018 at 12:02:10 UTC, aliak wrote: === The use case is for a non-nullable type, where I want to guarantee that the value inside will never be null. I can't do it for inner classes though. And I can't allow the user to do something like: void main() { class C {}

Re: Preferred Alias Declaration Style

2018-06-27 Thread Basile B. via Digitalmars-d-learn
On Wednesday, 27 June 2018 at 12:25:26 UTC, Uknown wrote: On Wednesday, 27 June 2018 at 10:22:38 UTC, Vijay Nayar wrote: Most of the documentation at https://dlang.org/spec/declaration.html#alias uses examples of the form: `alias aliasName = other;`, where `aliasName` becomes the new name to

[Issue 19022] CTorFlow: Show the line of the duplicated initialization for const/immutable fields

2018-06-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19022 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/e7cbc9d1acd290d1af1587ad3b0389667bc6091c Fix Issue 19022 - CTorFlow: Show the line of the duplicated

[Issue 19022] CTorFlow: Show the line of the duplicated initialization for const/immutable fields

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

[Issue 19002] __FUNCTION__ and __PRETTY_FUNCTION__ are not C string literals

2018-06-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19002 --- Comment #2 from Steven Schveighoffer --- No, this is not expected. I can use printf with a string literal, and it works, even if it's via an enum, or some const folding. The compiler implicitly can cast a string literal to a const(char*),

[Issue 19002] __FUNCTION__ and __PRETTY_FUNCTION__ cannot be used as C string literals

2018-06-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19002 Steven Schveighoffer changed: What|Removed |Added Summary|__FUNCTION__ and|__FUNCTION__ and

Re: `update` and `require` properties for AA

2018-06-27 Thread Jacob Carlborg via Digitalmars-d
On 2018-06-27 01:22, Seb wrote: On Tuesday, 26 June 2018 at 17:12:37 UTC, H. S. Teoh wrote: On Tue, Jun 26, 2018 at 12:54:11PM -0400, Steven Schveighoffer via Digitalmars-d wrote: [...] 1. The dlang.org repository is backwards -- master generates the docs for the default dlang.org. I've

Re: Getting the underlying range from std.range.indexed, with elements in swapped order, when Indexed.source.length == Indexed.indices.length

2018-06-27 Thread Alex via Digitalmars-d-learn
On Wednesday, 27 June 2018 at 14:29:33 UTC, Uknown wrote: On Wednesday, 27 June 2018 at 14:21:39 UTC, Alex wrote: On Wednesday, 27 June 2018 at 13:27:46 UTC, Uknown wrote: Title says it all. Is there a trivial way to do this? There are

Re: Preferred Alias Declaration Style

2018-06-27 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/27/18 6:22 AM, Vijay Nayar wrote: Does this mean that the `alias other aliasName;` syntax is preferred, or does it simply mean that this is a low priority issue that hasn't been addressed yet? IIRC, there was an ambiguity for using the new syntax for alias this. I don't remember the

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

2018-06-27 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, June 27, 2018 10:59:35 Seb via Digitalmars-d wrote: > On Friday, 22 June 2018 at 07:38:04 UTC, Mike Parker wrote: > > On Thursday, 7 June 2018 at 06:22:04 UTC, Mike Parker wrote: > >> DIP 1013, "The Deprecation Process", is now ready for final > >> review. This is a last chance for

Re: Compilation is taking a ton of memory

2018-06-27 Thread H. S. Teoh via Digitalmars-d
On Wed, Jun 27, 2018 at 04:00:37PM +, Mario Silva via Digitalmars-d wrote: > Hello, > > Our code base has been growing steadily and it's currently at a point > where my 16GB machine just freezes when we're compiling our code. This > happens because DMD just consumes all my memory for a while.

Re: Preferred Alias Declaration Style

2018-06-27 Thread Basile B. via Digitalmars-d-learn
On Wednesday, 27 June 2018 at 15:27:09 UTC, Steven Schveighoffer wrote: On 6/27/18 6:22 AM, Vijay Nayar wrote: Does this mean that the `alias other aliasName;` syntax is preferred, or does it simply mean that this is a low priority issue that hasn't been addressed yet? IIRC, there was an

Re: Getting the underlying range from std.range.indexed, with elements in swapped order, when Indexed.source.length == Indexed.indices.length

2018-06-27 Thread Uknown via Digitalmars-d-learn
On Wednesday, 27 June 2018 at 15:18:05 UTC, Alex wrote: On Wednesday, 27 June 2018 at 15:07:57 UTC, Uknown wrote: On Wednesday, 27 June 2018 at 14:50:25 UTC, Alex wrote: On Wednesday, 27 June 2018 at 14:29:33 UTC, Uknown wrote: On Wednesday, 27 June 2018 at 14:21:39 UTC, Alex wrote: On

Re: Struct template cannot deduce function from argument types

2018-06-27 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, June 27, 2018 16:19:56 Luka Aleksic via Digitalmars-d-learn wrote: > Hello, > > In the following code: > > T first; > U second; > > this(T arg_first, U arg_second) { > first = arg_first; > second = arg_second; > } > }; > > void main() { > > pair!(char, uint)

Re: Struct template cannot deduce function from argument types

2018-06-27 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Jun 27, 2018 at 04:19:56PM +, Luka Aleksic via Digitalmars-d-learn wrote: [...] > struct pair(T, U) { > T first; > U second; > > this(T arg_first, U arg_second) { > first = arg_first; > second = arg_second; > } > }; > > void main()

Re: Struct template cannot deduce function from argument types

2018-06-27 Thread Luka Aleksic via Digitalmars-d-learn
On Wednesday, 27 June 2018 at 17:07:52 UTC, Jonathan M Davis wrote: On Wednesday, June 27, 2018 16:19:56 Luka Aleksic via Digitalmars-d-learn wrote: [...] [...] Well, for one, what's on the left side of the = doesn't normally affect the type of what's on the right. It does in some cases

Compilation is taking a ton of memory

2018-06-27 Thread Mario Silva via Digitalmars-d
Hello, Our code base has been growing steadily and it's currently at a point where my 16GB machine just freezes when we're compiling our code. This happens because DMD just consumes all my memory for a while. Also, it's taking a long time to compile it. Less than an year ago our project

Struct template cannot deduce function from argument types

2018-06-27 Thread Luka Aleksic via Digitalmars-d-learn
Hello, In the following code: struct pair(T, U) { T first; U second; this(T arg_first, U arg_second) { first = arg_first; second = arg_second; } }; void main() { pair!(char, uint) p1 = pair('a', 1); } I am getting the

dub - Add dependency for only "dub test"

2018-06-27 Thread Ben Goodwyn via Digitalmars-d
I like to use fluent-asserts (https://github.com/gedaiu/fluent-asserts), but I seem to be missing something in how to only add that as a dependency for the unittest builds. The documentation encourages overwriting the unittest configuration, but when I do this it changes a large number of

Re: Struct template cannot deduce function from argument types

2018-06-27 Thread lithium iodate via Digitalmars-d-learn
On Wednesday, 27 June 2018 at 16:19:56 UTC, Luka Aleksic wrote: […] I am getting the following error: scratch.d(14): Error: struct scratch.pair cannot deduce function from argument types !()(char, int), candidates are: scratch.d(2):scratch.pair(T, U) Failed: ["/usr/bin/dmd", "-v",

Re: Tuple DIP

2018-06-27 Thread 12345swordy via Digitalmars-d
On Tuesday, 26 June 2018 at 09:55:10 UTC, Francesco Mecca wrote: On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote: As promised [1], I have started setting up a DIP to improve tuple ergonomics in D: [...] What is the status of the DIP? Is it ready to be proposed and dicussed?

Re: dub - Add dependency for only "dub test"

2018-06-27 Thread Ben Goodwyn via Digitalmars-d
On Wednesday, 27 June 2018 at 16:53:49 UTC, Ben Goodwyn wrote: I like to use fluent-asserts (https://github.com/gedaiu/fluent-asserts), but I seem to be missing something in how to only add that as a dependency for the unittest builds. The documentation encourages overwriting the unittest

Re: D hash table comparison benchmark

2018-06-27 Thread Nathan S. via Digitalmars-d
On Tuesday, 26 June 2018 at 03:45:27 UTC, Seb wrote: Did you by chance also benchmark it with other languages like C++, Go or Rust? = Not reusing hashtables, optimizations enabled = 79 msecs Rust std::collections::HashMap 90 msecs Go built-in map 177 msecs C++ std::unordered_map (whichever

Re: anyway to pass the context of an inner type to a template so it can be constructed?

2018-06-27 Thread Timoses via Digitalmars-d-learn
On Wednesday, 27 June 2018 at 12:02:10 UTC, aliak wrote: This currently fails unless you mark the class as static: auto construct(T)() { return new T; } void main() { class C {} auto s = construct!C; } So wondering if there's anything that can be done to get the above working?

Re: Visual D 0.47.0 released

2018-06-27 Thread Rainer Schuetze via Digitalmars-d-learn
On 27/06/2018 12:37, Robert M. Münch wrote: On 2018-06-27 06:22:19 +, Rainer Schuetze said: - Windows-10, 64bit, running in a Parallels VM on OSX 10.13.5 - VS-2017 latest patch applied If you try to debug 64-bit-builds, mago starts another monitoring process. Maybe there are issues

Re: anyway to pass the context of an inner type to a template so it can be constructed?

2018-06-27 Thread aliak via Digitalmars-d-learn
On Wednesday, 27 June 2018 at 14:01:03 UTC, Alex wrote: On Wednesday, 27 June 2018 at 12:02:10 UTC, aliak wrote: === The use case is for a non-nullable type, where I want to guarantee that the value inside will never be null. I can't do it for inner classes though. And I can't allow the user

Re: anyway to pass the context of an inner type to a template so it can be constructed?

2018-06-27 Thread aliak via Digitalmars-d-learn
On Wednesday, 27 June 2018 at 19:28:37 UTC, Timoses wrote: Can't seem to avoid using mixin in main.. hehe yeah I see, didn't think of trying mixins, worth a shot! It seems like you had fun at least ;)

Re: Preferred Alias Declaration Style

2018-06-27 Thread Uknown via Digitalmars-d-learn
On Wednesday, 27 June 2018 at 14:01:06 UTC, Basile B. wrote: On Wednesday, 27 June 2018 at 12:25:26 UTC, Uknown wrote: On Wednesday, 27 June 2018 at 10:22:38 UTC, Vijay Nayar wrote: [...] aliasing a function type only works with the old syntax too: alias void proto_identifier(); Very

Re: Getting the underlying range from std.range.indexed, with elements in swapped order, when Indexed.source.length == Indexed.indices.length

2018-06-27 Thread Alex via Digitalmars-d-learn
On Wednesday, 27 June 2018 at 13:27:46 UTC, Uknown wrote: Title says it all. Is there a trivial way to do this? There are https://dlang.org/library/std/algorithm/mutation/reverse.html and https://dlang.org/library/std/range/retro.html both require a bidirectional range, which Indexed, luckily

Re: Getting the underlying range from std.range.indexed, with elements in swapped order, when Indexed.source.length == Indexed.indices.length

2018-06-27 Thread Uknown via Digitalmars-d-learn
On Wednesday, 27 June 2018 at 14:21:39 UTC, Alex wrote: On Wednesday, 27 June 2018 at 13:27:46 UTC, Uknown wrote: Title says it all. Is there a trivial way to do this? There are https://dlang.org/library/std/algorithm/mutation/reverse.html and https://dlang.org/library/std/range/retro.html

Re: Preferred Alias Declaration Style

2018-06-27 Thread Basile B. via Digitalmars-d-learn
On Wednesday, 27 June 2018 at 14:23:25 UTC, Uknown wrote: On Wednesday, 27 June 2018 at 14:01:06 UTC, Basile B. wrote: On Wednesday, 27 June 2018 at 12:25:26 UTC, Uknown wrote: On Wednesday, 27 June 2018 at 10:22:38 UTC, Vijay Nayar wrote: [...] aliasing a function type only works with the

Re: Sign the installers

2018-06-27 Thread Manu via Digitalmars-d
On Wed, 27 Jun 2018 at 17:24, Manu wrote: > > On Wed, 27 Jun 2018 at 17:16, Jonathan M Davis via Digitalmars-d > wrote: > > > > On Wednesday, June 27, 2018 16:54:55 Manu via Digitalmars-d wrote: > > > Hey people, > > > > > > So I had a few people in the office refuse to install DMD because when

Re: Sign the installers

2018-06-27 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, June 27, 2018 17:26:36 Manu via Digitalmars-d wrote: > On Wed, 27 Jun 2018 at 17:24, Manu wrote: > > On Wed, 27 Jun 2018 at 17:16, Jonathan M Davis via Digitalmars-d > > > > wrote: > > > On Wednesday, June 27, 2018 16:54:55 Manu via Digitalmars-d wrote: > > > > Hey people, > > > >

Re: Sign the installers

2018-06-27 Thread Chris M. via Digitalmars-d
On Thursday, 28 June 2018 at 00:15:54 UTC, Jonathan M Davis wrote: On Wednesday, June 27, 2018 16:54:55 Manu via Digitalmars-d wrote: Hey people, So I had a few people in the office refuse to install DMD because when they launched the installer, Windows displayed the prompt that it was

Re: Sign the installers

2018-06-27 Thread Brad Roberts via Digitalmars-d
On 6/27/2018 5:34 PM, Jonathan M Davis via Digitalmars-d wrote: On Wednesday, June 27, 2018 17:26:36 Manu via Digitalmars-d wrote: I guess people feel nervous about installing allegedly potentially dangerous software on their corporate workstation. Honestly, that's exactly the sort of thing

Re: Sign the installers

2018-06-27 Thread Ali via Digitalmars-d
On Wednesday, 27 June 2018 at 23:54:55 UTC, Manu wrote: Hey people, So I had a few people in the office refuse to install DMD because when they launched the installer, Windows displayed the prompt that it was untrusted (ie, unsigned) and not offer the install button without manual override.

Re: Sign the installers

2018-06-27 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, June 27, 2018 17:59:42 Brad Roberts via Digitalmars-d wrote: > On 6/27/2018 5:34 PM, Jonathan M Davis via Digitalmars-d wrote: > > On Wednesday, June 27, 2018 17:26:36 Manu via Digitalmars-d wrote: > >> I guess people feel nervous about installing allegedly potentially > >> dangerous

Re: Sign the installers

2018-06-27 Thread User via Digitalmars-d
It's all about removing resistance and raising the level of professionalism. D isn't a hobby project and shouldn't act like one. This is an obvious barrier that's worth removing. In this day and age of rampant actively dangerous software, it's an obvious improvement to sign it and make the

Re: Preferred Alias Declaration Style

2018-06-27 Thread Uknown via Digitalmars-d-learn
On Wednesday, 27 June 2018 at 14:29:18 UTC, Basile B. wrote: On Wednesday, 27 June 2018 at 14:23:25 UTC, Uknown wrote: On Wednesday, 27 June 2018 at 14:01:06 UTC, Basile B. wrote: On Wednesday, 27 June 2018 at 12:25:26 UTC, Uknown wrote: On Wednesday, 27 June 2018 at 10:22:38 UTC, Vijay Nayar

Re: `update` and `require` properties for AA

2018-06-27 Thread Seb via Digitalmars-d
On Wednesday, 27 June 2018 at 13:41:46 UTC, Jacob Carlborg wrote: On 2018-06-27 01:22, Seb wrote: On Tuesday, 26 June 2018 at 17:12:37 UTC, H. S. Teoh wrote: On Tue, Jun 26, 2018 at 12:54:11PM -0400, Steven Schveighoffer via Digitalmars-d wrote: [...] 1. The dlang.org repository is backwards

Re: Preferred Alias Declaration Style

2018-06-27 Thread Basile B. via Digitalmars-d-learn
On Wednesday, 27 June 2018 at 14:29:18 UTC, Basile B. wrote: On Wednesday, 27 June 2018 at 14:23:25 UTC, Uknown wrote: On Wednesday, 27 June 2018 at 14:01:06 UTC, Basile B. wrote: [...] You can use this syntax for functions : `alias proto_identifier = void function();` Nah it's not the

[Issue 19032] New: Alias this does not interact with inheritance.

2018-06-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19032 Issue ID: 19032 Summary: Alias this does not interact with inheritance. Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal

Sign the installers

2018-06-27 Thread Manu via Digitalmars-d
Hey people, So I had a few people in the office refuse to install DMD because when they launched the installer, Windows displayed the prompt that it was untrusted (ie, unsigned) and not offer the install button without manual override. True also for VisualD. Can we get a key and start signing

[Issue 19033] New: Sign the installer

2018-06-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19033 Issue ID: 19033 Summary: Sign the installer Product: D Version: D2 Hardware: All OS: Windows Status: NEW Severity: enhancement Priority: P1

[Issue 19034] New: Sign the installer

2018-06-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19034 Issue ID: 19034 Summary: Sign the installer Product: D Version: D2 Hardware: All OS: Windows Status: NEW Severity: enhancement Priority: P1

[Issue 19034] Sign the installer

2018-06-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19034 Manu changed: What|Removed |Added Keywords||industry --

[Issue 19033] Sign the installer

2018-06-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19033 Manu changed: What|Removed |Added Keywords||industry --

Re: Is there a way to get the address of the function that would be used in Implicit Function Template Instantiation?

2018-06-27 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, June 27, 2018 22:59:03 Nathan S. via Digitalmars-d-learn wrote: > On Wednesday, 27 June 2018 at 22:39:26 UTC, Jonathan M Davis > > wrote: > > You could explicitly instantiate the function template and then > > take its address. > > Explicitly instantiating the template can result in

Re: Sign the installers

2018-06-27 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, June 27, 2018 16:54:55 Manu via Digitalmars-d wrote: > Hey people, > > So I had a few people in the office refuse to install DMD because when > they launched the installer, Windows displayed the prompt that it was > untrusted (ie, unsigned) and not offer the install button without >

Re: Sign the installers

2018-06-27 Thread Manu via Digitalmars-d
On Wed, 27 Jun 2018 at 17:16, Jonathan M Davis via Digitalmars-d wrote: > > On Wednesday, June 27, 2018 16:54:55 Manu via Digitalmars-d wrote: > > Hey people, > > > > So I had a few people in the office refuse to install DMD because when > > they launched the installer, Windows displayed the

Is there a way to get the address of the function that would be used in Implicit Function Template Instantiation?

2018-06-27 Thread Nathan S. via Digitalmars-d-learn
Let's say there's a function template `doImpl` and `doImpl(x)` compiles thanks to IFTI. Is there any way to get the address of the function that would be called in `doImpl(x)`?

Re: Is there a way to get the address of the function that would be used in Implicit Function Template Instantiation?

2018-06-27 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, June 27, 2018 22:34:46 Nathan S. via Digitalmars-d-learn wrote: > Let's say there's a function template `doImpl` and `doImpl(x)` > compiles thanks to IFTI. Is there any way to get the address of > the function that would be called in `doImpl(x)`? You could explicitly instantiate

Re: Compilation is taking a ton of memory

2018-06-27 Thread Steven Schveighoffer via Digitalmars-d
On 6/27/18 12:00 PM, Mario Silva wrote: Hello, Our code base has been growing steadily and it's currently at a point where my 16GB machine just freezes when we're compiling our code. This happens because DMD just consumes all my memory for a while. That is the path of D's compiler

Re: Is there a way to get the address of the function that would be used in Implicit Function Template Instantiation?

2018-06-27 Thread Nathan S. via Digitalmars-d-learn
On Wednesday, 27 June 2018 at 22:39:26 UTC, Jonathan M Davis wrote: You could explicitly instantiate the function template and then take its address. Explicitly instantiating the template can result in a function that may be behaviorally identical but have a different address.

Re: Is there a way to get the address of the function that would be used in Implicit Function Template Instantiation?

2018-06-27 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/27/18 6:34 PM, Nathan S. wrote: Let's say there's a function template `doImpl` and `doImpl(x)` compiles thanks to IFTI. Is there any way to get the address of the function that would be called in `doImpl(x)`? It's a good question! You may be able to use TemplateOf, TemplateArgsOf, and

Re: Compilation is taking a ton of memory

2018-06-27 Thread sarn via Digitalmars-d
On Wednesday, 27 June 2018 at 16:00:37 UTC, Mario Silva wrote: Any tips on how to code in a way that minimizes both compilation times and memory consumption when compiling? Here are my tips. I'd love to hear more from others. * Try to reduce imports. E.g., say you use a lot of stuff from

Preferred Alias Declaration Style

2018-06-27 Thread Vijay Nayar via Digitalmars-d-learn
Most of the documentation at https://dlang.org/spec/declaration.html#alias uses examples of the form: `alias aliasName = other;`, where `aliasName` becomes the new name to reference `other`. Alternatively, one may write `alias other aliasName;`. My understanding is that the syntax with `=`

Re: Visual D 0.47.0 released

2018-06-27 Thread Robert M. Münch via Digitalmars-d-learn
On 2018-06-27 06:22:19 +, Rainer Schuetze said: Works for me, can you give more details? VS version, platform, etc. - Windows-10, 64bit, running in a Parallels VM on OSX 10.13.5 - VS-2017 latest patch applied Please note that there is no need to select the Mago debug engine in VS2013 or

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

2018-06-27 Thread Seb via Digitalmars-d
On Friday, 22 June 2018 at 07:38:04 UTC, Mike Parker wrote: On Thursday, 7 June 2018 at 06:22:04 UTC, Mike Parker wrote: 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

Re: Visual D 0.47.0 released

2018-06-27 Thread Rainer Schuetze via Digitalmars-d-learn
On 26/06/2018 16:25, Robert M. Münch wrote: On 2018-06-24 13:08:53 +, Rainer Schuetze said: a new release of Visual D has just been uploaded. Major changes are * improved Visual C++ project integration: better dependencies,    automatic libraries, name demangling * new project wizard *

[Issue 16360] DMD fails to inline functions that contain a type

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

Re: Disappointing performance from DMD/Phobos

2018-06-27 Thread Manu via Digitalmars-d
On Tue., 26 Jun. 2018, 11:45 am Iain Buclaw via Digitalmars-d, < digitalmars-d@puremagic.com> wrote: > On 26 June 2018 at 20:07, Manu via Digitalmars-d > wrote: > > On Tue, 26 Jun 2018 at 10:43, Iain Buclaw via Digitalmars-d > > wrote: > >> > >> On 26 June 2018 at 19:41, Manu via Digitalmars-d

[Issue 9701] UDAs cannot be attached to enum values.

2018-06-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9701 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/36d349c6fffc734ee13b05e6927d1a4a01444a24 Fix Issue 9701 - allow UDAs to be attached to enum values

[Issue 18439] Error: cannot use operator ~= in @nogc delegate 'main.test.__lambda1'

2018-06-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18439 --- Comment #4 from Seb --- I looked a bit at this and there seem to be two issues going on: 1) DMD creates the __lambda1 member For this in @nogc main case (i.e. without label), TypeFunction.isnogc = false -> initInferAttributes tries to infer the

[Issue 9701] UDAs cannot be attached to enum values.

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

DIP 1014--Hooking D's struct move semantics--Final Review

2018-06-27 Thread Mike Parker via Digitalmars-d
DIP 1014, "Hooking D's struct move semantics", 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:

DIP 1014--Hooking D's struct move semantics--Final Review

2018-06-27 Thread Mike Parker via Digitalmars-d
DIP 1014, "Hooking D's struct move semantics", 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 18719] Doubly-called constructor against member when using forwarding constructors

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

[Issue 19030] New: CTorFlow checking is too aggressive and only checks whether a this call is present

2018-06-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19030 Issue ID: 19030 Summary: CTorFlow checking is too aggressive and only checks whether a this call is present Product: D Version: D2 Hardware: All OS: All

[Issue 16360] DMD fails to inline functions that contain a type

2018-06-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16360 --- Comment #4 from Basile B. --- (In reply to Basile B. from comment #0) > When a simple type is nested in the function, e.g as an helper DMD fails to > inline: > > > #!runnable-flags: -O -inline > module runnable; >

Re: Disappointing performance from DMD/Phobos

2018-06-27 Thread Per Nordlöw via Digitalmars-d
On Wednesday, 27 June 2018 at 06:47:46 UTC, Manu wrote: This is some seriously good news for GDC. Awesome stuff guys! Agreed!

Re: DIP 1014--Hooking D's struct move semantics--Final Review

2018-06-27 Thread Mike Parker via Digitalmars-d
On Wednesday, 27 June 2018 at 07:13:14 UTC, Mike Parker wrote: Thanks in advance for your participation. For those of you using the NNTP or mailing list interfaces, this is the thread to respond in. Thanks!

Re: DIP 1014--Hooking D's struct move semantics--Final Review Begins

2018-06-27 Thread Mike Parker via Digitalmars-d-announce
On Wednesday, 27 June 2018 at 07:28:07 UTC, Mike Parker wrote: On Wednesday, 27 June 2018 at 07:26:20 UTC, Mike Parker wrote: https://forum.dlang.org/post/hwscnvmtrzfcfnppd...@forum.dlang.org And I've pasted the wrong link here. The correct thread link is this one:

[Issue 19002] __FUNCTION__ and __PRETTY_FUNCTION__ are not C string literals

2018-06-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19002 Seb changed: What|Removed |Added CC||greensunn...@gmail.com --- Comment #1 from Seb ---

DIP 1014--Hooking D's struct move semantics--Final Review Begins

2018-06-27 Thread Mike Parker via Digitalmars-d-announce
The last chance for community feedback on DIP 1014, "Hooking D's struct move semantics", 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

Re: DIP 1014--Hooking D's struct move semantics--Final Review Begins

2018-06-27 Thread Mike Parker via Digitalmars-d-announce
On Wednesday, 27 June 2018 at 07:26:20 UTC, Mike Parker wrote: https://forum.dlang.org/post/hwscnvmtrzfcfnppd...@forum.dlang.org And I've pasted the wrong link here. The correct thread link is this one: https://forum.dlang.org/post/ipidsodqhgazrfvzh...@forum.dlang.org Thanks!

anyway to pass the context of an inner type to a template so it can be constructed?

2018-06-27 Thread aliak via Digitalmars-d-learn
This currently fails unless you mark the class as static: auto construct(T)() { return new T; } void main() { class C {} auto s = construct!C; } So wondering if there's anything that can be done to get the above working? Or if there isn't then how could the compiler be enhanced

[Issue 19035] Escape in scope inference, improve scope inference

2018-06-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19035 --- Comment #1 from Walter Bright --- https://github.com/dlang/dmd/pull/8408 --

[Issue 19035] New: Escape in scope inference, improve scope inference

2018-06-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19035 Issue ID: 19035 Summary: Escape in scope inference, improve scope inference Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal

Re: How to list aggregate members in order of declaration at compile time?

2018-06-27 Thread Guillaume Lathoud via Digitalmars-d-learn
On Friday, 11 November 2016 at 23:55:58 UTC, Jonathan M Davis wrote: ... So, just provide a solid use case (if not multiple) as to why it needs to have a specific order, and you probably stand a good chance of it being added to the spec - especially since it's what the implementation does

Re: Sign the installers

2018-06-27 Thread Patrick Schluter via Digitalmars-d
On Thursday, 28 June 2018 at 01:34:22 UTC, Jonathan M Davis wrote: On Wednesday, June 27, 2018 17:59:42 Brad Roberts via Digitalmars-d wrote: On 6/27/2018 5:34 PM, Jonathan M Davis via Digitalmars-d wrote: > On Wednesday, June 27, 2018 17:26:36 Manu via Digitalmars-d > wrote: >> I guess people

[Issue 19036] New: .tupleof order guarantee

2018-06-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19036 Issue ID: 19036 Summary: .tupleof order guarantee Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1

[Issue 16639] Review std.json wrt this article on JSON edge cases and ambiguities

2018-06-27 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16639 Tyler Knott changed: What|Removed |Added Keywords||pull CC|