Re: fearless v0.0.1 - shared made easy (and @safe)

2018-09-20 Thread Atila Neves via Digitalmars-d-announce
On Thursday, 20 September 2018 at 09:52:37 UTC, Guillaume Piolat wrote: On Tuesday, 18 September 2018 at 17:20:26 UTC, Atila Neves wrote: // compile with -dip1000 import fearless; Now *that* is a properly named library :) Thanks! :) I'm still wondering whether or not anyone noticed that

Re: fearless v0.0.1 - shared made easy (and @safe)

2018-09-20 Thread Guillaume Piolat via Digitalmars-d-announce
On Tuesday, 18 September 2018 at 17:20:26 UTC, Atila Neves wrote: // compile with -dip1000 import fearless; Now *that* is a properly named library :)

Re: fearless v0.0.1 - shared made easy (and @safe)

2018-09-19 Thread H. S. Teoh via Digitalmars-d-announce
On Wed, Sep 19, 2018 at 10:58:04AM +, thedeemon via Digitalmars-d-announce wrote: > On Tuesday, 18 September 2018 at 17:20:26 UTC, Atila Neves wrote: > > I was envious of std::sync::Mutex from Rust and thought: can I use > > DIP1000 to make this work in D and be @safe? Turns out, yes. > >

Re: fearless v0.0.1 - shared made easy (and @safe)

2018-09-19 Thread Steven Schveighoffer via Digitalmars-d-announce
On 9/19/18 6:44 AM, Atila Neves wrote: On Tuesday, 18 September 2018 at 17:34:10 UTC, 12345swordy wrote: On Tuesday, 18 September 2018 at 17:20:26 UTC, Atila Neves wrote: The `shared` keyword currently means one of two things: 1. You can use core.atomic with it 2. It's some struct and you

Re: fearless v0.0.1 - shared made easy (and @safe)

2018-09-19 Thread thedeemon via Digitalmars-d-announce
On Tuesday, 18 September 2018 at 17:20:26 UTC, Atila Neves wrote: I was envious of std::sync::Mutex from Rust and thought: can I use DIP1000 to make this work in D and be @safe? Turns out, yes. Nice! I spent a few minutes playing with the example and trying to break it, make the pointer

Re: fearless v0.0.1 - shared made easy (and @safe)

2018-09-19 Thread Atila Neves via Digitalmars-d-announce
On Wednesday, 19 September 2018 at 07:33:55 UTC, Claude wrote: On Tuesday, 18 September 2018 at 17:20:26 UTC, Atila Neves wrote: I was envious of std::sync::Mutex from Rust and thought: can I use DIP1000 to make this work in D and be @safe? Turns out, yes. Beautiful! The only current

Re: fearless v0.0.1 - shared made easy (and @safe)

2018-09-19 Thread Atila Neves via Digitalmars-d-announce
On Tuesday, 18 September 2018 at 17:34:10 UTC, 12345swordy wrote: On Tuesday, 18 September 2018 at 17:20:26 UTC, Atila Neves wrote: The `shared` keyword currently means one of two things: 1. You can use core.atomic with it 2. It's some struct and you BYOM (Bring Your Own Mutex) [...] Why is

Re: fearless v0.0.1 - shared made easy (and @safe)

2018-09-19 Thread Claude via Digitalmars-d-announce
On Tuesday, 18 September 2018 at 17:20:26 UTC, Atila Neves wrote: I was envious of std::sync::Mutex from Rust and thought: can I use DIP1000 to make this work in D and be @safe? Turns out, yes. Beautiful! The only current downside, is the fact the application using that library has to be

Re: fearless v0.0.1 - shared made easy (and @safe)

2018-09-18 Thread shfit via Digitalmars-d-announce
On Tuesday, 18 September 2018 at 17:34:10 UTC, 12345swordy wrote: On Tuesday, 18 September 2018 at 17:20:26 UTC, Atila Neves wrote: The `shared` keyword currently means one of two things: 1. You can use core.atomic with it 2. It's some struct and you BYOM (Bring Your Own Mutex) [...] Why is

Re: fearless v0.0.1 - shared made easy (and @safe)

2018-09-18 Thread 12345swordy via Digitalmars-d-announce
On Tuesday, 18 September 2018 at 17:20:26 UTC, Atila Neves wrote: The `shared` keyword currently means one of two things: 1. You can use core.atomic with it 2. It's some struct and you BYOM (Bring Your Own Mutex) [...] Why is this is an external 3rd party library isn't of the standard

Re: fearless v0.0.1 - shared made easy (and @safe)

2018-09-18 Thread Paolo Invernizzi via Digitalmars-d-announce
On Tuesday, 18 September 2018 at 17:20:26 UTC, Atila Neves wrote: The `shared` keyword currently means one of two things: 1. You can use core.atomic with it 2. It's some struct and you BYOM (Bring Your Own Mutex) [...] Whahh!! You made my day! /Paolo

fearless v0.0.1 - shared made easy (and @safe)

2018-09-18 Thread Atila Neves via Digitalmars-d-announce
The `shared` keyword currently means one of two things: 1. You can use core.atomic with it 2. It's some struct and you BYOM (Bring Your Own Mutex) Do you have to send mutable data to other threads? Are you tired of locking a mutex and casting? Now you don't have to: