Re: shared - i need it to be useful

2018-10-18 Thread Steven Schveighoffer via Digitalmars-d
On 10/18/18 10:11 AM, Simen Kjærås wrote: On Thursday, 18 October 2018 at 13:35:22 UTC, Steven Schveighoffer wrote: struct ThreadSafe {    private int x;    void increment()    {   ++x; // I know this is not shared, so no reason to use atomics    }    void increment() shared    {   atomi

Re: shared - i need it to be useful

2018-10-18 Thread Simen Kjærås via Digitalmars-d
On Thursday, 18 October 2018 at 13:35:22 UTC, Steven Schveighoffer wrote: struct ThreadSafe { private int x; void increment() { ++x; // I know this is not shared, so no reason to use atomics } void increment() shared { atomicIncrement(&x); // use atomics, to avoid

Re: shared - i need it to be useful

2018-10-18 Thread Steven Schveighoffer via Digitalmars-d
On 10/18/18 9:35 AM, Steven Schveighoffer wrote: struct NotThreadsafe {   private int x;   void local()   {     ++x; // <- invalidates the method below, you violate the other function's `shared` promise   }   void notThreadsafe() shared   {     atomicIncrement(&x);   } } [snip] But

Re: shared - i need it to be useful

2018-10-18 Thread Steven Schveighoffer via Digitalmars-d
On 10/18/18 2:20 AM, Manu wrote: On Wed, Oct 17, 2018 at 5:05 AM Timon Gehr via Digitalmars-d wrote: [... all text ...] OMFG, I just spent about 3 hours writing a super-detailed reply to all of Timon's posts in aggregate... I clicked send... and it's gone. I don't know if

Re: shared - i need it to be useful

2018-10-18 Thread Steven Schveighoffer via Digitalmars-d
On 10/17/18 10:26 PM, Manu wrote: On Wed, Oct 17, 2018 at 6:50 PM Steven Schveighoffer via Digitalmars-d The implicit cast means that you have to look at more than just your method. You have to look at the entire module, and figure out all the interactions, to see if the thread safe method

Re: shared - i need it to be useful

2018-10-18 Thread Simen Kjærås via Digitalmars-d
On Thursday, 18 October 2018 at 13:09:10 UTC, Simen Kjærås wrote: Ergo... you can't have functions taking pointers to shared primitives. Ergo, `shared ` becomes a useless language construct. Yup, this is correct. But wrap it in a struct, like e.g. Atomic!int, and everything's hunky-dory. So

Re: My statements related to terminating my SAoC relationship

2018-10-18 Thread Basile.B via Digitalmars-d
On Monday, 15 October 2018 at 21:26:52 UTC, solidstate1991 wrote: I have done two mistakes: I underestimated the scope of the project and overestimated my capabilities. This caused a chain reaction, which in turn made the first milestone unreachable. At the same time, my sleep disorder became

Re: shared - i need it to be useful

2018-10-18 Thread Simen Kjærås via Digitalmars-d
On Thursday, 18 October 2018 at 12:15:07 UTC, Stanislav Blinov wrote: On Thursday, 18 October 2018 at 11:35:21 UTC, Simen Kjærås wrote: On Thursday, 18 October 2018 at 10:08:48 UTC, Stanislav Blinov wrote: Manu, how is it that you can't see what *your own* proposal means??? Implicit casting f

Re: shared - i need it to be useful

2018-10-18 Thread Stanislav Blinov via Digitalmars-d
On Thursday, 18 October 2018 at 11:35:21 UTC, Simen Kjærås wrote: On Thursday, 18 October 2018 at 10:08:48 UTC, Stanislav Blinov wrote: Manu, how is it that you can't see what *your own* proposal means??? Implicit casting from mutable to shared means that everything is shared by default! Prec

Re: Shared - Another Thread

2018-10-18 Thread Patrick Schluter via Digitalmars-d
On Wednesday, 17 October 2018 at 22:56:26 UTC, H. S. Teoh wrote: If something might be used by someone else it's better not to touch it, unless one has confirmation it is not used by someone else. This is what shared has to enforce. Yes. But how can the compiler statically verify this? Bec

Re: shared - i need it to be useful

2018-10-18 Thread Simen Kjærås via Digitalmars-d
On Thursday, 18 October 2018 at 10:08:48 UTC, Stanislav Blinov wrote: Manu, how is it that you can't see what *your own* proposal means??? Implicit casting from mutable to shared means that everything is shared by default! Precisely the opposite of what D proclaims. Well, sorta. But that's

Re: shared - i need it to be useful

2018-10-18 Thread Stanislav Blinov via Digitalmars-d
Manu, how is it that you can't see what *your own* proposal means??? Implicit casting from mutable to shared means that everything is shared by default! Precisely the opposite of what D proclaims. You also essentially forbid defining *any* functions that take `shared T*` argument(s). You kee

Re: My statements related to terminating my SAoC relationship

2018-10-18 Thread kinke via Digitalmars-d
On Thursday, 18 October 2018 at 00:28:32 UTC, solidstate1991 wrote: I hope it's not some melatonin insensitivity, that would require some pretty harsh drugs. Have you given Cannabis a try? You don't have to smoke it, it can be vaporized too for example, and is really easy to grow yourself.

Dlang at FOSDEM 2019

2018-10-18 Thread Pjotr Prins via Digitalmars-d
D usually has a talk in the LLVM room. There are more options, e.g., we are organizing a devroom on Minimalistic Languages. It may be an idea to propose one or two talks on minimalism. D as a betterC would be interesting. https://libreplanet.org/wiki/FOSDEM2019-devroom-minimalism

Re: DMD Linker Issue on Windows

2018-10-18 Thread Kagamin via Digitalmars-d
On Thursday, 18 October 2018 at 00:24:29 UTC, Kai wrote: C:\D2\dmd2\windows\bin\lld-link.exe: error: could not open libcmt.lib: no such file or directory You should link with dynamic crt, pass an option like -msctrlib=msvcrt100.lib or something like that https://dlang.org/dmd-windows.html#swi

Re: Shared - Another Thread

2018-10-18 Thread Paolo Invernizzi via Digitalmars-d
On Wednesday, 17 October 2018 at 21:55:48 UTC, H. S. Teoh wrote: The problem, of course, is that they are also charged particles, and the electromagnetic forces that hold the atom in place would be greatly disturbed if two atoms were to occupy the same space simultaneously, leading to a (very

Re: DMD Linker Issue on Windows

2018-10-18 Thread Andre Pany via Digitalmars-d
On Thursday, 18 October 2018 at 00:24:29 UTC, Kai wrote: On Wednesday, 17 October 2018 at 17:44:34 UTC, Adam D. Ruppe wrote: [...] Hmm - wish it was so. When architecture not specified, the linker crashes. When it's given, this happens (seems to be a vibe issue?): [...] As far as I can

Re: shared - i need it to be useful

2018-10-18 Thread Paolo Invernizzi via Digitalmars-d
On Thursday, 18 October 2018 at 06:20:02 UTC, Manu wrote: On Wed, Oct 17, 2018 at 5:05 AM Timon Gehr via Digitalmars-d wrote: [... all text ...] OMFG, I just spent about 3 hours writing a super-detailed reply to all of Timon's posts in aggregate... I clicked send... and it's gon

Re: My statements related to terminating my SAoC relationship

2018-10-18 Thread Paolo Invernizzi via Digitalmars-d
On Wednesday, 17 October 2018 at 20:03:23 UTC, lagfra wrote: On Monday, 15 October 2018 at 21:26:52 UTC, solidstate1991 wrote: I have done two mistakes: I underestimated the scope of the project and overestimated my capabilities. This caused a chain reaction, which in turn made the first milest

Re: shared - i need it to be useful

2018-10-17 Thread Manu via Digitalmars-d
On Wed, Oct 17, 2018 at 5:05 AM Timon Gehr via Digitalmars-d wrote: > > [... all text ...] OMFG, I just spent about 3 hours writing a super-detailed reply to all of Timon's posts in aggregate... I clicked send... and it's gone. I don't know if this is a gmail thing, a mai

Re: shared - i need it to be useful

2018-10-17 Thread Manu via Digitalmars-d
On Wed, Oct 17, 2018 at 6:15 AM Timon Gehr via Digitalmars-d wrote: > > On 17.10.2018 14:24, Timon Gehr wrote: > > and unshared methods are only allowed to access unshared members. > > This is actually not necessary, let me reformulate: > > You want: > > - if yo

Re: shared - i need it to be useful

2018-10-17 Thread Manu via Digitalmars-d
On Wed, Oct 17, 2018 at 6:50 PM Steven Schveighoffer via Digitalmars-d wrote: > > On 10/17/18 6:37 PM, Manu wrote: > > On Wed, Oct 17, 2018 at 12:35 PM Steven Schveighoffer via > > Digitalmars-d wrote: > >> > >> On 10/17/18 2:46 PM, Manu wrote: > >

Re: shared - i need it to be useful

2018-10-17 Thread Joakim via Digitalmars-d
On Wednesday, 17 October 2018 at 23:12:48 UTC, Manu wrote: On Wed, Oct 17, 2018 at 2:15 PM Stanislav Blinov via Digitalmars-d wrote: On Wednesday, 17 October 2018 at 19:25:33 UTC, Manu wrote: > On Wed, Oct 17, 2018 at 12:05 PM Stanislav Blinov via > Digitalmars-d wrote: >> >

Re: shared - i need it to be useful

2018-10-17 Thread Manu via Digitalmars-d
On Wed, Oct 17, 2018 at 5:35 PM Stanislav Blinov via Digitalmars-d wrote: > > On Wednesday, 17 October 2018 at 23:12:48 UTC, Manu wrote: > > On Wed, Oct 17, 2018 at 2:15 PM Stanislav Blinov via > > Digitalmars-d wrote: > >> > >> On Wednesday, 17 Octo

Re: shared - i need it to be useful

2018-10-17 Thread Steven Schveighoffer via Digitalmars-d
On 10/17/18 6:37 PM, Manu wrote: On Wed, Oct 17, 2018 at 12:35 PM Steven Schveighoffer via Digitalmars-d wrote: On 10/17/18 2:46 PM, Manu wrote: On Wed, Oct 17, 2018 at 10:30 AM Steven Schveighoffer via What the example demonstrates is that while you are trying to disallow implicit

Re: shared - i need it to be useful

2018-10-17 Thread Erik van Velzen via Digitalmars-d
I don't have anything to add that hasn't been said yet but it's good to see some thinking on this subject. It feels like progress.

Re: shared - i need it to be useful

2018-10-17 Thread Stanislav Blinov via Digitalmars-d
On Wednesday, 17 October 2018 at 23:12:48 UTC, Manu wrote: On Wed, Oct 17, 2018 at 2:15 PM Stanislav Blinov via Digitalmars-d wrote: On Wednesday, 17 October 2018 at 19:25:33 UTC, Manu wrote: > On Wed, Oct 17, 2018 at 12:05 PM Stanislav Blinov via > Digitalmars-d wrote: >> >

Re: My statements related to terminating my SAoC relationship

2018-10-17 Thread solidstate1991 via Digitalmars-d
On Tuesday, 16 October 2018 at 02:20:09 UTC, Soulsbane wrote: Have you tried melatonin? My doctor has me take a 1mg tablet and split it in two. So I take 1/2 at bedtime. That is the sweet spot. If you take more than that you will end up groggy. No, but I'll since I used to have this issue even

Re: DMD Linker Issue on Windows

2018-10-17 Thread Kai via Digitalmars-d
On Wednesday, 17 October 2018 at 17:44:34 UTC, Adam D. Ruppe wrote: On Wednesday, 17 October 2018 at 17:37:37 UTC, Kai wrote: I just ran into this linker issue (see answer below that I grabbed from the vibe.d forum) as well - where can I ask/track about the progress on this issue? Do you have

Re: Shared - Another Thread

2018-10-17 Thread Stefan Koch via Digitalmars-d
On Wednesday, 17 October 2018 at 22:56:26 UTC, H. S. Teoh wrote: On Wed, Oct 17, 2018 at 10:13:37PM +, Stefan Koch via Digitalmars-d wrote: On Wednesday, 17 October 2018 at 21:55:48 UTC, H. S. Teoh wrote: [...] > But nobody will be building a fusion engine out of race > conditions a

Re: shared - i need it to be useful

2018-10-17 Thread Manu via Digitalmars-d
On Wed, Oct 17, 2018 at 2:15 PM Stanislav Blinov via Digitalmars-d wrote: > > On Wednesday, 17 October 2018 at 19:25:33 UTC, Manu wrote: > > On Wed, Oct 17, 2018 at 12:05 PM Stanislav Blinov via > > Digitalmars-d wrote: > >> > >> On Wednesday, 17 Octo

Re: Shared - Another Thread

2018-10-17 Thread H. S. Teoh via Digitalmars-d
On Wed, Oct 17, 2018 at 10:13:37PM +, Stefan Koch via Digitalmars-d wrote: > On Wednesday, 17 October 2018 at 21:55:48 UTC, H. S. Teoh wrote: [...] > > But nobody will be building a fusion engine out of race conditions > > anytime in the foreseeable future. :-D [...] > Now

Re: shared - i need it to be useful

2018-10-17 Thread Manu via Digitalmars-d
On Wed, Oct 17, 2018 at 12:35 PM Steven Schveighoffer via Digitalmars-d wrote: > > On 10/17/18 2:46 PM, Manu wrote: > > On Wed, Oct 17, 2018 at 10:30 AM Steven Schveighoffer via > > >> What the example demonstrates is that while you are trying to disallow > >> imp

Re: Shared - Another Thread

2018-10-17 Thread Stefan Koch via Digitalmars-d
On Wednesday, 17 October 2018 at 21:55:48 UTC, H. S. Teoh wrote: Nah, that's not even anywhere close to nuclear fusion. The atoms which make up your body (and basically everything else) are mostly empty, with just a tiny speck of a nucleus, and a bunch of extremely tiny electrons zipping ab

Re: Shared - Another Thread

2018-10-17 Thread Stanislav Blinov via Digitalmars-d
On Wednesday, 17 October 2018 at 21:55:48 UTC, H. S. Teoh wrote: But nobody will be building a fusion engine out of race conditions anytime in the foreseeable future. :-D We should be so blessed...

Re: Shared - Another Thread

2018-10-17 Thread H. S. Teoh via Digitalmars-d
On Wed, Oct 17, 2018 at 09:29:07PM +, Stefan Koch via Digitalmars-d wrote: > On Wednesday, 17 October 2018 at 21:12:49 UTC, Stefan Koch wrote: > > [another person] cannot actually occupy the same space. It is > > physically impossible. > > Actually, that's not quite

Re: Shared - Another Thread

2018-10-17 Thread Stefan Koch via Digitalmars-d
On Wednesday, 17 October 2018 at 21:40:35 UTC, Stanislav Blinov wrote: Now, I perfectly understand what Manu wants: for `shared` to stop being a stupid keyword that nobody uses, and start bringing in value to the language. At the moment, the compiler happily allows you to write and read `shared

Re: Shared - Another Thread

2018-10-17 Thread Stanislav Blinov via Digitalmars-d
On Wednesday, 17 October 2018 at 21:29:07 UTC, Stefan Koch wrote: in any case it would certainly mess up the state of everyone involved; which is exactly what happens win multi-threaded situations. ^ that is very true. And that is why: - one must not keep shared and local data close togethe

Re: Shared - Another Thread

2018-10-17 Thread Stefan Koch via Digitalmars-d
On Wednesday, 17 October 2018 at 21:12:49 UTC, Stefan Koch wrote: [another person] cannot actually occupy the same space. It is physically impossible. Actually, that's not quite true, If they were to try hard enough the result would be nuclear fusion, (I am guessing (I am not a phsysist)), in

Re: shared - i need it to be useful

2018-10-17 Thread Stanislav Blinov via Digitalmars-d
On Wednesday, 17 October 2018 at 19:25:33 UTC, Manu wrote: On Wed, Oct 17, 2018 at 12:05 PM Stanislav Blinov via Digitalmars-d wrote: On Wednesday, 17 October 2018 at 18:46:18 UTC, Manu wrote: > I've said this a bunch of times, there are 2 rules: > 1. shared inhibits read and writ

Shared - Another Thread

2018-10-17 Thread Stefan Koch via Digitalmars-d
Hi, reading the other shared thread "shared - i need to be useful"(https://forum.dlang.org/thread/mailman.4299.1539629222.29801.digitalmar...@puremagic.com) let me to an important realisation concerning the reason shareding data across threads is so unintuitve and hard to get right. The rea

Re: shared - i need it to be useful

2018-10-17 Thread ag0aep6g via Digitalmars-d
On 17.10.18 20:46, Manu wrote: struct NotThreadsafe { int x; void local() { ++x; // <- invalidates the method below, you violate the other function's `shared` promise } void notThreadsafe() shared { atomicIncrement(&x); } } In the `shared` method you'd get a nice

Re: My statements related to terminating my SAoC relationship

2018-10-17 Thread lagfra via Digitalmars-d
On Monday, 15 October 2018 at 21:26:52 UTC, solidstate1991 wrote: I have done two mistakes: I underestimated the scope of the project and overestimated my capabilities. This caused a chain reaction, which in turn made the first milestone unreachable. Hi, I'm one of the other participants to th

Re: shared - i need it to be useful

2018-10-17 Thread NX via Digitalmars-d
I don't see any problem with this proposal as long as these points hold: - Shared <-> Unshared is never implicit, either requiring an explicit cast (both ways) or having a language support which allows the conversion gracefully. - Shared methods are called by compiler if the type is shared or

Re: shared - i need it to be useful

2018-10-17 Thread Steven Schveighoffer via Digitalmars-d
On 10/17/18 2:46 PM, Manu wrote: On Wed, Oct 17, 2018 at 10:30 AM Steven Schveighoffer via What the example demonstrates is that while you are trying to disallow implicit casting of a shared pointer to an unshared pointer, you have inadvertently allowed it by leaving behind an unshared pointer

Re: shared - i need it to be useful

2018-10-17 Thread Manu via Digitalmars-d
On Wed, Oct 17, 2018 at 12:05 PM Stanislav Blinov via Digitalmars-d wrote: > > On Wednesday, 17 October 2018 at 18:46:18 UTC, Manu wrote: > > > I've said this a bunch of times, there are 2 rules: > > 1. shared inhibits read and write access to members > > 2. `sh

Re: shared - i need it to be useful

2018-10-17 Thread Stanislav Blinov via Digitalmars-d
On Wednesday, 17 October 2018 at 18:46:18 UTC, Manu wrote: I've said this a bunch of times, there are 2 rules: 1. shared inhibits read and write access to members 2. `shared` methods must be threadsafe From there, shared becomes interesting and useful. Oh God... void atomicInc(shared int* i

Re: shared - i need it to be useful

2018-10-17 Thread Manu via Digitalmars-d
On Wed, Oct 17, 2018 at 10:30 AM Steven Schveighoffer via Digitalmars-d wrote: > > On 10/17/18 12:27 PM, Nicholas Wilson wrote: > > On Wednesday, 17 October 2018 at 15:51:04 UTC, Steven Schveighoffer wrote: > >> On 10/17/18 9:58 AM, Nicholas Wilson wrote: > >>> On

Re: DMD Linker Issue on Windows

2018-10-17 Thread Adam D. Ruppe via Digitalmars-d
On Wednesday, 17 October 2018 at 17:37:37 UTC, Kai wrote: I just ran into this linker issue (see answer below that I grabbed from the vibe.d forum) as well - where can I ask/track about the progress on this issue? Do you have the new dmd installed? Using the x86_64 should work now if all goes

DMD Linker Issue on Windows

2018-10-17 Thread Kai via Digitalmars-d
Hi, I just ran into this linker issue (see answer below that I grabbed from the vibe.d forum) as well - where can I ask/track about the progress on this issue? Thanks! "This is currently an unfortunate limitation on Windows, where the DigitalMars linker runs into a crash when building with

Re: shared - i need it to be useful

2018-10-17 Thread Steven Schveighoffer via Digitalmars-d
On 10/17/18 12:27 PM, Nicholas Wilson wrote: On Wednesday, 17 October 2018 at 15:51:04 UTC, Steven Schveighoffer wrote: On 10/17/18 9:58 AM, Nicholas Wilson wrote: On Wednesday, 17 October 2018 at 13:25:28 UTC, Steven Schveighoffer wrote: It's identical to the top one. You now have a new unshar

Re: shared - i need it to be useful

2018-10-17 Thread Stanislav Blinov via Digitalmars-d
On Wednesday, 17 October 2018 at 14:14:56 UTC, Nicholas Wilson wrote: On Wednesday, 17 October 2018 at 07:24:13 UTC, Stanislav Blinov wrote: On Wednesday, 17 October 2018 at 05:40:41 UTC, Walter Bright wrote: When Andrei and I came up with the rules for: mutable const shared cons

Re: shared - i need it to be useful

2018-10-17 Thread Stanislav Blinov via Digitalmars-d
On Wednesday, 17 October 2018 at 14:44:19 UTC, Guillaume Piolat wrote: The fact that this _type constructor_ finds its way into _identifiers_ create some concern: https://github.com/dlang/phobos/blob/656798f2b385437c239246b59e0433148190938c/std/experimental/allocator/package.d#L642 Well, ISh

Re: shared - i need it to be useful

2018-10-17 Thread Nicholas Wilson via Digitalmars-d
On Wednesday, 17 October 2018 at 15:51:04 UTC, Steven Schveighoffer wrote: On 10/17/18 9:58 AM, Nicholas Wilson wrote: On Wednesday, 17 October 2018 at 13:25:28 UTC, Steven Schveighoffer wrote: It's identical to the top one. You now have a new unshared reference to shared data. This is done WIT

Re: shared - i need it to be useful

2018-10-17 Thread Steven Schveighoffer via Digitalmars-d
On 10/17/18 9:58 AM, Nicholas Wilson wrote: On Wednesday, 17 October 2018 at 13:25:28 UTC, Steven Schveighoffer wrote: It's identical to the top one. You now have a new unshared reference to shared data. This is done WITHOUT any agreed-upon synchronization. It isn't, you typo'd it (I originall

Re: shared - i need it to be useful

2018-10-17 Thread Steven Schveighoffer via Digitalmars-d
On 10/17/18 10:33 AM, Nicholas Wilson wrote: On Wednesday, 17 October 2018 at 14:26:43 UTC, Timon Gehr wrote: On 17.10.2018 16:14, Nicholas Wilson wrote: I was thinking that mutable -> shared const as apposed to mutable -> shared would get around the issues that Timon posted. Unfortunately

Re: shared - i need it to be useful

2018-10-17 Thread Steven Schveighoffer via Digitalmars-d
On 10/17/18 10:18 AM, Timon Gehr wrote: On 17.10.2018 15:40, Steven Schveighoffer wrote: On 10/17/18 8:02 AM, Timon Gehr wrote: Now, if a class has only shared members, that is another story. In this case, all references should implicitly convert to shared. There's a DIP I meant to write about

Re: No D bindings in Atom editor

2018-10-17 Thread Laurent Tréguier via Digitalmars-d
On Tuesday, 16 October 2018 at 02:34:47 UTC, Jabari Zakiya wrote: Just updated Atom editor and noticed D files read as plain .txt and no D bindings in list of programs. Maybe someone should bring that to Atom's devs attention. Interesting, since my main editor, KDE's Kate, does have D file sy

Re: shared - i need it to be useful

2018-10-17 Thread Guillaume Piolat via Digitalmars-d
On Wednesday, 17 October 2018 at 07:20:20 UTC, Manu wrote: Shared is uninteresting and mostly useless as spec-ed, everyone knows this. Interaction with shared via barely-controlled blunt casting in @trusted blocks is feeble and boring. It doesn't really give us anything in practice that we don't

Re: shared - i need it to be useful

2018-10-17 Thread Nicholas Wilson via Digitalmars-d
On Wednesday, 17 October 2018 at 14:26:43 UTC, Timon Gehr wrote: On 17.10.2018 16:14, Nicholas Wilson wrote: I was thinking that mutable -> shared const as apposed to mutable -> shared would get around the issues that Timon posted. Unfortunately not. For example, the thread with the mutable

Re: shared - i need it to be useful

2018-10-17 Thread Timon Gehr via Digitalmars-d
On 17.10.2018 16:14, Nicholas Wilson wrote: I was thinking that mutable -> shared const as apposed to mutable -> shared would get around the issues that Timon posted. Unfortunately not. For example, the thread with the mutable reference is not obliged to actually make the changes that are pe

Re: shared - i need it to be useful

2018-10-17 Thread Timon Gehr via Digitalmars-d
On 17.10.2018 15:40, Steven Schveighoffer wrote: On 10/17/18 8:02 AM, Timon Gehr wrote: Now, if a class has only shared members, that is another story. In this case, all references should implicitly convert to shared. There's a DIP I meant to write about this. (For all qualifiers, not just shar

Re: shared - i need it to be useful

2018-10-17 Thread Nicholas Wilson via Digitalmars-d
On Wednesday, 17 October 2018 at 07:24:13 UTC, Stanislav Blinov wrote: On Wednesday, 17 October 2018 at 05:40:41 UTC, Walter Bright wrote: When Andrei and I came up with the rules for: mutable const shared const shared immutable and which can be implicitly converted to what, s

Re: shared - i need it to be useful

2018-10-17 Thread Nicholas Wilson via Digitalmars-d
On Wednesday, 17 October 2018 at 13:25:28 UTC, Steven Schveighoffer wrote: On 10/16/18 8:26 PM, Manu wrote: On Tue, Oct 16, 2018 at 2:20 PM Steven Schveighoffer via Digitalmars-d wrote: There is in fact, no difference between: int *p; shared int *p2 = p; int *p3 = cast(int*)p2; Totally

Re: shared - i need it to be useful

2018-10-17 Thread Steven Schveighoffer via Digitalmars-d
On 10/17/18 8:02 AM, Timon Gehr wrote: Now, if a class has only shared members, that is another story. In this case, all references should implicitly convert to shared. There's a DIP I meant to write about this. (For all qualifiers, not just shared). When you say "shared members", you mean all

Re: shared - i need it to be useful

2018-10-17 Thread Stanislav Blinov via Digitalmars-d
On Wednesday, 17 October 2018 at 13:36:53 UTC, Stanislav Blinov wrote: Explicit cast from mutable to unsafe, on the other hand: Blargh, to shared of course.

Re: shared - i need it to be useful

2018-10-17 Thread Stanislav Blinov via Digitalmars-d
Jesus Manu, it's soon 8 pages of dancing around a trivial issue. Implicit casting from mutable to shared is unsafe, case closed. Explicit cast from mutable to unsafe, on the other hand: - is an assertion (on programmer's behalf) that this instance is indeed unique - is self-documenting - is gr

Re: shared - i need it to be useful

2018-10-17 Thread Steven Schveighoffer via Digitalmars-d
On 10/16/18 8:26 PM, Manu wrote: On Tue, Oct 16, 2018 at 2:20 PM Steven Schveighoffer via Digitalmars-d wrote: On 10/16/18 4:26 PM, Manu wrote: On Tue, Oct 16, 2018 at 11:30 AM Steven Schveighoffer via Digitalmars-d wrote: int x; shared int *p = &x; // allow implicit conversion, curre

Re: Norwich 2018-11-07

2018-10-17 Thread bachmeier via Digitalmars-d
On Wednesday, 17 October 2018 at 08:35:09 UTC, Russel Winder wrote: D + GtkD (inc GStreamerD) is really quite nice. The biggest downside is the documentation presenting all the C examples not D ones, and the lack of non- trivial examples of use. The biggest problem is really not enough differ

Re: shared - i need it to be useful

2018-10-17 Thread Timon Gehr via Digitalmars-d
On 17.10.2018 14:24, Timon Gehr wrote: and unshared methods are only allowed to access unshared members. This is actually not necessary, let me reformulate: You want: - if you have a C c and a shared(C) s, typeof(s.x) == typeof(c.x). - shared methods are not allowed to access unshared members

Re: shared - i need it to be useful

2018-10-17 Thread Steven Schveighoffer via Digitalmars-d
On 10/16/18 6:24 PM, Nicholas Wilson wrote: On Tuesday, 16 October 2018 at 21:19:26 UTC, Steven Schveighoffer wrote: OK, so here is where I think I misunderstood your point. When you said a lock-free queue would be unusable if it wasn't shared, I thought you meant it would be unusable if we did

Re: shared - i need it to be useful

2018-10-17 Thread Timon Gehr via Digitalmars-d
On 17.10.2018 14:29, Timon Gehr wrote: to access c.m iff m is not shared Unfortunate typo. This should be if, not iff (if and only if).

Re: shared - i need it to be useful

2018-10-17 Thread Timon Gehr via Digitalmars-d
On 17.10.2018 09:20, Manu wrote: Timon Gehr has done a good job showing that they still stand unbreached. His last comment was applied to a different proposal. His only comment on this thread wasn't in response to the proposal in this thread. If you nominate Timon as your proxy, then he needs to

Re: shared - i need it to be useful

2018-10-17 Thread Timon Gehr via Digitalmars-d
On 17.10.2018 14:24, Timon Gehr wrote: On 15.10.2018 23:51, Manu wrote: If a shared method is incompatible with an unshared method, your class is broken. Then what you want is not implicit unshared->shared conversion. What you want is a different way to type shared member access. You want a s

Re: shared - i need it to be useful

2018-10-17 Thread Timon Gehr via Digitalmars-d
On 15.10.2018 23:51, Manu wrote: If a shared method is incompatible with an unshared method, your class is broken. Then what you want is not implicit unshared->shared conversion. What you want is a different way to type shared member access. You want a setup where shared methods are only allo

Re: shared - i need it to be useful

2018-10-17 Thread Timon Gehr via Digitalmars-d
On 16.10.2018 19:25, Manu wrote: On Tue, Oct 16, 2018 at 3:20 AM Timon Gehr via Digitalmars-d wrote: On 15.10.2018 20:46, Manu wrote: Assuming the rules above: "can't read or write to members", and the understanding that `shared` methods are expected to have threadsafe

Re: shared - i need it to be useful

2018-10-17 Thread Timon Gehr via Digitalmars-d
On 16.10.2018 20:07, Manu wrote: On Tue, Oct 16, 2018 at 6:25 AM Timon Gehr via Digitalmars-d wrote: On 16.10.2018 13:04, Dominikus Dittes Scherkl wrote: On Tuesday, 16 October 2018 at 10:15:51 UTC, Timon Gehr wrote: On 15.10.2018 20:46, Manu wrote: Assuming the rules above: "can&#

Re: shared - i need it to be useful

2018-10-17 Thread jmh530 via Digitalmars-d
On Wednesday, 17 October 2018 at 07:20:20 UTC, Manu wrote: [snip] Oh bollocks... everyone has been complaining about this for at least the 10 years I've been here! [snip] As far as I had known from reading the forums, shared was not feature complete. Also, are you familiar with Atila's fe

Re: shared - i need it to be useful

2018-10-17 Thread jmh530 via Digitalmars-d
On Wednesday, 17 October 2018 at 05:40:41 UTC, Walter Bright wrote: On 10/15/2018 11:46 AM, Manu wrote: [...] Shared has one incredibly valuable feature - it allows you, the programmer, to identify data that can be accessed by multiple threads. There are so many ways that data can be shared,

2019 H1 Vision document?

2018-10-17 Thread JN via Digitalmars-d
Looks like 2018H2 vision hasn't been published, and it's a bit late for it. Are there any plans for 2019H1 document? I think it provides a good framework for discussions, gives something to get excited about. Right now it's hard to see what are the short and long term goals for the language and

Re: My statements related to terminating my SAoC relationship

2018-10-17 Thread welkam via Digitalmars-d
On Monday, 15 October 2018 at 21:26:52 UTC, solidstate1991 wrote: my sleep disorder became even worse. I started to sleep 10-12 hours a day while spending around 4-6 hours in bed just to trying to fall asleep And when you wake up do you feel rested and fully awake or does it take time to sobe

Re: std.digest

2018-10-17 Thread rikki cattermole via Digitalmars-d
On 17/10/2018 10:36 PM, Márcio Martins wrote: Hi! To my surprise, std.digest.MurmurHash3 doesn't work in CTFE. Would it be hard to have it explicit in the documentation if a particular Phobos symbol works in CTFE? Maybe it could be manual, and vote-based, to avoid building infrastructure arou

std.digest

2018-10-17 Thread Márcio Martins via Digitalmars-d
Hi! To my surprise, std.digest.MurmurHash3 doesn't work in CTFE. Would it be hard to have it explicit in the documentation if a particular Phobos symbol works in CTFE? Maybe it could be manual, and vote-based, to avoid building infrastructure around it. Also, MurmurHash3 only outputs 32-bit

Re: Norwich 2018-11-07

2018-10-17 Thread Russel Winder via Digitalmars-d
A PS to the bit on D vs Rust: The Rust plugin to CLion is managed by JetBrains and has resource assigned, the D plugin to CLion is a pure volunteer effort. The Rust development experience in CLion is really rather good. The D development experience in CLion is there, but clearly a WIP. I mention

Re: Norwich 2018-11-07

2018-10-17 Thread Russel Winder via Digitalmars-d
On Tue, 2018-10-16 at 16:31 +, Gerald via Digitalmars-d wrote: […] > Wish I could see this one, it would be very interesting to hear > your thoughts on C++ vs D vs Rust in terms of working with GTK. I do not know if the sessions are recorded. C++ and gtkmm sort of work but using C++

Re: shared - i need it to be useful

2018-10-17 Thread Stanislav Blinov via Digitalmars-d
On Wednesday, 17 October 2018 at 05:40:41 UTC, Walter Bright wrote: When Andrei and I came up with the rules for: mutable const shared const shared immutable and which can be implicitly converted to what, so far nobody has found a fault in those rules... Here's one: shared -

Re: shared - i need it to be useful

2018-10-17 Thread Manu via Digitalmars-d
On Tue, Oct 16, 2018 at 10:45 PM Walter Bright via Digitalmars-d wrote: > > On 10/15/2018 11:46 AM, Manu wrote: > > [...] > > Shared has one incredibly valuable feature - it allows you, the programmer, to > identify data that can be accessed by multiple threads. There are so

Re: shared - i need it to be useful

2018-10-16 Thread Walter Bright via Digitalmars-d
On 10/15/2018 11:46 AM, Manu wrote: [...] Shared has one incredibly valuable feature - it allows you, the programmer, to identify data that can be accessed by multiple threads. There are so many ways that data can be shared, the only way to comprehend what is going on is to build a wall arou

Re: shared - i need it to be useful

2018-10-16 Thread Isaac S. via Digitalmars-d
On Wednesday, 17 October 2018 at 03:50:44 UTC, Manu wrote: On Tue, Oct 16, 2018 at 8:20 PM Isaac S. via Digitalmars-d wrote: *snip* Overloading for shared and unshared is my reason for not allowing implicit conversion on my types (I have no problems with implicit conversion being optional

Re: shared - i need it to be useful

2018-10-16 Thread Manu via Digitalmars-d
On Tue, Oct 16, 2018 at 8:20 PM Isaac S. via Digitalmars-d wrote: > > On Tuesday, 16 October 2018 at 06:21:22 UTC, Manu wrote: > > On Mon, Oct 15, 2018 at 8:55 PM Isaac S. via Digitalmars-d > > wrote: > >> > >> On Tuesday, 16 October 2018 at 02:26:04 UTC, M

Re: shared - i need it to be useful

2018-10-16 Thread Isaac S. via Digitalmars-d
On Tuesday, 16 October 2018 at 06:21:22 UTC, Manu wrote: On Mon, Oct 15, 2018 at 8:55 PM Isaac S. via Digitalmars-d wrote: On Tuesday, 16 October 2018 at 02:26:04 UTC, Manu wrote: >> I understand your point but I think the current shared (no >> implicit conversion) has its use

Re: shared - i need it to be useful

2018-10-16 Thread Nicholas Wilson via Digitalmars-d
On Wednesday, 17 October 2018 at 00:29:04 UTC, Manu wrote: On Tue, Oct 16, 2018 at 3:25 PM Nicholas Wilson via Digitalmars-d wrote: On Tuesday, 16 October 2018 at 21:19:26 UTC, Steven Schveighoffer wrote: > There is in fact, no difference between: > > int *p; > shared int *p2 =

Re: shared - i need it to be useful

2018-10-16 Thread Manu via Digitalmars-d
On Tue, Oct 16, 2018 at 3:25 PM Nicholas Wilson via Digitalmars-d wrote: > > On Tuesday, 16 October 2018 at 21:19:26 UTC, Steven Schveighoffer > wrote: > > There is in fact, no difference between: > > > > int *p; > > shared int *p2 = p; > > int *p3 = cast(in

Re: shared - i need it to be useful

2018-10-16 Thread Manu via Digitalmars-d
On Tue, Oct 16, 2018 at 2:20 PM Steven Schveighoffer via Digitalmars-d wrote: > > On 10/16/18 4:26 PM, Manu wrote: > > On Tue, Oct 16, 2018 at 11:30 AM Steven Schveighoffer via > > Digitalmars-d wrote: > >> > >> On 10/16/18 2:10 PM, Manu wrote: > >

Re: No D bindings in Atom editor

2018-10-16 Thread Jabari Zakiya via Digitalmars-d
On Tuesday, 16 October 2018 at 22:59:18 UTC, Soulsbane wrote: On Tuesday, 16 October 2018 at 02:34:47 UTC, Jabari Zakiya wrote: Just updated Atom editor and noticed D files read as plain .txt and no D bindings in list of programs. Maybe someone should bring that to Atom's devs attention. Inte

Re: automatically closing stale pull requests

2018-10-16 Thread tide via Digitalmars-d
On Tuesday, 16 October 2018 at 22:18:13 UTC, Walter Bright wrote: On 10/16/2018 1:16 PM, notna wrote: [...] We're not going to automatically close stale pull requests, nor are we going to arbitrarily close old unfixed bug reports. Agreed, then there won't be those 5+ year old reports we can

Re: No D bindings in Atom editor

2018-10-16 Thread Soulsbane via Digitalmars-d
On Tuesday, 16 October 2018 at 02:34:47 UTC, Jabari Zakiya wrote: Just updated Atom editor and noticed D files read as plain .txt and no D bindings in list of programs. Maybe someone should bring that to Atom's devs attention. Interesting, since my main editor, KDE's Kate, does have D file sy

Re: shared - i need it to be useful

2018-10-16 Thread Nicholas Wilson via Digitalmars-d
On Tuesday, 16 October 2018 at 21:19:26 UTC, Steven Schveighoffer wrote: There is in fact, no difference between: int *p; shared int *p2 = p; int *p3 = cast(int*)p2; and this: int *p; shared int *p2 = p; int *p3 = p; If I understand Manu correctly the first should compile, and the second sh

Re: shared - i need it to be useful

2018-10-16 Thread Nicholas Wilson via Digitalmars-d
On Tuesday, 16 October 2018 at 21:19:26 UTC, Steven Schveighoffer wrote: OK, so here is where I think I misunderstood your point. When you said a lock-free queue would be unusable if it wasn't shared, I thought you meant it would be unusable if we didn't allow the implicit cast. But I realize n

Re: automatically closing stale pull requests

2018-10-16 Thread Walter Bright via Digitalmars-d
On 10/16/2018 1:16 PM, notna wrote: [...] We're not going to automatically close stale pull requests, nor are we going to arbitrarily close old unfixed bug reports.

<    1   2   3   4   5   6   7   8   9   10   >