byLine(n)?

2017-06-10 Thread helxi via Digitalmars-d-learn
I was writing a program that reads and prints the first nth lines to the stdout: import std.stdio; void main(string[] args) { import std.algorithm, std.range; import std.conv; stdin.byLine.take(args[1].to!ulong).each!writeln; } As far as I understand the

[Issue 14246] RAII - proper destruction of partially constructed objects/structs

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14246 --- Comment #8 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/1e755c648e5142719d50dcf984f10ace5b8f8357 fix Issue 14246 - RAII - proper destruction of partially

Re: Isn't it about time for D3?

2017-06-10 Thread ketmar via Digitalmars-d
Liam McGillivray wrote: On Sunday, 11 June 2017 at 00:27:06 UTC, ketmar wrote: ..and it actually should be D1.5, not D3. ;-) 'cause D3 implies even more features, and i feel that the way to get The Perfect D (sorry! ;-) is trying to cut all the features that aren't strictly necessary

Re: Isn't it about time for D3?

2017-06-10 Thread Vladimir Panteleev via Digitalmars-d
On Sunday, 11 June 2017 at 05:03:10 UTC, Suliman wrote: There is already something like D3 exists. https://github.com/VoltLang https://github.com/VoltLang/Watt/blob/97507a202250af96560317f84c29cb2248ae588b/src/watt/algorithm.volt#L37-L91 I don't think so.

workaround for `The module 'foo.bar' is already defined` when recompiling objects?

2017-06-10 Thread Timothee Cour via Digitalmars-d
``` dmd -shared -oflibfoo.so a1.d a2.d dmd -ofmain -L-lfoo a2.d main.d ./main ``` gives runtime error: `The module 'foo.bar' is already defined in 'main'` How would I work around this error? Use case: allow partial recompilation of a binary without rebuilding everything to optimize compile time

Re: The DLang Tour translated into Russian

2017-06-10 Thread Eugene Wissner via Digitalmars-d-announce
On Sunday, 11 June 2017 at 04:50:55 UTC, Dmitry wrote: On Saturday, 10 June 2017 at 17:50:52 UTC, Eugene Wissner wrote: Может быть: "В стандартной поставке D есть компилятор dmd, инструмент для запуска D программ "на лету", rdmd, и пакетный менеджер dub. ? Лично мне "на лету" не говорит

[Issue 17489] ICE in ddmd/argtypes.d

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17489 --- Comment #2 from greensunn...@gmail.com --- It seems that argtypemerge has troubles when confronted with an error: /home/seb/dlang/dmd/generated/linux/debug/64/../../../../../phobos/std/traits.d(1046,60): Error: parameter index must be in range

Re: Isn't it about time for D3?

2017-06-10 Thread Suliman via Digitalmars-d
There is already something like D3 exists. https://github.com/VoltLang

Re: The DLang Tour translated into Russian

2017-06-10 Thread Dmitry via Digitalmars-d-announce
On Saturday, 10 June 2017 at 17:50:52 UTC, Eugene Wissner wrote: Может быть: "В стандартной поставке D есть компилятор dmd, инструмент для запуска D программ "на лету", rdmd, и пакетный менеджер dub. ? Лично мне "на лету" не говорит ничего, только куча вопросов появляется. P.S. Точку

[Issue 17489] ICE in ddmd/argtypes.d

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17489 --- Comment #1 from greensunn...@gmail.com --- It seems that argtypemerge has troubles when confronted with an error: /home/seb/dlang/dmd/generated/linux/debug/64/../../../../../phobos/std/traits.d(1046,60): Error: parameter index must be in range

[Issue 17489] New: ICE in ddmd/argtypes.d

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17489 Issue ID: 17489 Summary: ICE in ddmd/argtypes.d Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: major Priority: P1

Re: D for Android beta

2017-06-10 Thread Joakim via Digitalmars-d-announce
On Thursday, 1 June 2017 at 19:31:28 UTC, Joakim wrote: The beta release of ldc 1.3, the llvm-based D compiler, is now out: https://github.com/joakim-noah/android/releases ---snip--- I will write up instructions on how to write an Android app in D _on_ your Android device by using ldc and

Re: Isn't it about time for D3?

2017-06-10 Thread James Hofmann via Digitalmars-d
On Saturday, 10 June 2017 at 23:30:18 UTC, Liam McGillivray wrote: I realize that there are people who want to continue using D as it is, but those people may continue to use D2. Putting the breaking changes in a separate branch ensures that DM won't lose current clients as they can just

Re: brew install dmd

2017-06-10 Thread Seb via Digitalmars-d-learn
On Sunday, 11 June 2017 at 03:48:57 UTC, Joel wrote: On Sunday, 11 June 2017 at 02:38:21 UTC, Mike Parker wrote: On Sunday, 11 June 2017 at 01:30:37 UTC, Joel wrote: but still 2.074.0 (not 74.1) Joels-MacBook-Pro:Testing joelchristensen$ dmd DMD64 D Compiler v2.074.0 It's probably related

Re: brew install dmd

2017-06-10 Thread Joel via Digitalmars-d-learn
On Sunday, 11 June 2017 at 03:54:05 UTC, Mike Parker wrote: On Sunday, 11 June 2017 at 03:48:57 UTC, Joel wrote: curl https://i.dlang.io | bash -s But I'm not sure about doing this. I'm don't what that means, but Homebrew is giving you 2.074.1, it's just that the binary has the wrong

Re: brew install dmd

2017-06-10 Thread Joel via Digitalmars-d-learn
On Sunday, 11 June 2017 at 02:38:21 UTC, Mike Parker wrote: On Sunday, 11 June 2017 at 01:30:37 UTC, Joel wrote: but still 2.074.0 (not 74.1) Joels-MacBook-Pro:Testing joelchristensen$ dmd DMD64 D Compiler v2.074.0 It's probably related to this:

[Issue 16108] `to!string` fails on struct with disabled postblit

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16108 --- Comment #6 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/3d80936f0b1e56418d6826180a7a9dbb29e01b7f Fix Issue 16108: tostrings fails on struct with

Re: SCons and D

2017-06-10 Thread bachmeier via Digitalmars-d
On Saturday, 10 June 2017 at 05:36:38 UTC, Russel Winder wrote: Could I get you to send it again I appear either not to have received it or I have deleted it before reading it. SharedLibrary('lib2', ['lib2.d'], SHOBJSUFFIX='.o') instead of the above SharedLibrary call (which I took from the

Re: brew install dmd

2017-06-10 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 11 June 2017 at 01:30:37 UTC, Joel wrote: but still 2.074.0 (not 74.1) Joels-MacBook-Pro:Testing joelchristensen$ dmd DMD64 D Compiler v2.074.0 It's probably related to this: http://forum.dlang.org/post/abyacihlxtcphnhzi...@forum.dlang.org

Re: Generalized Linear Models and Stochastic Gradient Descent in D

2017-06-10 Thread 9il via Digitalmars-d-announce
Why not to use ndslice and Lubeck [1] libraries instead? [1] https://github.com/kaleidicassociates/lubeck Ilya It is already has hight level ndslice interface for inv (inverse) and mtimes (matmul).

Re: Generalized Linear Models and Stochastic Gradient Descent in D

2017-06-10 Thread 9il via Digitalmars-d-announce
On Saturday, 10 June 2017 at 20:03:16 UTC, data pulverizer wrote: Hi all, I have written a draft article on Generalized Linear Models and Stochastic Gradient Descent in D (https://github.com/dataPulverizer/glm-stochastic-gradient-descent-d/blob/master/article.ipynb) and would greatly

Re: Isn't it about time for D3?

2017-06-10 Thread Liam McGillivray via Digitalmars-d
On Sunday, 11 June 2017 at 00:27:06 UTC, ketmar wrote: ..and it actually should be D1.5, not D3. ;-) 'cause D3 implies even more features, and i feel that the way to get The Perfect D (sorry! ;-) is trying to cut all the features that aren't strictly necessary (including fat-free stdlib too: i

brew install dmd

2017-06-10 Thread Joel via Digitalmars-d-learn
but still 2.074.0 (not 74.1) I'm not that familier brew. I've tried `brew upgrade` and `brew update`. Joels-MacBook-Pro:Testing joelchristensen$ brew upgrade dmd ==> Upgrading 1 outdated package, with result: dmd 2.074.1 ==> Upgrading dmd ==> Downloading

Re: Isn't it about time for D3?

2017-06-10 Thread Seb via Digitalmars-d
On Sunday, 11 June 2017 at 00:37:09 UTC, ketmar wrote: Adam D. Ruppe wrote: I think dev resources are thin because of mismanagement by the core team failing to attract and retain contributors. Part of this mismanagement is a really discouraging attitude toward positive yet breaking change; I

Re: Isn't it about time for D3?

2017-06-10 Thread Mike B Johnson via Digitalmars-d
On Sunday, 11 June 2017 at 00:37:09 UTC, ketmar wrote: Adam D. Ruppe wrote: On Sunday, 11 June 2017 at 00:06:13 UTC, Joakim wrote: Dev resources are stretched thin as it is, I doubt the core team would go for it. I think dev resources are thin because of mismanagement by the core team

Re: Generalized Linear Models and Stochastic Gradient Descent in D

2017-06-10 Thread Nicholas Wilson via Digitalmars-d-announce
On Saturday, 10 June 2017 at 20:03:16 UTC, data pulverizer wrote: Hi all, I have written a draft article on Generalized Linear Models and Stochastic Gradient Descent in D (https://github.com/dataPulverizer/glm-stochastic-gradient-descent-d/blob/master/article.ipynb) and would greatly

Re: Isn't it about time for D3?

2017-06-10 Thread ketmar via Digitalmars-d
Adam D. Ruppe wrote: On Sunday, 11 June 2017 at 00:06:13 UTC, Joakim wrote: Dev resources are stretched thin as it is, I doubt the core team would go for it. I think dev resources are thin because of mismanagement by the core team failing to attract and retain contributors. Part of this

Expressing range constraints in CNF form

2017-06-10 Thread Andrei Alexandrescu via Digitalmars-d
https://github.com/dlang/phobos/pull/5461 There's many good advantages to this. The immediate one is the constraint is better structured and easier to understand. Then, the compiler can print the exact clause that failed, which improves the precision and quality of the error message. We

Re: Isn't it about time for D3?

2017-06-10 Thread ketmar via Digitalmars-d
Liam McGillivray wrote: I feel like D3 would see significantly wider adoption than D2 ever got, as long as it successfully solves the problems of D2. ..and it actually should be D1.5, not D3. ;-) 'cause D3 implies even more features, and i feel that the way to get The Perfect D (sorry! ;-)

Re: Isn't it about time for D3?

2017-06-10 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 11 June 2017 at 00:06:13 UTC, Joakim wrote: Dev resources are stretched thin as it is, I doubt the core team would go for it. I think dev resources are thin because of mismanagement by the core team failing to attract and retain contributors. Part of this mismanagement is a really

Re: Isn't it about time for D3?

2017-06-10 Thread Joakim via Digitalmars-d
On Saturday, 10 June 2017 at 23:30:18 UTC, Liam McGillivray wrote: D is a language with much promise, but it still has many problems that prevent it from being the great replacement for C++ that it was always meant to be. There have been many changes suggested over time to improve the

Re: Isn't it about time for D3?

2017-06-10 Thread bpr via Digitalmars-d
On Saturday, 10 June 2017 at 23:30:18 UTC, Liam McGillivray wrote: I'd be fascinated by a revised D like language, say D3 or whatever. Here are some ways that D3 can be an improvement of D2: -Final by default Wow, after all that, this is it? I think final by default would be an

Re: Isn't it about time for D3?

2017-06-10 Thread Seb via Digitalmars-d
On Saturday, 10 June 2017 at 23:30:18 UTC, Liam McGillivray wrote: D is a language with much promise, but it still has many problems that prevent it from being the great replacement for C++ that it was always meant to be. [...] FYI: There also has been a recent debate about developing a new

Re: Is there a good lib out there to handle large integer of know size ?

2017-06-10 Thread Nicholas Wilson via Digitalmars-d
On Saturday, 10 June 2017 at 19:28:30 UTC, Era Scarecrow wrote: On Saturday, 9 January 2016 at 20:28:26 UTC, Andrei Alexandrescu wrote: Who can champion ONE fixed large integer library for Phobos? -- Andrei Got a possible one. My implementation is heavy on assembly language to take

Isn't it about time for D3?

2017-06-10 Thread Liam McGillivray via Digitalmars-d
D is a language with much promise, but it still has many problems that prevent it from being the great replacement for C++ that it was always meant to be. There have been many changes suggested over time to improve the language, but they were rejected as they would inevitably cause breaking

Re: "Programming in D" is up-to-date

2017-06-10 Thread Ali Çehreli via Digitalmars-d-announce
On 06/10/2017 12:53 PM, adamss3 wrote: I just got the paper back which has been upgraded to the latest version. I'm wondering if the hardcover version has been upgraded as well. There is no way of knowing for sure but from my experience it really takes just 1-2 days. I'm confident that it's

[Issue 17488] Platform-inconsistent behavior from getTempDir()

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17488 Vladimir Panteleev changed: What|Removed |Added CC|

[Issue 17399] [REG2.071] core.checkedint.addu cannot inline function

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17399 Martin Krejcirik changed: What|Removed |Added Summary|core.checkedint.addu cannot |[REG2.071]

[Issue 16538] Parameter head-const-ness shouldn't matter but does

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16538 --- Comment #2 from Walter Bright --- Fixed by https://github.com/dlang/dmd/pull/6731 --

[Issue 16600] Wrong error message for ambiguous mutable/immutable constructor

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16600 Walter Bright changed: What|Removed |Added Status|REOPENED|RESOLVED

[Issue 16303] covariant delegates should implicitly convert

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16303 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 17407] [REG2.067] __traits(compiles) triggers assertion failure

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17407 Martin Krejcirik changed: What|Removed |Added Summary|[REG] __traits(compiles)|[REG2.067]

[Issue 17354] An overload in a final class can silently hide base methods

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17354 b2.t...@gmx.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: Is there a good lib out there to handle large integer of know size ?

2017-06-10 Thread Era Scarecrow via Digitalmars-d
On Saturday, 10 June 2017 at 19:40:47 UTC, Andrei Alexandrescu wrote: On 6/10/17 3:28 PM, Era Scarecrow wrote: Got a possible one. My implementation is heavy on assembly language to take advantage of x86 features That's cool as long as the assembler is guarded by version(X_86) and has a

Re: Dub or Dmd trying to use some funny path to find linker.exe

2017-06-10 Thread Mike Wey via Digitalmars-d-learn
On 06/10/2017 07:04 PM, WhatMeWorry wrote: Dub or Dmd dies when it can't find the linker. Like so: C:\Users\kheaser\Git\Delivery\projects\00_01_print_ogl_ver>dub run --arch=x86_64 --force Performing "debug" build using dmd for x86_64. derelict-util 2.0.6: building configuration "library"...

Generalized Linear Models and Stochastic Gradient Descent in D

2017-06-10 Thread data pulverizer via Digitalmars-d-announce
Hi all, I have written a draft article on Generalized Linear Models and Stochastic Gradient Descent in D (https://github.com/dataPulverizer/glm-stochastic-gradient-descent-d/blob/master/article.ipynb) and would greatly appreciate your suggestions. Apologies for the spartan nature of the

[Issue 17349] Covariant overrides should be allowed

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

[Issue 17349] Covariant overrides should be allowed

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17349 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/832031adddadc3b9b8a3bca94bd30be1393b570a fix Issue 17349 - Covariant overrides should be allowed

Re: "Programming in D" is up-to-date

2017-06-10 Thread adamss3 via Digitalmars-d-announce
On Sunday, 28 May 2017 at 14:57:02 UTC, Ali Çehreli wrote: On 05/28/2017 06:25 AM, Steve wrote: On Tuesday, 16 May 2017 at 07:52:18 UTC, Ali Çehreli wrote: On 05/16/2017 12:47 AM, Suliman wrote: Big thanks!!! Thank you all! I'm very happy that it's useful. Ali Has Amazon caught up with

Re: Is there a good lib out there to handle large integer of know size ?

2017-06-10 Thread Andrei Alexandrescu via Digitalmars-d
On 6/10/17 3:28 PM, Era Scarecrow wrote: On Saturday, 9 January 2016 at 20:28:26 UTC, Andrei Alexandrescu wrote: Who can champion ONE fixed large integer library for Phobos? -- Andrei Got a possible one. My implementation is heavy on assembly language to take advantage of x86 features

Re: when I run dub within git bash, dub prompts are not displayed. For instance...

2017-06-10 Thread Anonymouse via Digitalmars-d-learn
On Saturday, 10 June 2017 at 16:11:31 UTC, WhatMeWorry wrote: kheaser@IT-ASST-SB MINGW64 /c/Users/kheaser/Git/Delivery/projects (master) $ dub init 00_01_print_ogl_ver ... All this white space here is me just pressing the Enter key ... to get the default values. If the problem is that the

Re: Is there a good lib out there to handle large integer of know size ?

2017-06-10 Thread Era Scarecrow via Digitalmars-d
On Saturday, 9 January 2016 at 20:28:26 UTC, Andrei Alexandrescu wrote: Who can champion ONE fixed large integer library for Phobos? -- Andrei Got a possible one. My implementation is heavy on assembly language to take advantage of x86 features (like the carry flag, and giving you 64 &

[Issue 4559] Disallowing single semicolons

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4559 Nemanja Boric <4bur...@gmail.com> changed: What|Removed |Added CC||4bur...@gmail.com ---

[Issue 4559] Disallowing single semicolons

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4559 Stefan Koch changed: What|Removed |Added CC||uplink.co...@gmail.com

Re: DMD test suite not runnable on Debian/Linux

2017-06-10 Thread Jacob Carlborg via Digitalmars-d
On 2017-06-10 00:34, Seb wrote: Don't worry about that. It's just a computer. As a temporary workaround, docker might be worth considering. Wow. Just modify the Makefile. -- /Jacob Carlborg

[Issue 4559] Disallowing single semicolons

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4559 --- Comment #5 from Andrei Alexandrescu --- (In reply to uplink.coder from comment #4) > (In reply to Andrei Alexandrescu from comment #3) > > No need for a DIP, we should just convert this to an error. > > If we do this, then we

Re: The DLang Tour translated into Russian

2017-06-10 Thread Eugene Wissner via Digitalmars-d-announce
On Saturday, 10 June 2017 at 17:20:14 UTC, Stanislav Blinov wrote: Hi everyone! We're happy to announce that as of today, the Russian translation of the DLang Tour chapters is available here: https://tour.dlang.org/tour/ru/welcome/welcome-to-d , and of course via the language selection page:

[Issue 17488] New: Platform-inconsistent behavior from getTempDir()

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17488 Issue ID: 17488 Summary: Platform-inconsistent behavior from getTempDir() Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

Re: The DLang Tour translated into Russian

2017-06-10 Thread Eugene Wissner via Digitalmars-d-announce
On Saturday, 10 June 2017 at 17:20:14 UTC, Stanislav Blinov wrote: Hi everyone! We're happy to announce that as of today, the Russian translation of the DLang Tour chapters is available here: https://tour.dlang.org/tour/ru/welcome/welcome-to-d , and of course via the language selection page:

The DLang Tour translated into Russian

2017-06-10 Thread Stanislav Blinov via Digitalmars-d-announce
Hi everyone! We're happy to announce that as of today, the Russian translation of the DLang Tour chapters is available here: https://tour.dlang.org/tour/ru/welcome/welcome-to-d , and of course via the language selection page: https://tour.dlang.org/tour/en/welcome/languages Hopefully, this

Re: std.stdio.stderr

2017-06-10 Thread Russel Winder via Digitalmars-d-learn
On Sat, 2017-06-10 at 16:45 +, Antonio Corbi via Digitalmars-d- learn wrote: > […] > > It seems to work for me with a dumb example: […] Spurred on by your report of success, I discovered my error. D treats a char[1024] as 1024 characters when using the %s format specifier. I had to use

Dub or Dmd trying to use some funny path to find linker.exe

2017-06-10 Thread WhatMeWorry via Digitalmars-d-learn
Dub or Dmd dies when it can't find the linker. Like so: C:\Users\kheaser\Git\Delivery\projects\00_01_print_ogl_ver>dub run --arch=x86_64 --force Performing "debug" build using dmd for x86_64. derelict-util 2.0.6: building configuration "library"... derelict-al 1.0.3: building configuration

Re: std.stdio.stderr

2017-06-10 Thread Antonio Corbi via Digitalmars-d-learn
On Saturday, 10 June 2017 at 16:10:18 UTC, Russel Winder wrote: It appears that std.stdio.stderr does not wor exactly as stdio stderr does. In particular std.stdio.stderr.writef(…) does not work as fprintf(stderr…) does. Some code I am porting from C++ to D makes use of ANSI escape codes to

when I run dub within git bash, dub prompts are not displayed. For instance...

2017-06-10 Thread WhatMeWorry via Digitalmars-d-learn
kheaser@IT-ASST-SB MINGW64 /c/Users/kheaser/Git/Delivery/projects (master) $ dub init 00_01_print_ogl_ver ... All this white space here is me just pressing the Enter key ... to get the default values. Package recipe format (sdl/json) [json]: Name [00_01_print_ogl_ver]: Description [A

std.stdio.stderr

2017-06-10 Thread Russel Winder via Digitalmars-d-learn
It appears that std.stdio.stderr does not wor exactly as stdio stderr does. In particular std.stdio.stderr.writef(…) does not work as fprintf(stderr…) does. Some code I am porting from C++ to D makes use of ANSI escape codes to go up a line and overwrite what was there, as well as change colours.

[Issue 17474] non-property being treated as a property

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17474 --- Comment #9 from Vladimir Panteleev --- (In reply to Eyal from comment #8) > I don't see how a=b invoking a(b) when a isn't a @property is justifiable. Yep, that `writeln = "Hello, world!";` works is an infamous

Re: Need way to compare classes, and primitive types in bst Template

2017-06-10 Thread Mark via Digitalmars-d-learn
On Saturday, 10 June 2017 at 14:35:48 UTC, ag0aep6g wrote: ... Just that you shouldn't take my version of addNode and rely on it without double checking that it's correct. Ah, Okay. I rechecked that everything is working. The size is correct, and the membership is correct for every

[Issue 4559] Disallowing single semicolons

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4559 uplink.co...@googlemail.com changed: What|Removed |Added CC||uplink.co...@googlemail.com ---

Re: Need way to compare classes, and primitive types in bst Template

2017-06-10 Thread ag0aep6g via Digitalmars-d-learn
On 06/10/2017 06:57 AM, Mark wrote: On Friday, 9 June 2017 at 15:12:04 UTC, ag0aep6g wrote: ... Note that this is only supposed to show how to do the special casing for classes. addNode probably doesn't do exactly what it's supposed to do in your tree. I'm not sure what you mean by this?

Re: Is D slow?

2017-06-10 Thread Nicholas Wilson via Digitalmars-d-learn
On Saturday, 10 June 2017 at 14:14:53 UTC, Steven Schveighoffer wrote: I can confirm on my system, ldc with bounds check off was at least twice as slow as with just -release. Definitely seems like a bug -Steve Ya, see https://github.com/ldc-developers/ldc/issues/2161

Re: Is D slow?

2017-06-10 Thread Steven Schveighoffer via Digitalmars-d-learn
On Saturday, 10 June 2017 at 13:43:48 UTC, Nicholas Wilson wrote: On Saturday, 10 June 2017 at 12:44:07 UTC, Honey wrote: On Saturday, 10 June 2017 at 12:23:05 UTC, Nicholas Wilson wrote: [...] Are you saying that introducing additional checks enables the optimizer to eliminate more or more

Re: Is D slow?

2017-06-10 Thread Nicholas Wilson via Digitalmars-d-learn
On Saturday, 10 June 2017 at 12:44:07 UTC, Honey wrote: On Saturday, 10 June 2017 at 12:23:05 UTC, Nicholas Wilson wrote: On Saturday, 10 June 2017 at 12:16:34 UTC, Honey wrote: Is it expected that turning off bounds checking can lead to a performance decrease? Yes, with it on you are doing

[Issue 4559] Disallowing single semicolons

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4559 --- Comment #3 from Andrei Alexandrescu --- No need for a DIP, we should just convert this to an error. --

Re: Is D slow?

2017-06-10 Thread Honey via Digitalmars-d-learn
On Saturday, 10 June 2017 at 12:23:05 UTC, Nicholas Wilson wrote: On Saturday, 10 June 2017 at 12:16:34 UTC, Honey wrote: Is it expected that turning off bounds checking can lead to a performance decrease? Yes, with it on you are doing an "is the index <= the length" for every array access.

Re: Is D slow?

2017-06-10 Thread Nicholas Wilson via Digitalmars-d-learn
On Saturday, 10 June 2017 at 12:16:34 UTC, Honey wrote: On Saturday, 10 June 2017 at 11:53:44 UTC, Johan Engelen wrote: `-release` should be synonymous with `-release -boundscheck=off`. Nope it's not.

Re: Is D slow?

2017-06-10 Thread Honey via Digitalmars-d-learn
On Saturday, 10 June 2017 at 11:53:44 UTC, Johan Engelen wrote: `-release` should be synonymous with `-release -boundscheck=off`. Nope it's not. http://www.digitalmars.com/d/archives/digitalmars/D/What_s_the_deal_with_-boundscheck_260237.html Thank you for clarifying that point. Is it

Re: Is D slow?

2017-06-10 Thread Honey via Digitalmars-d-learn
On Saturday, 10 June 2017 at 10:59:24 UTC, Steven Schveighoffer wrote: I wrote it like this, which confirms that it's indeed bringToFront (I tried your getTransitionIndex function, but that didn't change timings at all): void insertionSort(alias Less, Range)(Range r) if (hasLength!Range &&

Re: Is D slow?

2017-06-10 Thread Johan Engelen via Digitalmars-d-learn
On Saturday, 10 June 2017 at 11:43:06 UTC, Johan Engelen wrote: On Friday, 9 June 2017 at 16:21:22 UTC, Honey wrote: What seems particularly strange to me is that -boundscheck=off leads to a performance decrease. Strange indeed. `-release` should be synonymous with `-release

[Issue 4559] Disallowing single semicolons

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4559 dl...@ryanjframe.com changed: What|Removed |Added CC||dl...@ryanjframe.com --- Comment #2

Re: Is D slow?

2017-06-10 Thread Johan Engelen via Digitalmars-d-learn
On Friday, 9 June 2017 at 16:21:22 UTC, Honey wrote: What seems particularly strange to me is that -boundscheck=off leads to a performance decrease. Strange indeed. `-release` should be synonymous with `-release -boundscheck=off`. Investigating... - Johan

[Issue 17485] bringToFront and/or upperBound slow

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17485 --- Comment #3 from Steven Schveighoffer --- Indeed, memmove fixes the specific use case: https://forums.dlang.org/post/ohgjec$1aar$1...@digitalmars.com However, I think we should do a full examination of everything C++ does

Re: Is D slow?

2017-06-10 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/10/17 5:00 AM, Honey wrote: On Friday, 9 June 2017 at 23:10:28 UTC, Ali Çehreli wrote: You would get the exact performance if you implemented e.g. with pointers. Your test has been very valuable for exposing an embarrassing performance issue. :) I can confirm that, after changing

[Issue 17384] LDC x64 linker error in VS2017

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17384 --- Comment #3 from ki...@gmx.net --- > Visual D doesn't use LDC's automatic detection because it doesn't allow > using different versions of VS. It is possible - via env variable `LDC_VSDIR`. For LDC 1.0.0 compatibility, it'd have to end with a

Re: What is the best way to include this file from the runtime libraries?

2017-06-10 Thread ulyssesdwolfe via Digitalmars-d-learn
On Saturday, 10 June 2017 at 10:07:54 UTC, rikki cattermole wrote: You found it. Ok Thanks :)

Re: What is the best way to include this file from the runtime libraries?

2017-06-10 Thread rikki cattermole via Digitalmars-d-learn
On 10/06/2017 11:06 AM, ulyssesdwolfe wrote: Hi I am trying to hook up an app to log to /var/log through the rsyslog daemon and it seems I need this file https://github.com/dlang/druntime/blob/master/src/core/sys/posix/syslog.d but I am not sure what the correct way to include files from the

What is the best way to include this file from the runtime libraries?

2017-06-10 Thread ulyssesdwolfe via Digitalmars-d-learn
Hi I am trying to hook up an app to log to /var/log through the rsyslog daemon and it seems I need this file https://github.com/dlang/druntime/blob/master/src/core/sys/posix/syslog.d but I am not sure what the correct way to include files from the runtime libs is. Right now I am just doing

Re: Is D slow?

2017-06-10 Thread Honey via Digitalmars-d-learn
On Friday, 9 June 2017 at 23:10:28 UTC, Ali Çehreli wrote: You would get the exact performance if you implemented e.g. with pointers. Your test has been very valuable for exposing an embarrassing performance issue. :) I can confirm that, after changing implementation to the following,

Re: tanya 0.6.0, new containers

2017-06-10 Thread Eugene Wissner via Digitalmars-d-announce
On Saturday, 10 June 2017 at 07:33:33 UTC, Mike B Johnson wrote: On Friday, 9 June 2017 at 18:54:12 UTC, Eugene Wissner wrote: Dear community, there is a new release of my gc-free library, tanya. I don't announce each release, so I want to tell short about the latest development and plans

Re: tanya 0.6.0, new containers

2017-06-10 Thread Mike B Johnson via Digitalmars-d-announce
On Friday, 9 June 2017 at 18:54:12 UTC, Eugene Wissner wrote: Dear community, there is a new release of my gc-free library, tanya. I don't announce each release, so I want to tell short about the latest development and plans for the next releases. [...] Thanks! I'll check it out.. we need

[Issue 4559] Disallowing single semicolons

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4559 Infiltrator changed: What|Removed |Added CC||and...@erdani.com,

[Issue 4558] To spot a possible bug in code that doesn't change a value

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4558 Infiltrator changed: What|Removed |Added CC|

[Issue 17486] lazy parameters can be used to hijack the pure system

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17486 --- Comment #4 from Eyal --- The solution, clearly is to treat "lazy" is mere syntactic sugar to passing delegates - thus adding syntactic support for @nogc/etc attribute annotation on "lazy" parameters - and specifying their

[Issue 17474] non-property being treated as a property

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17474 --- Comment #8 from Eyal --- Requiring @property on a for a=b to invoke a(b) sounds much more reasonable than the opposite. I don't see how a=b invoking a(b) when a isn't a @property is justifiable. --

[Issue 17474] non-property being treated as a property

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17474 --- Comment #6 from Tomer Filiba (weka) --- (In reply to Walter Bright from comment #4) > But I can suggest avoiding using default function arguments. Default > arguments are a good solution for adding parameters without breaking >

[Issue 17474] non-property being treated as a property

2017-06-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17474 --- Comment #7 from Tomer Filiba (weka) --- (In reply to Stefan Koch from comment #5) > I am pretty sure the last thing you want is a function to be invoked as a > setter property if it returns an Lvalue. +1 --