#dbugfix Issue 1983

2018-02-07 Thread Mike Franklin via Digitalmars-d
https://issues.dlang.org/show_bug.cgi?id=1983 A PR addressing this issue (https://github.com/dlang/dmd/pull/2130), is the oldest PR in the DMD repository. The issue also is almost a decade old. I'd love to see it finally resolved.

Re: what's the point of function template declarations if they can't be defined?

2018-02-07 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, February 07, 2018 13:39:55 Timothee Cour via Digitalmars-d- learn wrote: > ``` > void fun_bad3(T)(T a); // declaration [1] > void fun_bad3(T)(T a){}; // definition [2] > void test(){ > fun_bad3(1); > } > ``` > Error: test_all.fun_bad3 called with argument types (int) matches

Re: free func "front" is not picked up as a candidate when doing range.front(...)

2018-02-07 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, February 07, 2018 20:17:54 aliak via Digitalmars-d-learn wrote: > On Wednesday, 7 February 2018 at 20:08:10 UTC, Paul Backus wrote: > > You can only call a function with UFCS syntax if the object > > you're calling it with does not have a member with the same > > name as the

[Issue 17778] Creating a static array with duplicates in betterC causes "undefined reference to _memset32" linker failure

2018-02-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17778 Mike Parker changed: What|Removed |Added CC||aldac...@gmail.com ---

Re: missing HexString documentation

2018-02-07 Thread Walter Bright via Digitalmars-d
On 2/7/2018 9:45 PM, Ralph Doncaster wrote: > While the fix is a huge improvement, it doesn't match the code generated by the hex literals. hexString!"deadbeef" stores the null-terminated string in the data section of the object file, while x"deadbeef" only stores 4 bytes in the data section.

Re: missing HexString documentation

2018-02-07 Thread Ralph Doncaster via Digitalmars-d
On Thursday, 8 February 2018 at 01:53:43 UTC, Walter Bright wrote: On 2/7/2018 11:29 AM, Ralph Doncaster wrote: I just did a quick check, and with DMD v2.078.1, the hexString template increases code size by ~300 bytes vs the hex literal. So yet one more reason to prefer the hex literals.

Re: missing HexString documentation

2018-02-07 Thread Ralph Doncaster via Digitalmars-d
On Thursday, 8 February 2018 at 01:27:46 UTC, Seb wrote: On Thursday, 8 February 2018 at 00:55:28 UTC, Seb wrote: On Wednesday, 7 February 2018 at 15:41:37 UTC, Seb wrote: On Wednesday, 7 February 2018 at 15:25:05 UTC, Steven Schveighoffer wrote: [...] They are deprecated:

Re: #dbugfix Issue 16189

2018-02-07 Thread Kirr via Digitalmars-d
On Wednesday, 7 February 2018 at 18:46:50 UTC, ketmar wrote: ... Great brainstorming, guys! Hopefuly the gained understanding will lead to eventual fix.

Re: missing HexString documentation

2018-02-07 Thread Ralph Doncaster via Digitalmars-d
On Thursday, 8 February 2018 at 00:24:22 UTC, Walter Bright wrote: On 2/7/2018 8:03 AM, Ralph Doncaster wrote: As expected, auto data = cast(ubyte[]) x"deadbeef"; works with -betterC, but auto data = cast(ubyte[]) hexString!"deadbeef"; does not. When I tried it: import std.conv; void

deprecation warning after upgrade

2018-02-07 Thread Norm via Digitalmars-d-learn
Hi All, In my generic code I now get this error, which requires manually finding all -a[] array ops, but that is another matter. $/src/druntime/import/core/internal/arrayop.d-mixin-57(57,20): Deprecation: integral promotion not done for -_param_1[pos], use '-transition=intpromote' switch or

Re: missing HexString documentation

2018-02-07 Thread Walter Bright via Digitalmars-d
On 2/7/2018 6:39 PM, Adam D. Ruppe wrote: On Thursday, 8 February 2018 at 01:55:19 UTC, Walter Bright wrote: No, because their usage by druntime is nearly nonexistent. Only because they're not supported! Code like `0xsomething // octal something else` is found a whopping 200 times in

Re: Performance of default and enum parameters

2018-02-07 Thread jmh530 via Digitalmars-d-learn
On Wednesday, 7 February 2018 at 23:18:53 UTC, H. S. Teoh wrote: [snip] Appreciate the detailed reply. I had tried to look at the assembly with that tool recently discussed in the announce thread, but there was so much extra stuff reported that I threw up my hands.

Re: Bye bye, fast compilation times

2018-02-07 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
Yes. This has been a personal annoyance for many years. Even tried arguing some time back to get it fixed to no avail. Really hoping for better success this time. On 02/06/2018 08:47 PM, jmh530 wrote: Would it help to take the approach of mir, i.e. putting version(mir_test) before all the

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

2018-02-07 Thread Laeeth Isharc via Digitalmars-d
On Thursday, 8 February 2018 at 00:09:47 UTC, Ali wrote: On Tuesday, 30 January 2018 at 20:45:44 UTC, Andrei Alexandrescu wrote: https://www.quora.com/Why-hasnt-D-started-to-replace-C++ Andrei my modest opinion about this D currently is a small player, that have an attractive proposition

Re: option -ignore_pure for temporary debugging (or how to wrap an unpure function inside a pure one)?

2018-02-07 Thread Seb via Digitalmars-d
On Thursday, 8 February 2018 at 03:29:54 UTC, Timothee Cour wrote: while hacking into druntime and adding temporary debug information (eg with custom logging etc) I had a hard time making things compile because lots of functions are pure nothrow safe, resulting in compile errors when my custom

Re: option -ignore_pure for temporary debugging (or how to wrap an unpure function inside a pure one)?

2018-02-07 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 8 February 2018 at 03:29:54 UTC, Timothee Cour wrote: How about adding flags ` -ignore_pure` (and perhaps -ignore_safe -ignore_nothrow) to allow code to compile ignoring safe, pure, nothrow mismatches? We already have that for pure. Just write `debug your_function` and it will

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

2018-02-07 Thread Laeeth Isharc via Digitalmars-d
On Wednesday, 7 February 2018 at 21:02:11 UTC, data pulverizer wrote: On Tuesday, 30 January 2018 at 20:45:44 UTC, Andrei Alexandrescu wrote: https://www.quora.com/Why-hasnt-D-started-to-replace-C++ Andrei The Betamax Problem When you introduce something new, how do you know that it is

Re: missing HexString documentation

2018-02-07 Thread Walter Bright via Digitalmars-d
On 2/7/2018 6:39 PM, H. S. Teoh wrote: and hope to make a PR forit shortly. https://issues.dlang.org/show_bug.cgi?id=18397 The bug report didn't explain what exactly in the implementation wasn't done right. :-/ The PR does. https://github.com/dlang/phobos/pull/6138 Another data

Re: option -ignore_pure for temporary debugging (or how to wrap an unpure function inside a pure one)?

2018-02-07 Thread Timothee Cour via Digitalmars-d
same question with how to wrap a gc function inside a nogc shell, if not, allowing a flag -ignore_nogc that'd enable this (again, for debugging purposes) On Wed, Feb 7, 2018 at 7:29 PM, Timothee Cour wrote: > while hacking into druntime and adding temporary debug

option -ignore_pure for temporary debugging (or how to wrap an unpure function inside a pure one)?

2018-02-07 Thread Timothee Cour via Digitalmars-d
while hacking into druntime and adding temporary debug information (eg with custom logging etc) I had a hard time making things compile because lots of functions are pure nothrow safe, resulting in compile errors when my custom debugging functions are not pure nothrow safe. How about adding

[Issue 18397] Poor implementation of std.conf.hexString results in unintended bloat

2018-02-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18397 --- Comment #2 from Walter Bright --- https://github.com/dlang/phobos/pull/6138 --

Re: Annoyance with new integer promotion deprecations

2018-02-07 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 02/06/2018 05:38 PM, Luís Marques wrote: Yeah, it's annoying. For my MSP430 work (16-bit, lots of shorts and bytes) I created a generic type which works around this, so you would do: byte c = a.nx + b; where .nx means "non-extending" and converts/wraps the (u)byte/(u)short in my special

Re: Official Dub package for DWT

2018-02-07 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-announce
Very cool, will have to give it a try. I'm very interested in cross platform native-UI GUI libs for D.

Re: missing HexString documentation

2018-02-07 Thread H. S. Teoh via Digitalmars-d
On Wed, Feb 07, 2018 at 05:53:43PM -0800, Walter Bright via Digitalmars-d wrote: > On 2/7/2018 11:29 AM, Ralph Doncaster wrote: > > I just did a quick check, and with DMD v2.078.1, the hexString > > template increases code size by ~300 bytes vs the hex literal. So > > yet one more reason to prefer

[Issue 18397] Poor implementation of std.conf.hexString results in unintended bloat

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

Re: missing HexString documentation

2018-02-07 Thread H. S. Teoh via Digitalmars-d
On Thu, Feb 08, 2018 at 02:39:50AM +, Adam D. Ruppe via Digitalmars-d wrote: > On Thursday, 8 February 2018 at 01:55:19 UTC, Walter Bright wrote: > > No, because their usage by druntime is nearly nonexistent. > > Only because they're not supported! > > Code like `0xsomething // octal

[Issue 18395] std.conv.hexString can't be used in BetterC

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

[Issue 18397] Poor implementation of std.conf.hexString results in unintended bloat

2018-02-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18397 Seb changed: What|Removed |Added CC||greensunn...@gmail.com ---

Re: missing HexString documentation

2018-02-07 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 8 February 2018 at 01:55:19 UTC, Walter Bright wrote: No, because their usage by druntime is nearly nonexistent. Only because they're not supported! Code like `0xsomething // octal something else` is found a whopping 200 times in druntime (granted btw all in the core.sys

Re: Bye bye, fast compilation times

2018-02-07 Thread Walter Bright via Digitalmars-d
On 2/7/2018 1:07 PM, Nathan S. wrote: On Tuesday, 6 February 2018 at 22:29:07 UTC, Walter Bright wrote: nobody uses regex for lexer in a compiler. Some years ago I was surprised when I saw this in Clojure's source code. It appears to still be there today:

Re: missing HexString documentation

2018-02-07 Thread Walter Bright via Digitalmars-d
On 2/7/2018 4:25 PM, H. S. Teoh wrote: Should templates like octal and hexString be in druntime instead? No, because their usage by druntime is nearly nonexistent.

Re: missing HexString documentation

2018-02-07 Thread Walter Bright via Digitalmars-d
On 2/7/2018 5:03 PM, Seb wrote: On Thursday, 8 February 2018 at 00:24:22 UTC, Walter Bright wrote: On 2/7/2018 8:03 AM, Ralph Doncaster wrote: As expected, auto data = cast(ubyte[]) x"deadbeef"; works with -betterC, but auto data = cast(ubyte[]) hexString!"deadbeef"; does not. When I tried

Re: missing HexString documentation

2018-02-07 Thread Walter Bright via Digitalmars-d
On 2/7/2018 11:29 AM, Ralph Doncaster wrote: I just did a quick check, and with DMD v2.078.1, the hexString template increases code size by ~300 bytes vs the hex literal. So yet one more reason to prefer the hex literals. Indeed it does, and that is the result of a poor implementation of

[Issue 18397] New: Poor implementation of std.conf.hexString results in unintended bloat

2018-02-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18397 Issue ID: 18397 Summary: Poor implementation of std.conf.hexString results in unintended bloat Product: D Version: D2 Hardware: All OS: All Status:

Re: missing HexString documentation

2018-02-07 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 8 February 2018 at 00:24:22 UTC, Walter Bright wrote: dmd -c -betterC test2.d Don't use -c with -betterC when doing tests. The majority of troubles we have are likely to be linker errors (undefined references to missing runtime) and that silences them.

Re: missing HexString documentation

2018-02-07 Thread Seb via Digitalmars-d
On Thursday, 8 February 2018 at 00:55:28 UTC, Seb wrote: On Wednesday, 7 February 2018 at 15:41:37 UTC, Seb wrote: On Wednesday, 7 February 2018 at 15:25:05 UTC, Steven Schveighoffer wrote: [...] They are deprecated: https://dlang.org/changelog/pending.html#hexstrings

Re: Official Dub package for DWT

2018-02-07 Thread Mike Franklin via Digitalmars-d-announce
On Wednesday, 7 February 2018 at 21:33:22 UTC, Jacob Carlborg wrote: This has been long overdue but I would like to announce that I've just released an official Dub package for the DWT library http://code.dlang.org/packages/dwt This is great! Nice work, and thank you! Mike

[Issue 18396] New: backtraces should demangle c++ symbols (eg via c++filt or __cxa_demangle)

2018-02-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18396 Issue ID: 18396 Summary: backtraces should demangle c++ symbols (eg via c++filt or __cxa_demangle) Product: D Version: D2 Hardware: x86 OS: Mac OS X

Re: missing HexString documentation

2018-02-07 Thread Mike Franklin via Digitalmars-d
On Thursday, 8 February 2018 at 00:25:21 UTC, H. S. Teoh wrote: hexString is in Phobos, and druntime can't use Phobos. Should templates like octal and hexString be in druntime instead? IMO, no. I think the interdependencies between the compiler, druntime, phobos, and even the packages

Re: missing HexString documentation

2018-02-07 Thread Mike Franklin via Digitalmars-d
On Wednesday, 7 February 2018 at 16:03:36 UTC, Steven Schveighoffer wrote: They are deprecated: https://dlang.org/changelog/pending.html#hexstrings https://dlang.org/deprecate.html#Hexstring%20literals Wow, that's... a little superfluous. I agree with the notion that the language should be

Re: missing HexString documentation

2018-02-07 Thread Seb via Digitalmars-d
On Thursday, 8 February 2018 at 00:24:22 UTC, Walter Bright wrote: On 2/7/2018 8:03 AM, Ralph Doncaster wrote: As expected, auto data = cast(ubyte[]) x"deadbeef"; works with -betterC, but auto data = cast(ubyte[]) hexString!"deadbeef"; does not. When I tried it: import std.conv; void

[Issue 18395] New: std.conv.hexString can't be used in BetterC

2018-02-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18395 Issue ID: 18395 Summary: std.conv.hexString can't be used in BetterC Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: betterC

Re: missing HexString documentation

2018-02-07 Thread Seb via Digitalmars-d
On Wednesday, 7 February 2018 at 15:41:37 UTC, Seb wrote: On Wednesday, 7 February 2018 at 15:25:05 UTC, Steven Schveighoffer wrote: On 2/7/18 9:59 AM, Ralph Doncaster wrote: [...] Good catch! Even the grammar says nothing about what it is, except it has HexString as a possible literal.

Re: missing HexString documentation

2018-02-07 Thread Walter Bright via Digitalmars-d
On 2/7/2018 4:08 PM, Mike Franklin wrote: Don't search for "[betterC]".  Instead, use "betterC" (without the brackets). https://issues.dlang.org/buglist.cgi?quicksearch=betterc_id=219390 We can't reliably rely on informal conventions. I used the wrong URL. This is the right one (a keyword

[Issue 18273] Better C: wrong exit code from main()

2018-02-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18273 Walter Bright changed: What|Removed |Added Keywords||betterC

[Issue 18101] allow Tuple for BetterC

2018-02-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18101 Walter Bright changed: What|Removed |Added Keywords||betterC

Re: missing HexString documentation

2018-02-07 Thread H. S. Teoh via Digitalmars-d
On Wed, Feb 07, 2018 at 04:11:19PM -0800, Walter Bright via Digitalmars-d wrote: > On 2/7/2018 12:13 PM, Adam D. Ruppe wrote: > > even that minor hassle has hurt the use in practice, like in the > > druntime examples. > > hexString is in Phobos, and druntime can't use Phobos. Should templates

[Issue 18393] REG(v2.078.1=>master) function re-declarations causes conflict, but should not

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

[Issue 18393] REG(v2.078.1=>master) function re-declarations causes conflict, but should not

2018-02-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18393 --- Comment #5 from Timothee Cour --- probably related to this PR: https://github.com/dlang/dmd/pull/7577/files#diff-3084a264389e086215b36670ae9f4a3dR392 snippet: /* Allow the hack that is actually used in druntime, +

Re: missing HexString documentation

2018-02-07 Thread Walter Bright via Digitalmars-d
On 2/7/2018 8:03 AM, Ralph Doncaster wrote: As expected, auto data = cast(ubyte[]) x"deadbeef"; works with -betterC, but auto data = cast(ubyte[]) hexString!"deadbeef"; does not. When I tried it: import std.conv; void test() { auto data = cast(ubyte[]) hexString!"deadbeef"; }

Re: missing HexString documentation

2018-02-07 Thread Walter Bright via Digitalmars-d
On 2/7/2018 12:13 PM, Adam D. Ruppe wrote: even that minor hassle has hurt the use in practice, like in the druntime examples. hexString is in Phobos, and druntime can't use Phobos.

Re: missing HexString documentation

2018-02-07 Thread Mike Franklin via Digitalmars-d
On Wednesday, 7 February 2018 at 23:30:57 UTC, Walter Bright wrote: Can you please provide a list of these issues, and file issues that aren't on bugzilla yet, and tag them with the betterC keyword? I see only one: https://issues.dlang.org/buglist.cgi?quicksearch=%5Bbetterc%5D_id=219382

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

2018-02-07 Thread Ali via Digitalmars-d
On Tuesday, 30 January 2018 at 20:45:44 UTC, Andrei Alexandrescu wrote: https://www.quora.com/Why-hasnt-D-started-to-replace-C++ Andrei my modest opinion about this D currently is a small player, that have an attractive proposition for some * it is like C++ (that is close to the power of

[Issue 2789] Functions overloads are not checked for conflicts

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

[Issue 2703] Duplicate constructors and methods

2018-02-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2703 Issue 2703 depends on issue 2789, which changed state. Issue 2789 Summary: Functions overloads are not checked for conflicts https://issues.dlang.org/show_bug.cgi?id=2789 What|Removed |Added

[Issue 14147] Compiler crash on identical functions in a single module

2018-02-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14147 Issue 14147 depends on issue 2789, which changed state. Issue 2789 Summary: Functions overloads are not checked for conflicts https://issues.dlang.org/show_bug.cgi?id=2789 What|Removed |Added

[Issue 18393] REG(v2.078.1=>master) function re-declarations causes conflict, but should not

2018-02-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18393 --- Comment #4 from Timothee Cour --- I'm confused: https://github.com/dlang/dmd/pull/7577/files says: Issue 14147 - Compiler crash on identical functions in a single module the bugs this fixes are cases of multiply

Re: missing HexString documentation

2018-02-07 Thread Walter Bright via Digitalmars-d
On 2/7/2018 8:05 AM, Adam D. Ruppe wrote: That's just because -betterC is buggy and extremely incomplete Can you please provide a list of these issues, and file issues that aren't on bugzilla yet, and tag them with the betterC keyword? I see only one:

Re: Performance of default and enum parameters

2018-02-07 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Feb 07, 2018 at 11:04:29PM +, jmh530 via Digitalmars-d-learn wrote: [...] > If check is not passed, I think it depends on how default function > arguments work. I could imagine that it works in two ways: 1) if you > call bar(x), then the compiler effectively re-writes it to bar(x, >

Re: parallel copy directory, faster than robocopy

2018-02-07 Thread rumbu via Digitalmars-d-announce
On Tuesday, 6 March 2012 at 00:29:01 UTC, Jay Norwood wrote: H:\xx8>robocopy /E /NDL /NFL /NC /NS /MT:8 xx8c xx8ca For a fair comparison, I think that's the command line: robocopy /E /NDL /NFL /NC /NS /MT:8 /COPY:D /NODCOPY /XJ /R:0 /W:0 /NP /NJH /NJS /256 xx8c xx8ca

Re: Official Dub package for DWT

2018-02-07 Thread lobo via Digitalmars-d-announce
On Wednesday, 7 February 2018 at 21:33:22 UTC, Jacob Carlborg wrote: This has been long overdue but I would like to announce that I've just released an official Dub package for the DWT library [1]. For a usage example, please see the GitHub page [2]. For those not familiar with DWT, it's a

[Issue 18393] REG(v2.078.1=>master) function re-declarations causes conflict, but should not

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

Performance of default and enum parameters

2018-02-07 Thread jmh530 via Digitalmars-d-learn
I'm a little curious on the impact of default and enum parameters on performance. In the simple example below, I have foo and bar that return different results depending on a bool. Foo is a template with check as a template parameter and bar is a normal function. foo creates two different

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

2018-02-07 Thread John Gabriele via Digitalmars-d
On Wednesday, 7 February 2018 at 21:02:11 UTC, data pulverizer wrote: On Tuesday, 30 January 2018 at 20:45:44 UTC, Andrei Alexandrescu wrote: https://www.quora.com/Why-hasnt-D-started-to-replace-C++ Andrei The Betamax Problem I don't think the analogy holds. With VHS and betamax, you just

Re: My LDC talk this weekend @ FOSDEM'18

2018-02-07 Thread Kai Nacke via Digitalmars-d-announce
On Friday, 2 February 2018 at 19:37:42 UTC, Kai Nacke wrote: Hi everybody! I am still around and try to get more active. Like last year, I am going to FOSDEM this weekend. I am a speaker in the LLVM toolchain devroom @ FOSDEM'18. My talk is about DCompute which I consider to be an awesome

Re: Bye bye, fast compilation times

2018-02-07 Thread Bastiaan Veelo via Digitalmars-d
On Wednesday, 7 February 2018 at 09:27:47 UTC, Stefan Koch wrote: Another Thing that can be done is reviewing the code and alerting me to potential problems. i.e. Missing or indecipherable comments as well as spelling mistakes. (with the correction please (just telling me something is wrong,

Deep

2018-02-07 Thread Ancient Broken Wind via Digitalmars-d-learn
Hi. I have been using D for more than 15 years now. But since I haven't done anything Note Worthy, I'll just post here in the newbie pen, even though I think my message is important. I just watched an episode of Computerphile about Type Theory. I wish, that Andrei would take a look at it.

Re: Shouldn't D be added to this list?

2018-02-07 Thread Bastiaan Veelo via Digitalmars-d-learn
On Tuesday, 6 February 2018 at 22:36:09 UTC, WhatMeWorry wrote: https://www.khronos.org/opengl/wiki/Language_bindings I was thinking that with derelictGL, D should be on this list? If so, I'm not sure how one would go about this? It is a wiki, anybody can add it, me thinks.

what's the point of function template declarations if they can't be defined?

2018-02-07 Thread Timothee Cour via Digitalmars-d-learn
``` void fun_bad3(T)(T a); // declaration [1] void fun_bad3(T)(T a){}; // definition [2] void test(){ fun_bad3(1); } ``` Error: test_all.fun_bad3 called with argument types (int) matches both: main.d(11): test_all.fun_bad3!int.fun_bad3(int a) and: main.d(12):

Re: Status status = __traits(compilesReportError, {string b=10; }) => status.msg=Error: cannot....

2018-02-07 Thread Timothee Cour via Digitalmars-d
understood, but that's responsibility of tester to make sure they're not too flaky (eg using msg.canFind("FOO") (or, if regex weren't slow, regex) On Wed, Feb 7, 2018 at 1:13 PM, Nicholas Wilson via Digitalmars-d wrote: > On Wednesday, 7 February 2018 at 20:29:44

Official Dub package for DWT

2018-02-07 Thread Jacob Carlborg via Digitalmars-d-announce
This has been long overdue but I would like to announce that I've just released an official Dub package for the DWT library [1]. For a usage example, please see the GitHub page [2]. For those not familiar with DWT, it's a library for creating cross-platform GUI applications. It's uses the

[Issue 18393] REG(v2.078.1=>master) function re-declarations causes conflict, but should not

2018-02-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18393 --- Comment #2 from Timothee Cour --- on a vaguely related note: ``` void fun_bad3(T)(T a); void fun_bad3(T)(T a){} void test(){ fun_bad3(1); } ``` Error: test_all.fun_bad3 called with argument types (int) matches

Re: Vanquish Forever These Bugs That Blasted Your Kingdom

2018-02-07 Thread Walter Bright via Digitalmars-d-announce
On 2/7/2018 12:30 PM, Dmitry Olshansky wrote: While an enjoable read, I fear we are aiming too low. I wished to show that array bounds overflow checking is not a tractable problem in C, i.e. you cannot make it go away by being a better programmer, and how BetterC solves this problem.

Re: Status status = __traits(compilesReportError, {string b=10; }) => status.msg=Error: cannot....

2018-02-07 Thread Nicholas Wilson via Digitalmars-d
On Wednesday, 7 February 2018 at 20:29:44 UTC, Timothee Cour wrote: is there any way to get error from speculative execution (`__traits( compiles, ...)`)? would be useful in tests; If not currently how hard would that be to implement? eg: ``` struct Status{bool ok; string msg;} Status

Re: Bye bye, fast compilation times

2018-02-07 Thread Nathan S. via Digitalmars-d
On Tuesday, 6 February 2018 at 22:29:07 UTC, Walter Bright wrote: nobody uses regex for lexer in a compiler. Some years ago I was surprised when I saw this in Clojure's source code. It appears to still be there today:

[Issue 18381] std.random.uniform01!(double,Mt19937) should produce at least 2^^53 distinct values

2018-02-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18381 --- Comment #2 from Nathan S. --- See the comments at pull request #6128 for why this could be a breaking change for existing projects. --

Re: Vanquish Forever These Bugs That Blasted Your Kingdom

2018-02-07 Thread H. S. Teoh via Digitalmars-d-announce
On Wed, Feb 07, 2018 at 08:30:54PM +, Dmitry Olshansky via Digitalmars-d-announce wrote: > On Wednesday, 7 February 2018 at 13:29:04 UTC, Mike Parker wrote: > > Walter's got a new post up! It's the first in a new series on the > > benefits of BetterC mode. In this one, he talks about solving

[Issue 18394] New: wrong `dmd --version` when building from git master: shows last tag instead of new one

2018-02-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18394 Issue ID: 18394 Summary: wrong `dmd --version` when building from git master: shows last tag instead of new one Product: D Version: D2 Hardware: x86 OS: Mac OS X

[Issue 18394] wrong `dmd --version` when building from git master: shows last tag instead of new one

2018-02-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18394 Timothee Cour changed: What|Removed |Added CC|

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

2018-02-07 Thread data pulverizer via Digitalmars-d
On Tuesday, 30 January 2018 at 20:45:44 UTC, Andrei Alexandrescu wrote: https://www.quora.com/Why-hasnt-D-started-to-replace-C++ Andrei The Betamax Problem When you introduce something new, how do you know that it is going to be compelling enough for people to move from whatever it is they

[Issue 18393] REG(v2.078.1=>master) function re-declarations causes conflict, but should not

2018-02-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18393 Timothee Cour changed: What|Removed |Added CC|

[Issue 18393] New: REG(v2.078.1=>master) function re-declarations causes conflict, but should not

2018-02-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18393 Issue ID: 18393 Summary: REG(v2.078.1=>master) function re-declarations causes conflict, but should not Product: D Version: D2 Hardware: x86 OS: Mac OS X

Re: Vanquish Forever These Bugs That Blasted Your Kingdom

2018-02-07 Thread Dmitry Olshansky via Digitalmars-d-announce
On Wednesday, 7 February 2018 at 13:29:04 UTC, Mike Parker wrote: Walter's got a new post up! It's the first in a new series on the benefits of BetterC mode. In this one, he talks about solving the fencepost problem (off-by-one errors) with D's arrays. While an enjoable read, I fear we are

Status status = __traits(compilesReportError, {string b=10;}) => status.msg=Error: cannot....

2018-02-07 Thread Timothee Cour via Digitalmars-d
is there any way to get error from speculative execution (`__traits( compiles, ...)`)? would be useful in tests; If not currently how hard would that be to implement? eg: ``` struct Status{bool ok; string msg;} Status status = __traits(compilesReportError, {string b=10;}) assert(!status.ok);

Re: Vibe.d rest & web service?

2018-02-07 Thread Nicholas Wilson via Digitalmars-d-learn
On Wednesday, 7 February 2018 at 19:50:31 UTC, Jacob Carlborg wrote: Have you tried this? No. But apart from the fact that I forgot to make the class inherit from an interface to that the rest interface would actually compile, the web interface is routed before the rest interface and so the

Re: missing HexString documentation

2018-02-07 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 7 February 2018 at 18:59:38 UTC, Steven Schveighoffer wrote: Not even close. Octal literals are a disaster, because putting a leading 0 should never change the base of a number. I agree the leading 0 is terrible. But that's not the real question here: it is 0o100 vs import

Re: Run-time initialised static variables

2018-02-07 Thread dekevin via Digitalmars-d-learn
On Wednesday, 7 February 2018 at 20:10:10 UTC, dekevin wrote: On Wednesday, 7 February 2018 at 16:26:16 UTC, Dominikus Dittes Scherkl wrote: On Wednesday, 7 February 2018 at 12:10:38 UTC, dekevin wrote: struct ℚ{ ℤ num, den; //cannot call constructors on these, since they require

Re: missing HexString documentation

2018-02-07 Thread H. S. Teoh via Digitalmars-d
On Wed, Feb 07, 2018 at 07:29:10PM +, Ralph Doncaster via Digitalmars-d wrote: [...] > I just did a quick check, and with DMD v2.078.1, the hexString > template increases code size by ~300 bytes vs the hex literal. So yet > one more reason to prefer the hex literals. Arguably, this is a QoI

Re: missing HexString documentation

2018-02-07 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 7 February 2018 at 19:38:35 UTC, Ali Çehreli wrote: It sounds so natural. I forgot; what was the argument against it? 0o was denied basically just because we felt it wasn't necessary to have in the language at all; that it was rare enough and the library *can* do it, so the

Re: free func "front" is not picked up as a candidate when doing range.front(...)

2018-02-07 Thread aliak via Digitalmars-d-learn
On Wednesday, 7 February 2018 at 20:08:10 UTC, Paul Backus wrote: You can only call a function with UFCS syntax if the object you're calling it with does not have a member with the same name as the function. Both iota's `Result` type and `FilterResult` have properties named "front", so you

Re: missing HexString documentation

2018-02-07 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 7 February 2018 at 17:36:56 UTC, Seb wrote: Octal predates GitHub, hexString is new: Yes, I know, I was there :) Heck, in the hexString forum thread, I argued that people knowing this pattern is really useful because then they can do all kinds of custom literals like stripping

Re: Run-time initialised static variables

2018-02-07 Thread dekevin via Digitalmars-d-learn
On Wednesday, 7 February 2018 at 16:26:16 UTC, Dominikus Dittes Scherkl wrote: On Wednesday, 7 February 2018 at 12:10:38 UTC, dekevin wrote: struct ℚ{ ℤ num, den; //cannot call constructors on these, since they require gmp_init, which requires runtime code //Default initialiser

Re: free func "front" is not picked up as a candidate when doing range.front(...)

2018-02-07 Thread Paul Backus via Digitalmars-d-learn
On Wednesday, 7 February 2018 at 19:25:01 UTC, aliak wrote: import std.range: iota; 0.iota.front(100).writeln; // Error: inout method std.range.iota!(int, int).iota.Result.front is not callable using a mutable object import std.algorithm: filter; auto arr = [0, 1];

[Issue 18349] std/math.d(543,33): Deprecation: integral promotion not done for -x

2018-02-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18349 --- Comment #5 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/a2ab91ad483a18c277490fe2a6d725054ad39584 fix issue 18349 - std/math.d(543,33): Deprecation:

Re: macOS preview D files

2018-02-07 Thread Jacob Carlborg via Digitalmars-d-learn
On 2018-02-07 20:28, Joel wrote: On Wednesday, 7 February 2018 at 12:45:43 UTC, Jacob Carlborg wrote: On 2018-02-07 02:24, Joel wrote: Using finder, I want to see D files shown in the preview column, I some times have with TextMate. Also on my iPhone (in iCloud app, open as a text file) would

Re: Vibe.d rest & web service?

2018-02-07 Thread Jacob Carlborg via Digitalmars-d-learn
On 2018-02-07 18:04, Nicholas Wilson wrote: Is it possible to have some urls routed to serve content and some to receive JSON in the same class? Basically I want: shared static this() { auto router = new URLRouter; auto a = new MyInterface; router.registerWebInterface(new

[Issue 18392] New: formum threads not searchable if starting with "Re: " (ie replies that were split off)

2018-02-07 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18392 Issue ID: 18392 Summary: formum threads not searchable if starting with "Re: " (ie replies that were split off) Product: D Version: D2 Hardware: x86 OS: Mac OS X

dmd -unittest=+foo.bar,+std,-std.stdio args... to specify unittests in select pkg/mod

2018-02-07 Thread Timothee Cour via Digitalmars-d
how about using same syntax (and reusing logic) as newly introduced` -i=+foo.bar,+baz-baz.bad`: `dmd -unittest=+foo.bar,+baz,-baz.bad rest_of_arguments` which would only enable unittests as specified? It's flexible and intuitive, and would solve a common woe with unittests (eg

Re: Vanquish Forever These Bugs That Blasted Your Kingdom

2018-02-07 Thread Dmitry Olshansky via Digitalmars-d-announce
On Wednesday, 7 February 2018 at 13:29:04 UTC, Mike Parker wrote: Walter's got a new post up! It's the first in a new series on the benefits of BetterC mode. In this one, he talks about solving the fencepost problem (off-by-one errors) with D's arrays. Blog:

Re: missing HexString documentation

2018-02-07 Thread Ali Çehreli via Digitalmars-d
On 02/07/2018 09:01 AM, Adam D. Ruppe wrote: > But for octal? It was a mistake. We should have just made it 0o. It sounds so natural. I forgot; what was the argument against it? Ali

  1   2   >