[your code here]

2017-05-16 Thread hasan via Digitalmars-d
fh

Re: No tempFile() in std.file

2017-05-16 Thread Patrick Schluter via Digitalmars-d-learn
On Wednesday, 17 May 2017 at 05:30:40 UTC, Patrick Schluter wrote: On Tuesday, 16 May 2017 at 13:56:57 UTC, Jonathan M Davis wrote: [...] As your solution doesn't inherently solve the race condition associated with temporary files, you could still generate the name with a wrapper around

Re: No tempFile() in std.file

2017-05-16 Thread Patrick Schluter via Digitalmars-d-learn
On Tuesday, 16 May 2017 at 13:56:57 UTC, Jonathan M Davis wrote: On Tuesday, May 16, 2017 11:19:14 bachmeier via Digitalmars-d-learn wrote: On Monday, 15 May 2017 at 22:38:15 UTC, Jonathan M Davis wrote: > [...] That seems perfectly reasonable to me. Couldn't the function return both the path

Re: Low hanging fruit: dub git integration

2017-05-16 Thread Andre Pany via Digitalmars-d
On Wednesday, 17 May 2017 at 01:54:20 UTC, rikki cattermole wrote: I've built a prototype UI[1] for some code[0] to solve this exact problem. It may seem complex, but you can't rely on HTTP download options for easy access to repositories. I would appreciate anyone taking the time to do

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

2017-05-16 Thread H. S. Teoh via Digitalmars-d
On Wed, May 17, 2017 at 03:02:02AM +, tsbockman via Digitalmars-d wrote: > std.math contains a lot of raw pointer arithmetic for accessing the > various bit fields of floating-point values (see > https://en.wikipedia.org/wiki/IEEE_754-1985). Much of this code has > several nearly-identical

[Issue 17403] -main switch doesn't run correctly in unittest builds when linking separately

2017-05-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17403 Atila Neves changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 17403] -main switch doesn't run correctly in unittest builds when linking separately

2017-05-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17403 --- Comment #2 from Atila Neves --- That's... not what I expected. Thanks for the clarification. --

[Issue 17404] New: creating type named 'object' fails to compile, but only if you import something

2017-05-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17404 Issue ID: 17404 Summary: creating type named 'object' fails to compile, but only if you import something Product: D Version: D2 Hardware: x86 OS: Windows

Re: Equivalent to nullptr

2017-05-16 Thread Leonardo via Digitalmars-d-learn
On Thursday, 4 May 2017 at 04:34:40 UTC, Stanislav Blinov wrote: In the meantime, you can get around the issue by redeclaring the function with another name and loading it manually just after calling DerelictSDL2.load(): import derelict.sdl2.sdl; __gshared SDL_bool function

[Issue 16053] SysTime.fromIsoExtString don't work if nanoseconds are presented

2017-05-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16053 --- Comment #3 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/21c09f18d33b65475a89c7d6ec75d87556e6c1e5 Issue 16053: Fix it so that SysTime's from*String

Re: D equivalent of C++11's function local static initialization?

2017-05-16 Thread Timothee Cour via Digitalmars-d-learn
NOTE: curious about both cases: * thread local * shared On Tue, May 16, 2017 at 8:04 PM, Timothee Cour wrote: > what's the best D equivalent of C++11's function local static initialization? > ``` > void fun(){ > static auto a=[](){ > //some code >return

D equivalent of C++11's function local static initialization?

2017-05-16 Thread Timothee Cour via Digitalmars-d-learn
what's the best D equivalent of C++11's function local static initialization? ``` void fun(){ static auto a=[](){ //some code return some_var; } } ``` (C++11 guarantees thread safety)

Replacing std.math raw pointer arithmetic with a union type

2017-05-16 Thread tsbockman via Digitalmars-d
std.math contains a lot of raw pointer arithmetic for accessing the various bit fields of floating-point values (see https://en.wikipedia.org/wiki/IEEE_754-1985). Much of this code has several nearly-identical copies, manually specialized for each supported floating-point format. Such code

Re: Low hanging fruit: dub git integration

2017-05-16 Thread rikki cattermole via Digitalmars-d
On 16/05/2017 7:10 PM, Andre Pany wrote: Hi, While integrating the git protocol into dub is complex, there is a much much easier solution. Github and bitbucket provides access to the source code, including releases, branches and commits as archive files using the http protocol. Without

Re: DIP 1003 Formal Review

2017-05-16 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, May 17, 2017 01:01:29 MysticZach via Digitalmars-d wrote: > I think there are several issues at hand, and they need to be > dealt with individually: > > 1. `body` is a very useful identifier. It would be nice to have > it available. > > 2. Contract syntax is too verbose. > > 3. a.

Re: DIP 1003 Formal Review

2017-05-16 Thread Meta via Digitalmars-d
On Wednesday, 17 May 2017 at 01:01:29 UTC, MysticZach wrote: I think the thread will be more productive if the posters commit to answering just one of these issues Agreed. Let's hope it's the topic that the DIP is actually addressing ;-)

Re: DIP 1003 Formal Review

2017-05-16 Thread MysticZach via Digitalmars-d
On Tuesday, 16 May 2017 at 18:57:37 UTC, H. S. Teoh wrote: To me, it's actually worse, because now you have a visual conflation with do-loops. Overall, what I don't like about contract syntax is that it is so unbearably verbose. It's not just the in and out blocks and the (IMO redundant)

Re: Weak Eco System?

2017-05-16 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, May 16, 2017 23:17:10 Mike B Johnson via Digitalmars-d wrote: > On Tuesday, 16 May 2017 at 21:08:34 UTC, Benro wrote: > > On Tuesday, 16 May 2017 at 17:14:49 UTC, Basile B. wrote: > >> For example the build.bat fix could have been made and merged > >> in 10 min. if you would have took

Re: Weak Eco System?

2017-05-16 Thread Mike B Johnson via Digitalmars-d
On Tuesday, 16 May 2017 at 21:08:34 UTC, Benro wrote: On Tuesday, 16 May 2017 at 17:14:49 UTC, Basile B. wrote: For example the build.bat fix could have been made and merged in 10 min. if you would have took the time to report it! First of all. ! is not appreciated. This is considered

[Issue 17403] -main switch doesn't run correctly in unittest builds when linking separately

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

Re: Harbored-mod 0.2.1 and DYaml 0.6.1 at dlang-community

2017-05-16 Thread via Digitalmars-d-announce
On Tuesday, 16 May 2017 at 22:03:17 UTC, Daniel Kozak wrote: Nice, I have wait so many months until I decided to fork yamkeys because of d-yaml. Now I can delete it thanks. This makes my live easier. This is something I want to propose many times, that there is something like dlang-community.

Re: Cheetah: Keeping track of multiple connected clients

2017-05-16 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: Harbored-mod 0.2.1 and DYaml 0.6.1 at dlang-community

2017-05-16 Thread Seb via Digitalmars-d-announce
On Tuesday, 16 May 2017 at 22:03:17 UTC, Daniel Kozak wrote: Nice, I have wait so many months until I decided to fork yamkeys because of d-yaml. Now I can delete it thanks. This makes my live easier. This is something I want to propose many times, that there is something like dlang-community.

Re: Harbored-mod 0.2.1 and DYaml 0.6.1 at dlang-community

2017-05-16 Thread Daniel Kozak via Digitalmars-d-announce
Nice, I have wait so many months until I decided to fork yamkeys because of d-yaml. Now I can delete it thanks. This makes my live easier. This is something I want to propose many times, that there is something like dlang-community. Btw. is there some more info about it. Because I miss it somehow

Re: Cheetah: Keeping track of multiple connected clients

2017-05-16 Thread aberba via Digitalmars-d-learn
On Tuesday, 16 May 2017 at 17:49:07 UTC, bauss wrote: On Tuesday, 16 May 2017 at 16:01:49 UTC, aberba wrote: Does anyone know how to keep track of multiple clients in Cheetah socket lib such that one can directly message a client or broadcast to all connected clients. Something like:

Re: DIP 1003 Formal Review

2017-05-16 Thread jmh530 via Digitalmars-d
On Tuesday, 16 May 2017 at 21:39:19 UTC, jmh530 wrote: I agree with your points, but it doesn't necessarily preclude adding in/out statements. My only qualm is that they would seem very similar to scope statements. Perhaps scope(in) and scope(out(x)) or something like that. Would not break

Re: DIP 1003 Formal Review

2017-05-16 Thread jmh530 via Digitalmars-d
On Monday, 15 May 2017 at 02:02:42 UTC, Basile B. wrote: int fun(int a) { in assert(...); out(x) assert(...); // do stuff } It's nice, i like it but it cant work as simply. You're forgetting that interface member functions can have contracts. With this syntax interfaces member

Re: Weak Eco System?

2017-05-16 Thread Basile B. via Digitalmars-d
On Tuesday, 16 May 2017 at 21:08:34 UTC, Benro wrote: On Tuesday, 16 May 2017 at 17:14:49 UTC, Basile B. wrote: For example the build.bat fix could have been made and merged in 10 min. if you would have took the time to report it! First of all. ! is not appreciated. This is considered

Re: Weak Eco System?

2017-05-16 Thread Benro via Digitalmars-d
On Tuesday, 16 May 2017 at 16:31:54 UTC, WebFreak001 wrote: Sorry to hear that, usually the issue is directly logged to the developer tools (Ctrl-Shift-P -> Toggle Developer Tools) which you can just send in as issue on https://github.com/Pure-D/code-d if it is broken. It should always have

Re: Weak Eco System?

2017-05-16 Thread Benro via Digitalmars-d
On Tuesday, 16 May 2017 at 17:14:49 UTC, Basile B. wrote: For example the build.bat fix could have been made and merged in 10 min. if you would have took the time to report it! First of all. ! is not appreciated. This is considered yelling. Second. The dscanner issue was listed on there own

Re: Snap packages for DMD and DUB

2017-05-16 Thread via Digitalmars-d-announce
On Tuesday, 16 May 2017 at 20:35:51 UTC, Joseph Rushton Wakeling wrote: On Tuesday, 16 May 2017 at 19:56:56 UTC, Joseph Rushton Wakeling wrote: With your patch in the repo, the packages should be automatically rebuilt and uploaded some time in the next hours. I'll follow up with an

Re: Low hanging fruit: dub git integration

2017-05-16 Thread Andre Pany via Digitalmars-d
On Tuesday, 16 May 2017 at 19:41:32 UTC, Brad Anderson wrote: On Tuesday, 16 May 2017 at 18:10:52 UTC, Andre Pany wrote: Hi, While integrating the git protocol into dub is complex, there is a much much easier solution. Github and bitbucket provides access to the source code, including

Harbored-mod 0.2.1 and DYaml 0.6.1 at dlang-community

2017-05-16 Thread Basile B. via Digitalmars-d-announce
Following Brian Schott Announce [1] about the migration of his projects to the dlang-community, I'm pleased to announce that the most popular repository from Ferdinand Majerech are now also hosted there. - D-YAML, a YAML parser and emitter for D (native D implementation) is at

Re: DIP 1003 Formal Review

2017-05-16 Thread Steven Schveighoffer via Digitalmars-d
On 5/16/17 3:43 PM, Timon Gehr wrote: On 16.05.2017 21:25, Steven Schveighoffer wrote: I'm specifically asking if just removing the 'keyword-ness' of it is not doable for some reason. It's easy to do technically. (The bad thing about option 1 is that it's the kind of thing that would probably

Re: Snap packages for DMD and DUB

2017-05-16 Thread Joseph Rushton Wakeling via Digitalmars-d-announce
On Tuesday, 16 May 2017 at 19:56:56 UTC, Joseph Rushton Wakeling wrote: With your patch in the repo, the packages should be automatically rebuilt and uploaded some time in the next hours. I'll follow up with an announcement here once that has happened. Patches with Petar's PIC fix in them

Re: DIP 1003 Formal Review

2017-05-16 Thread Timon Gehr via Digitalmars-d
On 16.05.2017 22:00, H. S. Teoh via Digitalmars-d wrote: On Tue, May 16, 2017 at 09:48:07PM +0200, Timon Gehr via Digitalmars-d wrote: [...] I'm saying no to this: ... { }{ } It doesn't have to be formatted that way. For example: int foo() in { assert(blah); } {

[Issue 15720] iota(long.max, long.min, step) does not work properly

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

[Issue 15720] iota(long.max, long.min, step) does not work properly

2017-05-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15720 --- Comment #4 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/49ee158a9e5887ad835dc0f04c0309adf22ff965 Fix Issue 15720 - iota(long.max, long.min, step) does

Re: DIP 1003 Formal Review

2017-05-16 Thread H. S. Teoh via Digitalmars-d
On Tue, May 16, 2017 at 09:48:07PM +0200, Timon Gehr via Digitalmars-d wrote: [...] > I'm saying no to this: > > ... > { > > }{ > > } It doesn't have to be formatted that way. For example: int foo() in { assert(blah); } { // not so bad after all

Re: Snap packages for DMD and DUB

2017-05-16 Thread Joseph Rushton Wakeling via Digitalmars-d-announce
On Monday, 15 May 2017 at 21:07:05 UTC, Petar Kirov [ZombineDev] wrote: This should fix it: https://github.com/dlang-snaps/dmd.snap/pull/7 Thanks ever so much for that. It's really nice to have the first not-by-me patch in that repo, especially when it comes with such a nicely-written

Re: DIP 1003 Formal Review

2017-05-16 Thread Timon Gehr via Digitalmars-d
On 16.05.2017 20:57, H. S. Teoh via Digitalmars-d wrote: On Tue, May 16, 2017 at 08:43:01PM +0200, Timon Gehr via Digitalmars-d wrote: On 16.05.2017 20:06, Andrei Alexandrescu wrote: On 05/16/2017 01:59 PM, Random D user wrote: int foo() in { } out { } do { bar(); } Can't deny I like

Re: DIP 1003 Formal Review

2017-05-16 Thread Timon Gehr via Digitalmars-d
On 16.05.2017 21:25, Steven Schveighoffer wrote: I'm specifically asking if just removing the 'keyword-ness' of it is not doable for some reason. It's easy to do technically. (The bad thing about option 1 is that it's the kind of thing that would probably not arise from an up-front language

Re: Low hanging fruit: dub git integration

2017-05-16 Thread Brad Anderson via Digitalmars-d
On Tuesday, 16 May 2017 at 18:10:52 UTC, Andre Pany wrote: Hi, While integrating the git protocol into dub is complex, there is a much much easier solution. Github and bitbucket provides access to the source code, including releases, branches and commits as archive files using the http

Re: DIP 1003 Formal Review

2017-05-16 Thread Eugene Wissner via Digitalmars-d
On Tuesday, 16 May 2017 at 19:25:25 UTC, Steven Schveighoffer wrote: On 5/16/17 2:48 PM, Eugene Wissner wrote: On Tuesday, 16 May 2017 at 18:34:06 UTC, Steven Schveighoffer wrote: 1) Consistency with functions without contracts. This only applies to the "naked" version which has ugly }{ in

Re: DIP 1003 Formal Review

2017-05-16 Thread Eugene Wissner via Digitalmars-d
On Tuesday, 16 May 2017 at 19:24:43 UTC, Ola Fosheim Grøstad wrote: On Tuesday, 16 May 2017 at 19:23:28 UTC, Eugene Wissner wrote: What about error messages. With asserts I get the line where the assert failed. Can I get an information which condition failed (sorry for the question, I don't

Re: DIP 1003 Formal Review

2017-05-16 Thread Steven Schveighoffer via Digitalmars-d
On 5/16/17 2:48 PM, Eugene Wissner wrote: On Tuesday, 16 May 2017 at 18:34:06 UTC, Steven Schveighoffer wrote: On 5/12/17 12:17 PM, Mike Parker wrote: The first stage of the formal review for DIP 1003 [1], "Remove body as a Keyword", is now underway. From now until 11:59 PM ET on May 26 (3:59

Re: DIP 1003 Formal Review

2017-05-16 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 16 May 2017 at 19:23:28 UTC, Eugene Wissner wrote: What about error messages. With asserts I get the line where the assert failed. Can I get an information which condition failed (sorry for the question, I don't know how it works in other languages)? Use multiple requires/ensures

Re: DIP 1003 Formal Review

2017-05-16 Thread Eugene Wissner via Digitalmars-d
On Tuesday, 16 May 2017 at 19:18:43 UTC, Ola Fosheim Grøstad wrote: On Tuesday, 16 May 2017 at 18:57:37 UTC, H. S. Teoh wrote: this ugly verbosity, but imagine how much better it would be if we could write something like this instead: int foo(T, U)(T t, U u) if

Re: DIP 1003 Formal Review

2017-05-16 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 16 May 2017 at 18:57:37 UTC, H. S. Teoh wrote: this ugly verbosity, but imagine how much better it would be if we could write something like this instead: int foo(T, U)(T t, U u) if (sigConstraints!T && sigConstraints!U) in (t > 0 && u < 10) out(foo

Re: On the subject of error messages

2017-05-16 Thread Steven Schveighoffer via Digitalmars-d
On 5/16/17 2:29 PM, Stanislav Blinov wrote: On Tuesday, 16 May 2017 at 15:47:37 UTC, Steven Schveighoffer wrote: On 5/16/17 9:54 AM, Stanislav Blinov wrote: On Tuesday, 16 May 2017 at 12:27:30 UTC, Steven Schveighoffer wrote: When I have a type like this: struct S { int foo; } and the

Re: DIP 1003 Formal Review

2017-05-16 Thread H. S. Teoh via Digitalmars-d
On Tue, May 16, 2017 at 08:43:01PM +0200, Timon Gehr via Digitalmars-d wrote: > On 16.05.2017 20:06, Andrei Alexandrescu wrote: > > On 05/16/2017 01:59 PM, Random D user wrote: > > > > > > int foo() > > > in > > > { > > > } > > > out > > > { > > > } > > > do > > > { > > > bar(); > > > } > > >

Re: DIP 1003 Formal Review

2017-05-16 Thread Eugene Wissner via Digitalmars-d
On Tuesday, 16 May 2017 at 16:10:56 UTC, David Gileadi wrote: One possible substitute for the `function` keyword in option 2 could be `do`. I'm not convinced it's a good substitute, but I thought I'd throw it out there. Looks weird for a C-style language imho.

Re: DMD now has colorized syntax highlighting in error messages

2017-05-16 Thread Random D user via Digitalmars-d-announce
On Sunday, 14 May 2017 at 14:07:20 UTC, Walter Bright wrote: https://github.com/dlang/dmd/pull/6777 It turned out to be unexpectedly easy to implement. Nice. But color highlighting should always be configurable (otherwise it's half done), because there are a lot of people who like colors,

Re: DIP 1003 Formal Review

2017-05-16 Thread Eugene Wissner via Digitalmars-d
On Tuesday, 16 May 2017 at 18:34:06 UTC, Steven Schveighoffer wrote: On 5/12/17 12:17 PM, Mike Parker wrote: The first stage of the formal review for DIP 1003 [1], "Remove body as a Keyword", is now underway. From now until 11:59 PM ET on May 26 (3:59 AM GMT on May 27), the community has the

Re: DIP 1003 Formal Review

2017-05-16 Thread Timon Gehr via Digitalmars-d
On 16.05.2017 20:06, Andrei Alexandrescu wrote: On 05/16/2017 01:59 PM, Random D user wrote: int foo() in { } out { } do { bar(); } Can't deny I like that. -- Andrei Beats options 2 and 3.

Re: DIP 1003 Formal Review

2017-05-16 Thread Timon Gehr via Digitalmars-d
On 16.05.2017 19:44, MysticZach wrote: On Tuesday, 16 May 2017 at 17:42:11 UTC, MysticZach wrote: On Tuesday, 16 May 2017 at 15:22:12 UTC, Timon Gehr wrote: auto foo()in{ assert(true); }out{ assert(true); }{ return 3; } Are you really arguing for this? I don't want to write code

Re: DIP 1003 Formal Review

2017-05-16 Thread Steven Schveighoffer via Digitalmars-d
On 5/12/17 12:17 PM, Mike Parker wrote: The first stage of the formal review for DIP 1003 [1], "Remove body as a Keyword", is now underway. From now until 11:59 PM ET on May 26 (3:59 AM GMT on May 27), the community has the opportunity to provide last-minute feedback. If you missed the

Re: On the subject of error messages

2017-05-16 Thread Stanislav Blinov via Digitalmars-d
On Tuesday, 16 May 2017 at 15:47:37 UTC, Steven Schveighoffer wrote: On 5/16/17 9:54 AM, Stanislav Blinov wrote: On Tuesday, 16 May 2017 at 12:27:30 UTC, Steven Schveighoffer wrote: When we have tests using dummy lambdas, are we to expect users to immediately extract the lambda body, parse

Low hanging fruit: dub git integration

2017-05-16 Thread Andre Pany via Digitalmars-d
Hi, While integrating the git protocol into dub is complex, there is a much much easier solution. Github and bitbucket provides access to the source code, including releases, branches and commits as archive files using the http protocol. Without counting the actual unzip/untar coding I

Re: DIP 1003 Formal Review

2017-05-16 Thread Andrei Alexandrescu via Digitalmars-d
On 05/16/2017 01:59 PM, Random D user wrote: int foo() in { } out { } do { bar(); } Can't deny I like that. -- Andrei

Re: DIP 1003 Formal Review

2017-05-16 Thread Random D user via Digitalmars-d
On Sunday, 14 May 2017 at 15:39:12 UTC, Walter Bright wrote: On 5/12/2017 9:17 AM, Mike Parker wrote: The first stage of the formal review for DIP 1003 [1], "Remove body as a Keyword", is now underway. A combination of Options 1 and 2: 1. Introduce 'function' as an alternative to 'body'.

Re: Fantastic exchange from DConf

2017-05-16 Thread Walter Bright via Digitalmars-d
On 5/16/2017 10:29 AM, Steven Schveighoffer wrote: 1 week later: WanaCry. Both Walter and WanaCry start with W. Hm No need to breed mosquitos to promote a cure for malaria :-)

Re: Cheetah: Keeping track of multiple connected clients

2017-05-16 Thread bauss via Digitalmars-d-learn
On Tuesday, 16 May 2017 at 16:01:49 UTC, aberba wrote: Does anyone know how to keep track of multiple clients in Cheetah socket lib such that one can directly message a client or broadcast to all connected clients. Something like: onMessage(... e) { ... // send to all

Re: DIP 1003 Formal Review

2017-05-16 Thread MysticZach via Digitalmars-d
On Tuesday, 16 May 2017 at 17:42:11 UTC, MysticZach wrote: On Tuesday, 16 May 2017 at 15:22:12 UTC, Timon Gehr wrote: auto foo()in{ assert(true); }out{ assert(true); }{ return 3; } Are you really arguing for this? I don't want to write code like this. It's not any better than

Re: DIP 1003 Formal Review

2017-05-16 Thread MysticZach via Digitalmars-d
On Tuesday, 16 May 2017 at 15:22:12 UTC, Timon Gehr wrote: auto foo()in{ assert(true); }out{ assert(true); }{ return 3; } Are you really arguing for this? I don't want to write code like this. It's not any better than this: auto foo()in{ assert(true); }out{ assert(true);

[Issue 17403] -main switch doesn't run correctly in unittest builds when linking separately

2017-05-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17403 Atila Neves changed: What|Removed |Added Severity|enhancement |normal --

[Issue 17403] New: -main switch doesn't run correctly in unittest builds when linking separately

2017-05-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17403 Issue ID: 17403 Summary: -main switch doesn't run correctly in unittest builds when linking separately Product: D Version: D2 Hardware: x86_64 OS: Linux

Re: Fantastic exchange from DConf

2017-05-16 Thread Steven Schveighoffer via Digitalmars-d
On 5/16/17 11:19 AM, Walter Bright wrote: On 5/5/2017 11:26 PM, Joakim wrote: Walter: I believe memory safety will kill C. I can't find any definitive explanation of what the Wannacry exploit is. One person told me it was an overflow bug, another that it was truncation from converting 32 to

[Issue 15720] iota(long.max, long.min, step) does not work properly

2017-05-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15720 Andrei Alexandrescu changed: What|Removed |Added CC||and...@erdani.com

[Issue 17402] dirEntries iterator crashes in conjunction with readText

2017-05-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17402 --- Comment #3 from Andrei Alexandrescu --- More info: the code only crashes when invoked from inside a dmd unittest. --

[Issue 17402] dirEntries iterator crashes in conjunction with readText

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

Re: Weak Eco System?

2017-05-16 Thread Basile B. via Digitalmars-d
On Tuesday, 16 May 2017 at 14:51:29 UTC, Benro wrote: Then found out it requires Dub, DCD, Dscanner, DFmt .. And here the "work" begins. It already requires GIT to be installed on the host system. Then it require knowledge how to clone the projects and building them. Several of the

Re: Andrei's "Design by Introspection" talk now on Hacker News

2017-05-16 Thread Walter Bright via Digitalmars-d-announce
On 5/16/2017 8:24 AM, Walter Bright wrote: Look under the [new] tab. It appeared at about 8:00AM PST. and reddit: https://www.reddit.com/r/programming/comments/6bhnss/andrei_alexandrescu_design_by_introspection_talk/

Re: Weak Eco System?

2017-05-16 Thread WebFreak001 via Digitalmars-d
On Tuesday, 16 May 2017 at 14:51:29 UTC, Benro wrote: **Visual Studio Code code-d:** * Installed. * Gave warning to install Workspaces-d. Auto installed Workspaces-d. Restarted. * Gave warning for DUB, DCD, etc ... Auto installed all dependances. Again issues. Code formatting etc worked

Re: Fantastic exchange from DConf

2017-05-16 Thread Joakim via Digitalmars-d
On Tuesday, 16 May 2017 at 15:19:54 UTC, Walter Bright wrote: On 5/5/2017 11:26 PM, Joakim wrote: Walter: I believe memory safety will kill C. I can't find any definitive explanation of what the Wannacry exploit is. One person told me it was an overflow bug, another that it was truncation

Re: DIP 1003 Formal Review

2017-05-16 Thread Timon Gehr via Digitalmars-d
On 16.05.2017 17:47, Jonathan M Davis via Digitalmars-d wrote: ... And having to have body (or function whatever other keyword we might put there) just makes contracts that much more verbose That's seriously exaggerated. - as well as being inconsistent with how functions bodies are declared

Re: DIP 1003 Formal Review

2017-05-16 Thread David Gileadi via Digitalmars-d
On 5/12/17 9:17 AM, Mike Parker wrote: The first stage of the formal review for DIP 1003 [1], "Remove body as a Keyword", is now underway. From now until 11:59 PM ET on May 26 (3:59 AM GMT on May 27), the community has the opportunity to provide last-minute feedback. If you missed the

Re: DMD now has colorized syntax highlighting in error messages

2017-05-16 Thread Adam D. Ruppe via Digitalmars-d-announce
On Tuesday, 16 May 2017 at 15:38:53 UTC, Walter Bright wrote: It includes DOS and Windows consoles. Only under specific circumstances. On the VGA hardware, underline shares a bit with blue and needs a register tweaked to make it visible (the default 16 color VGA text mode does NOT display

Cheetah: Keeping track of multiple connected clients

2017-05-16 Thread aberba via Digitalmars-d-learn
Does anyone know how to keep track of multiple clients in Cheetah socket lib such that one can directly message a client or broadcast to all connected clients. Something like: onMessage(... e) { ... // send to all e.clients.broadcast (message); ...OR... // target a client

Re: Weak Eco System?

2017-05-16 Thread aberba via Digitalmars-d
On Tuesday, 16 May 2017 at 14:51:29 UTC, Benro wrote: A quick summary trying to get D and a some IDEs running on a Windows environment. [...] I just install sublime text editor and that all the tooling I ever needed. Sublime has a Dkit plugin too. I agree to bundling the tools together

Re: On the subject of error messages

2017-05-16 Thread Steven Schveighoffer via Digitalmars-d
On 5/16/17 9:54 AM, Stanislav Blinov wrote: On Tuesday, 16 May 2017 at 12:27:30 UTC, Steven Schveighoffer wrote: When we have tests using dummy lambdas, are we to expect users to immediately extract the lambda body, parse it, and figure out what's wrong? This is what you have to do today.

Re: DIP 1003 Formal Review

2017-05-16 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, May 16, 2017 17:22:12 Timon Gehr via Digitalmars-d wrote: > On 15.05.2017 03:18, Jonathan M Davis via Digitalmars-d wrote: > > So, while I do like the idea of getting the word body back as an > > identifier, what really appeals to me here is getting rid of the need > > for it with

rdub V2 released

2017-05-16 Thread JamesD via Digitalmars-d-announce
V2 accepts multiple files and wildcard *.d on the command line. https://code.dlang.org/packages/rdub RDUB is a front end for DUB, a D language build tool. It's designed to build source files specified on the command line, without having to edit the dub files: dub.json, dub.sdl, src/app.d,

Re: DMD now has colorized syntax highlighting in error messages

2017-05-16 Thread Walter Bright via Digitalmars-d-announce
On 5/16/2017 8:25 AM, Adam D. Ruppe wrote: It's also possible to use underlining. Yeah, on some systems, but not really on Windows or even all linux terminals. Color has broader support, though you do want to be careful not to *depend* on color either. I've never met an ASCII console that

Re: DMD now has colorized syntax highlighting in error messages

2017-05-16 Thread Jonathan M Davis via Digitalmars-d-announce
On Tuesday, May 16, 2017 08:11:21 Walter Bright via Digitalmars-d-announce wrote: > On 5/16/2017 7:17 AM, Adam D. Ruppe wrote: > > So again it is NOT color that bothers me. It is OVERUSE of color for > > stuff that isn't important to read the message which dilutes the > > meaning of color. It

Re: DMD now has colorized syntax highlighting in error messages

2017-05-16 Thread Adam D. Ruppe via Digitalmars-d-announce
On Tuesday, 16 May 2017 at 15:11:21 UTC, Walter Bright wrote: error: undefined identifier maybe Colorizing code distinguishes it from text. What's important there? The generic syntax that you get from a syntax highlighter or the fact that it is the user input? Drawing attention to

Re: DIP 1003 Formal Review

2017-05-16 Thread Timon Gehr via Digitalmars-d
On 15.05.2017 03:18, Jonathan M Davis via Digitalmars-d wrote: So, while I do like the idea of getting the word body back as an identifier, what really appeals to me here is getting rid of the need for it with contracts. auto foo()in{ assert(true); }out{ assert(true); }{ return 3;

Re: No tempFile() in std.file

2017-05-16 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, May 16, 2017 08:06:13 H. S. Teoh via Digitalmars-d-learn wrote: > On Tue, May 16, 2017 at 06:56:57AM -0700, Jonathan M Davis via Digitalmars-d-learn wrote: > > On Tuesday, May 16, 2017 11:19:14 bachmeier via Digitalmars-d-learn wrote: > > > On Monday, 15 May 2017 at 22:38:15 UTC,

Re: DMD now has colorized syntax highlighting in error messages

2017-05-16 Thread H. S. Teoh via Digitalmars-d-announce
On Tue, May 16, 2017 at 08:11:21AM -0700, Walter Bright via Digitalmars-d-announce wrote: > On 5/16/2017 7:17 AM, Adam D. Ruppe wrote: > > So again it is NOT color that bothers me. It is OVERUSE of color for > > stuff that isn't important to read the message which dilutes the > > meaning of

Re: Fantastic exchange from DConf

2017-05-16 Thread Walter Bright via Digitalmars-d
On 5/5/2017 11:26 PM, Joakim wrote: Walter: I believe memory safety will kill C. I can't find any definitive explanation of what the Wannacry exploit is. One person told me it was an overflow bug, another that it was truncation from converting 32 to 16 bits. Anyhow, the Wannacry disaster

[Issue 17356] [Reg 2.075] __simd_sto no longer executed

2017-05-16 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17356 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/894d9950f4ff996e1342242e7e51953ac718fc01 fix Issue 17356 - [Reg 2.075] __simd_sto no longer executed

Re: Weak Eco System?

2017-05-16 Thread burber via Digitalmars-d
On Tuesday, 16 May 2017 at 14:51:29 UTC, Benro wrote: A quick summary trying to get D and a some IDEs running on a Windows environment. [...] I've tried many different IDEs, some are alright but most don't have what I personally think they should have. I think if this language had a solid

[Issue 17356] [Reg 2.075] __simd_sto no longer executed

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

Re: No tempFile() in std.file

2017-05-16 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, May 16, 2017 at 08:06:13AM -0700, H. S. Teoh via Digitalmars-d-learn wrote: > On Tue, May 16, 2017 at 06:56:57AM -0700, Jonathan M Davis via > Digitalmars-d-learn wrote: > > On Tuesday, May 16, 2017 11:19:14 bachmeier via Digitalmars-d-learn wrote: > > > On Monday, 15 May 2017 at

Re: DMD now has colorized syntax highlighting in error messages

2017-05-16 Thread Walter Bright via Digitalmars-d-announce
On 5/16/2017 7:17 AM, Adam D. Ruppe wrote: So again it is NOT color that bothers me. It is OVERUSE of color for stuff that isn't important to read the message which dilutes the meaning of color. It isn't special anymore. Perhaps. I know I have some trouble distinguishing code from explanatory

[issue std.regex] Fail to match with negative look-ahead assertion when tracking down on a delimiter

2017-05-16 Thread k-five via Digitalmars-d-learn
Although I wanted to post this context at: https://issues.dlang.org/ but even I registered at,I could not login to. -- As long as I know a little about RegExp, the two below patterns are the same: [ 1 ]: ^(?:[ab]|ab)(.)(?:(?!\1).)+\1$ [ 2 ]:

Re: No tempFile() in std.file

2017-05-16 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, May 16, 2017 at 06:56:57AM -0700, Jonathan M Davis via Digitalmars-d-learn wrote: > On Tuesday, May 16, 2017 11:19:14 bachmeier via Digitalmars-d-learn wrote: > > On Monday, 15 May 2017 at 22:38:15 UTC, Jonathan M Davis wrote: > > > I suppose that we could add a tempFile that did what > >

Re: Andre's Google Tel Aviv Talk

2017-05-16 Thread rikki cattermole via Digitalmars-d-announce
On 16/05/2017 4:05 PM, rikki cattermole wrote: On 16/05/2017 4:04 PM, Andrei Alexandrescu wrote: On 05/16/2017 11:02 AM, Walter Bright wrote: On 5/16/2017 7:00 AM, Andrei Alexandrescu wrote: Same material as my DConf talk, better delivery. Longer, too, however. -- Andrei I.e. the Director's

Re: Andre's Google Tel Aviv Talk

2017-05-16 Thread rikki cattermole via Digitalmars-d-announce
On 16/05/2017 4:04 PM, Andrei Alexandrescu wrote: On 05/16/2017 11:02 AM, Walter Bright wrote: On 5/16/2017 7:00 AM, Andrei Alexandrescu wrote: Same material as my DConf talk, better delivery. Longer, too, however. -- Andrei I.e. the Director's Cut. It's been also on

Re: Andre's Google Tel Aviv Talk

2017-05-16 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 05/16/2017 11:02 AM, Walter Bright wrote: On 5/16/2017 7:00 AM, Andrei Alexandrescu wrote: Same material as my DConf talk, better delivery. Longer, too, however. -- Andrei I.e. the Director's Cut. It's been also on https://news.ycombinator.com/newest as of a few minutes ago. -- Andrei

  1   2   >