[Issue 18441] Add comments to GC page about tradeoffs in design and impl of GC (garbage collector)

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18441 --- Comment #2 from anonymous4 --- https://blog.plan99.net/modern-garbage-collection-911ef4f8bd8e GC questionnaire, may be interesting to fill. --

[Issue 18441] Add comments to GC page about tradeoffs in design and impl of GC (garbage collector)

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18441 greenify changed: What|Removed |Added CC||greeen...@gmail.com ---

[Issue 17747] extern(C) shared static module constructor should be called in betterC programs

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17747 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 18450] New: ICE without line numbers on templated struct constructor call

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18450 Issue ID: 18450 Summary: ICE without line numbers on templated struct constructor call Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW

Re: Congrats to D / Vibe-D -- techempower Round 15

2018-02-16 Thread Daniel Kozak via Digitalmars-d
https://tfb-status.techempower.com/raw/results.2018-02-09-10-22-34-441.json On Fri, Feb 16, 2018 at 1:01 AM, Petar via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On Thursday, 15 February 2018 at 20:59:53 UTC, Ali wrote: > >> On Thursday, 15 February 2018 at 20:43:41 UTC, Daniel Kozak

Re: how to get typeid of extern(C++) classes?

2018-02-16 Thread Meta via Digitalmars-d
On Friday, 16 February 2018 at 00:42:02 UTC, Timothee Cour wrote: C++ exposes it via typeid so in theory all the info is there ; It's been awhile since I've written any C++ code, but as I remember it, this type of type info is not available unless you enable it with a (C++) compiler switch.

Re: Release D 2.078.2

2018-02-16 Thread Eugene Wissner via Digitalmars-d-announce
On Friday, 16 February 2018 at 11:25:42 UTC, Martin Nowak wrote: On 02/10/2018 09:17 AM, Thomas Mader wrote: https://github.com/dlang/dub/releases/latest doesn't point to 1.7.2. Out of curiosity, do you have a strong use-case to install/update dub separately of the compiler? I'm shipping

Re: Vulkan

2018-02-16 Thread rumbu via Digitalmars-d
On Saturday, 17 February 2018 at 05:52:38 UTC, Jonathan M Davis wrote: Well, in D-speak, C header definitions rewritten as D so that D can call the C functions are exactly what bindings are, whereas if bindings are wrapped in D code to make them more D-like, those are called wrappers. I

Re: Vulkan

2018-02-16 Thread Rubn via Digitalmars-d
On Friday, 16 February 2018 at 22:58:30 UTC, Ivan Trombley wrote: On Wednesday, 14 February 2018 at 02:40:18 UTC, Mike Parker wrote: What [does] it mean to say they don't work? Have you reported any issues? I don't see any in the DerelictVulkan repo. If something's broken, please report it so

Re: Vulkan

2018-02-16 Thread Jonathan M Davis via Digitalmars-d
On Saturday, February 17, 2018 13:52:06 Danni Coy via Digitalmars-d wrote: > On Wed, Feb 14, 2018 at 2:26 PM, rikki cattermole via Digitalmars-d < > > digitalmars-d@puremagic.com> wrote: > > On 13/02/2018 10:54 PM, Danni Coy wrote: > >> On Wed, Feb 14, 2018 at 8:20 AM, Ivan Trombley via

Re: how to get typeid of extern(C++) classes?

2018-02-16 Thread Stefan Koch via Digitalmars-d
On Friday, 16 February 2018 at 00:42:02 UTC, Timothee Cour wrote: is there a way to get typeid of extern(C++) classes (eg for ones in dmd/astbase.d but not limited to that) ? C++ exposes it via typeid so in theory all the info is there ; I would need it at least for debugging (eg if RTTI is not

New abstraction: Layout

2018-02-16 Thread Andrei Alexandrescu via Digitalmars-d
I've been long bothered that the builtin .tupleof and our own abstractions Fields and RepresentationTypeTuple in std.traits - all omit the essential information of field offsets. That makes types that use align() to have the same .tupleof, Fields, and RepresentationTypeTuple even though they

Re: New abstraction: Layout

2018-02-16 Thread rikki cattermole via Digitalmars-d
On 17/02/2018 12:04 AM, Andrei Alexandrescu wrote: I've been long bothered that the builtin .tupleof and our own abstractions Fields and RepresentationTypeTuple in std.traits - all omit the essential information of field offsets. That makes types that use align() to have the same .tupleof,

Appending to ddoc macros

2018-02-16 Thread Jonathan M Davis via Digitalmars-d-learn
Does anyone know if there's a way to append to a ddoc macro instead of replacing it? For instance, dlang.org has the EXTRA_HEADERS macro for adding extra stuff to the header of a web page, and it uses that with several pages defining EXTRA_HEADERS to add headers to that specific page. I have

Re: Disk space used and free size of a Network share folder in Windows

2018-02-16 Thread Vino via Digitalmars-d-learn
On Thursday, 15 February 2018 at 20:43:32 UTC, Johan Engelen wrote: On Wednesday, 14 February 2018 at 12:22:09 UTC, Vino wrote: Hi All, Request your help on how to get the disk space used and free size of a Network share folder in Windows, tried with getSize but it return 0; See:

Re: how to get typeid of extern(C++) classes?

2018-02-16 Thread Jonathan M Davis via Digitalmars-d
On Saturday, February 17, 2018 00:23:01 Meta via Digitalmars-d wrote: > On Friday, 16 February 2018 at 00:42:02 UTC, Timothee Cour wrote: > > C++ exposes it via typeid so in theory all the info is there ; > > It's been awhile since I've written any C++ code, but as I > remember it, this type of

[Issue 17772] Wrong C++ mangled names for templated functions

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17772 --- Comment #1 from Walter Bright --- Partial fix: https://github.com/dlang/dmd/pull/7906 --

Re: Dub, Cargo, Go, Gradle, Maven

2018-02-16 Thread Dmitry Olshansky via Digitalmars-d
On Friday, 16 February 2018 at 22:48:55 UTC, H. S. Teoh wrote: On Fri, Feb 16, 2018 at 07:31:37PM +, Dmitry Olshansky via Digitalmars-d wrote: On Friday, 16 February 2018 at 18:16:12 UTC, H. S. Teoh wrote: [...] > If a dependent node requires network access, it forces > network access

Re: Tuple DIP

2018-02-16 Thread Timon Gehr via Digitalmars-d
On 16.02.2018 20:51, Martin Nowak wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 01/12/2018 11:44 PM, Timon Gehr wrote: As promised [1], I have started setting up a DIP to improve tuple ergonomics in D: https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md Pardon me

Re: Vulkan

2018-02-16 Thread Zoadian via Digitalmars-d
On Friday, 16 February 2018 at 22:58:30 UTC, Ivan Trombley wrote: On Wednesday, 14 February 2018 at 02:40:18 UTC, Mike Parker wrote: What [does] it mean to say they don't work? Have you reported any issues? I don't see any in the DerelictVulkan repo. If something's broken, please report it so

Re: Vulkan

2018-02-16 Thread Danni Coy via Digitalmars-d
On Wed, Feb 14, 2018 at 2:26 PM, rikki cattermole via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On 13/02/2018 10:54 PM, Danni Coy wrote: > >> >> On Wed, Feb 14, 2018 at 8:20 AM, Ivan Trombley via Digitalmars-d < >> digitalmars-d@puremagic.com >

Re: Tuple DIP

2018-02-16 Thread Timon Gehr via Digitalmars-d
On 16.02.2018 21:16, Jonathan M Davis wrote: On Friday, February 16, 2018 21:01:02 Martin Nowak via Digitalmars-d wrote: On 01/14/2018 12:21 AM, Timon Gehr wrote: what would be the equivalent of this ? ` writeln(tuple!("x", "y", "z")(2, 3, 4).y); ` It would continue to work the same way. I

Re: Tuple DIP

2018-02-16 Thread Timon Gehr via Digitalmars-d
On 16.02.2018 21:48, H. S. Teoh wrote: On Fri, Feb 16, 2018 at 01:16:13PM -0700, Jonathan M Davis via Digitalmars-d wrote: On Friday, February 16, 2018 21:01:02 Martin Nowak via Digitalmars-d wrote: On 01/14/2018 12:21 AM, Timon Gehr wrote: what would be the equivalent of this ? `

Re: Tuple DIP

2018-02-16 Thread Timon Gehr via Digitalmars-d
On 16.02.2018 21:01, Martin Nowak wrote: On 01/14/2018 12:21 AM, Timon Gehr wrote: what would be the equivalent of this ? ` writeln(tuple!("x", "y", "z")(2, 3, 4).y); ` It would continue to work the same way. I did consider adding a proposal for built-in named tuple syntax: writeln((x: 2,

Re: Knowing the approach to solve a D challenge

2018-02-16 Thread rikki cattermole via Digitalmars-d
On 16/02/2018 9:44 AM, aberba wrote: D has tone of features and library solutions. When you encounter a problem, how do you approach solving it in code? 1. Do you first write it in idiomatic D style or a more general approach before porting to idiomatic D? 2. Do you find yourself mostly

Re: is this a bug with writeln / std.algorithm.remove?

2018-02-16 Thread arturg via Digitalmars-d-learn
On Friday, 16 February 2018 at 11:45:21 UTC, arturg wrote: this code fails to compile: void delegate(void*) dg; void delegate(void*)[] dgs = [dg, dg, dg]; dgs.writeln; dgs.remove(1).writeln(); if you comment out dgs.writeln; it works as expected, it works if you use other types

Re: Knowing the approach to solve a D challenge

2018-02-16 Thread Joakim via Digitalmars-d
I don't write much D code, but here are my answers for _any_ language. On Friday, 16 February 2018 at 09:44:27 UTC, aberba wrote: D has tone of features and library solutions. When you encounter a problem, how do you approach solving it in code? 1. Do you first write it in idiomatic D style

Re: Knowing the approach to solve a D challenge

2018-02-16 Thread Chris via Digitalmars-d
On Friday, 16 February 2018 at 09:44:27 UTC, aberba wrote: D has tone of features and library solutions. When you encounter a problem, how do you approach solving it in code? 1. Do you first write it in idiomatic D style or a more general approach before porting to idiomatic D? As idiomatic

Re: Release D 2.078.2

2018-02-16 Thread Martin Nowak via Digitalmars-d-announce
On 02/10/2018 09:17 AM, Thomas Mader wrote: > https://github.com/dlang/dub/releases/latest doesn't point to 1.7.2. Out of curiosity, do you have a strong use-case to install/update dub separately of the compiler?

Release D 2.078.3

2018-02-16 Thread Martin Nowak via Digitalmars-d-announce
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Glad to announce D 2.078.3. http://dlang.org/download.html This point release fixes an ICE and an incorrect diagnostic warning, see the changelog for more details. http://dlang.org/changelog/2.078.3.html - -Martin -BEGIN PGP SIGNATURE-

Re: getSymbolsByUDA does not take private symbols under consideration. Should I file a bug?

2018-02-16 Thread Anonymouse via Digitalmars-d-learn
On Friday, 16 February 2018 at 09:26:47 UTC, Piotr Mitana wrote: Hello, The code below: import std.traits; enum Attr; class MyClass { private @Attr int a; static assert(getSymbolsByUDA!(typeof(this), MyClass).length == 1); } does not compile as

Knowing the approach to solve a D challenge

2018-02-16 Thread aberba via Digitalmars-d
D has tone of features and library solutions. When you encounter a problem, how do you approach solving it in code? 1. Do you first write it in idiomatic D style or a more general approach before porting to idiomatic D? 2. Do you find yourself mostly rolling out your own implementation

[Issue 18450] ICE without line numbers on templated struct constructor call

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18450 Simen Kjaeraas changed: What|Removed |Added Status|NEW |RESOLVED

Re: is this a bug with writeln / std.algorithm.remove?

2018-02-16 Thread bauss via Digitalmars-d-learn
On Friday, 16 February 2018 at 12:15:07 UTC, arturg wrote: On Friday, 16 February 2018 at 11:45:21 UTC, arturg wrote: this code fails to compile: void delegate(void*) dg; void delegate(void*)[] dgs = [dg, dg, dg]; dgs.writeln; dgs.remove(1).writeln(); if you comment out

Re: getSymbolsByUDA does not take private symbols under consideration. Should I file a bug?

2018-02-16 Thread bauss via Digitalmars-d-learn
On Friday, 16 February 2018 at 09:26:47 UTC, Piotr Mitana wrote: Hello, The code below: import std.traits; enum Attr; class MyClass { private @Attr int a; static assert(getSymbolsByUDA!(typeof(this), MyClass).length == 1); } does not compile as

getSymbolsByUDA does not take private symbols under consideration. Should I file a bug?

2018-02-16 Thread Piotr Mitana via Digitalmars-d-learn
Hello, The code below: import std.traits; enum Attr; class MyClass { private @Attr int a; static assert(getSymbolsByUDA!(typeof(this), MyClass).length == 1); } does not compile as static assertion fails. Making the filed a public makes it compile

is this a bug with writeln / std.algorithm.remove?

2018-02-16 Thread arturg via Digitalmars-d-learn
this code fails to compile: void delegate(void*) dg; void delegate(void*)[] dgs = [dg, dg, dg]; dgs.writeln; dgs.remove(1).writeln(); if you comment out dgs.writeln; it works as expected, it works if you use other types then void*: void delegate(int*) dg; void

Re: How to check if aggregate member is static templated method?

2018-02-16 Thread bauss via Digitalmars-d-learn
On Thursday, 15 February 2018 at 15:49:47 UTC, RazvanN wrote: On Thursday, 15 February 2018 at 13:51:41 UTC, drug wrote: 15.02.2018 16:50, drug пишет: https://run.dlang.io/is/zHT2XZ I can check againts if member is either static function or template. But I failed to check if it both static

[Issue 18425] std.process environment["VAR"] = "NAME" does not always take effect

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18425 --- Comment #4 from Rainer Schuetze --- > Was this a hand-copied typo, or was there a typo in the original? Ooops. Typo is in the test only. The result with DFLAGS is the same, though. > I looked at the code, and it's very

[Issue 18451] rejects-valid since 2.076.1

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18451 Steven Schveighoffer changed: What|Removed |Added Keywords||rejects-valid

Re: is this a bug with writeln / std.algorithm.remove?

2018-02-16 Thread bauss via Digitalmars-d-learn
On Friday, 16 February 2018 at 13:08:09 UTC, bauss wrote: On Friday, 16 February 2018 at 12:15:07 UTC, arturg wrote: On Friday, 16 February 2018 at 11:45:21 UTC, arturg wrote: this code fails to compile: void delegate(void*) dg; void delegate(void*)[] dgs = [dg, dg, dg];

Re: is this a bug with writeln / std.algorithm.remove?

2018-02-16 Thread arturg via Digitalmars-d-learn
On Friday, 16 February 2018 at 13:28:59 UTC, Steven Schveighoffer wrote: Strictly speaking, this is not necessarily proof that it's in phobos, there could have been changes elsewhere that cause one of the conditions to fail. However, testing this out, I found something very weird. If you

[Issue 18451] [REG 2.076.1] In certain circumstances, calling remove on an array of delegates fails

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18451 --- Comment #1 from Steven Schveighoffer --- A couple more notes: Putting a pragma(msg, isInputRange!(typeof(dgs))) before the remove line seems to make it succeed to compile. Removing the writeln after the remove also makes

[Issue 5710] cannot use delegates as parameters to non-global template

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5710 Simen Kjaeraas changed: What|Removed |Added CC||simend...@gmail.com

[Issue 11098] template instance x cannot use local y as parameter to non-global template z

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11098 Simen Kjaeraas changed: What|Removed |Added Status|NEW |RESOLVED

Re: static opSlice is not possible

2018-02-16 Thread Alex via Digitalmars-d-learn
On Friday, 16 February 2018 at 13:35:03 UTC, Basile B. wrote: Technically iy's a multi dimensional slicing but there's a constraint on the number of dimension allowed so that it looks exactly like a normal opSlice. By the way, i reduced too much. This shows more how it works: struct Foo {

Re: Knowing the approach to solve a D challenge

2018-02-16 Thread Dukc via Digitalmars-d
On Friday, 16 February 2018 at 09:44:27 UTC, aberba wrote: 1. Do you first write it in idiomatic D style or a more general approach before porting to idiomatic D? In micro-level, it's usually fairly idiomatic from get-go. Usually no heap allocations at inner loops, for-looping, static

Re: is this a bug with writeln / std.algorithm.remove?

2018-02-16 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/16/18 8:16 AM, bauss wrote: On Friday, 16 February 2018 at 13:08:09 UTC, bauss wrote: On Friday, 16 February 2018 at 12:15:07 UTC, arturg wrote: On Friday, 16 February 2018 at 11:45:21 UTC, arturg wrote: this code fails to compile:     void delegate(void*) dg;     void delegate(void*)[]

Re: static opSlice is not possible

2018-02-16 Thread Basile B. via Digitalmars-d-learn
On Friday, 16 February 2018 at 13:23:09 UTC, Basile B. wrote: On Thursday, 15 February 2018 at 22:49:56 UTC, Alex wrote: Hi all, a short question about an old bug: https://issues.dlang.org/show_bug.cgi?id=11877 Are there reasons, which speaks against this feature? And maybe another one, more

Re: is this a bug with writeln / std.algorithm.remove?

2018-02-16 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/16/18 8:51 AM, arturg wrote: On Friday, 16 February 2018 at 13:28:59 UTC, Steven Schveighoffer wrote: Strictly speaking, this is not necessarily proof that it's in phobos, there could have been changes elsewhere that cause one of the conditions to fail. However, testing this out, I

Re: is this a bug with writeln / std.algorithm.remove?

2018-02-16 Thread arturg via Digitalmars-d-learn
On Friday, 16 February 2018 at 13:57:07 UTC, Steven Schveighoffer wrote: You have a pretty good minimal test, put that in bugzilla along with the forum thread link and all the info we know. Mark it as a dmd bug, regression, along with the version where it regressed (2.076.1), and I would tag

Re: static opSlice is not possible

2018-02-16 Thread Basile B. via Digitalmars-d-learn
On Thursday, 15 February 2018 at 22:49:56 UTC, Alex wrote: Hi all, a short question about an old bug: https://issues.dlang.org/show_bug.cgi?id=11877 Are there reasons, which speaks against this feature? And maybe another one, more general: Is there any place, where it is documented, which

[Issue 18451] New: rejects-valid since 2.076.1

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18451 Issue ID: 18451 Summary: rejects-valid since 2.076.1 Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: regression Priority: P1

[Issue 18451] [REG 2.076.1] In certain circumstances, calling remove on an array of delegates fails

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18451 Steven Schveighoffer changed: What|Removed |Added Summary|rejects-valid since 2.076.1 |[REG 2.076.1] In

Re: Dub, Cargo, Go, Gradle, Maven

2018-02-16 Thread Ola Fosheim Grøstad via Digitalmars-d
On Friday, 16 February 2018 at 18:16:12 UTC, H. S. Teoh wrote: The O(N) vs. O(n) issue is actually very important once you I understand what you are trying to say, but this usage of notation is very confusing. O(n) is exactly the same as O(N) if N relates to n by a given percentage.

Re: Tuple DIP

2018-02-16 Thread Martin Nowak via Digitalmars-d
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 01/12/2018 11:44 PM, Timon Gehr wrote: > As promised [1], I have started setting up a DIP to improve tuple > ergonomics in D: > > https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md Pardon me if things have been said already,

Re: std.zip size limit of 2 GB?

2018-02-16 Thread Andre Pany via Digitalmars-d-learn
On Thursday, 15 February 2018 at 21:57:23 UTC, Steven Schveighoffer wrote: Really, i should be size_t in all places, I can't see why it should ever be int. Please file an issue. -Steve Issue created: https://issues.dlang.org/show_bug.cgi?id=18452 Thanks for the analysis. Kind regards André

Re: Tuple DIP

2018-02-16 Thread Martin Nowak via Digitalmars-d
On 01/14/2018 07:41 PM, Timothee Cour wrote: > Should definitely be mentioned in the DIP to open that up for discussion; > it breaks assumptions like sizeof(Tuple)=sum_i : tuple (sizeof(Ti)); That doesn't hold for all cases anyhow, as it seems were talking about closed tuples that are contiguous

Re: Congrats to D / Vibe-D -- techempower Round 15

2018-02-16 Thread Johan Engelen via Digitalmars-d
On Thursday, 15 February 2018 at 19:04:53 UTC, Benny wrote: https://www.techempower.com/benchmarks/#section=data-r15=ph=plaintext https://www.techempower.com/benchmarks/#section=data-r14=ph=json D is finally showing up in the upper and middle parts of the tests. In some tests Vibe-D ( with LDC

Re: Dub, Cargo, Go, Gradle, Maven

2018-02-16 Thread Dmitry Olshansky via Digitalmars-d
On Friday, 16 February 2018 at 18:16:12 UTC, H. S. Teoh wrote: On Mon, Feb 12, 2018 at 10:35:06AM +, Russel Winder via Digitalmars-d wrote: In all the discussion of Dub to date, it hasn't been pointed out that JVM building merged dependency management and build a long time ago.

Re: Dub, Cargo, Go, Gradle, Maven

2018-02-16 Thread H. S. Teoh via Digitalmars-d
On Fri, Feb 16, 2018 at 07:40:01PM +, Ola Fosheim Grøstad via Digitalmars-d wrote: > On Friday, 16 February 2018 at 18:16:12 UTC, H. S. Teoh wrote: > > The O(N) vs. O(n) issue is actually very important once you > > I understand what you are trying to say, but this usage of notation is >

[Issue 18452] New: std.zip has size limit of 2 GB

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18452 Issue ID: 18452 Summary: std.zip has size limit of 2 GB Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1

Re: Tuple DIP

2018-02-16 Thread Jonathan M Davis via Digitalmars-d
On Friday, February 16, 2018 21:01:02 Martin Nowak via Digitalmars-d wrote: > On 01/14/2018 12:21 AM, Timon Gehr wrote: > >> what would be the equivalent of this ? > >> ` writeln(tuple!("x", "y", "z")(2, 3, 4).y); ` > > > > It would continue to work the same way. > > > > I did consider adding a

Re: Tuple DIP

2018-02-16 Thread Martin Nowak via Digitalmars-d
On 01/14/2018 12:21 AM, Timon Gehr wrote: >> what would be the equivalent of this ? >> ` writeln(tuple!("x", "y", "z")(2, 3, 4).y); ` > > It would continue to work the same way. > > I did consider adding a proposal for built-in named tuple syntax: > > writeln((x: 2, y: 3, z: 4).y); > > (int a,

[Issue 18434] BigInt gcd asserts when one argument is zero.

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18434 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/fb66d07b769111664d648b5d4eb0a96d8c3e3101 Fix issue 18434: gcd(BigInt(0), BigInt(1)) fails The

[Issue 18434] BigInt gcd asserts when one argument is zero.

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

Faking a non-pure function as pure

2018-02-16 Thread Nordlöw via Digitalmars-d-learn
I'm struggling with my definition of assumePure that should make a non-pure function `f` callable as pure `pureF`. I've copied the definition of assumePure from the Phobos docs at https://dlang.org/phobos/std_traits.html#SetFunctionAttributes and managed to define pureF using it but I cannot

Re: Dub, Cargo, Go, Gradle, Maven

2018-02-16 Thread H. S. Teoh via Digitalmars-d
On Mon, Feb 12, 2018 at 10:35:06AM +, Russel Winder via Digitalmars-d wrote: > In all the discussion of Dub to date, it hasn't been pointed out that > JVM building merged dependency management and build a long time ago. > Historically: > > Make → Ant → Maven → Gradle > > and Gradle can

[Issue 10828] datetime toString functions should accept sink

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10828 Jack Stouffer changed: What|Removed |Added Status|RESOLVED|REOPENED

Re: Faking a non-pure function as pure

2018-02-16 Thread Ali Çehreli via Digitalmars-d-learn
On 02/16/2018 09:58 AM, Nordlöw wrote: void g() pure {     static assert(!__traits(compiles, { auto x = f(42); }));     alias pureF = assumePure!(typeof());     // TODO: how do I call pureF?     // auto x = (*pureF)(42);     // auto x = pureF(42); } auto pureF = assumePure();

[Issue 17420] std.format.formatObject doesn't work with @safe toString specialization

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17420 Jack Stouffer changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 18449] dmd allows to compile `extern(C++) class` even though it should be extern(C++) struct; should give error

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18449 Timothee Cour changed: What|Removed |Added Summary|extern(C++) class layout|dmd allows to

[Issue 18449] dmd allows to compile `extern(C++) class` even though it should be extern(C++) struct; should give error

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18449 --- Comment #2 from Timothee Cour --- reopening and changed title to: dmd allows to compile `extern(C++) class` even though it should be extern(C++) struct; should give error is that fixable or fundamentally hard to

[Issue 18449] dmd allows to compile `extern(C++) class` even though it should be extern(C++) struct; should give error

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18449 Timothee Cour changed: What|Removed |Added Status|RESOLVED|REOPENED

Re: Dub, Cargo, Go, Gradle, Maven

2018-02-16 Thread Ola Fosheim Grøstad via Digitalmars-d
On Friday, 16 February 2018 at 19:40:07 UTC, H. S. Teoh wrote: On Fri, Feb 16, 2018 at 07:40:01PM +, Ola Fosheim Grøstad via Digitalmars-d wrote: On Friday, 16 February 2018 at 18:16:12 UTC, H. S. Teoh wrote: > The O(N) vs. O(n) issue is actually very important once you I understand what

Re: Tuple DIP

2018-02-16 Thread H. S. Teoh via Digitalmars-d
On Fri, Feb 16, 2018 at 01:16:13PM -0700, Jonathan M Davis via Digitalmars-d wrote: > On Friday, February 16, 2018 21:01:02 Martin Nowak via Digitalmars-d wrote: > > On 01/14/2018 12:21 AM, Timon Gehr wrote: > > >> what would be the equivalent of this ? > > >> ` writeln(tuple!("x", "y", "z")(2,

Re: Congrats to D / Vibe-D -- techempower Round 15

2018-02-16 Thread Daniel Kozak via Digitalmars-d
Hard to say, but I believe one of reasons is VibeManualMemoryManagement, another one would be same fixes in vibe-core and eventcore

Re: how to get typeid of extern(C++) classes?

2018-02-16 Thread timotheecour via Digitalmars-d
On Friday, 16 February 2018 at 00:42:02 UTC, Timothee Cour wrote: is there a way to get typeid of extern(C++) classes (eg for ones in dmd/astbase.d but not limited to that) ? as a workaround, could the compiler insert (eg, depending on a version(insert_typeid)) a virtual method in each

[Issue 18449] extern(C++) class layout does not work

2018-02-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18449 Timothee Cour changed: What|Removed |Added Status|NEW |RESOLVED

Re: how to get typeid of extern(C++) classes?

2018-02-16 Thread Steven Schveighoffer via Digitalmars-d
On 2/15/18 7:42 PM, Timothee Cour wrote: is there a way to get typeid of extern(C++) classes (eg for ones in dmd/astbase.d but not limited to that) ? C++ exposes it via typeid so in theory all the info is there ; I would need it at least for debugging (eg if RTTI is not enabled for all compilers

LDC 1.8.0-beta1

2018-02-16 Thread kinke via Digitalmars-d-announce
Hi everyone, on behalf of the LDC team, I'm glad to announce the first beta for LDC 1.8. The highlights of this version in a nutshell: * Based on D 2.078.3. * New switch `-link-defaultlib-shared` to link against shared druntime/Phobos. * Plugins support, compatible with existing Clang

Re: std.zip size limit of 2 GB?

2018-02-16 Thread Ali Çehreli via Digitalmars-d-learn
On 02/15/2018 01:57 PM, Steven Schveighoffer wrote: > Really, i should be size_t in all places size_t or ulong? size_t would constrain 32-bit systems unless they can't handle files over 2G. Ali

Re: std.zip size limit of 2 GB?

2018-02-16 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/16/18 5:39 PM, Ali Çehreli wrote: On 02/15/2018 01:57 PM, Steven Schveighoffer wrote: > Really, i should be size_t in all places size_t or ulong? size_t would constrain 32-bit systems unless they can't handle files over 2G. The code I linked to writes to an array. So it's constrained

Re: Dub, Cargo, Go, Gradle, Maven

2018-02-16 Thread H. S. Teoh via Digitalmars-d
On Fri, Feb 16, 2018 at 07:31:37PM +, Dmitry Olshansky via Digitalmars-d wrote: > On Friday, 16 February 2018 at 18:16:12 UTC, H. S. Teoh wrote: [...] > > If a dependent node requires network access, it forces network > > access every time the DAG is updated. This is slow, and also > >

Re: Vulkan

2018-02-16 Thread Ivan Trombley via Digitalmars-d
On Wednesday, 14 February 2018 at 02:40:18 UTC, Mike Parker wrote: What [does] it mean to say they don't work? Have you reported any issues? I don't see any in the DerelictVulkan repo. If something's broken, please report it so it can be fixed. Derelict-vulkan is Windows only ATM.

Re: Vulkan

2018-02-16 Thread Ivan Trombley via Digitalmars-d
On Wednesday, 14 February 2018 at 00:22:25 UTC, flamencofantasy wrote: Maybe these work, not sure; https://github.com/Rikarin/VulkanizeD Thanks, I'll check this out.

Re: Knowing the approach to solve a D challenge

2018-02-16 Thread Jesse Phillips via Digitalmars-d
On Friday, 16 February 2018 at 09:44:27 UTC, aberba wrote: D has tone of features and library solutions. When you encounter a problem, how do you approach solving it in code? 1. Do you first write it in idiomatic D style or a more general approach before porting to idiomatic D? Like always,