Re: On "A New Collections Framework for the Standard Library"

2017-05-18 Thread Eugene Wissner via Digitalmars-d
On Thursday, 18 May 2017 at 15:18:00 UTC, Jack Stouffer wrote: I just got around to watching Eduard Staniloiu's talk at DConf [1] about the collections library he was working on. One thing seemed odd, in that Eduard seems to be saying that the container and the range over the container's

[Issue 17411] Visual Studio Community 2017 for Mac Version 7.0 (build 3146) Not Supported, Mac OS X not supported

2017-05-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17411 Vladimir Panteleev changed: What|Removed |Added Status|NEW |RESOLVED

Re: Replacing std.math raw pointer arithmetic with a union type

2017-05-18 Thread tsbockman via Digitalmars-d
On Wednesday, 17 May 2017 at 20:25:26 UTC, Stefan Koch wrote: On Wednesday, 17 May 2017 at 19:26:32 UTC, tsbockman wrote: On Wednesday, 17 May 2017 at 15:30:29 UTC, Stefan Koch wrote: the special case it supports if cast(uint*) and cast(ulong*) What about casting from real* when real.sizeof

[Issue 17411] New: Visual Studio Community 2017 for Mac Version 7.0 (build 3146) Not Supported, Mac OS X not supported

2017-05-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17411 Issue ID: 17411 Summary: Visual Studio Community 2017 for Mac Version 7.0 (build 3146) Not Supported, Mac OS X not supported Product: D Version: D2 Hardware: x86

Re: On "A New Collections Framework for the Standard Library"

2017-05-18 Thread Jack Stouffer via Digitalmars-d
On Thursday, 18 May 2017 at 18:27:22 UTC, Andrei Alexandrescu wrote: Iterating over a container using e.g. foreach won't consume the container same as iterating over int[] won't consume the slice. I don't understand why you're mapping the behavior of ranges/slices, which theoretically are

Re: How to check a struct exists at a particular memory address?

2017-05-18 Thread Nicholas Wilson via Digitalmars-d-learn
On Thursday, 18 May 2017 at 20:20:47 UTC, Gary Willoughby wrote: This might be a really silly question but: I've allocated some memory like this (Foo is a struct): this._data = cast(Foo*) calloc(n, Foo.sizeof); How can I then later check that there is a valid Foo at `this._data` or

Re: [Semi-OT] to!string(enumType)

2017-05-18 Thread Stefan Koch via Digitalmars-d
On Thursday, 18 May 2017 at 23:15:46 UTC, ag0aep6g wrote: On 05/19/2017 12:31 AM, Stefan Koch wrote: string enumToString(E)(E v) { static assert(is(E == enum), "emumToString is only meant for enums"); mixin ({ string result = "final switch(v) {\n";

Re: [Semi-OT] to!string(enumType)

2017-05-18 Thread H. S. Teoh via Digitalmars-d
On Thu, May 18, 2017 at 11:42:25PM +, Stefan Koch via Digitalmars-d wrote: > On Thursday, 18 May 2017 at 22:31:47 UTC, Stefan Koch wrote: > > > Granted this version will result in undefined behavior if you pass > > something like (cast(ET) 3) to it. > > But the 55x increase in compilation

Re: [Semi-OT] to!string(enumType)

2017-05-18 Thread Stefan Koch via Digitalmars-d
On Thursday, 18 May 2017 at 22:31:47 UTC, Stefan Koch wrote: Granted this version will result in undefined behavior if you pass something like (cast(ET) 3) to it. But the 55x increase in compilation speed is well worth it :) This code will replicate to!string behavior perfectly but will

Re: [Semi-OT] to!string(enumType)

2017-05-18 Thread ag0aep6g via Digitalmars-d
On 05/19/2017 12:31 AM, Stefan Koch wrote: string enumToString(E)(E v) { static assert(is(E == enum), "emumToString is only meant for enums"); mixin ({ string result = "final switch(v) {\n"; foreach(m;[__traits(allMembers, E)]) { result ~= "\tcase E." ~ m ~ "

Re: [Semi-OT] to!string(enumType)

2017-05-18 Thread Moritz Maxeiner via Digitalmars-d
On Thursday, 18 May 2017 at 22:31:47 UTC, Stefan Koch wrote: Hi, I just took a look into commonly used functionality of Phobos. Such as getting the string representation of a enum. [...] Nice, thank you. I dream of a guide to compile time optimization in D. :)

Re: [Semi-OT] to!string(enumType)

2017-05-18 Thread Stefan Koch via Digitalmars-d
On Thursday, 18 May 2017 at 22:31:47 UTC, Stefan Koch wrote: Hi, I just took a look into commonly used functionality of Phobos. Such as getting the string representation of a enum. [...] Using -vcg-ast we see that it expands to ~50 lines.

[Semi-OT] to!string(enumType)

2017-05-18 Thread Stefan Koch via Digitalmars-d
Hi, I just took a look into commonly used functionality of Phobos. Such as getting the string representation of a enum. the following code: import std.conv; enum ET { One, Two } static assert(to!string(ET.One) == "One"); takes about 220 milliseconds to compile. creating a 7.5k object

Re: Eric Niebler talks about C++ Ranges at Microsoft Campus Wed evening

2017-05-18 Thread Martin Nowak via Digitalmars-d-announce
On Tuesday, 16 May 2017 at 17:44:28 UTC, Walter Bright wrote: Eric's talks are generally not to be missed. We often go out for beer afterwards :-) Was a good talk, find the video here [Concepts of the Upcoming Ranges TS](https://youtu.be/4OgAjT6HTG8).

Re: How to check a struct exists at a particular memory address?

2017-05-18 Thread Gary Willoughby via Digitalmars-d-learn
On Thursday, 18 May 2017 at 21:09:06 UTC, Igor wrote: On Thursday, 18 May 2017 at 20:20:47 UTC, Gary Willoughby wrote: This might be a really silly question but: I've allocated some memory like this (Foo is a struct): this._data = cast(Foo*) calloc(n, Foo.sizeof); How can I then later

Re: Eric Niebler talks about C++ Ranges at Microsoft Campus Wed evening

2017-05-18 Thread qznc via Digitalmars-d-announce
On Thursday, 18 May 2017 at 20:09:04 UTC, Mark wrote: Eric's talks are generally not to be missed. I remember this talk of him, which was great: CppCon 2015: Eric Niebler "Ranges for the Standard Library" https://www.youtube.com/watch?v=mFUXNMfaciE "Stolen from the D community wiki" :D

Re: How to check a struct exists at a particular memory address?

2017-05-18 Thread Igor via Digitalmars-d-learn
On Thursday, 18 May 2017 at 20:20:47 UTC, Gary Willoughby wrote: This might be a really silly question but: I've allocated some memory like this (Foo is a struct): this._data = cast(Foo*) calloc(n, Foo.sizeof); How can I then later check that there is a valid Foo at `this._data` or

How to check a struct exists at a particular memory address?

2017-05-18 Thread Gary Willoughby via Digitalmars-d-learn
This might be a really silly question but: I've allocated some memory like this (Foo is a struct): this._data = cast(Foo*) calloc(n, Foo.sizeof); How can I then later check that there is a valid Foo at `this._data` or `this._data + n`?

Re: How to setup DLL and EXE projects in one VS solution

2017-05-18 Thread Igor via Digitalmars-d-learn
On Thursday, 18 May 2017 at 18:00:02 UTC, Rainer Schuetze wrote: That's what I meant with "other cross module dependencies". In this case it might work if you export _D10handmade_h10game_input6__initZ from your DLL with the help of a def-file, but that's not something that scales well.

Re: Eric Niebler talks about C++ Ranges at Microsoft Campus Wed evening

2017-05-18 Thread Mark via Digitalmars-d-announce
On Tuesday, 16 May 2017 at 17:44:28 UTC, Walter Bright wrote: http://nwcpp.org May 17th, 2017 at 7:00 PM Steptoe Room, Cafeteria 40, Microsoft Campus, 156th Ave NE, Redmond, WA 98052. Eric's talks are generally not to be missed. We often go out for beer afterwards :-) I remember this talk

Re: Fantastic exchange from DConf

2017-05-18 Thread Walter Bright via Digitalmars-d
On 5/18/2017 10:53 AM, H. S. Teoh via Digitalmars-d wrote: Yes, and that is why it's a grave concern that Phobos has (or used to have) giant blocks of code under the heading `@trusted:`. Even entire functions marked @trusted are a concern, to me, if the function is more than 5-10 lines long.

Re: C and memory safety comments by me

2017-05-18 Thread Walter Bright via Digitalmars-d
On 5/18/2017 10:42 AM, Joakim wrote: On Thursday, 18 May 2017 at 17:25:24 UTC, Walter Bright wrote: On 5/18/2017 10:08 AM, David Gileadi wrote: On 5/18/17 10:00 AM, Walter Bright wrote: https://www.reddit.com/r/cpp/comments/6b4xrc/walter_bright_believes_memory_safety_will_kill_c/dhkxhef/

Re: alias this and struct initializer

2017-05-18 Thread Andre Pany via Digitalmars-d-learn
On Thursday, 18 May 2017 at 12:56:09 UTC, Adam D. Ruppe wrote: On Thursday, 18 May 2017 at 08:40:39 UTC, Andre Pany wrote: [...] Nope, case 2 is assigning to an already constructed object and case 3 is constructing a new one. [...] Thanks for the explanation, that makes perfectly sense.

[Issue 17407] [REG] __traits(compiles) triggers assertion failure

2017-05-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17407 Walter Bright changed: What|Removed |Added Keywords||CTFE

[Issue 17375] colliding modules detected with binutils 2.28 linker and shared libraries

2017-05-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17375 --- Comment #6 from Vladimir Panteleev --- (In reply to Martin Nowak from comment #5) > The PIE (-fPIC) workaround seems a lot simpler. Sorry, yeah, I meant when modifying the build command is not feasible (e.g. when

Re: On "A New Collections Framework for the Standard Library"

2017-05-18 Thread Andrei Alexandrescu via Digitalmars-d
On 05/18/2017 02:17 PM, Jack Stouffer wrote: On Thursday, 18 May 2017 at 15:18:00 UTC, Jack Stouffer wrote: ... Also, shared allocators raise another problem entirely. Let's say for the sake of clarity that these future containers will use a separate range type. Let's say you have a

Re: On "A New Collections Framework for the Standard Library"

2017-05-18 Thread Andrei Alexandrescu via Digitalmars-d
On 05/18/2017 11:18 AM, Jack Stouffer wrote: I just got around to watching Eduard Staniloiu's talk at DConf [1] about the collections library he was working on. One thing seemed odd, in that Eduard seems to be saying that the container and the range over the container's elements are one in the

Re: DMD now has colorized syntax highlighting in error messages

2017-05-18 Thread MysticZach via Digitalmars-d-announce
On Thursday, 18 May 2017 at 01:52:17 UTC, Adam D. Ruppe wrote: On Tuesday, 16 May 2017 at 14:17:41 UTC, Adam D. Ruppe wrote: Similarly, what I want to see in the future is highlighting of specific parts of code where the error applies. Fear me. I combined Walter's code with my own to form

Re: On "A New Collections Framework for the Standard Library"

2017-05-18 Thread Jack Stouffer via Digitalmars-d
On Thursday, 18 May 2017 at 15:18:00 UTC, Jack Stouffer wrote: ... Also, shared allocators raise another problem entirely. Let's say for the sake of clarity that these future containers will use a separate range type. Let's say you have a container with five elements, and then you give a

Re: Fantastic exchange from DConf

2017-05-18 Thread Stanislav Blinov via Digitalmars-d
On Thursday, 18 May 2017 at 17:53:52 UTC, H. S. Teoh wrote: In the long run, I fear that if there are too many @trusted blocks in a given codebase (not necessarily Phobos), it will become too onerous to review, and could lead to hidden exploits that are overlooked by reviewers. I don't know

Re: [OT] Fast Deterministic Selection

2017-05-18 Thread Stanislav Blinov via Digitalmars-d-announce
On Thursday, 18 May 2017 at 15:14:17 UTC, Andrei Alexandrescu wrote: The implementation is an improved version of what we now have in the D standard library. I'll take up the task of updating phobos at a later time.

[Issue 17375] colliding modules detected with binutils 2.28 linker and shared libraries

2017-05-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17375 --- Comment #5 from Martin Nowak --- The PIE (-fPIC) workaround seems a lot simpler. It should be made default on Arch anyhow after we've switched with 2.072.2 http://forum.dlang.org/post/o3sr68$2shj$1...@digitalmars.com. --

Re: Fantastic exchange from DConf

2017-05-18 Thread H. S. Teoh via Digitalmars-d
On Thu, May 18, 2017 at 08:12:18AM -0400, Steven Schveighoffer via Digitalmars-d wrote: [...] > Of course. But what business people would see is a huge company like > facebook being marginalized by a small startup, and having the > analysts say "well, it's mostly because they used Rust/D". The

Re: How to setup DLL and EXE projects in one VS solution

2017-05-18 Thread Rainer Schuetze via Digitalmars-d-learn
On 18.05.2017 09:53, Igor wrote: On Thursday, 18 May 2017 at 07:10:54 UTC, Rainer Schuetze wrote: You have to add an import path to the folder with dllproj inside to the project configuration of the exeproject. If you want to limit the imported code to the declarations, you can enable

Re: On "A New Collections Framework for the Standard Library"

2017-05-18 Thread Jack Stouffer via Digitalmars-d
On Thursday, 18 May 2017 at 15:38:39 UTC, Jonathan M Davis wrote: That point concerned me as well. Dynamic arrays in D are very strange beasts indeed, and while it works for them to function as both ranges and (sort of) containers, it's also created a fair bit of confusion, and it really a

Re: C and memory safety comments by me

2017-05-18 Thread Joakim via Digitalmars-d
On Thursday, 18 May 2017 at 17:25:24 UTC, Walter Bright wrote: On 5/18/2017 10:08 AM, David Gileadi wrote: On 5/18/17 10:00 AM, Walter Bright wrote: https://www.reddit.com/r/cpp/comments/6b4xrc/walter_bright_believes_memory_safety_will_kill_c/dhkxhef/ Oddly enough that link took me to a

First Alexa D Skill is live

2017-05-18 Thread Fabian Wallentowitz via Digitalmars-d-announce
Hey guys, Stephan (extrawurst) and me (fabsi88) have published the first Amazon Echo Alexa Skill based on D. It's called Enigma2 control and can be used for controlling your enigma based linux receiver via openwebif plugin. For further information see skill store (german only right now):

Re: C and memory safety comments by me

2017-05-18 Thread Walter Bright via Digitalmars-d
On 5/18/2017 10:08 AM, David Gileadi wrote: On 5/18/17 10:00 AM, Walter Bright wrote: https://www.reddit.com/r/cpp/comments/6b4xrc/walter_bright_believes_memory_safety_will_kill_c/dhkxhef/ Oddly enough that link took me to a comment thread about Rust CFFI, with no comments by you in it.

Re: C and memory safety comments by me

2017-05-18 Thread Joakim via Digitalmars-d
On Thursday, 18 May 2017 at 17:00:11 UTC, Walter Bright wrote: https://www.reddit.com/r/cpp/comments/6b4xrc/walter_bright_believes_memory_safety_will_kill_c/dhkxhef/ Heh, that explains all the views of that video, making it the most-viewed DConf talk, which I was confused about before:

Re: Cheetah: Keeping track of multiple connected clients

2017-05-18 Thread bauss via Digitalmars-d-learn
On Thursday, 18 May 2017 at 11:44:57 UTC, aberba wrote: On Tuesday, 16 May 2017 at 21:56:16 UTC, aberba wrote: On Tuesday, 16 May 2017 at 17:49:07 UTC, bauss wrote: [...] It really awesome the way you responded quickly. About targeting a client, suppose I have clients A, B, and C. Message

Re: C and memory safety comments by me

2017-05-18 Thread David Gileadi via Digitalmars-d
On 5/18/17 10:00 AM, Walter Bright wrote: https://www.reddit.com/r/cpp/comments/6b4xrc/walter_bright_believes_memory_safety_will_kill_c/dhkxhef/ Oddly enough that link took me to a comment thread about Rust CFFI, with no comments by you in it. Perhaps you meant the link to not include the

Re: Please provide DMD as 64 executable

2017-05-18 Thread Vladimir Panteleev via Digitalmars-d
On Thursday, 18 May 2017 at 13:41:21 UTC, Andre Pany wrote: One issue is that digger does not support proxies If the problem is about git:// URLs, you can configure Git to use https:// instead of git:// globally: https://github.com/CyberShadow/Digger/issues/8 Otherwise, please file an

C and memory safety comments by me

2017-05-18 Thread Walter Bright via Digitalmars-d
https://www.reddit.com/r/cpp/comments/6b4xrc/walter_bright_believes_memory_safety_will_kill_c/dhkxhef/

Re: On "A New Collections Framework for the Standard Library"

2017-05-18 Thread Jonathan M Davis via Digitalmars-d
On Thursday, May 18, 2017 15:18:00 Jack Stouffer via Digitalmars-d wrote: > I just got around to watching Eduard Staniloiu's talk at DConf > [1] about the collections library he was working on. One thing > seemed odd, in that Eduard seems to be saying that the container > and the range over the

[Issue 17135] Optimization of big functions takes a lot of time

2017-05-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17135 --- Comment #5 from ag0ae...@gmail.com --- (In reply to anonymous4 from comment #3) > IIRC there was an issue about this - dmd backend optimization is quadratic > on function size, though can't find it now. I remember issue 14571, but there it was

[Issue 17410] Compilation is incredibily slow when instantiating classes in release mode

2017-05-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17410 anonymous4 changed: What|Removed |Added Keywords||performance

[Issue 17135] Optimization of big functions takes a lot of time

2017-05-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17135 anonymous4 changed: What|Removed |Added CC||kriptoga...@gmail.com

On "A New Collections Framework for the Standard Library"

2017-05-18 Thread Jack Stouffer via Digitalmars-d
I just got around to watching Eduard Staniloiu's talk at DConf [1] about the collections library he was working on. One thing seemed odd, in that Eduard seems to be saying that the container and the range over the container's elements are one in the same and the range primitives are on the

[Issue 17407] [REG] __traits(compiles) triggers assertion failure

2017-05-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17407 ag0ae...@gmail.com changed: What|Removed |Added Keywords||ice CC|

[Issue 17406] int var = 10; write(--var,' ',var^^2); //output: 9 100 //NOT: 9 81

2017-05-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17406 ag0ae...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Issue 16408] [REG2.065] left-to-right order of evaluation of function arguments not consistently followed

2017-05-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16408 ag0ae...@gmail.com changed: What|Removed |Added CC||fordlangcomme...@gmail.com --- Comment

[OT] Fast Deterministic Selection

2017-05-18 Thread Andrei Alexandrescu via Digitalmars-d-announce
The implementation is an improved version of what we now have in the D standard library. I'll take up the task of updating phobos at a later time. https://www.reddit.com/r/programming/comments/6bwsjn/fast_deterministic_selection_sea_2017_now_with/ Andrei

Re: Please provide DMD as 64 executable

2017-05-18 Thread Jacob Carlborg via Digitalmars-d
On 2017-05-18 16:24, Ethan Watson wrote: On Thursday, 18 May 2017 at 13:41:21 UTC, Andre Pany wrote: I think the 64 bit version of dmd should be the default these days;) I believe this is a Windows-only problem. Yes, DMD fir Linux and FreeBSD is shipped in both 32bit and 64bit. Since

Re: DIP 1003 Formal Review

2017-05-18 Thread MysticZach via Digitalmars-d
On Thursday, 18 May 2017 at 13:06:38 UTC, Petar Kirov [ZombineDev] wrote: On Thursday, 18 May 2017 at 12:56:31 UTC, Meta wrote: This is pretty much the same as option 2. The short-term contextual part is covered by Walter's suggestion. No it's not. What MysticZach suggests, and what I

Re: Please provide DMD as 64 executable

2017-05-18 Thread Ethan Watson via Digitalmars-d
On Thursday, 18 May 2017 at 13:41:21 UTC, Andre Pany wrote: I think the 64 bit version of dmd should be the default these days;) I believe this is a Windows-only problem. For which I'm +1. I have to build my own because compiling some Binderoo code with a few objects breaks the memory

Re: Fails to use testFilename in unittest

2017-05-18 Thread biocyberman via Digitalmars-d-learn
On Thursday, 18 May 2017 at 10:05:41 UTC, Jonathan M Davis wrote: On Thursday, May 18, 2017 09:56:36 biocyberman via Digitalmars-d-learn wrote: [...] My point is that it's a private function for testing std.stdio and not intended to be part of the public API or be used by anyone else (it's

Please provide DMD as 64 executable

2017-05-18 Thread Andre Pany via Digitalmars-d
Hi, is it possible to provide dmd as 64 download too for windows? I generated out of the Amazon Web Services API definitions D source code and always get this error message: "Fatal Error: Out of memorydmd failed with exit code 1." (There is really a space missing in the error text). I

[Issue 17410] New: Compilation is incredibily slow when instantiating classes in release mode

2017-05-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17410 Issue ID: 17410 Summary: Compilation is incredibily slow when instantiating classes in release mode Product: D Version: D2 Hardware: All OS: All

Re: DIP 1003 Formal Review

2017-05-18 Thread via Digitalmars-d
On Thursday, 18 May 2017 at 12:56:31 UTC, Meta wrote: On Thursday, 18 May 2017 at 03:59:49 UTC, MysticZach wrote: On Thursday, 18 May 2017 at 02:13:52 UTC, Meta wrote: On Wednesday, 17 May 2017 at 11:46:07 UTC, Meta wrote: I'll add this option to the DIP.

Re: DIP 1003 Formal Review

2017-05-18 Thread Meta via Digitalmars-d
On Thursday, 18 May 2017 at 03:59:49 UTC, MysticZach wrote: On Thursday, 18 May 2017 at 02:13:52 UTC, Meta wrote: On Wednesday, 17 May 2017 at 11:46:07 UTC, Meta wrote: I'll add this option to the DIP. https://github.com/dlang/DIPs/pull/65 I think (

Re: alias this and struct initializer

2017-05-18 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 18 May 2017 at 08:40:39 UTC, Andre Pany wrote: I think as case 2 is working case 3 should work also. Nope, case 2 is assigning to an already constructed object and case 3 is constructing a new one. alias this is NEVER used in construction. It can only apply after the object

[Issue 17409] New: [ICE] Segmentation fault with invalid code and -dip1000

2017-05-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17409 Issue ID: 17409 Summary: [ICE] Segmentation fault with invalid code and -dip1000 Product: D Version: D2 Hardware: All OS: All Status: NEW

[Issue 17408] New: scope and in are considered redundant

2017-05-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17408 Issue ID: 17408 Summary: scope and in are considered redundant Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1

[Issue 17407] New: [REG] __traits(compiles) triggers assertion failure

2017-05-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17407 Issue ID: 17407 Summary: [REG] __traits(compiles) triggers assertion failure Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: regression

Re: Fantastic exchange from DConf

2017-05-18 Thread Steven Schveighoffer via Digitalmars-d
On 5/18/17 12:40 AM, H. S. Teoh via Digitalmars-d wrote: On Wed, May 17, 2017 at 08:58:31PM -0400, Steven Schveighoffer via Digitalmars-d wrote: On 5/17/17 8:27 PM, H. S. Teoh via Digitalmars-d wrote: [...] What will cause a shift is a continuous business loss. If business A and B are

Re: Cheetah: Keeping track of multiple connected clients

2017-05-18 Thread aberba via Digitalmars-d-learn
On Tuesday, 16 May 2017 at 21:56:16 UTC, aberba wrote: On Tuesday, 16 May 2017 at 17:49:07 UTC, bauss wrote: [...] It really awesome the way you responded quickly. About targeting a client, suppose I have clients A, B, and C. Message can be broadcast to all using above solution. But in

Re: GPGPU progess

2017-05-18 Thread Nicholas Wilson via Digitalmars-d
On Thursday, 18 May 2017 at 09:07:38 UTC, Nicholas Wilson wrote: When ldc runs you will get a kernels_cudaxxx_yy.ptx (where xxx is the CUDA compute capability specified on the command line and yy is 32 or 64 for 32 or 64bit) which should fit somewhere into your existing C++ pipeline. Whoops,

Re: Fantastic exchange from DConf

2017-05-18 Thread Johannes Pfau via Digitalmars-d
On Thursday, 18 May 2017 at 08:24:18 UTC, Walter Bright wrote: On 5/17/2017 10:07 PM, Patrick Schluter wrote: D requires afaict at least a 32 bit system Yes. You've said this some times before but never explained why there's such a limitation? I've actually used GDC to run code on 8bit

Re: Fails to use testFilename in unittest

2017-05-18 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, May 18, 2017 09:56:36 biocyberman via Digitalmars-d-learn wrote: > On Thursday, 18 May 2017 at 09:49:26 UTC, Jonathan M Davis wrote: > > On Thursday, May 18, 2017 09:40:33 biocyberman via > > > > Digitalmars-d-learn wrote: > >> [...] > > > > Actually, it's not used all over the place

Re: Fails to use testFilename in unittest

2017-05-18 Thread biocyberman via Digitalmars-d-learn
On Thursday, 18 May 2017 at 09:49:26 UTC, Jonathan M Davis wrote: On Thursday, May 18, 2017 09:40:33 biocyberman via Digitalmars-d-learn wrote: [...] Actually, it's not used all over the place in Phobos. It's only used std.stdio, where it's a private function in a version(unittest) block.

Re: Fails to use testFilename in unittest

2017-05-18 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, May 18, 2017 09:40:33 biocyberman via Digitalmars-d-learn wrote: > There is a ongoing discussion about temp file over here: > http://forum.dlang.org/thread/sbehcxusxxibmpkae...@forum.dlang.org > > I have a question about generating a temporary file to write test > data. I can create

Re: Fails to use testFilename in unittest

2017-05-18 Thread biocyberman via Digitalmars-d-learn
This is the compile error message by the way: dmd -unittest ./testFile.d

Fails to use testFilename in unittest

2017-05-18 Thread biocyberman via Digitalmars-d-learn
There is a ongoing discussion about temp file over here: http://forum.dlang.org/thread/sbehcxusxxibmpkae...@forum.dlang.org I have a question about generating a temporary file to write test data. I can create my own file and use it but just want to use the existing tool for convenience.

[Issue 17406] New: int var = 10; write(--var,' ',var^^2); //output: 9 100 //NOT: 9 81

2017-05-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17406 Issue ID: 17406 Summary: int var = 10; write(--var,' ',var^^2); //output: 9 100 //NOT: 9 81 Product: D Version: D2 Hardware: x86_64 URL: http://dlang.org/

Re: Dconf - lightning talk: Excel add-ins in D

2017-05-18 Thread Nicholas Wilson via Digitalmars-d-announce
On Thursday, 18 May 2017 at 04:49:20 UTC, Laeeth Isharc wrote: On Wednesday, 17 May 2017 at 21:17:37 UTC, jmh530 wrote: On Wednesday, 17 May 2017 at 20:58:05 UTC, Laeeth Isharc wrote:

Re: Weak Eco System?

2017-05-18 Thread MysticZach via Digitalmars-d
On Thursday, 18 May 2017 at 05:43:48 UTC, Manu wrote: On 17 May 2017 at 00:51, Benro via Digitalmars-d < digitalmars-d@puremagic.com> wrote: [...] 4 Hours work. Discouraged and gave up after this. Visual Studio proper is the only IDE that 'just works' well, VisualD is very good.

Re: How to move append to an array?

2017-05-18 Thread biocyberman via Digitalmars-d-learn
On Monday, 15 May 2017 at 21:38:52 UTC, Yuxuan Shui wrote: Suppose I have a struct A { @disable this(this); } x; How do I append it into an array? Do I have to do array.length++; moveEmplace(x, array[$-1]); ? Judging form the way you write the struct. It is of C/C++ style. With that

Re: Fantastic exchange from DConf

2017-05-18 Thread Nicholas Wilson via Digitalmars-d
On Thursday, 18 May 2017 at 08:24:18 UTC, Walter Bright wrote: On 5/17/2017 10:07 PM, Patrick Schluter wrote: D requires afaict at least a 32 bit system Yes. What are the technical limitations of this? *LLVM has 16bit targets *Nobody would use druntime on 16bit anyway and would not generate

Re: DIP 1003 Formal Review

2017-05-18 Thread MysticZach via Digitalmars-d
On Thursday, 18 May 2017 at 03:59:49 UTC, MysticZach wrote: http://forum.dlang.org/post/kybywnscisxpebezw...@forum.dlang.org ) represents yet another distinct option. i.e. continue to allow `body`, but make it optional, that is, you can simply omit it if you want, while also allowing it as an

Re: Replacing std.math raw pointer arithmetic with a union type

2017-05-18 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Wednesday, 17 May 2017 at 20:25:26 UTC, Stefan Koch wrote: On Wednesday, 17 May 2017 at 19:26:32 UTC, tsbockman wrote: On Wednesday, 17 May 2017 at 15:30:29 UTC, Stefan Koch wrote: the special case it supports if cast(uint*) and cast(ulong*) What about casting from real* when real.sizeof

Re: GPGPU progess

2017-05-18 Thread Nicholas Wilson via Digitalmars-d
On Thursday, 18 May 2017 at 05:39:52 UTC, Manu wrote: I just caught up on the dconf material. It was a really interesting year, and I'm super bummed I missed it! So I'm just starting out on some GPGPU work, and I love the direction we're going here. Given this scenario; I want to write CUDA

alias this and struct initializer

2017-05-18 Thread Andre Pany via Digitalmars-d-learn
Hi, I have some issues with struct initializer and alias this. In following example 1 and 2 is working but there is a syntax error for 3. I think as case 2 is working case 3 should work also. For me case 3 is looking much nicer than case 1. What do you think? void main() { // Working

Re: How to setup DLL and EXE projects in one VS solution

2017-05-18 Thread Mike Parker via Digitalmars-d-learn
On Thursday, 18 May 2017 at 07:53:02 UTC, Igor wrote: I tried just adding import paths to project and to di files and although compilation passes I still get link errors like: error LNK2019: unresolved external symbol _D10handmade_h10game_input6__initZ (handmade_h.game_input.__init)

Re: Fantastic exchange from DConf

2017-05-18 Thread Walter Bright via Digitalmars-d
On 5/17/2017 10:07 PM, Patrick Schluter wrote: D requires afaict at least a 32 bit system Yes. with virtual memory, No.

Re: Fantastic exchange from DConf

2017-05-18 Thread Patrick Schluter via Digitalmars-d
On Thursday, 18 May 2017 at 06:36:55 UTC, Paulo Pinto wrote: On Thursday, 18 May 2017 at 05:07:38 UTC, Patrick Schluter wrote: On Thursday, 18 May 2017 at 00:58:31 UTC, Steven Schveighoffer wrote: On 5/17/17 8:27 PM, H. S. Teoh via Digitalmars-d wrote: [...] What will cause a shift is a

Re: How to setup DLL and EXE projects in one VS solution

2017-05-18 Thread Igor via Digitalmars-d-learn
On Thursday, 18 May 2017 at 07:10:54 UTC, Rainer Schuetze wrote: You have to add an import path to the folder with dllproj inside to the project configuration of the exeproject. If you want to limit the imported code to the declarations, you can enable "generate interface headers" and add

Re: How to setup DLL and EXE projects in one VS solution

2017-05-18 Thread MGW via Digitalmars-d-learn
On Wednesday, 17 May 2017 at 19:48:42 UTC, Igor wrote: On Wednesday, 17 May 2017 at 18:03:04 UTC, Igor wrote: What exactly do mean by "binding"? Also I am wondering if using extern(C) as opposed to extern(D) only affects name mangling or am I losing some DLang possibilities since I am only

Yu(玉) - 0.0.4 : A Dlang's Toolkit

2017-05-18 Thread Dsby via Digitalmars-d-announce
add Buffer add http 1x parser add shared lib load https://github.com/dushibaiyu/yu/ https://github.com/dushibaiyu/yu/archive/v0.0.4.zip

Re: How to setup DLL and EXE projects in one VS solution

2017-05-18 Thread Rainer Schuetze via Digitalmars-d-learn
On 17.05.2017 18:56, Igor wrote: At the moment I have: EXEProject: app.d - it does loadlibrary of dllproj and uses data structures defined in dllproj.d (it imports dllproj). On the file system this file is under /platform/win32/ and is defined as module win32.app; DLLProject dllproj.d -

Re: Fantastic exchange from DConf

2017-05-18 Thread Laeeth Isharc via Digitalmars-d
On Thursday, 18 May 2017 at 00:58:31 UTC, Steven Schveighoffer wrote: On 5/17/17 8:27 PM, H. S. Teoh via Digitalmars-d wrote: [...] What will cause a shift is a continuous business loss. If business A and B are competing in the same space, and business A has a larger market share, but

Re: Fantastic exchange from DConf

2017-05-18 Thread Paulo Pinto via Digitalmars-d
On Thursday, 18 May 2017 at 05:07:38 UTC, Patrick Schluter wrote: On Thursday, 18 May 2017 at 00:58:31 UTC, Steven Schveighoffer wrote: On 5/17/17 8:27 PM, H. S. Teoh via Digitalmars-d wrote: [...] What will cause a shift is a continuous business loss. If business A and B are competing in