[Issue 18775] DMD falsely reports deprecation for deprecated implicit casts that were not used in UFCS

2018-04-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18775 ag0aep6g changed: What|Removed |Added CC||ag0ae...@gmail.com

[Issue 12807] UFCS checks "alias this" attributes even when not called

2018-04-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12807 ag0aep6g changed: What|Removed |Added See Also||https://issues.dlang.org/sh

Re: Small Buffer Optimization for string and friends

2018-04-18 Thread Manu via Digitalmars-d
On Wed., 18 Apr. 2018, 8:36 pm Manu, wrote: > On Wed., 18 Apr. 2018, 1:00 pm Walter Bright via Digitalmars-d, < > digitalmars-d@puremagic.com> wrote: > >> On 4/8/2012 7:29 AM, Andrei Alexandrescu wrote: >> > On 4/8/12 1:33 AM, Daniel Murphy wrote: >> >> - Would generate

Re: lazy evaluation of logical operators in enum definition

2018-04-18 Thread Meta via Digitalmars-d
On Wednesday, 18 April 2018 at 10:19:20 UTC, Atila Neves wrote: On Wednesday, 18 April 2018 at 04:44:23 UTC, Shachar Shemesh wrote: On 17/04/18 13:59, Simen Kjærås wrote: [...] Also, extremely dangerous. Seriously, guys and gals. __traits(compiles) (and its uglier sibling, is(typeof()))

Re: Small Buffer Optimization for string and friends

2018-04-18 Thread Manu via Digitalmars-d
On Wed., 18 Apr. 2018, 1:00 pm Walter Bright via Digitalmars-d, < digitalmars-d@puremagic.com> wrote: > On 4/8/2012 7:29 AM, Andrei Alexandrescu wrote: > > On 4/8/12 1:33 AM, Daniel Murphy wrote: > >> - Would generate false pointers > > Fair point but we're also moving to precise collection :o).

Re: The 10k Twitter Target

2018-04-18 Thread Jack Stouffer via Digitalmars-d-announce
On Monday, 16 April 2018 at 08:39:05 UTC, Mike Parker wrote: If you have a Twitter handle, it would help us out to retweet anything interesting you see on @D_Programming. The link in the navbar should probably link to this twitter handle rather than the hash tag.

Re: making a struct an inputRange with free functions

2018-04-18 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, April 18, 2018 20:39:46 jmh530 via Digitalmars-d-learn wrote: > On Monday, 16 April 2018 at 19:27:28 UTC, Jonathan M Davis wrote: > > [snip] > > It really would be nice if it worked with free functions... > > I was trying to get the example working with Atila's concepts > library

Re: CTFE in .di files

2018-04-18 Thread Manu via Digitalmars-d
On 18 April 2018 at 08:10, Stefan Koch via Digitalmars-d wrote: > On Tuesday, 17 April 2018 at 22:19:19 UTC, Manu wrote: >> >> I've been having some problems like this: >> https://issues.dlang.org/show_bug.cgi?id=18774 >> >> I have .di files with mixins that generate

[Issue 13184] better error messages for incorrect constructors

2018-04-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13184 --- Comment #4 from Manu --- I think it should definitely emit an error. There may come some time in the future where it is decided that application of the attribute may like to mean something new and useful, but if we leave

[Issue 18774] meta used in .di files causes link errors

2018-04-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18774 ki...@gmx.net changed: What|Removed |Added CC||ki...@gmx.net --- Comment #9 from

Re: Issues with debugging GC-related crashes #2

2018-04-18 Thread Matthias Klumpp via Digitalmars-d
On Wednesday, 18 April 2018 at 22:12:12 UTC, kinke wrote: On Wednesday, 18 April 2018 at 20:36:03 UTC, Johannes Pfau wrote: Actually this sounds very familiar: https://github.com/D-Programming-GDC/GDC/pull/236 Interesting, but I don't think it applies here. Both start and end addresses are

Re: Issues with debugging GC-related crashes #2

2018-04-18 Thread Matthias Klumpp via Digitalmars-d
On Wednesday, 18 April 2018 at 20:36:03 UTC, Johannes Pfau wrote: [...] Actually this sounds very familiar: https://github.com/D-Programming-GDC/GDC/pull/236 it took us quite some time to reduce and debug this: https://github.com/D-Programming-GDC/GDC/pull/236/commits/

Re: Issues with debugging GC-related crashes #2

2018-04-18 Thread kinke via Digitalmars-d
On Wednesday, 18 April 2018 at 20:36:03 UTC, Johannes Pfau wrote: Actually this sounds very familiar: https://github.com/D-Programming-GDC/GDC/pull/236 Interesting, but I don't think it applies here. Both start and end addresses are 16-bytes aligned, and both cannot be accessed according to

Re: Issues with debugging GC-related crashes #2

2018-04-18 Thread Matthias Klumpp via Digitalmars-d
On Wednesday, 18 April 2018 at 20:40:52 UTC, Matthias Klumpp wrote: [...] If possible, I'd give static linking a try. I tried that, with at least linking druntime and phobos statically. I did not, however, link all the things statically. That is something to try (at least statically linking

Re: Feature to get or add value to an associative array.

2018-04-18 Thread Jordan Wilson via Digitalmars-d
On Wednesday, 18 April 2018 at 17:19:45 UTC, Giles Bathgate wrote: On Sunday, 15 April 2018 at 22:55:41 UTC, Giles Bathgate wrote: Time for a bikeshed discussion... I have had some thoughts about the name and would like to share my idea. Firstly to summarise here are the names that have

Re: Issues with debugging GC-related crashes #2

2018-04-18 Thread Matthias Klumpp via Digitalmars-d
On Wednesday, 18 April 2018 at 18:55:48 UTC, kinke wrote: On Wednesday, 18 April 2018 at 10:15:49 UTC, Kagamin wrote: There's a number of debugging options for GC, though not sure which ones are enabled in default debug build of druntime Speaking for LDC, none are, they all need to be

Re: Issues with debugging GC-related crashes #2

2018-04-18 Thread negi via Digitalmars-d
On Monday, 16 April 2018 at 16:36:48 UTC, Matthias Klumpp wrote: ... This reminds me of (otherwise unrelated) problems I had involving Linux 4.15. If you feel out of ideas, I suggest you take a look at the kernels. It might be that Ubuntu is turning some security-related knob in a

Re: making a struct an inputRange with free functions

2018-04-18 Thread jmh530 via Digitalmars-d-learn
On Monday, 16 April 2018 at 19:27:28 UTC, Jonathan M Davis wrote: [snip] It really would be nice if it worked with free functions... I was trying to get the example working with Atila's concepts library [1]. I tried re-writing the checkInputRange function so that UFCS is only used when

Re: Issues with debugging GC-related crashes #2

2018-04-18 Thread Johannes Pfau via Digitalmars-d
Am Wed, 18 Apr 2018 17:40:56 + schrieb Matthias Klumpp: > > The crashes always appear in > https://github.com/dlang/druntime/blob/master/src/gc/impl/conservative/ gc.d#L1990 > The important point to note here is that this is not one of these 'GC collected something because it was not

[Issue 18778] New: std.format: Positional arguments do not work as expected with nesting

2018-04-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18778 Issue ID: 18778 Summary: std.format: Positional arguments do not work as expected with nesting Product: D Version: D2 Hardware: All OS: All Status:

Re: Small Buffer Optimization for string and friends

2018-04-18 Thread Walter Bright via Digitalmars-d
On 4/8/2012 7:29 AM, Andrei Alexandrescu wrote: On 4/8/12 1:33 AM, Daniel Murphy wrote: - Would generate false pointers Fair point but we're also moving to precise collection :o). I don't know of a good generic way to do precise collection with unions.

Re: The 10k Twitter Target

2018-04-18 Thread aberba via Digitalmars-d-announce
On Monday, 16 April 2018 at 08:39:05 UTC, Mike Parker wrote: Lately, we've seen a steadily increasing trend of new followers on Twitter. We're closing in on the totally arbitrary yet emotionally significant number of 10,000. I was just thinking how cool it would be to hit that number before or

Re: DIP 1013: The Deprecation Process -- Community Review Round 1

2018-04-18 Thread Dukc via Digitalmars-d
On Monday, 2 April 2018 at 07:05:45 UTC, Mike Parker wrote: [snip] I like this. A goto-reference as of how and when to deprectate and remove. About the concerns that depractation period being measured by releases could fluctate the interval, I definitely would have agreed in autumn 2016.

Re: D's string mixins are like Tcl's uplevel

2018-04-18 Thread Phillip via Digitalmars-d
On Tuesday, 17 April 2018 at 19:39:54 UTC, Ali Çehreli wrote: I came across this Tcl advocacy article on Reddit (the article is from 2006): https://www.reddit.com/r/programming/comments/8cw63d/tcl_the_misunderstood/ "Everything is a string" concept of Tcl reminded me of how D can generate

Re: CTFE in .di files

2018-04-18 Thread Jacob Carlborg via Digitalmars-d
On 2018-04-18 11:35, Jonathan M Davis wrote: As in you're seeing the same problem Manu is, or as in you're not seeing it on Mac OS X, just like I'm not seeing it on FreeBSD? I'd guess the latter given how close FreeBSD and Mac OS X are, but the way you said it wasn't clear. I am seeing the

Re: Is DWT usable?

2018-04-18 Thread Jacob Carlborg via Digitalmars-d-dwt
On 2018-04-17 11:42, dangbinghoo wrote: both archlinux (updated) and deepin linux 15(same core as debain 8). Are those platforms using KDE? Might be the same as this issue [1]. [1] https://github.com/d-widget-toolkit/dwt/issues/34 -- /Jacob Carlborg

Re: Issues with debugging GC-related crashes #2

2018-04-18 Thread kinke via Digitalmars-d
On Wednesday, 18 April 2018 at 10:15:49 UTC, Kagamin wrote: There's a number of debugging options for GC, though not sure which ones are enabled in default debug build of druntime Speaking for LDC, none are, they all need to be enabled explicitly. There's a whole bunch of them

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

2018-04-18 Thread jmh530 via Digitalmars-d-announce
On Wednesday, 18 April 2018 at 15:28:07 UTC, Atila Neves wrote: http://code.dlang.org/packages/autowrap This came out of the need at work to take existing D code and make it available for both Excel and Python. [snip] Cool. I bet something similar would work with embedr as well.

Re: Issues with debugging GC-related crashes #2

2018-04-18 Thread Matthias Klumpp via Digitalmars-d
On Wednesday, 18 April 2018 at 10:15:49 UTC, Kagamin wrote: You can call GC.collect at some points in the program to see if they can trigger the crash I already do that, and indeed I get crashes. I could throw those calls into every function though, or make a minimal pool size, maybe that

Re: Feature to get or add value to an associative array.

2018-04-18 Thread Giles Bathgate via Digitalmars-d
On Sunday, 15 April 2018 at 22:55:41 UTC, Giles Bathgate wrote: Time for a bikeshed discussion... I have had some thoughts about the name and would like to share my idea. Firstly to summarise here are the names that have been found/discussed so far: C# : GetOrAdd Java

[Issue 18777] std.traits.RetrunType ambiguity

2018-04-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18777 Adam D. Ruppe changed: What|Removed |Added CC|

[Issue 18777] New: std.traits.RetrunType ambiguity

2018-04-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18777 Issue ID: 18777 Summary: std.traits.RetrunType ambiguity Product: D Version: D2 Hardware: x86_64 OS: Mac OS X Status: NEW Severity: minor Priority:

Re: Feature to get or add value to an associative array.

2018-04-18 Thread ag0aep6g via Digitalmars-d
On 04/18/2018 11:41 AM, Nick Treleaven wrote: How do you implement this if the function returns with ref: bool inserted; auto p = aa.slot("key", ); if (inserted) {   ...   // set *p } else {   // read *p   ...   // set *p } You can get a pointer from the ref return: Value* p =

Re: Building is slow!

2018-04-18 Thread Dlang User via Digitalmars-d
On 4/16/2018 3:27 PM, Ivan Trombley wrote: I want to revisit this issue. Building 64 bit on Linux, release or debug, is fast. However, building 64 bit release on Windows 10 is super slow. I have a cross platform app that uses gtk-d. Today, I updated DMD to 2.079.1 and the gtk-d lib to 3.8.0.

Re: Feature to get or add value to an associative array.

2018-04-18 Thread Giles Bathgate via Digitalmars-d
On Wednesday, 18 April 2018 at 09:41:48 UTC, Nick Treleaven wrote: How do you implement this if the function returns with ref: I understand where you are coming from, but I am not sure it is appropriate to shoehorn every use case into one api. I think actually what you are describing here is

Re: Error calling geqrs function from lubeck package.

2018-04-18 Thread jmh530 via Digitalmars-d-learn
On Tuesday, 17 April 2018 at 03:30:45 UTC, Jamie wrote: On Tuesday, 17 April 2018 at 03:26:25 UTC, Jamie wrote: Sorry it's really an error calling geqrs function from mir-lapack package. If you don't get an answer here, you can always file an issue at mir-lapack with a simple example.

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

2018-04-18 Thread Atila Neves via Digitalmars-d-announce
http://code.dlang.org/packages/autowrap This came out of the need at work to take existing D code and make it available for both Excel and Python. Both pyd and excel-d make the reasonable assumption that one is using them to write code specifically for those environments. That breaks when

Re: CTFE in .di files

2018-04-18 Thread Stefan Koch via Digitalmars-d
On Tuesday, 17 April 2018 at 22:19:19 UTC, Manu wrote: I've been having some problems like this: https://issues.dlang.org/show_bug.cgi?id=18774 I have .di files with mixins that generate declarations using CTFE. Trouble is, executing the CTFE seems to leave residual references to symbols

Re: The case of -debug -O and: is breaking pure/@nogc/nothrow/@safe UB under -debug?

2018-04-18 Thread Guillaume Piolat via Digitalmars-d-learn
On Wednesday, 18 April 2018 at 13:47:35 UTC, Jonathan M Davis wrote: Thanks for both your answers, Jonathan and Nicholas. To the extent that I'd like to explain this in a d-idioms post, here is a tentative synthesis of your answers (Jonathan M Davis and Nicholas Wilson): - breaking pure

[Issue 17127] bad example code for std.concurrency.Generator

2018-04-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17127 --- Comment #6 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/903c38d7bb4e6ecad86f75ba444737de91fd8078 Issue 17127 - bad example code for

[Issue 18759] feature request: blocks

2018-04-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18759 hst...@quickfur.ath.cx changed: What|Removed |Added Hardware|x86_64 |All OS|Linux

[Issue 18759] feature request: blocks

2018-04-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18759 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --- Comment

[Issue 18772] [ICE] Internal error: dmd\backend\cgcod.c 607 no optimizations

2018-04-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18772 hst...@quickfur.ath.cx changed: What|Removed |Added Keywords||ice CC|

[Issue 18776] Internal error: dmd/backend/symbol.c 1043

2018-04-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18776 hst...@quickfur.ath.cx changed: What|Removed |Added Keywords||ice --

[Issue 18776] New: Internal error: dmd/backend/symbol.c 1043

2018-04-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18776 Issue ID: 18776 Summary: Internal error: dmd/backend/symbol.c 1043 Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: critical

Hit a snag

2018-04-18 Thread FeepingCreature via Digitalmars-d
I've hit a bit of a snag while implementing the PR. https://issues.dlang.org/show_bug.cgi?id=18775 seems to make deprecating the implicit conversion basically impossible, because the deprecation will be triggered on every UFCS access to a Nullable, no matter whether it actually uses .get or

[Issue 1807] ENHANCEMENT: Let IFTI "see through" templates to simple aliases

2018-04-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1807 anonymous4 changed: What|Removed |Added Keywords||spec

[Issue 18775] New: DMD falsely reports deprecation for deprecated implicit casts that were not used in UFCS

2018-04-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18775 Issue ID: 18775 Summary: DMD falsely reports deprecation for deprecated implicit casts that were not used in UFCS Product: D Version: D2 Hardware: x86_64 OS:

Re: The case of -debug -O and: is breaking pure/@nogc/nothrow/@safe UB under -debug?

2018-04-18 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, April 18, 2018 13:15:08 Guillaume Piolat via Digitalmars-d- learn wrote: > The D specification says: > > "A ConditionalStatement that has a DebugCondition is called a > DebugStatement. DebugStatements have relaxed semantic checks in > that pure, @nogc, nothrow and @safe checks are

[Issue 13184] better error messages for incorrect constructors

2018-04-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13184 --- Comment #3 from RazvanN --- (In reply to Mike Franklin from comment #2) > (In reply to RazvanN from comment #1) > > It seems that __gshared is ignored when applied to a constructor, which > > seems to be in trend with

Re: The case of -debug -O and: is breaking pure/@nogc/nothrow/@safe UB under -debug?

2018-04-18 Thread Nicholas Wilson via Digitalmars-d-learn
On Wednesday, 18 April 2018 at 13:15:08 UTC, Guillaume Piolat wrote: The D specification says: "A ConditionalStatement that has a DebugCondition is called a DebugStatement. DebugStatements have relaxed semantic checks in that pure, @nogc, nothrow and @safe checks are not done. Neither do

Re: Is there a strong reason for Nullable's alias get this?

2018-04-18 Thread FeepingCreature via Digitalmars-d
On Wednesday, 18 April 2018 at 10:01:17 UTC, Nick Treleaven wrote: On Wednesday, 18 April 2018 at 08:24:14 UTC, FeepingCreature wrote: If nobody objects, I'll make a PR to deprecate it. +1. Nullable has received some improvements lately, it would be great if `get` was no longer implicit. For

The case of -debug -O and: is breaking pure/@nogc/nothrow/@safe UB under -debug?

2018-04-18 Thread Guillaume Piolat via Digitalmars-d-learn
The D specification says: "A ConditionalStatement that has a DebugCondition is called a DebugStatement. DebugStatements have relaxed semantic checks in that pure, @nogc, nothrow and @safe checks are not done. Neither do DebugStatements influence the inference of pure, @nogc, nothrow and

Status of dstddb

2018-04-18 Thread Pasqui23 via Digitalmars-d-learn
What is the status of dstddb( https://code.dlang.org/packages/database )?Is it usable? What about entity( https://code.dlang.org/packages/entity )?

Re: DIP 1013: The Deprecation Process -- Community Review Round 1

2018-04-18 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, April 18, 2018 12:48:18 Mike Franklin via Digitalmars-d wrote: > On Wednesday, 18 April 2018 at 12:28:59 UTC, Jonathan M Davis > > wrote: > >> > In order to facilitate on schedule deprecations, a comment > >> > of the format @@@DEPRECATED_[version]@@@ should be added to > >> > the

[Issue 13184] better error messages for incorrect constructors

2018-04-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13184 Mike Franklin changed: What|Removed |Added CC||slavo5...@yahoo.com

Re: lazy evaluation of logical operators in enum definition

2018-04-18 Thread Timon Gehr via Digitalmars-d
On 18.04.2018 09:18, Walter Bright wrote: On 4/15/2018 10:57 PM, Shachar Shemesh wrote: It seems that the && evaluation does not stop when the first false is found. Evaluation does stop, semantic analysis does not. For example:   bool foo() {     return 0 && undefined_variable;   } does

Re: DIP 1013: The Deprecation Process -- Community Review Round 1

2018-04-18 Thread Mike Franklin via Digitalmars-d
On Wednesday, 18 April 2018 at 12:28:59 UTC, Jonathan M Davis wrote: > In order to facilitate on schedule deprecations, a comment > of the format @@@DEPRECATED_[version]@@@ should be added to > the top of the code to be removed/disabled. Is `[version]` the version in which the deprecation

[Issue 13184] better error messages for incorrect constructors

2018-04-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13184 RazvanN changed: What|Removed |Added CC|

Re: DIP 1013: The Deprecation Process -- Community Review Round 1

2018-04-18 Thread Jonathan M Davis via Digitalmars-d
On Monday, April 02, 2018 07:05:45 Mike Parker via Digitalmars-d wrote: > DIP 1013 is titled "The Deprecation Process". > > https://github.com/dlang/DIPs/blob/d8f6bfa1810c9774bd7d3b3dc6a7a6776ed5e17 > e/DIPs/DIP1013.md > > All review-related feedback on and discussion of the DIP should > occur in

Re: DIP 1013: The Deprecation Process -- Community Review Round 1

2018-04-18 Thread Jonathan M Davis via Digitalmars-d
On Thursday, April 05, 2018 14:42:56 Mike Franklin via Digitalmars-d wrote: > On Monday, 2 April 2018 at 07:05:45 UTC, Mike Parker wrote: > > DIP 1013 is titled "The Deprecation Process". > > > > https://github.com/dlang/DIPs/blob/d8f6bfa1810c9774bd7d3b3dc6a7a6776ed5e > > 17e/DIPs/DIP1013.md > I

[Issue 15651] filter: only parameters or stack based variables can be inout

2018-04-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15651 Alex changed: What|Removed |Added CC||sascha.or...@gmail.com --

Re: DIP 1013: The Deprecation Process -- Community Review Round 1

2018-04-18 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, April 18, 2018 11:23:49 Mike Franklin via Digitalmars-d wrote: > On Monday, 2 April 2018 at 07:05:45 UTC, Mike Parker wrote: > > DIP 1013 is titled "The Deprecation Process". > > > > https://github.com/dlang/DIPs/blob/d8f6bfa1810c9774bd7d3b3dc6a7a6776ed5e > > 17e/DIPs/DIP1013.md >

Re: DIP 1013: The Deprecation Process -- Community Review Round 1

2018-04-18 Thread Mike Franklin via Digitalmars-d
On Monday, 2 April 2018 at 07:05:45 UTC, Mike Parker wrote: DIP 1013 is titled "The Deprecation Process". https://github.com/dlang/DIPs/blob/d8f6bfa1810c9774bd7d3b3dc6a7a6776ed5e17e/DIPs/DIP1013.md I've been thinking about the deprecation schedule being measure in terms of releases, and I

[Issue 13435] Strange error if struct is a class member and opAssign applied

2018-04-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13435 RazvanN changed: What|Removed |Added CC|

Re: Issues with debugging GC-related crashes #2

2018-04-18 Thread Kagamin via Digitalmars-d
You can call GC.collect at some points in the program to see if they can trigger the crash https://dlang.org/library/core/memory/gc.collect.html If you link against debug druntime, GC can check invariants for correctness of its structures. There's a number of debugging options for GC, though

Re: lazy evaluation of logical operators in enum definition

2018-04-18 Thread Atila Neves via Digitalmars-d
On Wednesday, 18 April 2018 at 04:44:23 UTC, Shachar Shemesh wrote: On 17/04/18 13:59, Simen Kjærås wrote: [...] Also, extremely dangerous. Seriously, guys and gals. __traits(compiles) (and its uglier sibling, is(typeof())) should be used *extremely* sparingly. [...] A very good rule of

Re: Is there a strong reason for Nullable's alias get this?

2018-04-18 Thread Nick Treleaven via Digitalmars-d
On Wednesday, 18 April 2018 at 08:24:14 UTC, FeepingCreature wrote: If nobody objects, I'll make a PR to deprecate it. +1. Nullable has received some improvements lately, it would be great if `get` was no longer implicit. For new code, it is trivial to write `.get` to convert to the original

Re: Feature to get or add value to an associative array.

2018-04-18 Thread Nick Treleaven via Digitalmars-d
On Tuesday, 17 April 2018 at 20:49:30 UTC, Steven Schveighoffer wrote: Why do you think it's less efficient to use a lazy parameter? Wouldn't an extra function call have to happen, at least in some cases? This pattern needs a pointer to be returned, instead of using `ref`. Note that `` is

Re: CTFE in .di files

2018-04-18 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, April 18, 2018 09:16:14 Jacob Carlborg via Digitalmars-d wrote: > On Wednesday, 18 April 2018 at 08:12:43 UTC, Jonathan M Davis > > wrote: > > Curiously, I can't reproduce the problem on my FreeBSD system, > > so I wonder if it's Windows-specific (or at least that the > > linker on

[Issue 14245] Immutable reference to immutable field in constructor allows breaking type system

2018-04-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14245 RazvanN changed: What|Removed |Added CC|

Re: CTFE in .di files

2018-04-18 Thread Jacob Carlborg via Digitalmars-d
On Wednesday, 18 April 2018 at 08:12:43 UTC, Jonathan M Davis wrote: Curiously, I can't reproduce the problem on my FreeBSD system, so I wonder if it's Windows-specific (or at least that the linker on FreeBSD doesn't choke in the same way - the object files may or may not have a similar

[Issue 18584] Undefined identifier when not specifying 'this'

2018-04-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18584 --- Comment #4 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/4c6794ff0e64e6c7fc6e78fd06bb69bdc82d6435 Use toAlias2 instead of toAlias - follow-up on Issue 18584

Re: Is there a strong reason for Nullable's alias get this?

2018-04-18 Thread FeepingCreature via Digitalmars-d
If nobody objects, I'll make a PR to deprecate it.

Re: CTFE in .di files

2018-04-18 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, April 18, 2018 07:25:17 Diego Lago via Digitalmars-d wrote: > Could this issue be related? > > https://issues.dlang.org/show_bug.cgi?id=18485 > > It is about *.di files but it isn't related with CTFE. Without digging through the compiler internals, I couldn't say with 100% certainty

[Issue 18493] [betterC] Can't use aggregated type with postblit

2018-04-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18493 --- Comment #5 from Radu Racariu --- Ideally -betterC should imply `nothrow`, and any lowered code should work with this assumption. What is important to keep in mind is that if you require `this(this)` to be annotated with

Re: CTFE in .di files

2018-04-18 Thread Diego Lago via Digitalmars-d
Could this issue be related? https://issues.dlang.org/show_bug.cgi?id=18485 It is about *.di files but it isn't related with CTFE. -- Diego

Re: lazy evaluation of logical operators in enum definition

2018-04-18 Thread Walter Bright via Digitalmars-d
On 4/15/2018 10:57 PM, Shachar Shemesh wrote: It seems that the && evaluation does not stop when the first false is found. Evaluation does stop, semantic analysis does not. For example: bool foo() { return 0 && undefined_variable; } does not compile. I'd speculate that most would

Re: Rotate array in writefln?

2018-04-18 Thread Simen Kjærås via Digitalmars-d-learn
On Wednesday, 18 April 2018 at 06:54:29 UTC, Chris Katko wrote: I need to rotate an array by 90 degrees, or have writefln figure that out. I need, say: 0 4 5 6 0 0 0 0 0 0 0 0 0 0 0 0 But it's outputting: 0 0 0 0 4 0 0 0 5 0 0 0 6 0 0 0 int [4][4] data; file.writeln(format("%(%-(%d

Re: DCompute is now in the master branch of LDC

2018-04-18 Thread bioinfornatics via Digitalmars-d-announce
On Monday, 19 June 2017 at 12:46:16 UTC, Nicholas Wilson wrote: On Monday, 19 June 2017 at 08:24:09 UTC, bioinfornatics wrote: [...] The library enables you to launch kernels written with the accompanying complier extensions (the focus of this announcement). It also provides the intrinsics

Re: Rotate array in writefln?

2018-04-18 Thread Stefan Koch via Digitalmars-d-learn
On Wednesday, 18 April 2018 at 06:54:29 UTC, Chris Katko wrote: I need to rotate an array by 90 degrees, or have writefln figure that out. I need, say: 0 4 5 6 0 0 0 0 0 0 0 0 0 0 0 0 But it's outputting: 0 0 0 0 4 0 0 0 5 0 0 0 6 0 0 0 int [4][4] data; file.writeln(format("%(%-(%d

Rotate array in writefln?

2018-04-18 Thread Chris Katko via Digitalmars-d-learn
I need to rotate an array by 90 degrees, or have writefln figure that out. I need, say: 0 4 5 6 0 0 0 0 0 0 0 0 0 0 0 0 But it's outputting: 0 0 0 0 4 0 0 0 5 0 0 0 6 0 0 0 int [4][4] data; file.writeln(format("%(%-(%d %)\n%)", data));

Re: LockingTextWriter not an output range?

2018-04-18 Thread rikki cattermole via Digitalmars-d-learn
On 18/04/2018 6:28 PM, kookman wrote: The below static assert fails. Is this expected? Not the way I read the docs. static assert (isOutputRange(typeof(stdout.lockingTextWriter), char)); static assert (isOutputRange!(typeof(stdout.lockingTextWriter()), char));

Re: LockingTextWriter not an output range?

2018-04-18 Thread kookman via Digitalmars-d-learn
Typo corrected: static assert (isOutputRange!(typeof(stdout.lockingTextWriter), char));

LockingTextWriter not an output range?

2018-04-18 Thread kookman via Digitalmars-d-learn
The below static assert fails. Is this expected? Not the way I read the docs. static assert (isOutputRange(typeof(stdout.lockingTextWriter), char));

Re: Delegates and classes for custom code.

2018-04-18 Thread Simen Kjærås via Digitalmars-d-learn
On Wednesday, 18 April 2018 at 01:12:33 UTC, Chris Katko wrote: My only questions are: [snip] How's about this one: import std.stdio : writefln; struct data_to_access_t { int tacos; } class Abc(T, alias Fn) { T data; this(T data) { this.data = data; } void