[Issue 5227] X ^^ FP at compile-time

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

[Issue 5227] X ^^ FP at compile-time

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5227 --- Comment #17 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/6767a32f6988c6794815405e01f07250177d6098 fix Issue 5227 - X ^^ FP at compile-time

[Issue 18769] New: Cannot infer template parameters for aliased types

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18769 Issue ID: 18769 Summary: Cannot infer template parameters for aliased types Product: D Version: D2 Hardware: All URL: http://dlang.org/ OS: All Status:

[Issue 18767] __xtoHash memberwise hashing shouldn't just sum the member hashes

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18767 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/2f13c2d416490fdb5e62c0d296e42b76c5c02388 Fix Issue 18767 - __xtoHash memberwise hashing shouldn't just

[Issue 18767] __xtoHash memberwise hashing shouldn't just sum the member hashes

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

Re: Building is slow!

2018-04-17 Thread Daniel Kozak via Digitalmars-d
Try disable your antivirus On Mon, Apr 16, 2018 at 10:27 PM, Ivan Trombley via Digitalmars-d < digitalmars-d@puremagic.com> 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

Re: (Unofficial) Discord Server!

2018-04-17 Thread JN via Digitalmars-d
On Monday, 16 April 2018 at 22:24:18 UTC, Luke Wilson wrote: Hi there! After having found nearly zero solutions for a D community on Discord, having one server be quite inefficient, I've made my own. https://discord.gg/crpA2Hn I hope to bring the community closer by doing this. I think most

[Issue 2043] Closure outer variables in nested blocks are not allocated/instantiated correctly: should have multiple instances but only have one.

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2043 --- Comment #39 from Artem Borisovskiy --- Sorry for off-topic, but this discussion brought back memories of the classic song by Frank C Mantra: It's a feature, not a bug, No one really gives a *cough*, So if you want it to be fixed,

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

2018-04-17 Thread Giles Bathgate via Digitalmars-d
On Tuesday, 17 April 2018 at 00:04:32 UTC, Cym13 wrote: "in" returns a pointer to the object, there'es not double lookup necessary: // if we don't know .get(key, default) exists auto ptr = key in aa; auto value = ptr ? *ptr : default; This doesn't work. `in` returns null when

Re: Issues with debugging GC-related crashes #2

2018-04-17 Thread Kagamin via Digitalmars-d
Other stuff to try: 1. run application compiled on debian against ubuntu libs 2. can you mix dependencies from debian and ubuntu?

Re: lazy evaluation of logical operators in enum definition

2018-04-17 Thread Jacob Carlborg via Digitalmars-d
On Monday, 16 April 2018 at 05:57:01 UTC, Shachar Shemesh wrote: Consider the following program: struct S1 { enum member = 3; } struct S2 { enum member = 2; } struct S3 { } enum prop(T) = __traits(hasMember, T, "member") && T.member==3; pragma(msg, prop!S1); pragma(msg, prop!S2);

Re: (Unofficial) Discord Server!

2018-04-17 Thread bauss via Digitalmars-d
On Tuesday, 17 April 2018 at 02:36:20 UTC, Wild wrote: On Monday, 16 April 2018 at 22:24:18 UTC, Luke Wilson wrote: Hi there! After having found nearly zero solutions for a D community on Discord, having one server be quite inefficient, I've made my own. https://discord.gg/crpA2Hn I hope to

[Issue 18649] curl on Ubuntu 18.04 depends on libcurl4, .deb installer depends on libcurl3

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

[Issue 18649] curl on Ubuntu 18.04 depends on libcurl4, .deb installer depends on libcurl3

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18649 --- Comment #9 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/installer https://github.com/dlang/installer/commit/4790451e11f3891cf74efa54b9e1b2e29fd4eaa9 fix Issue 18649 - curl on Ubuntu 18.04 depends on

Re: Issues with debugging GC-related crashes #2

2018-04-17 Thread Kagamin via Digitalmars-d
On Monday, 16 April 2018 at 16:36:48 UTC, Matthias Klumpp wrote: The code uses std.typecons.scoped occasionally, does no GC allocations in destructors and does nothing to mess with the GC in general. What do you use destructors for?

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

2018-04-17 Thread Giles Bathgate via Digitalmars-d
On Tuesday, 17 April 2018 at 07:40:23 UTC, Giles Bathgate wrote: My personal reason for not liking it is because the same name is used by Microsoft The java name for such a function is `computeIfAbsent`

Re: Is DWT usable?

2018-04-17 Thread dangbinghoo via Digitalmars-d-dwt
On Monday, 16 April 2018 at 18:50:38 UTC, Jacob Carlborg wrote: On 2018-04-16 06:24, dangbinghoo wrote: I have noticed DWT moved to as a dub package. And said it easy to startup. So, I just cloned the DWT git repo. And did the same thing as README. But I got the following : ``` dub

Re: Ldc on Windows

2018-04-17 Thread Nicholas Wilson via Digitalmars-d-learn
On Tuesday, 17 April 2018 at 10:17:56 UTC, Dgame wrote: Ah, I found the msvcEnv.bat and I told me that I have to VSC installation. Solved! You should also be able to use -link-internally /LLMV's lld if you don't want to install MSVC

Re: Assoc. Array and struct with immutable member

2018-04-17 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, April 15, 2018 17:59:01 Dgame via Digitalmars-d-learn wrote: > How am I supposed to insert a struct with immutable members into > an assoc. array? > > Reduced example: > > struct A { > immutable string name; > } > > A[string] as; > as["a"] = A("a"); // Does not work > I

Re: Assoc. Array and struct with immutable member

2018-04-17 Thread Alex via Digitalmars-d-learn
On Tuesday, 17 April 2018 at 11:07:55 UTC, bauss wrote: Even though it works in static this, then it still looks like a bug if you ask me, because the associative array itself isn't immutable. Yeah... I'm not sure, if this behavior is wanted, too... If you argue, that an absent field in in

Re: Assoc. Array and struct with immutable member

2018-04-17 Thread bauss via Digitalmars-d-learn
On Sunday, 15 April 2018 at 18:51:52 UTC, Alex wrote: On Sunday, 15 April 2018 at 17:59:01 UTC, Dgame wrote: How am I supposed to insert a struct with immutable members into an assoc. array? Reduced example: struct A { immutable string name; } A[string] as; as["a"] = A("a"); // Does

Re: Ldc on Windows

2018-04-17 Thread Dgame via Digitalmars-d-learn
On Tuesday, 17 April 2018 at 09:42:01 UTC, Dgame wrote: I'm trying to use Ldc on Windows, but I get these linker errors: OPTLINK (R) for Win32 Release 8.00.17 Copyright (C) Digital Mars 1989-2013 All rights reserved. http://www.digitalmars.com/ctg/optlink.html OPTLINK : Warning 9:

[Issue 18770] Ternary operator returns incorrect value when compiling with -O option

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18770 nebukur...@gmail.com changed: What|Removed |Added Severity|enhancement |normal --

[Issue 18746] function returning empty struct isn't called if used in equality expression

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18746 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/db1f8041670d592c3ad94111a3dc83ba12237932 Fix Issue 18746 - function returning empty struct isn't

[Issue 18746] function returning empty struct isn't called if used in equality expression

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

Re: Delegates and classes for custom code.

2018-04-17 Thread bauss via Digitalmars-d-learn
On Tuesday, 17 April 2018 at 03:55:55 UTC, Chris Katko wrote: What I want: class viewport_t { int x,y,w,h; } class dialog_t { int x,y; this( int x, int y, delegate void (viewport_t) on_draw ) { this.x = x; this.y = y; this.execute = execute; } void

Re: lazy evaluation of logical operators in enum definition

2018-04-17 Thread Simen Kjærås via Digitalmars-d
On Monday, 16 April 2018 at 05:57:01 UTC, Shachar Shemesh wrote: Consider the following program: struct S1 { enum member = 3; } struct S2 { enum member = 2; } struct S3 { } enum prop(T) = __traits(hasMember, T, "member") && T.member==3; pragma(msg, prop!S1); pragma(msg, prop!S2);

Re: Delegates and classes for custom code.

2018-04-17 Thread Simen Kjærås via Digitalmars-d-learn
On Tuesday, 17 April 2018 at 03:55:55 UTC, Chris Katko wrote: What I want: class viewport_t { int x,y,w,h; } class dialog_t { int x,y; this( int x, int y, delegate void (viewport_t) on_draw ) { this.x = x; this.y = y; this.execute = execute; } void

[Issue 7443] Better diagnostic on wrongly written static constructor

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7443 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/4a023ae3f23480110ab5ac3e0a4915e1b0ad4b6d Fix Issue 7443 - Better diagnostic on wrongly written static

[Issue 7443] Better diagnostic on wrongly written static constructor

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

Ldc on Windows

2018-04-17 Thread Dgame via Digitalmars-d-learn
I'm trying to use Ldc on Windows, but I get these linker errors: OPTLINK (R) for Win32 Release 8.00.17 Copyright (C) Digital Mars 1989-2013 All rights reserved. http://www.digitalmars.com/ctg/optlink.html OPTLINK : Warning 9: Unknown Option : OUT OPTLINK : Warning 9: Unknown Option :

[Issue 18770] New: Ternary operator returns incorrect value when compiling with -O option

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18770 Issue ID: 18770 Summary: Ternary operator returns incorrect value when compiling with -O option Product: D Version: D2 Hardware: x86 OS: Mac OS X

Re: #dbugfix 18493

2018-04-17 Thread Mike Franklin via Digitalmars-d
On Tuesday, 17 April 2018 at 05:33:53 UTC, Radu wrote: This is very odd, as the following compiles: --- struct S { this(this) { } ~this() { } } struct C { S s1; } --- If the scope failure would cause this then I assume it would not work at all in any case.

Re: Ldc on Windows

2018-04-17 Thread Dgame via Digitalmars-d-learn
On Tuesday, 17 April 2018 at 11:01:21 UTC, Nicholas Wilson wrote: On Tuesday, 17 April 2018 at 10:17:56 UTC, Dgame wrote: Ah, I found the msvcEnv.bat and I told me that I have to VSC installation. Solved! You should also be able to use -link-internally /LLMV's lld if you don't want to

Re: Assoc. Array and struct with immutable member

2018-04-17 Thread Dgame via Digitalmars-d-learn
On Tuesday, 17 April 2018 at 11:38:17 UTC, Jonathan M Davis wrote: On Sunday, April 15, 2018 17:59:01 Dgame via Digitalmars-d-learn wrote: How am I supposed to insert a struct with immutable members into an assoc. array? Reduced example: struct A { immutable string name; }

Re: Ldc on Windows

2018-04-17 Thread Nicholas Wilson via Digitalmars-d-learn
On Tuesday, 17 April 2018 at 12:42:48 UTC, Dgame wrote: On Tuesday, 17 April 2018 at 11:01:21 UTC, Nicholas Wilson wrote: On Tuesday, 17 April 2018 at 10:17:56 UTC, Dgame wrote: Ah, I found the msvcEnv.bat and I told me that I have to VSC installation. Solved! You should also be able to use

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

2018-04-17 Thread Steven Schveighoffer via Digitalmars-d
On 4/15/18 6:52 PM, Giles Bathgate wrote: I find this later code clunky and it requires two hashes/lookups. The proposed implementation adds support directly to rt/aaA.d to avoid this. I should also point out that the allocation of a new Person in the example is trivial, but it might often be

Getting the overload set of a template

2018-04-17 Thread Arafel via Digitalmars-d-learn
Hi! Is there any way to get the full set of templates that are "overloaded" (in my case, based on constraints)? Basically, I'd like to make something like https://run.dlang.io/is/z2LeAj return both versions of the template (and then retrieve their UDAs)... If it's not possible, I can

Re: Ldc on Windows

2018-04-17 Thread kinke via Digitalmars-d-learn
On Tuesday, 17 April 2018 at 11:01:21 UTC, Nicholas Wilson wrote: You should also be able to use -link-internally /LLMV's lld if you don't want to install MSVC Nope, the MSVC libs are still required, and no, the ancient ones shipping with DMD can't be used.

Re: #dbugfix 18493

2018-04-17 Thread Radu via Digitalmars-d
On Tuesday, 17 April 2018 at 12:13:06 UTC, Mike Franklin wrote: On Tuesday, 17 April 2018 at 05:33:53 UTC, Radu wrote: This is very odd, as the following compiles: --- struct S { this(this) { } ~this() { } } struct C { S s1; } --- If the scope failure would cause

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

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18584 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/814b822011002fe89434f195597ed6a20042ce88 Fix Issue 18584 - Undefined identifier when not specifying

Re: #dbugfix 18493

2018-04-17 Thread Mike Franklin via Digitalmars-d
On Tuesday, 17 April 2018 at 12:13:06 UTC, Mike Franklin wrote: On Tuesday, 17 April 2018 at 05:33:53 UTC, Radu wrote: This is very odd, as the following compiles: --- struct S { this(this) { } ~this() { } } struct C { S s1; } --- If the scope failure would cause

[Issue 10884] Support for using alias expressions to shorten inferred function types

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10884 ag0aep6g changed: What|Removed |Added CC||e...@weka.io --- Comment #1

[Issue 18769] Cannot infer template parameters for aliased types

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18769 ag0aep6g changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Issue 13090] Type inferring fails at function parameters with parameterized alias

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13090 ag0aep6g changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Issue 10884] Support for using alias expressions to shorten inferred function types

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

Re: isInputRange is false for non-copyable types

2018-04-17 Thread H. S. Teoh via Digitalmars-d
On Tue, Apr 17, 2018 at 11:14:02AM -0400, Steven Schveighoffer via Digitalmars-d wrote: > On 4/15/18 6:14 AM, Dmitry Olshansky wrote: [...] > > Input range should “produce” elements not keep cache of them, > > forward ranges may cache current item alright. > > Well, sometimes you HAVE to cache

Re: Small Buffer Optimization for string and friends

2018-04-17 Thread Per Nordlöw via Digitalmars-d
On Sunday, 8 April 2012 at 05:56:36 UTC, Andrei Alexandrescu wrote: Walter and I discussed today about using the small string optimization in string and other arrays of immutable small objects. I put together SSOString at

[Issue 16465] Template alias does not get unwrapped in templated functions

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16465 ag0aep6g changed: What|Removed |Added Status|REOPENED|RESOLVED CC|

[Issue 10884] Support for using alias expressions to shorten inferred function types

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10884 ag0aep6g changed: What|Removed |Added CC||sky.13th...@gmail.com ---

[Issue 16486] Compiler see template alias like a separate type in template function definition

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16486 ag0aep6g changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 10884] Support for using alias expressions to shorten inferred function types

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10884 ag0aep6g changed: What|Removed |Added Status|NEW |RESOLVED CC|

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

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1807 --- Comment #7 from ag0aep6g --- *** Issue 10884 has been marked as a duplicate of this issue. *** --

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

2018-04-17 Thread Nick Treleaven via Digitalmars-d
On Sunday, 15 April 2018 at 22:52:47 UTC, Giles Bathgate wrote: The function provides a means to get a value corresponding to the key, but if the value doesn't exist it will evaluate the lazy argument to create a new value, add this to the associative array and then return it. auto p =

Reddit Post: Overview of the Efficient Programming Languages (v.3)

2018-04-17 Thread Nerve via Digitalmars-d
Overview of the Efficient Programming Languages (v.3): C++, Rust, Swift, Scala, Dlang, Kotlin, Nim, Julia, Golang, Python. http://reddit.com/r/programming/comments/8cw2xn/overview_of_the_efficient_programming_languages/

[Issue 10884] Support for using alias expressions to shorten inferred function types

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

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

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18772 Issue ID: 18772 Summary: [ICE] Internal error: dmd\backend\cgcod.c 607 Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: enhancement

Re: (Unofficial) Discord Server!

2018-04-17 Thread Vladimir Panteleev via Digitalmars-d
On Tuesday, 17 April 2018 at 06:43:16 UTC, JN wrote: I prefer ergonomics of Discord/Slack/Gitter over IRC, although in the long run I guess IRC is good for the openness compared to proprietiary solution. Have you tried Matrix / Riot? https://riot.im/app/#/room/#freenode_#d:matrix.org

Re: isInputRange is false for non-copyable types

2018-04-17 Thread Steven Schveighoffer via Digitalmars-d
On 4/15/18 6:14 AM, Dmitry Olshansky wrote: On Sunday, 15 April 2018 at 06:39:43 UTC, Jonathan M Davis wrote: On Sunday, April 15, 2018 07:26:54 Shachar Shemesh via Digitalmars-d wrote: [...] It's extremely common for range-based functions to copy front. Even foreach does it. e.g. [...]

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

2018-04-17 Thread Giles Bathgate via Digitalmars-d
On Tuesday, 17 April 2018 at 09:21:14 UTC, Giles Bathgate wrote: The java name for such a function is `computeIfAbsent` More names from other languages, this time python: https://docs.python.org/3/library/stdtypes.html#dict.setdefault It's horrid though, a method called `set` that returns a

[Issue 11452] IFTI failure for aliased static array parameter

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11452 ag0aep6g changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Issue 12734] Template cannot deduce E[] from typeof(null)

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12734 ag0aep6g changed: What|Removed |Added Status|NEW |RESOLVED CC|

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

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18772 --- Comment #1 from ponce --- Successfully reproduced using: dmd_2.079.1 (latest) dmd_2.074.1 dmd_2.070.0 (2 years ago) --

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

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18772 ponce changed: What|Removed |Added Summary|[ICE] Internal error: |[ICE] Internal error:

Re: lazy evaluation of logical operators in enum definition

2018-04-17 Thread Shachar Shemesh via Digitalmars-d
On 17/04/18 13:59, Simen Kjærås wrote: There's a kinda neat (and kinda ugly) way to implement prop in one line:     enum prop(T) = __traits(compiles, { static assert(T.member == 3); }); Now, that's not the same as short-circuiting, and only useful in some cases, but for those cases, it's

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

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

[Issue 18771] New: Identical overload sets in different modules have different identities

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18771 Issue ID: 18771 Summary: Identical overload sets in different modules have different identities Product: D Version: D2 Hardware: All OS: All Status:

[Issue 15574] wrong order of linker arguments

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

[Issue 18760] theAllocator should hold a reference to the allocator that it uses

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18760 --- Comment #1 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/4126f928270570c9149a6412acde16f16506fd39 Merge pull request #6449 from edi33416/fix_thread_alloc

[Issue 18760] theAllocator should hold a reference to the allocator that it uses

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

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

2018-04-17 Thread Giles Bathgate via Digitalmars-d
On Tuesday, 17 April 2018 at 19:33:16 UTC, MrSmith wrote: You may need to perform extra logic when value is inserted in the container and something else when value already existed. Fair enough, I will consider adding this and some tests to the PR, a function overload seems like the way to go.

[Issue 15574] wrong order of linker arguments

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15574 --- Comment #5 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/fbaeeaee1cac009d9f7157b7d63ea22dee1d3b0e Fix issue 15574 - wrong order of link arguments This

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

2018-04-17 Thread MrSmith via Digitalmars-d
On Tuesday, 17 April 2018 at 17:27:02 UTC, Giles Bathgate wrote: I like the name. I think your version is quite low level which ultimately provides more power at the expense of making the callee code less clean. I am not sure with D which of those two aspects is preferred. Perhaps both

D's string mixins are like Tcl's uplevel

2018-04-17 Thread Ali Çehreli via Digitalmars-d
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 code as string. So, Tcl's 'uplevel' is like string mixins. It's

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

2018-04-17 Thread Giles Bathgate via Digitalmars-d
On Tuesday, 17 April 2018 at 16:18:32 UTC, Nick Treleaven wrote: I called the function `slot` because it always returns the address of the slot which the value is stored in. I like the name. I think your version is quite low level which ultimately provides more power at the expense of making

Re: isInputRange is false for non-copyable types

2018-04-17 Thread Dmitry Olshansky via Digitalmars-d
On Tuesday, 17 April 2018 at 15:14:02 UTC, Steven Schveighoffer wrote: On 4/15/18 6:14 AM, Dmitry Olshansky wrote: On Sunday, 15 April 2018 at 06:39:43 UTC, Jonathan M Davis wrote: On Sunday, April 15, 2018 07:26:54 Shachar Shemesh via Digitalmars-d wrote: [...] It's extremely common for

[Issue 5227] X ^^ FP at compile-time

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5227 --- Comment #18 from Manu --- Yay! 8 years in the making. This must be a very fine brew! :P --

D IDE Coedit 3.6.7 - now with an integrated terminal emulator.

2018-04-17 Thread Basile B. via Digitalmars-d-announce
I hadn't announced the 5 or 6 latest releases (3.6.x series) but this one comes with an integrated terminal emulator (linux only), a bit like Geany does, if you see what i mean. See https://github.com/BBasile/Coedit/releases for changelog and download links.

Beta 2.080.0

2018-04-17 Thread Martin Nowak via Digitalmars-d-announce
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Glad to announce the first beta for the 2.080.0 release, ♥ to the 65 contributors for this release. http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.080.0.html As usual please report any bugs at https://issues.dlang.org -

Re: Issues with debugging GC-related crashes #2

2018-04-17 Thread Matthias Klumpp via Digitalmars-d
On Tuesday, 17 April 2018 at 08:23:07 UTC, Kagamin wrote: Other stuff to try: 1. run application compiled on debian against ubuntu libs 2. can you mix dependencies from debian and ubuntu? I haven't tried that yet (next on my todo list), if I do run the program compiled with address sanitizer

Re: D IDE Coedit 3.6.7 - now with an integrated terminal emulator.

2018-04-17 Thread ketmar via Digitalmars-d-announce
Basile B. wrote: I hadn't announced the 5 or 6 latest releases (3.6.x series) but this one comes with an integrated terminal emulator (linux only), a bit like Geany does, if you see what i mean. See https://github.com/BBasile/Coedit/releases for changelog and download links. yay!

CTFE in .di files

2018-04-17 Thread Manu via Digitalmars-d
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 which result in unresolved link errors in the client of the .di

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

2018-04-17 Thread Giles Bathgate via Digitalmars-d
On Tuesday, 17 April 2018 at 21:40:55 UTC, Giles Bathgate wrote: Rust calls its version of this function `or_insert_with` (blegh) Of course, a rustic API could be built atop this PR: template entry(K, V) { static struct Entry { alias get this; V[K] aa; K key;

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

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

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

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18774 --- Comment #2 from hst...@quickfur.ath.cx --- P.S. and the `if (__ctfe)` hack I use only saves on executable size, it doesn't suppress the symbol itself from appearing in the object file, so it's probably not good enough for your use case. --

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

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18774 --- Comment #1 from hst...@quickfur.ath.cx --- AIUI, all template functions that are instantiated will end up in the object file, even if they are only used during CTFE (i.e. the instantiation is triggered by CTFE but not anywhere else). This is a

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

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18774 --- Comment #3 from Manu --- Well in this case, the symbol is emit in a .di file, which means it's never written to any object file; hence the unresolved external... But that's actually kind-of irrelevant. The big question I

[Issue 18773] New: Constraints on buffer re-use for std.zlib should be documented.

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18773 Issue ID: 18773 Summary: Constraints on buffer re-use for std.zlib should be documented. Product: D Version: D2 Hardware: All OS: All Status: NEW

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

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18774 Issue ID: 18774 Summary: meta used in .di files causes link errors Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: normal

Re: (Unofficial) Discord Server!

2018-04-17 Thread bachmeier via Digitalmars-d
On Tuesday, 17 April 2018 at 06:43:16 UTC, JN wrote: On Monday, 16 April 2018 at 22:24:18 UTC, Luke Wilson wrote: Hi there! After having found nearly zero solutions for a D community on Discord, having one server be quite inefficient, I've made my own. https://discord.gg/crpA2Hn I hope to

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

2018-04-17 Thread Steven Schveighoffer via Digitalmars-d
On 4/17/18 12:18 PM, Nick Treleaven wrote: On Sunday, 15 April 2018 at 22:52:47 UTC, Giles Bathgate wrote: The function provides a means to get a value corresponding to the key, but if the value doesn't exist it will evaluate the lazy argument to create a new value, add this to the associative

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

2018-04-17 Thread Giles Bathgate via Digitalmars-d
On Tuesday, 17 April 2018 at 20:49:30 UTC, Steven Schveighoffer wrote: Not as straightforward, but it can be done: bool inserted = false; auto p = aa.getOrAdd("key", {inserted = true; return new Person; }); Yes, I like that approach. I don't want to bloat the feature at this stage, although

get literal symbol name without base class/struct as string

2018-04-17 Thread Dr.No via Digitalmars-d-learn
give structs like this: struct A { int a = 10; string s = "haha"; } struct B { A aDetails; } I'd like to do this and store that symbol name as string (my goal is store the member name); string memberName = magic(B.aDetails.s); writeln(memberName); // otuput

Re: Delegates and classes for custom code.

2018-04-17 Thread arturg via Digitalmars-d-learn
On Wednesday, 18 April 2018 at 01:12:33 UTC, Chris Katko wrote: That was all pseudo-code typed by hand. I got my code to work today. I don't know if it's the prettiest it can be, but it works: // TESTING ACCESS TO the OWNING function //--- class

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

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18774 --- Comment #5 from Manu --- > dmd -m64 main.d Emits: main.obj : error LNK2019: unresolved external symbol _D4test9test_funcFiiZv referenced in function _Dmain (expected) main.obj : error LNK2001: unresolved external

Re: Delegates and classes for custom code.

2018-04-17 Thread arturg via Digitalmars-d-learn
On Wednesday, 18 April 2018 at 01:58:40 UTC, arturg wrote: is it this what you want? class A { int a; void delegate() onDraw; this(void delegate() dg) { onDraw = dg; } void drawText(string s) { s.writeln; }

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

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18774 Jonathan M Davis changed: What|Removed |Added CC|

Re: Delegates and classes for custom code.

2018-04-17 Thread Chris Katko via Digitalmars-d-learn
That was all pseudo-code typed by hand. I got my code to work today. I don't know if it's the prettiest it can be, but it works: // TESTING ACCESS TO the OWNING function //--- class test_window { float x; float y;

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

2018-04-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18774 --- Comment #6 from Jonathan M Davis --- (In reply to Manu from comment #5) > I think you've missed my point, there is NO REFERENCE to Zip!().init in > main.d, at least, there shouldn't be... so why the link error? >

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

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

  1   2   >