Re: Should the "front" range primitive be "const" ?

2018-01-30 Thread Simen Kjærås via Digitalmars-d-learn
On Wednesday, 31 January 2018 at 01:45:57 UTC, H. S. Teoh wrote: .headConst .headMutable. :p Head-const is something we generally want to avoid. -- Simen

[Issue 18337] https://dlang.org/spec/operatoroverloading.html missing opIn/opIn_r

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18337 Jonathan Marler changed: What|Removed |Added Status|RESOLVED|REOPENED

[Issue 18337] https://dlang.org/spec/operatoroverloading.html missing opIn/opIn_r

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18337 Simen Kjaeraas changed: What|Removed |Added Status|REOPENED|RESOLVED

[Issue 12617] Add old-style operator overloading to the Deprecated Features page

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12617 Simen Kjaeraas changed: What|Removed |Added CC|

Re: Quora: Why hasn't D started to replace C++?

2018-01-30 Thread Paulo Pinto via Digitalmars-d
On Tuesday, 30 January 2018 at 22:43:32 UTC, Ola Fosheim Grøstad wrote: On Tuesday, 30 January 2018 at 21:49:39 UTC, H. S. Teoh wrote: "extremely eefficient native code". I don't argue that C++ has extremely efficient native code. But so has D. So the claim that C++ has an "enormous

Re: Union Initialization

2018-01-30 Thread Ali Çehreli via Digitalmars-d-learn
On 01/30/2018 07:33 PM, Rubn wrote: Is there any way to initialize an array of unions with more than just the first union type? struct A { float a; } struct B { uint b; } union Test {     A a;     B b; } Test[2] test = [     Test(A(1.0f)),     Test(B(10)), // ERROR ]; AFAIK there's

[Issue 10879] std.variant Variant/Algebraic: Can't store static arrays > 32(/16) bytes

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

[Issue 10879] std.variant Variant/Algebraic: Can't store static arrays > 32(/16) bytes

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10879 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/875015e7af63eff5b893caffae1b60cac5fdd82e Fix Issue 10879 - std.variant Variant/Algebraic: Cant

Re: Quora: Why hasn't D started to replace C++?

2018-01-30 Thread mate via Digitalmars-d
On Wednesday, 31 January 2018 at 04:55:02 UTC, thedeemon wrote: On Tuesday, 30 January 2018 at 22:38:20 UTC, Andrei Alexandrescu wrote: https://www.quora.com/Why-hasnt-D-started-to-replace-C++ [...] At best responses would go on Quora, not here. Thanks! -- Andrei That's a question from

Re: How to test a DUB-based library during development?

2018-01-30 Thread Joel via Digitalmars-d-learn
On Thursday, 11 January 2018 at 12:36:22 UTC, Guillaume Piolat wrote: On Thursday, 11 January 2018 at 12:27:27 UTC, DanielG wrote: [snip] You may have some unittest blocks in your source files, and then type: $ dub test [snip] When I try 'dub test' I get errors like 'Source file

Re: Quora: Why hasn't D started to replace C++?

2018-01-30 Thread thedeemon via Digitalmars-d
On Tuesday, 30 January 2018 at 22:38:20 UTC, Andrei Alexandrescu wrote: https://www.quora.com/Why-hasnt-D-started-to-replace-C++ [...] At best responses would go on Quora, not here. Thanks! -- Andrei That's a question from 2014. I wonder if anybody would see those answers.

[Issue 18342] New: std.concurrency needs to be optimized

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18342 Issue ID: 18342 Summary: std.concurrency needs to be optimized Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

Union Initialization

2018-01-30 Thread Rubn via Digitalmars-d-learn
Is there any way to initialize an array of unions with more than just the first union type? struct A { float a; } struct B { uint b; } union Test { A a; B b; } Test[2] test = [ Test(A(1.0f)), Test(B(10)), // ERROR ]; AFAIK there's no way to specify to use D with an

[Issue 18341] New: Documentation for std.array.split is confusing/incorrect

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18341 Issue ID: 18341 Summary: Documentation for std.array.split is confusing/incorrect Product: D Version: D2 Hardware: x86_64 OS: Other Status: NEW

[Issue 18340] Missing a list of possible operators for opBinary and opBinaryRight

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18340 Jonathan Marler changed: What|Removed |Added Resolution|FIXED |INVALID --

[Issue 18340] Missing a list of possible operators for opBinary and opBinaryRight

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18340 Jonathan Marler changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 18340] New: Missing a list of possible operators for opBinary and opBinaryRight

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18340 Issue ID: 18340 Summary: Missing a list of possible operators for opBinary and opBinaryRight Product: D Version: D2 Hardware: x86 URL:

Re: Tuple DIP

2018-01-30 Thread Seb via Digitalmars-d
On Friday, 12 January 2018 at 22:44:48 UTC, Timon Gehr wrote: As promised [1], I have started setting up a DIP to improve tuple ergonomics in D: https://github.com/tgehr/DIPs/blob/tuple-syntax/DIPs/DIP1xxx-tg.md This DIP aims to make code like the following valid D: --- auto (a, b) = (1,

[Issue 18337] https://dlang.org/spec/operatoroverloading.html missing opIn/opIn_r

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18337 Jonathan Marler changed: What|Removed |Added Status|RESOLVED|REOPENED

Re: Should the "front" range primitive be "const" ?

2018-01-30 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Jan 30, 2018 at 06:05:47PM -0700, Jonathan M Davis via Digitalmars-d-learn wrote: > On Tuesday, January 30, 2018 07:49:28 H. S. Teoh via Digitalmars-d-learn > wrote: [...] > > Simen has had some ideas recently about "head mutable" aka > > tail-const, which could be a first step towards

Re: How programmers transition between languages

2018-01-30 Thread rjframe via Digitalmars-d
On Wed, 31 Jan 2018 00:34:48 +, Benny wrote: > https://crates.io/categories Thanks. I wish that was easier to find though. I still don't see how to get there without knowing it already exists. > The issue is that a lot of D's packages are even less maintained then > Rust, mostly because

Re: How programmers transition between languages

2018-01-30 Thread rjframe via Digitalmars-d
On Tue, 30 Jan 2018 20:59:16 +, aberba wrote: > Is the foundation allowed to publicise its financial status as an NGO > based on US laws? It's required to file with the IRS, and those filings are public. The 2016 990-EZ filing:

Re: Should the "front" range primitive be "const" ?

2018-01-30 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, January 30, 2018 07:49:28 H. S. Teoh via Digitalmars-d-learn wrote: > On Tue, Jan 30, 2018 at 08:54:00AM -0500, Steven Schveighoffer via Digitalmars-d-learn wrote: > > On 1/29/18 8:20 PM, Jonathan M Davis wrote: > [...] > > > > If you want to put an attribute on it, inout is better,

[Issue 18318] std.net.curl.download silently ignores non-2xx http statuses

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18318 --- Comment #4 from Martin Nowak --- (In reply to Aravinda from comment #2) > auto conn = HTTP(url); > download(url, "tmp", conn); > auto status = conn.statusLine(); > if (status.code == 200){ Thanks, that's a helpful

[Issue 18335] The D_ObjectiveC version identifier is not printed in verbose mode

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

[Issue 18335] The D_ObjectiveC version identifier is not printed in verbose mode

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18335 --- Comment #1 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/dc7a44c87e2419badc1b495c7763f0a45862eba4 Fix issue 18335 - The D_ObjectiveC version identifier is not

[Issue 18318] std.net.curl.download silently ignores non-2xx http statuses

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18318 Martin Nowak changed: What|Removed |Added Keywords||pull --- Comment #3 from

Re: Quora: Why hasn't D started to replace C++?

2018-01-30 Thread Walter Bright via Digitalmars-d
On 1/30/2018 1:02 PM, H. S. Teoh wrote: Where's C++'s "enormous performance advantage?" I'm not seeing it, except in this article, and, presumably, in the author's imagination. I know C, C++, and D code generation semantics. There is only one case where C/C++ can fundamentally generate

Re: How programmers transition between languages

2018-01-30 Thread Benny via Digitalmars-d
On Tuesday, 30 January 2018 at 11:55:42 UTC, rjframe wrote: - I click "Browse All Crates"; the default sort is alphabetical - not useful unless I'm just browsing, Right side: * Alphabetical * All-Time Downloads * Recent Downloads even then I'd likely want to browse by category.

Re: Quora: Why hasn't D started to replace C++?

2018-01-30 Thread H. S. Teoh via Digitalmars-d
On Tue, Jan 30, 2018 at 10:12:07PM +, Ola Fosheim Grøstad via Digitalmars-d wrote: > On Tuesday, 30 January 2018 at 21:49:39 UTC, H. S. Teoh wrote: > > Meaning, the "enormous performance advantage" is because of > > "extremely eefficient native code". I don't argue that C++ has > > extremely

[Issue 14260] std.net.curl.byLineAsync should be stoppped manually.

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14260 Martin Nowak changed: What|Removed |Added Keywords||bootcamp, trivial --

[Issue 14260] std.net.curl.byLineAsync should be stoppped manually.

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14260 Martin Nowak changed: What|Removed |Added CC||c...@dawg.eu --- Comment #1

Re: Quora: Why hasn't D started to replace C++?

2018-01-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 30 January 2018 at 21:49:39 UTC, H. S. Teoh wrote: "extremely eefficient native code". I don't argue that C++ has extremely efficient native code. But so has D. So the claim that C++ has an "enormous performance advantage" over D is specious. We also need to keep in mind that

Re: How to proceed with learning to code Windows desktop applications?

2018-01-30 Thread aberba via Digitalmars-d-learn
On Tuesday, 30 January 2018 at 18:41:57 UTC, I Lindström wrote: On Tuesday, 30 January 2018 at 05:56:51 UTC, DanielG wrote: There are far too many options for Windows GUI programming, so we probably need a bit more information about any constraints that are important to you. For example: -

Re: Quora: Why hasn't D started to replace C++?

2018-01-30 Thread Andrei Alexandrescu via Digitalmars-d
On 01/30/2018 04:02 PM, H. S. Teoh wrote: On Tue, Jan 30, 2018 at 03:45:44PM -0500, Andrei Alexandrescu via Digitalmars-d wrote: https://www.quora.com/Why-hasnt-D-started-to-replace-C++ [...] I actually agree with all of his points, except one: C++'s "enormous performance advantage"?! Is he

Re: Quora: Why hasn't D started to replace C++?

2018-01-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 30 January 2018 at 21:49:39 UTC, H. S. Teoh wrote: Meaning, the "enormous performance advantage" is because of "extremely eefficient native code". I don't argue that C++ has extremely efficient native code. But so has D. So the claim that C++ has an "enormous performance

Re: Quora: Why hasn't D started to replace C++?

2018-01-30 Thread H. S. Teoh via Digitalmars-d
On Tue, Jan 30, 2018 at 09:49:46PM +, Ola Fosheim Grøstad via Digitalmars-d wrote: > On Tuesday, 30 January 2018 at 21:43:45 UTC, Daniel Kozak wrote: > > Thats not completly true, last time I tried some of best c++ version > > from http://benchmarksgame.alioth.debian.org/. I was able to write

[Issue 18339] Variant.coerce is unable to convert between types that std.conv.to is able to convert

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18339 hst...@quickfur.ath.cx changed: What|Removed |Added See Also||https://issues.dlang.org/sh

[Issue 12997] Variant's coerce function does not go from enums to their underlying types

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

[Issue 18339] New: Variant.coerce is unable to convert between types that std.conv.to is able to convert

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18339 Issue ID: 18339 Summary: Variant.coerce is unable to convert between types that std.conv.to is able to convert Product: D Version: D2 Hardware: All OS: All

Re: Quora: Why hasn't D started to replace C++?

2018-01-30 Thread Daniel Kozak via Digitalmars-d
Yes, than you are right On Tue, Jan 30, 2018 at 10:49 PM, Ola Fosheim Grøstad via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On Tuesday, 30 January 2018 at 21:43:45 UTC, Daniel Kozak wrote: > >> Thats not completly true, last time I tried some of best c++ version from >>

Re: Quora: Why hasn't D started to replace C++?

2018-01-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 30 January 2018 at 21:43:45 UTC, Daniel Kozak wrote: Thats not completly true, last time I tried some of best c++ version from http://benchmarksgame.alioth.debian.org/. I was able to write much idiomatic D code which was faster than c++ witch use some specific libraries and so on.

Re: Quora: Why hasn't D started to replace C++?

2018-01-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 30 January 2018 at 21:30:06 UTC, H. S. Teoh wrote: On Tue, Jan 30, 2018 at 09:26:30PM +, Ola Fosheim Grøstad via Digitalmars-d wrote: Specific examples, please. What are some examples of these "performance related options"? Supported concurrency options and tuning etc.

Re: Quora: Why hasn't D started to replace C++?

2018-01-30 Thread Daniel Kozak via Digitalmars-d
Thats not completly true, last time I tried some of best c++ version from http://benchmarksgame.alioth.debian.org/. I was able to write much idiomatic D code which was faster than c++ witch use some specific libraries and so on. So my experience is that D is same or faster than C++ On Tue, Jan

Re: Quora: Why hasn't D started to replace C++?

2018-01-30 Thread H. S. Teoh via Digitalmars-d
On Tue, Jan 30, 2018 at 09:26:30PM +, Ola Fosheim Grøstad via Digitalmars-d wrote: > On Tuesday, 30 January 2018 at 21:02:13 UTC, H. S. Teoh wrote: > > On Tue, Jan 30, 2018 at 03:45:44PM -0500, Andrei Alexandrescu via > > Digitalmars-d wrote: > > >

Re: Quora: Why hasn't D started to replace C++?

2018-01-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 30 January 2018 at 21:02:13 UTC, H. S. Teoh wrote: On Tue, Jan 30, 2018 at 03:45:44PM -0500, Andrei Alexandrescu via Digitalmars-d wrote: https://www.quora.com/Why-hasnt-D-started-to-replace-C++ [...] I actually agree with all of his points, except one: C++'s "enormous

[Issue 18338] typeid expression causes typeInfo to be duplicated

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

Re: Quora: Why hasn't D started to replace C++?

2018-01-30 Thread H. S. Teoh via Digitalmars-d
On Tue, Jan 30, 2018 at 03:45:44PM -0500, Andrei Alexandrescu via Digitalmars-d wrote: > https://www.quora.com/Why-hasnt-D-started-to-replace-C++ [...] I actually agree with all of his points, except one: C++'s "enormous performance advantage"?! Is he being serious? Or is his view biased by

Re: What libraries should run.dlang.io support?

2018-01-30 Thread aberba via Digitalmars-d
On Tuesday, 30 January 2018 at 10:03:48 UTC, Seb wrote: On Tuesday, 30 January 2018 at 09:32:02 UTC, aberba wrote: On Sunday, 28 January 2018 at 15:39:41 UTC, Seb wrote: [...] requests library for http etc. I use it the most in addition to vibe.d For obvious reasons networking is disabled

Re: How programmers transition between languages

2018-01-30 Thread aberba via Digitalmars-d
On Tuesday, 30 January 2018 at 20:56:22 UTC, bachmeier wrote: On Tuesday, 30 January 2018 at 08:32:41 UTC, aberba wrote: [...] But who's going to pay? I don't think anyone would object to paying someone to write libraries - it worked well for languages like Java - but I'm not aware of a pot

Re: How programmers transition between languages

2018-01-30 Thread bachmeier via Digitalmars-d
On Tuesday, 30 January 2018 at 08:32:41 UTC, aberba wrote: On Sunday, 28 January 2018 at 00:47:23 UTC, bachmeier wrote: The community will have to do this. They are part of the community. I'm not saying Andrei or Walter should write an http/https2, json, etc. lib. They need to actively help

Re: An idea for commercial support for D

2018-01-30 Thread sclytrack via Digitalmars-d
On Monday, 12 January 2015 at 06:30:20 UTC, Zach the Mystic wrote: Convenience, to me, is one-click downloading from the home page, one click installation, and full IDE support akin to what Apple, Microsoft and any other behemoth has done for their language. The language has nothing to do with

Re: How programmers transition between languages

2018-01-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 30 January 2018 at 19:19:39 UTC, Laeeth Isharc wrote: Every language is based on different principles. The way D will be adopted is via people who are principals giving it a try because it solves their problems. Not sure what you mean by principles, Algol languages (the class of

Quora: Why hasn't D started to replace C++?

2018-01-30 Thread Andrei Alexandrescu via Digitalmars-d
https://www.quora.com/Why-hasnt-D-started-to-replace-C++ Andrei

Re: enforce (i > 0) for i = int.min does not throw

2018-01-30 Thread kdevel via Digitalmars-d-learn
On Sunday, 28 January 2018 at 19:17:49 UTC, Steven Schveighoffer wrote: This is insane. i > 0 is used in so many places. The only saving grace appears to be that int.min is just so uncommonly seen in the wild. And another one that it does not happen when compiled with optimization (-O) and

Re: questions around mutating range algorithms, const, and return ref

2018-01-30 Thread aliak via Digitalmars-d-learn
On Tuesday, 30 January 2018 at 09:51:18 UTC, Ali Çehreli wrote: > [...] is trying to > [...] It's the same with C++: A type with a const member cannot have a compiler-generated assignment operator. Ok, that made it obvious :) 'const' as a member function attribute is meaningful: It makes

Re: LDC 1.7.0

2018-01-30 Thread aberba via Digitalmars-d-announce
On Tuesday, 30 January 2018 at 18:30:56 UTC, Johan Engelen wrote: On Tuesday, 30 January 2018 at 09:38:26 UTC, aberba wrote: On Monday, 29 January 2018 at 07:40:10 UTC, Dominikus Dittes Scherkl wrote: On Saturday, 27 January 2018 at 21:42:49 UTC, aberba wrote: [...] Ubuntu 16.04 This is a

[Issue 18337] https://dlang.org/spec/operatoroverloading.html missing opIn/opIn_r

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

[Issue 18338] typeid expression causes typeInfo to be duplicated

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18338 Benjamin Thaut changed: What|Removed |Added Severity|enhancement |normal --

[Issue 18338] New: typeid expression causes typeInfo to be duplicated

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18338 Issue ID: 18338 Summary: typeid expression causes typeInfo to be duplicated Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: enhancement

Re: Should negating an unsigned integral be an error?

2018-01-30 Thread Michael via Digitalmars-d
On Tuesday, 30 January 2018 at 14:08:41 UTC, bauss wrote: On Tuesday, 30 January 2018 at 11:09:08 UTC, Michael wrote: On Monday, 29 January 2018 at 10:06:41 UTC, Jonathan M Davis wrote: On Monday, January 29, 2018 09:58:00 Dave Jones via Digitalmars-d wrote: Given uint i = 12345; should

Re: An idea for commercial support for D

2018-01-30 Thread Laeeth Isharc via Digitalmars-d
On Sunday, 4 January 2015 at 08:31:23 UTC, Joakim wrote: This is an idea I've been kicking around for a while, and given the need for commercial support for D, would perhaps work well here. [...] By the way, in case you are interested in this path personally still, I'd be willing to pay

Re: How to get a range from std.container.array for use with std.format.sformat?

2018-01-30 Thread Seb via Digitalmars-d-learn
On Tuesday, 30 January 2018 at 18:42:45 UTC, Steven Schveighoffer wrote: On 1/30/18 12:53 PM, cc wrote: import std.container; import std.format; Array!char str; str.length = 256; str.sformat!"%s:%s"("some", "string"); // Error: template std.format.sformat cannot

Re: How programmers transition between languages

2018-01-30 Thread Laeeth Isharc via Digitalmars-d
On Tuesday, 30 January 2018 at 09:20:37 UTC, aberba wrote: On Sunday, 28 January 2018 at 18:54:34 UTC, Laeeth Isharc wrote: On Sunday, 28 January 2018 at 13:50:03 UTC, Michael wrote: I do worry that, having been using D for about 3 1/2 years now, that the perceptions of D outside of this

Re: How to get a range from std.container.array for use with std.format.sformat?

2018-01-30 Thread cc via Digitalmars-d-learn
Still doesn't work without the cast it seems.. auto rng = str[]; rng.sformat!"%s:%s"("some", "string"); // Error: template std.format.sformat cannot deduce function from argument types !("%s:%s")(RangeT!(Array!char), string, string)

Re: How to proceed with learning to code Windows desktop applications?

2018-01-30 Thread I Lindström via Digitalmars-d-learn
On Tuesday, 30 January 2018 at 12:30:36 UTC, rjframe wrote: VS release builds compile to native now by default; for easy Windows programming, you really can't beat C# and drawing the GUI (Windows Forms, not necessarily the new stuff). If the OP wants to learn what's needed for more complex

Re: How to get a range from std.container.array for use with std.format.sformat?

2018-01-30 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/30/18 12:53 PM, cc wrote: import std.container; import std.format; Array!char str; str.length = 256; str.sformat!"%s:%s"("some", "string"); // Error: template std.format.sformat cannot deduce function from argument types !("%s:%s")(Array!char, string,

Re: How to proceed with learning to code Windows desktop applications?

2018-01-30 Thread I Lindström via Digitalmars-d-learn
On Tuesday, 30 January 2018 at 05:56:51 UTC, DanielG wrote: There are far too many options for Windows GUI programming, so we probably need a bit more information about any constraints that are important to you. For example: - do you specifically want something that works well with D? or

Re: LDC 1.7.0

2018-01-30 Thread Johan Engelen via Digitalmars-d-announce
On Tuesday, 30 January 2018 at 09:38:26 UTC, aberba wrote: On Monday, 29 January 2018 at 07:40:10 UTC, Dominikus Dittes Scherkl wrote: On Saturday, 27 January 2018 at 21:42:49 UTC, aberba wrote: [...] Ubuntu 16.04 This is a long-term support distribution. Don't expect those to have actual tip

Re: Bootstrap D template

2018-01-30 Thread Seb via Digitalmars-d-announce
On Tuesday, 30 January 2018 at 17:14:15 UTC, Mengu wrote: On Monday, 29 January 2018 at 11:04:19 UTC, Seb wrote: Have you ever wanted to use D in a project where not everyone had D installed or maybe you wanted to fix the compiler to a specific version? [...] clojure's lein support starter

How to get a range from std.container.array for use with std.format.sformat?

2018-01-30 Thread cc via Digitalmars-d-learn
import std.container; import std.format; Array!char str; str.length = 256; str.sformat!"%s:%s"("some", "string"); // Error: template std.format.sformat cannot deduce function from argument types !("%s:%s")(Array!char, string, string), candidates are:

Re: Best Practice: Alternatives to Void Pointers

2018-01-30 Thread Simen Kjærås via Digitalmars-d-learn
On Tuesday, 30 January 2018 at 17:41:53 UTC, jsako wrote: So what's considered the best alternative to void pointers in D if you don't want to use objects? Make a tagged Union of all possible datatypes in the struct? Have a Byte array and cast that instead of a void pointer? Some sort of magic

Best Practice: Alternatives to Void Pointers

2018-01-30 Thread jsako via Digitalmars-d-learn
The common C way to get a blob of generic data at runtime is to use void pointers like so: struct Structo { int type; void* data; } Then cast the void pointer to whatever data you needed based on the type. I imagine D has a better mechanism for this sort of thing, but after some

Re: How programmers transition between languages

2018-01-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 29 January 2018 at 10:12:04 UTC, Russel Winder wrote: On Mon, 2018-01-29 at 03:22 +, Ola Fosheim Grøstad via Digitalmars- d wrote: […] I guess some go to Rust after working with Go, but the transition matrix linked above suggests that the trend has been that people give up on

Re: How programmers transition between languages

2018-01-30 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 30 January 2018 at 12:35:21 UTC, jmh530 wrote: Sure, but I don't think there are enough D github-repositories to get decent quantitative analysis... Maybe a qualitative analysis. Small sample size problem makes me think of Bayesian analysis...though I suppose there's a bigger

Re: Bootstrap D template

2018-01-30 Thread Mengu via Digitalmars-d-announce
On Monday, 29 January 2018 at 11:04:19 UTC, Seb wrote: Have you ever wanted to use D in a project where not everyone had D installed or maybe you wanted to fix the compiler to a specific version? [...] clojure's lein support starter templates. it'd be great if dub did such a thing too.

Re: How programmers transition between languages

2018-01-30 Thread John Gabriele via Digitalmars-d
On Tuesday, 30 January 2018 at 09:20:37 UTC, aberba wrote: On Sunday, 28 January 2018 at 18:54:34 UTC, Laeeth Isharc wrote: On Sunday, 28 January 2018 at 13:50:03 UTC, Michael wrote: Enterprises care about making money with whatever will help them do that (impress investors). Its developers

Re: rdmd main.d leads to Segmentation fault

2018-01-30 Thread Timoses via Digitalmars-d-learn
On Tuesday, 30 January 2018 at 14:08:35 UTC, Kagamin wrote: On Sunday, 28 January 2018 at 22:02:11 UTC, Timoses wrote: How would I do that? https://forum.dlang.org/post/mailman.39.1510078013.9493.digitalmars-d-...@puremagic.com like this Thanks! I did $ gdb main $ (gdb) set logging on $

Re: DMD as a library package can now run through all semantic phases

2018-01-30 Thread Seb via Digitalmars-d
On Tuesday, 30 January 2018 at 15:56:12 UTC, H. S. Teoh wrote: On Tue, Jan 30, 2018 at 04:31:43AM +, rikki cattermole via Digitalmars-d wrote: [...] D isn't a scripting language, it is native. It will always matter what OS/platform you are compiling to. One could always hook the front end

Re: Discarded return values

2018-01-30 Thread Simen Kjærås via Digitalmars-d-learn
On Tuesday, 30 January 2018 at 14:01:00 UTC, bauss wrote: unittest { auto a = foo(); // This should fail, because a is never used. No it shouldn't. It is assigned to a variable, as the constraint said. // This should also fail, because b is never used actually used

[Issue 18336] Add std.algorithm.findMatchingParen

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18336 Andrei Alexandrescu changed: What|Removed |Added CC||and...@erdani.com

[Issue 16165] Show expected number of function arguments on mismatch

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16165 Nick Treleaven changed: What|Removed |Added Summary|Better error message for|Show expected number of

[Issue 18336] Add std.algorithm.findMatchingParen

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

[Issue 18336] Add std.algorithm.findMatchingParen

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18336 Seb changed: What|Removed |Added Summary|Add |Add

Re: DMD as a library package can now run through all semantic phases

2018-01-30 Thread H. S. Teoh via Digitalmars-d
On Tue, Jan 30, 2018 at 04:31:43AM +, rikki cattermole via Digitalmars-d wrote: [...] > D isn't a scripting language, it is native. It will always matter what > OS/platform you are compiling to. One could always hook the front end to a codegen that emits bytecode instead of native assembly.

Re: Should the "front" range primitive be "const" ?

2018-01-30 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Jan 30, 2018 at 08:54:00AM -0500, Steven Schveighoffer via Digitalmars-d-learn wrote: > On 1/29/18 8:20 PM, Jonathan M Davis wrote: [...] > > If you want to put an attribute on it, inout is better, because then > > it will work with any constness, but in general, I'd suggest just > >

[Issue 18086] BigInt DivMod

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18086 --- Comment #1 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/203499a93f741697889072a158ab9863548d0c41 Merge pull request #5937 from Biotronic/Issue18086 Fix

[Issue 18336] Add std.algorithm.untilClosingParens

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18336 Jack Stouffer changed: What|Removed |Added CC||j...@jackstouffer.com

Re: How to proceed with learning to code Windows desktop applications?

2018-01-30 Thread Andre Pany via Digitalmars-d-learn
On Monday, 29 January 2018 at 22:55:12 UTC, I Lindström wrote: Hello all! I've been doing console apps for about a year and a half now, but my requirements are reaching the limits of easy to use with ASCII-based UI and typed commands so I'm thinking of moving into GUI-era with my projects. I

Re: A few Phobos projects: @safe, dip1000, public examples, properly documented functions, ...

2018-01-30 Thread H. S. Teoh via Digitalmars-d
On Tue, Jan 30, 2018 at 08:08:14AM +, Dukc via Digitalmars-d wrote: > On Monday, 29 January 2018 at 17:51:40 UTC, Seb wrote: > > > - All high-level code should be usable in @safe > > This is not currently possible with functions that take a delegate > parameter, including opApply. (without

[Issue 18328] algorithm.startsWith can compare narrow string lengths in more circumstances

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18328 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/b4ad39a8b62175ae895421ca24877793fa946ae5 Fix Issue 18328 - algorithm.startsWith can compare

[Issue 18328] algorithm.startsWith can compare narrow string lengths in more circumstances

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

[Issue 18329] std.algorithm.startsWith & endsWith can sometimes statically determine decoding unnecessary

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18329 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/361a5c55ccdf32dab48b63844c6fc4d08bc68465 Fix Issue 18329 - std.algorithm.startsWith & endsWith

[Issue 18329] std.algorithm.startsWith & endsWith can sometimes statically determine decoding unnecessary

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

Re: inline @trusted code

2018-01-30 Thread kinke via Digitalmars-d-learn
On Tuesday, 30 January 2018 at 15:05:38 UTC, ikod wrote: Hello, Several times I faced with next problem: I have "@safe" routine with few calls to @system functions inside: OS calls (recv, send, kqueue) os some phobos unsafe functions like assumeUnique. I'd like not to wrap these @system

inline @trusted code

2018-01-30 Thread ikod via Digitalmars-d-learn
Hello, Several times I faced with next problem: I have "@safe" routine with few calls to @system functions inside: OS calls (recv, send, kqueue) os some phobos unsafe functions like assumeUnique. I'd like not to wrap these @system functions in @trusted wrappers, but somehow mark these calls

Re: How to proceed with learning to code Windows desktop applications?

2018-01-30 Thread Kagamin via Digitalmars-d-learn
On Monday, 29 January 2018 at 22:55:12 UTC, I Lindström wrote: I've been Googling a ton these past few days for some kind of a book or a course on how to code desktop applications for Windows, but either there isn't one, or it's very well hidden. "Programming Windows" by Charles Petzold, 5th

[Issue 18336] New: Add std.algorithm.untilClosingParens

2018-01-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18336 Issue ID: 18336 Summary: Add std.algorithm.untilClosingParens Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement

Re: How to proceed with learning to code Windows desktop applications?

2018-01-30 Thread Kagamin via Digitalmars-d-learn
On Tuesday, 30 January 2018 at 05:47:11 UTC, thedeemon wrote: It's like saying "everything you need is assembly language" when talking about languages and compilers. Pure WinAPI is a cruel advice for a novice. He's not a novice: he wrote console applications that pushed through complexity

Re: rdmd main.d leads to Segmentation fault

2018-01-30 Thread Kagamin via Digitalmars-d-learn
On Sunday, 28 January 2018 at 21:41:39 UTC, Timoses wrote: Got it from here: http://d-apt.sourceforge.net/ with $ apt-get install dmd-compiler Sometimes such crashes can be caused by files left from previous installation. Or maybe confusion between gdc and dmd files.

  1   2   >