Re: Create a List or Dictionary.

2018-06-18 Thread Sunny via Digitalmars-d-learn
On Monday, 18 June 2018 at 13:23:37 UTC, Cym13 wrote: Yes, this is what need, thank you very much for your help. :-) On Monday, 18 June 2018 at 11:44:43 UTC, Sunny wrote: [...] If I read you well it seems the simplest equivalent code would be: struct MusicItem { string URL;

[Issue 19003] format!"" breaks with structs containing invariants violated in .init

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19003 --- Comment #1 from FeepingCreature --- PR is up: https://github.com/dlang/phobos/pull/6594 --

Re: UCFS does not work for nested functions?

2018-06-18 Thread aliak via Digitalmars-d-learn
On Monday, 18 June 2018 at 19:26:47 UTC, Steven Schveighoffer wrote: On 6/18/18 2:58 PM, aliak wrote: [...] It's the same in the fact that your call is silently switched to a different call. However, in the current syntax, an external entity CANNOT override a local function. When you call

Re: Cannot hash a std.datetime.Date

2018-06-18 Thread Seb via Digitalmars-d
On Sunday, 17 June 2018 at 18:15:19 UTC, Per Nordlöw wrote: The following unittest { import std.datetime.date : Date; Date date; import core.internal.hash : hashOf; auto hash = date.hashOf; } [...] Well it definitely used to work before: https://run.dlang.io/is/ayjpcH I

[Issue 19005] [REG2.081-b1] object.hashOf no longer works for std.datetime.date.Date

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19005 --- Comment #1 from Seb --- Broken by https://github.com/dlang/druntime/pull/2200 --

[Issue 19005] New: [REG2.081-b1] object.hashOf no longer works for std.datetime.date.Date

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19005 Issue ID: 19005 Summary: [REG2.081-b1] object.hashOf no longer works for std.datetime.date.Date Product: D Version: D2 Hardware: All OS: All Status:

Re: An (old/new?) pattern to utilize phobos better with @nogc

2018-06-18 Thread Seb via Digitalmars-d
On Monday, 18 June 2018 at 06:54:46 UTC, Dukc wrote: On Sunday, 17 June 2018 at 20:17:36 UTC, Dukc wrote: Yes, I agree. And each too, of course. Thought again and not so sure anymore: I just realized that if we are to do that, it should apply the same changes to tee, find, filter etc.

[Issue 18933] std.range.assumeSorted should not nest SortedRange!(SortedRange!(...), pred)

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18933 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/9112e31e501c78e94470d3485484c580192da8fd Fix Issue 18933 - std.range.assumeSorted should not

[Issue 18933] std.range.assumeSorted should not nest SortedRange!(SortedRange!(...), pred)

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

[Issue 18993] toLower is broken for UTF chars

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18993 Seb changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Issue 18804] std.algorithm.mutation.copy puts whole source range into target range when it should put elements

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18804 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/19052b08de1e269bf7e8ad1fef89540a5427b5d7 fix issue 18804 - std.algorithm.mutation.copy puts

[Issue 18804] std.algorithm.mutation.copy puts whole source range into target range when it should put elements

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

Re: allMembers broke for __

2018-06-18 Thread Steven Schveighoffer via Digitalmars-d
On 6/18/18 5:27 PM, Walter Bright wrote: On 6/18/2018 3:54 AM, Timon Gehr wrote: The code you linked to does it. :) I know. But it shouldn't. Do as I say, not as I do :-) I don't see how you misuse the symbols. I think it's more that you shouldn't *define* these symbols, not that you

Re: UCFS does not work for nested functions?

2018-06-18 Thread Bastiaan Veelo via Digitalmars-d-learn
On Monday, 18 June 2018 at 19:31:39 UTC, Steven Schveighoffer wrote: In other words, if UFCS meant that module-level symbols took precedent over local symbols, then it's backwards in terms of which place usually wins. Generally it's the local symbols. Ah, you mean it would have to be that way

Re: allMembers broke for __

2018-06-18 Thread Walter Bright via Digitalmars-d
On 6/18/2018 3:54 AM, Timon Gehr wrote: The code you linked to does it. :) I know. But it shouldn't. Do as I say, not as I do :-)

[Issue 18782] Documentation error: ProtectionAttributes should say Visibility Attributes

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18782 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dlang.org https://github.com/dlang/dlang.org/commit/7c328266beac7f125bde5edc134d9fca9252e45d fix issue 18782 - Documentation error:

[Issue 17934] [scope] scopeness entrypoint for unique/ref-counted missing

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17934 Walter Bright changed: What|Removed |Added Severity|normal |enhancement --- Comment #6 from Walter

[Issue 17934] [scope] scopeness entrypoint for unique/ref-counted missing

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17934 Walter Bright changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED

Re: Nothrow std.conv.to with explicit default value

2018-06-18 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/18/18 4:48 PM, Per Nordlöw wrote: The problem with this code is that throwing exceptions for the default case is costly at least with dmd. Is there another way to do this? Yes, have an internal implementation which doesn't throw, but rather returns an error code. Then you can call that

Re: Nothrow std.conv.to with explicit default value

2018-06-18 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 18 June 2018 at 20:48:55 UTC, Per Nordlöw wrote: T toDefaulted(T, S, U)(S value, /*lazy*/ U defaultValue) if (is(typeof(() { T r = defaultValue; }))) // TODO use std.traits.isAssignable!(T, U) ? why not just make it T toDefaulted(T, S)(S value, T defaultValue) and forget U

Re: D community's view on syntactic sugar

2018-06-18 Thread aberba via Digitalmars-d
On Saturday, 16 June 2018 at 08:39:07 UTC, Dmitry Olshansky wrote: On Friday, 15 June 2018 at 23:04:40 UTC, Sjoerd Nijboer wrote: For someone coming from a C# background there is some seemingly simple syntactic sugar missing from D. T* he `async` & `await` keyword from C# make proactor

Nothrow std.conv.to with explicit default value

2018-06-18 Thread Per Nordlöw via Digitalmars-d-learn
I have a nothrow variant of std.conv.to defined as follows: T toDefaulted(T, S, U)(S value, /*lazy*/ U defaultValue) if (is(typeof(() { T r = defaultValue; }))) // TODO use std.traits.isAssignable!(T, U) ? { try { import std.conv : to; return value.to!T; } catch

[Issue 18996] Inserting a type containing indirections into an std.container Array causes SIGILL(4). Illegal Instruction.

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18996 --- Comment #8 from Paul Crane --- Thanks Steven for finding the bug and fixing it! It is appreciated! --

Re: emeralD - Command-line tool for template files

2018-06-18 Thread biocyberman via Digitalmars-d-announce
On Sunday, 17 June 2018 at 23:04:59 UTC, bauss wrote: emeralD is a command-line tool for template files that can be used to generate code files, configurations etc. It's a very useful tool for generating files that you'd normally have to create by hand. The idea for emeralD was not actually

Re: What is the point of nothrow?

2018-06-18 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, June 18, 2018 15:22:48 wjoe via Digitalmars-d-learn wrote: > On Saturday, 16 June 2018 at 21:25:01 UTC, Jonathan M Davis wrote: > > every feature that you can't use in betterC is considered a > > loss, and efforts are being made to make more of them work. > > There's always going to be

Re: Aalborg D meetup

2018-06-18 Thread biocyberman via Digitalmars-d-announce
On Friday, 15 June 2018 at 08:45:29 UTC, Bienlein wrote: On Friday, 15 June 2018 at 07:34:07 UTC, biocyberman wrote: On Friday, 15 June 2018 at 07:20:04 UTC, Bienlein wrote: On Wednesday, 13 June 2018 at 12:37:26 UTC, bauss wrote: On Wednesday, 13 June 2018 at 12:12:11 UTC, bauss wrote: I'll

Re: D community's view on syntactic sugar

2018-06-18 Thread Seb via Digitalmars-d
On Monday, 18 June 2018 at 01:06:48 UTC, evilrat wrote: On Sunday, 17 June 2018 at 17:48:21 UTC, FromAnotherPlanet wrote: On Sunday, 17 June 2018 at 16:52:59 UTC, Neia Neutuladh wrote: The only case where D loses out is compared to { get; private set; }. That's a pretty big thing to give

Re: UCFS does not work for nested functions?

2018-06-18 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/18/18 2:57 PM, Bastiaan Veelo wrote: On Monday, 18 June 2018 at 17:58:11 UTC, Steven Schveighoffer wrote: On 6/18/18 1:25 PM, bauss wrote: On Monday, 18 June 2018 at 17:16:29 UTC, aliak wrote: On Monday, 18 June 2018 at 14:19:30 UTC, Steven Schveighoffer wrote: On 6/18/18 7:16 AM,

Re: UCFS does not work for nested functions?

2018-06-18 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/18/18 2:58 PM, aliak wrote: On Monday, 18 June 2018 at 17:58:11 UTC, Steven Schveighoffer wrote: What then can happen is that your local calls can get hijacked from outside the module, if someone happens to define something later that you happened to import. D tries to avoid such

Re: UCFS does not work for nested functions?

2018-06-18 Thread aliak via Digitalmars-d-learn
On Monday, 18 June 2018 at 17:58:11 UTC, Steven Schveighoffer wrote: What then can happen is that your local calls can get hijacked from outside the module, if someone happens to define something later that you happened to import. D tries to avoid such possibilities. There's not much

Re: UCFS does not work for nested functions?

2018-06-18 Thread Bastiaan Veelo via Digitalmars-d-learn
On Monday, 18 June 2018 at 17:58:11 UTC, Steven Schveighoffer wrote: On 6/18/18 1:25 PM, bauss wrote: On Monday, 18 June 2018 at 17:16:29 UTC, aliak wrote: On Monday, 18 June 2018 at 14:19:30 UTC, Steven Schveighoffer wrote: On 6/18/18 7:16 AM, Bastiaan Veelo wrote: On Sunday, 18 May 2014 at

Re: how to determine of a module or any other symbol is visible?

2018-06-18 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, June 18, 2018 11:53:50 Cauterite via Digitalmars-d-learn wrote: > On Monday, 18 June 2018 at 09:28:00 UTC, rikki cattermole wrote: > > On 18/06/2018 9:24 PM, Mr.Bingo wrote: > >> On Monday, 18 June 2018 at 09:10:59 UTC, rikki cattermole > >> wrote: > >> This doesn't work with

[Issue 8161] give an error for invalid property functions

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8161 --- Comment #15 from Jonathan M Davis --- (In reply to Nick Treleaven from comment #14) > This alone makes it an important feature. Actually, I think that it's caused more bugs than anything - especially when much is done with type introspection.

Re: UCFS does not work for nested functions?

2018-06-18 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/18/18 1:25 PM, bauss wrote: On Monday, 18 June 2018 at 17:16:29 UTC, aliak wrote: On Monday, 18 June 2018 at 14:19:30 UTC, Steven Schveighoffer wrote: On 6/18/18 7:16 AM, Bastiaan Veelo wrote: On Sunday, 18 May 2014 at 08:15:08 UTC, Steffen Wenz wrote: Hi, Just noticed that using UFCS

Re: UCFS does not work for nested functions?

2018-06-18 Thread bauss via Digitalmars-d-learn
On Monday, 18 June 2018 at 17:16:29 UTC, aliak wrote: On Monday, 18 June 2018 at 14:19:30 UTC, Steven Schveighoffer wrote: On 6/18/18 7:16 AM, Bastiaan Veelo wrote: On Sunday, 18 May 2014 at 08:15:08 UTC, Steffen Wenz wrote: Hi, Just noticed that using UFCS does not work for nested

Re: scope(success) lowered to try-catch ?

2018-06-18 Thread aliak via Digitalmars-d-learn
On Monday, 18 June 2018 at 12:48:46 UTC, Steven Schveighoffer wrote: On 6/17/18 11:58 PM, Neia Neutuladh wrote: [...] Yep, it's a good point. But also not the only way to do this. If you are returning void, just a goto would work: [...] I'm quite a noob when it comes to compiler stuff,

Re: UCFS does not work for nested functions?

2018-06-18 Thread aliak via Digitalmars-d-learn
On Monday, 18 June 2018 at 14:19:30 UTC, Steven Schveighoffer wrote: On 6/18/18 7:16 AM, Bastiaan Veelo wrote: On Sunday, 18 May 2014 at 08:15:08 UTC, Steffen Wenz wrote: Hi, Just noticed that using UFCS does not work for nested functions, and was wondering whether that's intended, and what

Re: allMembers broke for __

2018-06-18 Thread Steven Schveighoffer via Digitalmars-d
On 6/18/18 12:57 PM, bauss wrote: On Monday, 18 June 2018 at 08:25:46 UTC, Russel Winder wrote: On Sun, 2018-06-17 at 15:55 -0700, Walter Bright via Digitalmars-d wrote: […] Identifiers starting with __ are reserved for the implementation:    https://dlang.org/spec/lex.html#identifiers

Re: allMembers broke for __

2018-06-18 Thread bauss via Digitalmars-d
On Monday, 18 June 2018 at 08:25:46 UTC, Russel Winder wrote: On Sun, 2018-06-17 at 15:55 -0700, Walter Bright via Digitalmars-d wrote: […] Identifiers starting with __ are reserved for the implementation: https://dlang.org/spec/lex.html#identifiers They have implementation-defined

[Issue 18996] Inserting a type containing indirections into an std.container Array causes SIGILL(4). Illegal Instruction.

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18996 Steven Schveighoffer changed: What|Removed |Added Summary|Inserting a struct into an |Inserting a type containing

Re: What is the point of nothrow?

2018-06-18 Thread wjoe via Digitalmars-d-learn
On Saturday, 16 June 2018 at 21:25:01 UTC, Jonathan M Davis wrote: On Saturday, June 16, 2018 18:45:53 wjoe via Digitalmars-d-learn wrote: What you said earlier: On Monday, 11 June 2018 at 00:47:27 UTC, Jonathan M Davis wrote: > [...] > > 2. If the compiler knows that a function can't throw

[Issue 17656] Enum member circular reference error

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17656 RazvanN changed: What|Removed |Added CC||razvan.nitu1...@gmail.com --- Comment #2 from

[Issue 3567] std.traits: Unqual doesn't handle arrays well

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3567 Steven Schveighoffer changed: What|Removed |Added Keywords||safe CC|

Re: UCFS does not work for nested functions?

2018-06-18 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/18/18 7:16 AM, Bastiaan Veelo wrote: On Sunday, 18 May 2014 at 08:15:08 UTC, Steffen Wenz wrote: Hi, Just noticed that using UFCS does not work for nested functions, and was wondering whether that's intended, and what the rationale behind it is: I just had the same question. I can

Re: cyclic redundancy

2018-06-18 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/18/18 4:45 AM, Mr.Bingo wrote: I got tired of waiting for a solution and rolled my own: static this() { import std.meta, std.stdio; // Find all ___This functions linked to this module auto Iterate()() {     string[string] s;     void Iterate2(alias m, int

Re: cyclic redundancy

2018-06-18 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/18/18 3:19 AM, Mr.Bingo wrote: I have static this scattered throughout. Some are module static this and some are struct and class. In a test case I have reduced to a struct that uses a static this and I get a cycle... even though, of course, the static this does nothing accept internal

[Issue 18996] Inserting a struct into an std.container Array causes SIGILL(4). Illegal Instruction.

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18996 Steven Schveighoffer changed: What|Removed |Added Keywords||pull CC|

Re: What Is Python Developer Salary?

2018-06-18 Thread FromAnotherPlanet via Digitalmars-d
On Thursday, 12 April 2018 at 21:01:47 UTC, Arnold Blake wrote: I hired a remote developer in the language of the programming python, there was such a question as to how much should I pay him for the work? how many per hour? What kind of salary do they have, are different countries interested,

Re: emeralD - Command-line tool for template files

2018-06-18 Thread bauss via Digitalmars-d-announce
On Monday, 18 June 2018 at 13:31:40 UTC, bauss wrote: The files will be created / copied to the current working directory. In the next version you'll be able to specify folders that you work in and give them a name which can be used to invoke emeralD from anywhere and still work in the

Re: emeralD - Command-line tool for template files

2018-06-18 Thread bauss via Digitalmars-d-announce
On Monday, 18 June 2018 at 10:42:53 UTC, Dechcaudron wrote: On Sunday, 17 June 2018 at 23:04:59 UTC, bauss wrote: For more information see the Github repository and for examples see the read me. Could we get a complete, simple usage example? Like target directory structure and how to invoke

Re: What Is Python Developer Salary?

2018-06-18 Thread Jinn Coulson via Digitalmars-d
On Thursday, 12 April 2018 at 21:01:47 UTC, Arnold Blake wrote: I hired a remote developer in the language of the programming python, there was such a question as to how much should I pay him for the work? how many per hour? What kind of salary do they have, are different countries interested,

Re: Create a List or Dictionary.

2018-06-18 Thread Cym13 via Digitalmars-d-learn
On Monday, 18 June 2018 at 11:44:43 UTC, Sunny wrote: Hello, I'm having a problem, how can I create a List or Dictionary in D? In C #, I can create a tuple list, example: var musicList = new List <(string URL, string Artist, string Title, string Cover, string Duration)> (); In Google did

[Issue 19004] Allow passing a string literal to an extern(C) variadic parameter

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19004 Nick Treleaven changed: What|Removed |Added Keywords||pull URL|

[Issue 19004] New: Allow passing a string literal to an extern(C) variadic parameter

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19004 Issue ID: 19004 Summary: Allow passing a string literal to an extern(C) variadic parameter Product: D Version: D2 Hardware: x86 OS: Windows Status:

Re: scope(success) lowered to try-catch ?

2018-06-18 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/17/18 11:58 PM, Neia Neutuladh wrote: On Sunday, 17 June 2018 at 10:58:29 UTC, Cauterite wrote: Is there a reason scope(success) needs to set up for exception handling? Or is this a bug / potential enhancement ? If you had no exception handling in place, you'd need to duplicate code in

[Issue 19003] New: format!"" breaks with structs containing invariants violated in .init

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19003 Issue ID: 19003 Summary: format!"" breaks with structs containing invariants violated in .init Product: D Version: D2 Hardware: x86_64 OS: Linux

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

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19002 Issue ID: 19002 Summary: __FUNCTION__ and __PRETTY_FUNCTION__ are not C string literals Product: D Version: D2 Hardware: All OS: All Status: NEW

[Issue 8161] give an error for invalid property functions

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8161 Nick Treleaven changed: What|Removed |Added Keywords||accepts-invalid --- Comment #14 from Nick

Re: Create a List or Dictionary.

2018-06-18 Thread rikki cattermole via Digitalmars-d-learn
On 18/06/2018 11:44 PM, Sunny wrote: Hello, I'm having a problem, how can I create a List or Dictionary in D? In C #, I can create a tuple list, example: var musicList = new List <(string URL, string Artist, string Title, string Cover, string Duration)> (); In Google did not find anything,

Re: how to determine of a module or any other symbol is visible?

2018-06-18 Thread Cauterite via Digitalmars-d-learn
On Monday, 18 June 2018 at 09:28:00 UTC, rikki cattermole wrote: On 18/06/2018 9:24 PM, Mr.Bingo wrote: On Monday, 18 June 2018 at 09:10:59 UTC, rikki cattermole wrote: This doesn't work with depreciation warnings. There won't be a way to check for those (I think). Easier to not worry about

Create a List or Dictionary.

2018-06-18 Thread Sunny via Digitalmars-d-learn
Hello, I'm having a problem, how can I create a List or Dictionary in D? In C #, I can create a tuple list, example: var musicList = new List <(string URL, string Artist, string Title, string Cover, string Duration)> (); In Google did not find anything, tell me please how to get out of

Re: UCFS does not work for nested functions?

2018-06-18 Thread Bastiaan Veelo via Digitalmars-d-learn
On Sunday, 18 May 2014 at 08:15:08 UTC, Steffen Wenz wrote: Hi, Just noticed that using UFCS does not work for nested functions, and was wondering whether that's intended, and what the rationale behind it is: I just had the same question. I can imagine that the context pointer of nested

[Issue 19000] Building botan library causes segfault in dsymbolsem.d

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19000 --- Comment #3 from Mike Franklin --- This bug report needs a dustmite reduction. It's easy to reproduce, but without a reduced test case to submit with the bug fix, this isn't going to get fixed any time soon. --

Re: allMembers broke for __

2018-06-18 Thread Timon Gehr via Digitalmars-d
On 18.06.2018 00:55, Walter Bright wrote: On 6/15/2018 11:08 PM, DigitalDesigns wrote: When an identifier starts with __, allMembers does not return it. This is very bad behavior! It can silently create huge problems if the programmer is not aware of the bug. It's not a bug, it's quite

Re: Compiler segfaults if not compiling with -debug #dbugfix

2018-06-18 Thread FeepingCreature via Digitalmars-d
Can somebody explain what tnext does in TemplateInstance? It seems to be at the root of this stack overflow. The comment says it's "non-first instantiated instances", which is somewhat less than helpful.

[Issue 18026] Stack overflow in ddmd/dtemplate.d:6241, TemplateInstance::needsCodegen()

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18026 FeepingCreature changed: What|Removed |Added CC||default_357-l...@yahoo.de --- Comment #15

[Issue 18266] ICE: should allow reusing identifier in declarations in disjoint scopes in a function

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18266 RazvanN changed: What|Removed |Added CC||razvan.nitu1...@gmail.com --- Comment #1 from

[Issue 19000] Building botan library causes segfault in dsymbolsem.d

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

Re: emeralD - Command-line tool for template files

2018-06-18 Thread bauss via Digitalmars-d-announce
On Sunday, 17 June 2018 at 23:04:59 UTC, bauss wrote: Github: https://github.com/DiamondMVC/emeralD Thank you! Scaffolding has now been added, along with shell command passing. This makes it possible to use emeralD for like project shells, build tool combination and multiple file

Re: emeralD - Command-line tool for template files

2018-06-18 Thread Dechcaudron via Digitalmars-d-announce
On Sunday, 17 June 2018 at 23:04:59 UTC, bauss wrote: For more information see the Github repository and for examples see the read me. Could we get a complete, simple usage example? Like target directory structure and how to invoke the program to get to it.

Re: Help with DMD internals

2018-06-18 Thread Nicholas Wilson via Digitalmars-d
On Monday, 18 June 2018 at 10:23:21 UTC, David Nadlinger wrote: On Monday, 18 June 2018 at 10:19:57 UTC, Nicholas Wilson wrote: You should get in contact with Manu Evans, he's working on this as well IIRC. Might be a lonely conversation – this is a spam-bot repost of one of Manu's messages.

Re: Help with DMD internals

2018-06-18 Thread David Nadlinger via Digitalmars-d
On Monday, 18 June 2018 at 10:19:57 UTC, Nicholas Wilson wrote: You should get in contact with Manu Evans, he's working on this as well IIRC. Might be a lonely conversation – this is a spam-bot repost of one of Manu's messages. ;) —David

Re: Help with DMD internals

2018-06-18 Thread Nicholas Wilson via Digitalmars-d
On Monday, 18 June 2018 at 09:58:05 UTC, kullboys wrote: Hello everyone Then... next up, extern(C++) classes need to place __xdtor in the vtable (posix uses 2 slots). We need the vtable to match naturally, without advising people to add a dummy method. I also have a hack in progress to

Help with DMD internals

2018-06-18 Thread kullboys via Digitalmars-d
Hello everyone Then... next up, extern(C++) classes need to place __xdtor in the vtable (posix uses 2 slots). We need the vtable to match naturally, without advising people to add a dummy method. I also have a hack in progress to support `final ~this()` in extern(C++) classes, which will omit

Re: how to determine of a module or any other symbol is visible?

2018-06-18 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, June 18, 2018 21:28:00 rikki cattermole via Digitalmars-d-learn wrote: > On 18/06/2018 9:24 PM, Mr.Bingo wrote: > > On Monday, 18 June 2018 at 09:10:59 UTC, rikki cattermole wrote: > >> On 18/06/2018 9:03 PM, Mr.Bingo wrote: > >>> In the code I posted before about CRC, sometimes I get

Re: how to determine of a module or any other symbol is visible?

2018-06-18 Thread rikki cattermole via Digitalmars-d-learn
On 18/06/2018 9:24 PM, Mr.Bingo wrote: On Monday, 18 June 2018 at 09:10:59 UTC, rikki cattermole wrote: On 18/06/2018 9:03 PM, Mr.Bingo wrote: In the code I posted before about CRC, sometimes I get a visibility error for some modules. I would like to be able to filter those out using traits.

Re: how to determine of a module or any other symbol is visible?

2018-06-18 Thread Mr.Bingo via Digitalmars-d-learn
On Monday, 18 June 2018 at 09:10:59 UTC, rikki cattermole wrote: On 18/06/2018 9:03 PM, Mr.Bingo wrote: In the code I posted before about CRC, sometimes I get a visibility error for some modules. I would like to be able to filter those out using traits. Is there any way to determine if a

Re: how to determine of a module or any other symbol is visible?

2018-06-18 Thread rikki cattermole via Digitalmars-d-learn
On 18/06/2018 9:03 PM, Mr.Bingo wrote: In the code I posted before about CRC, sometimes I get a visibility error for some modules. I would like to be able to filter those out using traits. Is there any way to determine if a module is visible/reachable in the current scope? The modules that

how to determine of a module or any other symbol is visible?

2018-06-18 Thread Mr.Bingo via Digitalmars-d-learn
In the code I posted before about CRC, sometimes I get a visibility error for some modules. I would like to be able to filter those out using traits. Is there any way to determine if a module is visible/reachable in the current scope? The modules that are causing the problems are imported

Re: cyclic redundancy

2018-06-18 Thread Mr.Bingo via Digitalmars-d-learn
I got tired of waiting for a solution and rolled my own: static this() { import std.meta, std.stdio; // Find all ___This functions linked to this module auto Iterate()() { string[string] s; void Iterate2(alias m, int depth =

Re: Friends in D, the easy way!

2018-06-18 Thread Gary Willoughby via Digitalmars-d
On Monday, 18 June 2018 at 06:37:41 UTC, Mr.Bingo wrote: These go in the module you want allow access to the outside world just as if they were in the same module! See the package attribute: https://dlang.org/spec/attribute.html#visibility_attributes

Re: Friends in D, the easy way!

2018-06-18 Thread Mr.Bingo via Digitalmars-d
On Monday, 18 June 2018 at 07:24:47 UTC, bauss wrote: On Monday, 18 June 2018 at 06:37:41 UTC, Mr.Bingo wrote: These go in the module you want allow access to the outside world just as if they were in the same module! auto Setter(string name, alias O, T)(T t) { mixin("t."~name~" =

Re: Debugging silent exit of threads in Phobos calls

2018-06-18 Thread Russel Winder via Digitalmars-d-learn
For anyone still interested in this problem: Steve's pull request fixing the problem is included in D 2.081.0. I can experiment as soon as DMD 2.081.0 is released but will have to wait till the fixes get into LDC to create production code. Moral of the story: silent, except during gdb

Re: allMembers broke for __

2018-06-18 Thread Russel Winder via Digitalmars-d
On Sun, 2018-06-17 at 15:55 -0700, Walter Bright via Digitalmars-d wrote: > […] > Identifiers starting with __ are reserved for the implementation: > >https://dlang.org/spec/lex.html#identifiers > > They have implementation-defined behavior. Do not use them in user code. In delegates I

[Issue 18996] Inserting a struct into an std.container Array causes SIGILL(4). Illegal Instruction.

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18996 --- Comment #6 from Paul Crane --- Thanks a lot for looking into this. Your fix does work for me as well. Thanks again it's much appreciated! --

Re: scope(success) lowered to try-catch ?

2018-06-18 Thread Cauterite via Digitalmars-d-learn
On Monday, 18 June 2018 at 03:58:47 UTC, Neia Neutuladh wrote: ... yeah, at an AST level it makes sense why it was implemented like this. it's unfortunate that there's no straightforward way to express 'finally(success) {'.

Re: detectcycles: A source code dependency cycle checker

2018-06-18 Thread Vijay Nayar via Digitalmars-d-announce
On Sunday, 17 June 2018 at 20:20:48 UTC, Mario Kröplin wrote: I did not mention it in the README, but the tred filter used in https://code.dlang.org/packages/depend complains about cyclic dependencies. I am currently working on a branch, where the transitive reduction and the corresponding

[Issue 3567] std.traits: Unqual doesn't handle arrays well

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3567 FeepingCreature changed: What|Removed |Added Status|RESOLVED|REOPENED CC|

Re: Friends in D, the easy way!

2018-06-18 Thread bauss via Digitalmars-d
On Monday, 18 June 2018 at 06:37:41 UTC, Mr.Bingo wrote: These go in the module you want allow access to the outside world just as if they were in the same module! auto Setter(string name, alias O, T)(T t) { mixin("t."~name~" = O();"); } auto ref Getter(string name, T)(T t) {

[Issue 18984] Debugging stack struct's which are returned causes incorrect debuginfo.

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18984 Rainer Schuetze changed: What|Removed |Added Keywords||pull --- Comment #3 from Rainer Schuetze

cyclic redundancy

2018-06-18 Thread Mr.Bingo via Digitalmars-d-learn
I have static this scattered throughout. Some are module static this and some are struct and class. In a test case I have reduced to a struct that uses a static this and I get a cycle... even though, of course, the static this does nothing accept internal things. It is very annoying to

[Issue 18996] Inserting a struct into an std.container Array causes SIGILL(4). Illegal Instruction.

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18996 Basile B. changed: What|Removed |Added Component|druntime|phobos --- Comment #5 from Basile B. ---

Re: IOS support status

2018-06-18 Thread makedgreatagain via Digitalmars-d
On Sunday, 17 June 2018 at 01:50:14 UTC, Uknown wrote: On Saturday, 16 June 2018 at 12:59:48 UTC, makedgreatagain Darwin can generally imply either macOS, tvOS or iOS, as far as I can tell. Thanks for tips. @Joakim I speed the weekend on this and with no good results. abi-ios is not work

Re: An (old/new?) pattern to utilize phobos better with @nogc

2018-06-18 Thread Dukc via Digitalmars-d
On Sunday, 17 June 2018 at 20:17:36 UTC, Dukc wrote: Yes, I agree. And each too, of course. Thought again and not so sure anymore: I just realized that if we are to do that, it should apply the same changes to tee, find, filter etc. Probably too complicated to be worth it. For @nogc,

Friends in D, the easy way!

2018-06-18 Thread Mr.Bingo via Digitalmars-d
These go in the module you want allow access to the outside world just as if they were in the same module! auto Setter(string name, alias O, T)(T t) { mixin("t."~name~" = O();"); } auto ref Getter(string name, T)(T t) { mixin("return t."~name~";"); }

[Issue 19000] Building botan library causes segfault in dsymbolsem.d

2018-06-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19000 ag0aep6g changed: What|Removed |Added Keywords||ice CC|

Re: iopipe v0.1.0 - now with Windows support!

2018-06-18 Thread Dmitry Olshansky via Digitalmars-d-announce
On Sunday, 17 June 2018 at 04:52:07 UTC, Martin Nowak wrote: On 06/10/2018 10:10 PM, Steven Schveighoffer wrote: Note that the new io library also supports sockets, which IODev did not have support for, AND has a pluggable driver system, so you could potentially use fiber-based async io

Re: Cannot hash a std.datetime.Date

2018-06-18 Thread Jonathan M Davis via Digitalmars-d
On Sunday, June 17, 2018 18:15:19 Per Nordlöw via Digitalmars-d wrote: > The following > > unittest > { > import std.datetime.date : Date; > Date date; > import core.internal.hash : hashOf; > auto hash = date.hashOf; > } > > errors (with DMD v2.081.0-beta.1) as > >