Re: shared - i need it to be useful

2018-10-21 Thread Joakim via Digitalmars-d
On Monday, 22 October 2018 at 00:22:19 UTC, Manu wrote: On Sun, Oct 21, 2018 at 2:35 PM Walter Bright via Digitalmars-d wrote: On 10/21/2018 2:08 PM, Walter Bright wrote: > On 10/21/2018 12:20 PM, Nicholas Wilson wrote: >> Yes, but the problem you describe is arises from implicit >>

Re: D T-Shirts

2018-10-21 Thread Mike Parker via Digitalmars-d
On Monday, 22 October 2018 at 01:08:11 UTC, Manu wrote: FWIW, I'm disappointed with the quality of my dman shirt; I've put it through the wash no more than 3-4 times and the print is aggressively deteriorating with each wash. I don't tend to wear it because it's disintegrating so fast. I'm

Re: D Binding to GUI libraries

2018-10-21 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 10/21/18 1:13 PM, Russel Winder wrote: On Sun, 2018-10-21 at 04:15 -0400, Nick Sabalausky (Abscissa) via Digitalmars-d wrote: […] That's pure nonsense: It's Linux - unless one option actually goes away (KDE is still actively used and developed), then there's no such thing as one "winning"

Re: D Binding to GUI libraries [was Interesting Observation from JAXLondon]

2018-10-21 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 10/21/18 7:36 AM, Andre Pany wrote: While talking about bindings, do not forget Delphi. It has still a good eco system. Combining Delphi's advanced Runtime reflection capabilities with D's advanced compile reflection capabilities opens this eco system. I created a proof of concept and

[Issue 11904] Error: this cannot be interpreted at compile-time (core/time.di)

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11904 Mathias LANG changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Issue 5749] (D1 only) argument evaluation order of chained function from right

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5749 Mathias LANG changed: What|Removed |Added Status|NEW |RESOLVED CC|

Re: D Binding to GUI libraries

2018-10-21 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 10/21/18 1:29 PM, Russel Winder wrote: No, D should not forget DWT. It's one of the few (they only?) D GUI toolkit that has a native look and feel. Apart from GtkD on GTK+ systems, and dqml, QtE5, qtD, and dqt on Qt, and wxD on wxWidgets. Qt and wxWidgets pride themselves on being able to

Re: We need an internal keyword.

2018-10-21 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 10/20/18 11:17 PM, 12345swordy wrote: So that classes can share some of their variables but not others in a module. IE. class A { internal int A; //This is shared in the module private int B; // But not this. } No need to reintroduce the "Friend" feature from cpp. I've always felt the

Re: Need help with setting up LDC to cross-compile to Android/ARM

2018-10-21 Thread H. S. Teoh via Digitalmars-d
On Sat, Oct 20, 2018 at 09:51:28AM +, Joakim via Digitalmars-d wrote: > On Friday, 19 October 2018 at 22:19:31 UTC, H. S. Teoh wrote: [...] > > Haha, I feel so silly now. NDK r13b does not seem to have the > > sysroot subdir required by the clang build command, that's why it > > couldn't find

Re: D Binding to GUI libraries

2018-10-21 Thread Gerald via Digitalmars-d
On Monday, 22 October 2018 at 04:41:08 UTC, Nick Sabalausky (Abscissa) wrote: On 10/21/18 1:13 PM, Russel Winder wrote: [...] First of all, minor nitpick: Unless some bombshell news occurred that I managed to miss, Ubuntu pushes their own Unity, NOT Gnome. Yes, that's still GTK, but

[Issue 1861] (D1 only) .sort fails if opCmp takes a ref param

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=1861 Mathias LANG changed: What|Removed |Added Status|REOPENED|RESOLVED CC|

Re: D alternative for node.js's socket.IO?

2018-10-21 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 10/21/18 11:59 PM, Neia Neutuladh wrote: On Sun, 21 Oct 2018 23:05:06 -0400, Nick Sabalausky (Abscissa) wrote: I'm afraid I'm not familiar with socket.io, and the homepage doesn't seem to tell me much (it doesn't even say whether it uses TCP or UDP). But that said, in D, the gold-standard

Re: D alternative for node.js's socket.IO?

2018-10-21 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 10/21/18 4:58 PM, Fleel wrote: On Sunday, 21 October 2018 at 20:41:41 UTC, JN wrote: On Sunday, 21 October 2018 at 20:14:46 UTC, Fleel wrote: Does anyone know of a good D alternative for the socket.IO server (https://socket.io)? I would like to transition my server from node.js to D, but I

[Issue 19197] Replace instances of typeid(T).getHash(..) with hashOf

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19197 Nathan S. changed: What|Removed |Added CC||n8sh.second...@hotmail.com --- Comment #2 from

[Issue 4485] CT only arrays appear in executable

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4485 Mathias LANG changed: What|Removed |Added Status|NEW |RESOLVED CC|

Re: D alternative for node.js's socket.IO?

2018-10-21 Thread Neia Neutuladh via Digitalmars-d
On Sun, 21 Oct 2018 23:05:06 -0400, Nick Sabalausky (Abscissa) wrote: > I'm afraid I'm not familiar with socket.io, and the homepage doesn't > seem to tell me much (it doesn't even say whether it uses TCP or UDP). > But that said, in D, the gold-standard for pretty much *anything* > related to

Re: shared - i need it to be useful

2018-10-21 Thread Manu via Digitalmars-d
On Sun, Oct 21, 2018 at 2:35 PM Walter Bright via Digitalmars-d wrote: > > On 10/21/2018 2:08 PM, Walter Bright wrote: > > On 10/21/2018 12:20 PM, Nicholas Wilson wrote: > >> Yes, but the problem you describe is arises from implicit conversion in the > >> other direction, which is not part of the

Re: Can this recursive template type with named type parameters be simplified or improved?

2018-10-21 Thread Hakan Aras via Digitalmars-d-learn
On Sunday, 21 October 2018 at 21:23:35 UTC, aliak wrote: Hi, I'm playing around with a recursive template type that allows for named template parameters. The problem is that it requires a lot of repetition and becomes more error prone as the number of named arguments increase. So 1) Any

Re: D T-Shirts

2018-10-21 Thread Mike Parker via Digitalmars-d
On Sunday, 21 October 2018 at 20:04:02 UTC, Fleel wrote: It would be awesome if there were T-Shirts with D-man on them. I would totally buy one, and would help to support the foundation too... We've got a store coming, with t-shirts and other items. D-man shirts will not be there, though.

Re: shared - i need it to be useful

2018-10-21 Thread Manu via Digitalmars-d
On Sun, Oct 21, 2018 at 3:15 PM Neia Neutuladh via Digitalmars-d wrote: > > On Sun, 21 Oct 2018 12:04:16 -0700, Manu wrote: > > On Sun, Oct 21, 2018 at 12:00 PM Timon Gehr via Digitalmars-d > > wrote: > >> Note that there may well be a good way to get the good properties of MP > >> without

Re: shared - i need it to be useful

2018-10-21 Thread Timon Gehr via Digitalmars-d
On 21.10.18 20:46, Manu wrote: Shared data is only useful if, at some point, it is read/written, presumably by casting it to unshared in @trusted code. As soon as that is done, you've got a data race with the other existing unshared aliases. If such a race is possible, then the @trusted

Re: shared - i need it to be useful

2018-10-21 Thread Timon Gehr via Digitalmars-d
On 21.10.18 21:04, Manu wrote: On Sun, Oct 21, 2018 at 12:00 PM Timon Gehr via Digitalmars-d wrote: On 21.10.18 17:54, Nicholas Wilson wrote: As soon as that is done, you've got a data race with the other existing unshared aliases. You're in @trusted code, that is the whole point. The

Re: shared - i need it to be useful

2018-10-21 Thread Manu via Digitalmars-d
On Sun, Oct 21, 2018 at 5:35 PM Timon Gehr via Digitalmars-d wrote: > > On 21.10.18 20:46, Manu wrote: > >> Shared data is only useful if, at some point, it is read/written, > >> presumably by > >> casting it to unshared in @trusted code. As soon as that is done, you've > >> got a > >> data

Re: shared - i need it to be useful

2018-10-21 Thread Nicholas Wilson via Digitalmars-d
On Monday, 22 October 2018 at 00:32:35 UTC, Timon Gehr wrote: This only works if untrusted programmers (i.e. programmers who are only allowed to write/modify @safe code) are not allowed to change your class. I.e. it does not work. This is the basis of the current @safe/@trusted/@system model.

Re: shared - i need it to be useful

2018-10-21 Thread Nicholas Wilson via Digitalmars-d
On Monday, 22 October 2018 at 00:38:33 UTC, Timon Gehr wrote: I just did, Link please?

Re: shared - i need it to be useful

2018-10-21 Thread Walter Bright via Digitalmars-d
On 10/21/2018 4:12 PM, Nicholas Wilson wrote: On Sunday, 21 October 2018 at 21:32:14 UTC, Walter Bright wrote: On 10/21/2018 2:08 PM, Walter Bright wrote: On 10/21/2018 12:20 PM, Nicholas Wilson wrote: Yes, but the problem you describe is arises from implicit conversion in the other

Re: shared - i need it to be useful

2018-10-21 Thread Manu via Digitalmars-d
On Sun, Oct 21, 2018 at 5:50 PM Walter Bright via Digitalmars-d wrote: > > On 10/21/2018 4:12 PM, Nicholas Wilson wrote: > > On Sunday, 21 October 2018 at 21:32:14 UTC, Walter Bright wrote: > >> On 10/21/2018 2:08 PM, Walter Bright wrote: > >>> On 10/21/2018 12:20 PM, Nicholas Wilson wrote: >

Re: shared - i need it to be useful

2018-10-21 Thread Timon Gehr via Digitalmars-d
On 22.10.18 02:46, Nicholas Wilson wrote: On Monday, 22 October 2018 at 00:38:33 UTC, Timon Gehr wrote: I just did, Link please? https://forum.dlang.org/post/pqii8k$11u3$1...@digitalmars.com

Re: shared - i need it to be useful

2018-10-21 Thread Timon Gehr via Digitalmars-d
On 22.10.18 02:45, Manu wrote: On Sun, Oct 21, 2018 at 5:35 PM Timon Gehr via Digitalmars-d wrote: On 21.10.18 20:46, Manu wrote: Shared data is only useful if, at some point, it is read/written, presumably by casting it to unshared in @trusted code. As soon as that is done, you've got a

Re: shared - i need it to be useful

2018-10-21 Thread Manu via Digitalmars-d
On Sun, Oct 21, 2018 at 5:40 PM Timon Gehr via Digitalmars-d wrote: > > On 21.10.18 21:04, Manu wrote: > > On Sun, Oct 21, 2018 at 12:00 PM Timon Gehr via Digitalmars-d > > wrote: > >> > >> On 21.10.18 17:54, Nicholas Wilson wrote: > >>> > As soon as that is done, you've got a data race

Re: shared - i need it to be useful

2018-10-21 Thread Nicholas Wilson via Digitalmars-d
On Monday, 22 October 2018 at 00:46:04 UTC, Walter Bright wrote: That's what I was referring to, and Manu's example. It doesn't work, as I pointed out. I'm pretty sure it does, but please repeat it. We will eventually. This started as a "please point out any problems with this" and has

Re: shared - i need it to be useful

2018-10-21 Thread Manu via Digitalmars-d
On Sun, Oct 21, 2018 at 5:55 PM Timon Gehr via Digitalmars-d wrote: > > On 22.10.18 02:45, Manu wrote: > > On Sun, Oct 21, 2018 at 5:35 PM Timon Gehr via Digitalmars-d > > wrote: > >> > >> On 21.10.18 20:46, Manu wrote: > Shared data is only useful if, at some point, it is read/written, >

Re: D T-Shirts

2018-10-21 Thread Manu via Digitalmars-d
On Sun, Oct 21, 2018 at 5:35 PM Mike Parker via Digitalmars-d wrote: > > On Sunday, 21 October 2018 at 20:04:02 UTC, Fleel wrote: > > It would be awesome if there were T-Shirts with D-man on them. > > I would totally buy one, and would help to support the > > foundation too... > > We've got a

Re: shared - i need it to be useful

2018-10-21 Thread Nicholas Wilson via Digitalmars-d
On Monday, 22 October 2018 at 00:55:00 UTC, Timon Gehr wrote: On 22.10.18 02:46, Nicholas Wilson wrote: On Monday, 22 October 2018 at 00:38:33 UTC, Timon Gehr wrote: I just did, Link please? https://forum.dlang.org/post/pqii8k$11u3$1...@digitalmars.com That contains no code. Not all of

Re: assigment to null class object member compiled? is this a bug?

2018-10-21 Thread dangbinghoo via Digitalmars-d-learn
On Friday, 19 October 2018 at 09:08:32 UTC, Vijay Nayar wrote: Technically the code you have is syntactically correct. You are permitted to create a class variable without assigning it to a class object. (Assigning it to a class object would look like "A a = new A();") Which section of The

Re: Building GUI projects with D

2018-10-21 Thread dangbinghoo via Digitalmars-d-learn
On Saturday, 20 October 2018 at 15:40:07 UTC, karis njiru wrote: Hi. Am a computer science student from Kenya and decided to use D for my class project on Principles of Programming Languages. Am having a lot of fun with D but have come across an issue. I have been using Visual D for the past 2

Re: shared - i need it to be useful

2018-10-21 Thread Neia Neutuladh via Digitalmars-d
On Sun, 21 Oct 2018 17:35:38 -0700, Manu wrote: > On Sun, Oct 21, 2018 at 3:15 PM Neia Neutuladh via Digitalmars-d > wrote: >> If we only used your proposal and only used @safe code, we wouldn't >> have any data races, but that's only because we wouldn't have any >> shared data. We'd have shared

Re: D Binding to GUI libraries

2018-10-21 Thread Russel Winder via Digitalmars-d
On Sat, 2018-10-20 at 23:38 +, Gregor Mückl via Digitalmars-d wrote: > […] > I don't want to judge, but I need to point out that we have > managed to make this discussion progress from outward-facing > marketing to technical difficulties and related pull requests. > This is not bad, but it

Re: Interesting Observation from JAXLondon

2018-10-21 Thread Russel Winder via Digitalmars-d
On Sat, 2018-10-20 at 21:12 -0400, Nick Sabalausky (Abscissa) via Digitalmars-d wrote: > […] > > This is a VERY important thing, and it's true for many of us (myself > included). This why it was a HUGE mistake when the community decided > it > should become taboo to promote D as a redesigned

Re: D Binding to GUI libraries

2018-10-21 Thread Russel Winder via Digitalmars-d
On Sat, 2018-10-20 at 21:25 -0400, Nick Sabalausky (Abscissa) via Digitalmars-d wrote: > […] > > And KDE. Not entirely true, you can run KDE application on a GNOME system, and I assume GNOME application on a KDE system. > I've heard a lot of very good things about GtkD, and honestly, I have >

Re: Interesting Observation from JAXLondon

2018-10-21 Thread Russel Winder via Digitalmars-d
On Sun, 2018-10-21 at 05:47 +, Joakim via Digitalmars-d wrote: > […] > > Simple, C++ is increasingly seen as irrelevant by those choosing > a new language, so D's real competition is now Go, Rust, Swift, > Nim, Zig, etc. These are people who want to write "fast code > fast," well except

Re: D Binding to GUI libraries [was Interesting Observation from JAXLondon]

2018-10-21 Thread Russel Winder via Digitalmars-d
On Sat, 2018-10-20 at 16:37 +, Atila Neves via Digitalmars-d wrote: > […] > > It turns out that translating C++ is *hard*. Partly because the > language is huge and complicated, but also partly because > libclang isn't all it's cracked up to be. But... dpp is probably > a few full work

Re: D Binding to GUI libraries

2018-10-21 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 10/21/18 3:33 AM, Russel Winder wrote: On Sat, 2018-10-20 at 21:25 -0400, Nick Sabalausky (Abscissa) via Digitalmars-d wrote: I've heard a lot of very good things about GtkD, and honestly, I have no doubts about any of it. Unfortunately though, the main problem with GtkD is simply GTK itself

Re: shared - i need it to be useful

2018-10-21 Thread rikki cattermole via Digitalmars-d
On 21/10/2018 10:41 PM, Manu wrote: On Sun., 21 Oct. 2018, 2:05 am Walter Bright via Digitalmars-d, mailto:digitalmars-d@puremagic.com>> wrote: On 10/20/2018 11:30 AM, Manu wrote: > You can write an invalid program in any imaginable number of ways; > that's just not an

Re: shared - i need it to be useful

2018-10-21 Thread Walter Bright via Digitalmars-d
On 10/20/2018 11:24 AM, Manu wrote: This is an unfair dismissal. It has nothing at all to do with fairness. It is about what the type system guarantees in @safe code. To repeat, the current type system guarantees in @safe code that T* and shared(T)* do not point to the same memory location.

Re: More zero-initialization optimizations pending in std.experimental.allocator?

2018-10-21 Thread Per Nordlöw via Digitalmars-d
On Saturday, 20 October 2018 at 15:10:38 UTC, Nathan S. wrote: are there more zero-initializations that can be optimized in std.experimental.allocator? I looked and identified low-hanging fruit in std.mutation.initializeAll & moveEmplace and in std.typecons.RefCounted (PR #6698), and in

[Issue 19321] Unions "may not" have fields with destructors

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19321 --- Comment #2 from Stanislav Blinov --- I propose to still make the change, but also add a note about outstanding bugs (IIRC there was another one concerning assignment of fields). At least that way the spec will not be misleading. --

[Issue 19197] Replace instances of typeid(T).getHash(..) with hashOf

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19197 --- Comment #1 from Tiberiu Lepadatu --- (In reply to ZombineDev from comment #0) > Since core.internal.hash.hashOf is a template, there are a number potential > benefits: > * better performance (e.g. more opportunities for inlining, less >

Re: shared - i need it to be useful

2018-10-21 Thread Simen Kjærås via Digitalmars-d
On Sunday, 21 October 2018 at 09:50:09 UTC, Walter Bright wrote: On 10/20/2018 11:24 AM, Manu wrote: This is an unfair dismissal. It has nothing at all to do with fairness. It is about what the type system guarantees in @safe code. To repeat, the current type system guarantees in @safe code

Re: shared - i need it to be useful

2018-10-21 Thread Simen Kjærås via Digitalmars-d
On Sunday, 21 October 2018 at 09:58:18 UTC, Walter Bright wrote: On 10/20/2018 11:08 AM, Nicholas Wilson wrote: You can if no-one else writes to it, which is the whole point of Manu's proposal. Perhaps it should be const shared instead of shared but still. There is no purpose whatsoever to

Re: Interesting Observation from JAXLondon

2018-10-21 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 10/21/18 1:47 AM, Joakim wrote: Simple, C++ is increasingly seen as irrelevant by those choosing a new language, so D's real competition is now Go, Rust, Swift, Nim, Zig, etc. These are people who want to write "fast code fast," well except for Rust users, who value ownership more.

Re: We need an internal keyword.

2018-10-21 Thread Laurent Tréguier via Digitalmars-d
On Sunday, 21 October 2018 at 03:17:23 UTC, 12345swordy wrote: So that classes can share some of their variables but not others in a module. IE. class A { internal int A; //This is shared in the module private int B; // But not this. } No need to reintroduce the "Friend" feature from cpp.

Re: D Binding to GUI libraries

2018-10-21 Thread Paolo Invernizzi via Digitalmars-d
On Sunday, 21 October 2018 at 07:33:45 UTC, Russel Winder wrote: The GTK/Qt battle on Linux was won by GTK+2 hence GNOME over KDE as the default for Debian and Fedora. Whether this was right or wrong is left as a choice for the reader! Linux is not only the desktop, and Qt simply dominates

Re: shared - i need it to be useful

2018-10-21 Thread Manu via Digitalmars-d
On Sun., 21 Oct. 2018, 2:05 am Walter Bright via Digitalmars-d, < digitalmars-d@puremagic.com> wrote: > On 10/20/2018 11:30 AM, Manu wrote: > > You can write an invalid program in any imaginable number of ways; > > that's just not an interesting discussion. > > What we're discussing is not an

Re: D Binding to GUI libraries

2018-10-21 Thread Jacob Carlborg via Digitalmars-d
On 2018-10-21 09:33, Russel Winder wrote: The SWT framework is being replaced with JavaFX, so should D forget DWT and do something similar? Where do you get that idea? SWT (and therefore DWT) is using the native drawing operations of the OS. No, D should not forget DWT. It's one of the few

Re: D Binding to GUI libraries [was Interesting Observation from JAXLondon]

2018-10-21 Thread Jacob Carlborg via Digitalmars-d
On 2018-10-21 03:25, Nick Sabalausky (Abscissa) wrote: What about DWT? It seemed pretty good from what I could tell, though I still haven't ventured into D GUIs just yet myself. Are there issues people have with DWT? Or WxD? DWT is currently stuck at SWT version 3.4 and no macOS version is

[Issue 19264] byCodeUnit should compare with strings

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19264 dcua...@yahoo.com changed: What|Removed |Added CC||dcua...@yahoo.com

[Issue 19197] Replace instances of typeid(T).getHash(..) with hashOf

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19197 Tiberiu Lepadatu changed: What|Removed |Added CC||tiberiulepadat...@gmail.com

[Issue 19283] [std.mathspecial] documentation for normal distribution doesn't list parameters

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19283 dcua...@yahoo.com changed: What|Removed |Added CC||dcua...@yahoo.com

[Issue 6106] Keep track of changes during replace function

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6106 dcua...@yahoo.com changed: What|Removed |Added CC||dcua...@yahoo.com

Re: Why is dynamic array length required here?

2018-10-21 Thread Samir via Digitalmars-d-learn
Stanislav, Ali, Mike -- Thank you all for your thoughtful and helpful replies to my queries. Apologies that it has taken this long to reply to you. I still haven't been able to find time to go through all of the code examples provided but hope to do so later this week. If I have additional

[Issue 19323] New: Pure function nesting explanation; move to correct spot in specs

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19323 Issue ID: 19323 Summary: Pure function nesting explanation; move to correct spot in specs Product: D Version: D2 Hardware: All OS: All Status: NEW

[Issue 18728] std.math.fdim does not handle nan correctly

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18728 Tiberiu Lepadatu changed: What|Removed |Added CC||tiberiulepadat...@gmail.com --- Comment

[Issue 19316] GC runtime breaks @safe

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

Re: Truly @nogc Exceptions?

2018-10-21 Thread welkam via Digitalmars-d
On Thursday, 20 September 2018 at 10:48:35 UTC, Atila Neves wrote: What's the fix? Have the compiler insert a call to the exception's destructor at the end of the `catch(scope Exception)` block. If I understood you correctly then we have same idea. If exception is not handled or re thrown

[Issue 19264] byCodeUnit should compare with strings

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19264 Eduard Staniloiu changed: What|Removed |Added Keywords||bootcamp CC|

Re: shared - i need it to be useful

2018-10-21 Thread Walter Bright via Digitalmars-d
On 10/20/2018 11:30 AM, Manu wrote: You can write an invalid program in any imaginable number of ways; that's just not an interesting discussion. What we're discussing is not an invalid program, but what guarantees the type system can provide. D's current type system guarantees that a T*

[Issue 19283] [std.mathspecial] documentation for normal distribution doesn't list parameters

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19283 Eduard Staniloiu changed: What|Removed |Added Keywords||bootcamp CC|

[Issue 19321] Unions "may not" have fields with destructors

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19321 Simen Kjaeraas changed: What|Removed |Added CC||simen.kja...@gmail.com --- Comment #1 from

[Issue 18998] Improve Operator Overloading docs

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18998 Cristian Creteanu changed: What|Removed |Added CC||cristiancretean...@gmail.co

[Issue 19294] Support for array operations with Complex! is incomplete

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19294 Cristian Creteanu changed: What|Removed |Added CC||cristiancretean...@gmail.co

Re: D Binding to GUI libraries [was Interesting Observation from JAXLondon]

2018-10-21 Thread Jacob Carlborg via Digitalmars-d
On 2018-10-20 11:25, Russel Winder wrote: GtkD works very well for me. But I guess GTK+ has a reputation of not working on Windows and macOS. Once a reputation is established it is nigh on impossible to refute. As has been stated elsewhere, it's working on Windows and macOS but looks very

Re: shared - i need it to be useful

2018-10-21 Thread Stanislav Blinov via Digitalmars-d
On Sunday, 21 October 2018 at 09:58:18 UTC, Walter Bright wrote: On 10/20/2018 11:08 AM, Nicholas Wilson wrote: You can if no-one else writes to it, which is the whole point of Manu's proposal. Perhaps it should be const shared instead of shared but still. There is no purpose whatsoever to

Re: D Binding to GUI libraries [was Interesting Observation from JAXLondon]

2018-10-21 Thread Andre Pany via Digitalmars-d
On Sunday, 21 October 2018 at 01:32:22 UTC, Nick Sabalausky (Abscissa) wrote: On 10/20/18 6:28 AM, Gregor Mückl wrote: Even though web and mobile UIs seem to be the rage at the moment, I believe a solid support for desktop UIs is very important for a general purpose language, if it wants to

Re: Building GUI projects with D

2018-10-21 Thread Jacob Carlborg via Digitalmars-d-learn
On 2018-10-20 17:40, karis njiru wrote: Hi. Am a computer science student from Kenya and decided to use D for my class project on Principles of Programming Languages. Am having a lot of fun with D but have come across an issue. I have been using Visual D for the past 2 months for my coding but

[Issue 18290] std.conv.parse throws ConvOverflowException for negative values in hex

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18290 Tiberiu Lepadatu changed: What|Removed |Added CC||tiberiulepadat...@gmail.com --- Comment

Re: shared - i need it to be useful

2018-10-21 Thread Simen Kjærås via Digitalmars-d
On Sunday, 21 October 2018 at 12:45:43 UTC, Stanislav Blinov wrote: On Sunday, 21 October 2018 at 05:47:14 UTC, Manu wrote: On Sat, Oct 20, 2018 at 10:10 AM Stanislav Blinov via Digitalmars-d wrote: Synchronized with what? You still have `a`, which isn't `shared` and doesn't require any

Re: We need an internal keyword.

2018-10-21 Thread Basile B. via Digitalmars-d
On Sunday, 21 October 2018 at 03:17:23 UTC, 12345swordy wrote: So that classes can share some of their variables but not others in a module. IE. class A { internal int A; //This is shared in the module private int B; // But not this. } No need to reintroduce the "Friend" feature from cpp.

Re: shared - i need it to be useful

2018-10-21 Thread Simen Kjærås via Digitalmars-d
On Sunday, 21 October 2018 at 13:24:49 UTC, Stanislav Blinov wrote: On Sunday, 21 October 2018 at 11:25:16 UTC, aliak wrote: When I say ok, I mean assuming the implementer actually wrote correct code. This applies to any shared method today as well. This ("ok") can only be achieved if the

[Issue 19294] Support for array operations with Complex! is incomplete

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19294 Eduard Staniloiu changed: What|Removed |Added Keywords||bootcamp CC|

[Issue 19197] Replace instances of typeid(T).getHash(..) with hashOf

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19197 Eduard Staniloiu changed: What|Removed |Added Keywords||bootcamp CC|

Re: shared - i need it to be useful

2018-10-21 Thread Simen Kjærås via Digitalmars-d
On Sunday, 21 October 2018 at 09:04:34 UTC, Walter Bright wrote: On 10/20/2018 11:30 AM, Manu wrote: You can write an invalid program in any imaginable number of ways; that's just not an interesting discussion. What we're discussing is not an invalid program, but what guarantees the type

Re: BindBC -- The successor to Derelict

2018-10-21 Thread Andrea Fontana via Digitalmars-d-announce
On Friday, 19 October 2018 at 17:34:10 UTC, Mike Parker wrote: [...] Well done!

Re: shared - i need it to be useful

2018-10-21 Thread Stanislav Blinov via Digitalmars-d
On Sunday, 21 October 2018 at 05:47:14 UTC, Manu wrote: On Sat, Oct 20, 2018 at 10:10 AM Stanislav Blinov via Digitalmars-d wrote: Synchronized with what? You still have `a`, which isn't `shared` and doesn't require any atomic access or synchronization. At this point it doesn't matter if

[Issue 19324] New: Code ")<" does not respect the coding

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19324 Issue ID: 19324 Summary: Code ")<" does not respect the coding Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: enhancement

[Issue 8025] std.net.curl.del should return response body.

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8025 Tiberiu Lepadatu changed: What|Removed |Added CC||tiberiulepadat...@gmail.com

[Issue 3129] Cannot take advantage of overriding Throwable.toString

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3129 Tiberiu Lepadatu changed: What|Removed |Added CC||tiberiulepadat...@gmail.com --- Comment

[Issue 18499] std.regex cannot handle (?i:)

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18499 Tiberiu Lepadatu changed: What|Removed |Added CC||tiberiulepadat...@gmail.com --- Comment

[Issue 18571] Missing functions in std.complex

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18571 Tiberiu Lepadatu changed: What|Removed |Added CC||tiberiulepadat...@gmail.com --- Comment

Re: D Binding to GUI libraries

2018-10-21 Thread Jacob Carlborg via Digitalmars-d
On 2018-10-21 19:29, Russel Winder wrote: But who apart from Eclipse and JetBrains uses Java for desktop GUI applications? There's probably a ton of business/enterprise applications that are written in Java. But I don't care for that, that's why I'm using D :) I do not have Eclipse to

[Issue 19316] GC runtime breaks @safe

2018-10-21 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19316 Stanislav Blinov changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID

Re: shared - i need it to be useful

2018-10-21 Thread Manu via Digitalmars-d
On Sun., 21 Oct. 2018, 2:55 am Walter Bright via Digitalmars-d, wrote: > > On 10/20/2018 11:24 AM, Manu wrote: > > This is an unfair dismissal. > > It has nothing at all to do with fairness. It is about what the type system > guarantees in @safe code. To repeat, the current type system guarantees

Re: Can opApply be made @nogc?

2018-10-21 Thread welkam via Digitalmars-d-learn
DIP 1000 says: Delegates currently defensively allocate closures with the GC. Few actually escape, and with scope only those that actually escape need to have the closures allocated. https://github.com/dlang/DIPs/blob/master/DIPs/DIP1000.md#benefits

Re: shared - i need it to be useful

2018-10-21 Thread Manu via Digitalmars-d
On Sun, Oct 21, 2018 at 3:00 AM Walter Bright via Digitalmars-d wrote: > > On 10/20/2018 11:08 AM, Nicholas Wilson wrote: > > You can if no-one else writes to it, which is the whole point of Manu's > > proposal. Perhaps it should be const shared instead of shared but still. > > There is no

Re: Which Docker to use?

2018-10-21 Thread Jon Degenhardt via Digitalmars-d-learn
On Sunday, 21 October 2018 at 18:11:37 UTC, Jacob Carlborg wrote: On 2018-10-18 01:15, Jon Degenhardt wrote: I need to use docker to build static linked Linux executables. My reason is specific, may be different than the OP's. I'm using Travis-CI to build executables. Travis-CI uses Ubuntu

Re: shared - i need it to be useful

2018-10-21 Thread Walter Bright via Digitalmars-d
I'd like to add that if the compiler can prove that a T* points to a unique T, then it can be implicitly cast to shared(T)*. And it does so, like the result of .dup can be so converted.

Re: shared - i need it to be useful

2018-10-21 Thread Timon Gehr via Digitalmars-d
On 21.10.18 17:54, Nicholas Wilson wrote: As soon as that is done, you've got a data race with the other existing unshared aliases. You're in @trusted code, that is the whole point. The onus is on the programmer to make that correct, same with regular @safe/@trusted@system code. Not all

Re: shared - i need it to be useful

2018-10-21 Thread Manu via Digitalmars-d
On Sun, Oct 21, 2018 at 12:00 PM Timon Gehr via Digitalmars-d wrote: > > On 21.10.18 17:54, Nicholas Wilson wrote: > > > >> As soon as that is done, you've got a data race with the other > >> existing unshared aliases. > > > > You're in @trusted code, that is the whole point. The onus is on the >

Re: shared - i need it to be useful

2018-10-21 Thread Nicholas Wilson via Digitalmars-d
On Sunday, 21 October 2018 at 09:50:09 UTC, Walter Bright wrote: Manu's Proposal --- @safe: int i; int* a = StartNewThread(a); // Compiles! Coder has no idea! ... in the new thread ... void StartOfNewThread(shared(int)* b) { ... we have two threads accessing 'i', one thinks it is

Re: shared - i need it to be useful

2018-10-21 Thread 12345swordy via Digitalmars-d
On Sunday, 21 October 2018 at 18:45:15 UTC, Walter Bright wrote: I'd like to add that if the compiler can prove that a T* points to a unique T, then it can be implicitly cast to shared(T)*. And it does so, like the result of .dup can be so converted. This can be achieved by using the unique

  1   2   >