Re: [go-nuts] Re: Slices, backing array, goroutines, perhaps Considerations for Go2

2019-10-27 Thread Dan Kortschak
This is not necessarily due to races. You can have this exact situation
occurring in single threaded code. I don't think any mention of race
issues was made here.

On Sun, 2019-10-27 at 08:53 +, roger peppe wrote:
> On Sun, 27 Oct 2019, 00:04 Gert,  wrote:
> 
> > I believe it's going to be to hard to write a go vet analyser that
> > could
> > warn to detect unintended state change on a array from two
> > different
> > pointers.
> > 
> 
> Isn't that why we have the race detector?
> 
> -- 
> > You received this message because you are subscribed to the Google
> > Groups
> > "golang-nuts" group.
> > To unsubscribe from this group and stop receiving emails from it,
> > send an
> > email to golang-nuts+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit
> > 
https://groups.google.com/d/msgid/golang-nuts/30ac16bc-bc70-40a6-bc79-f41e3536d144%40googlegroups.com
> > <
> > https://groups.google.com/d/msgid/golang-nuts/30ac16bc-bc70-40a6-bc79-f41e3536d144%40googlegroups.com?utm_medium=email_source=footer
> > >
> > .
> > 
> 
> 

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/fd35e7a25f8a7e0ba57b68ceaf9fc95cece08fa8.camel%40kortschak.io.


Re: [go-nuts] Re: Slices, backing array, goroutines, perhaps Considerations for Go2

2019-10-27 Thread andrey mirtchovski
>> I think it only catches concurrent access to the same address, so not sure 
>> if it catches everything.
>
>
> If two things aren't writing concurrently to the same address, what's the 
> problem?

I took that to mean 'things may be updating concurrently at different
addresses inside an array backing the same slice'. But the race
detector will flag as soon as a read is attempted by another goroutine
on any of those.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAK4xykU5nKhU0BFocR0XP-mYD0rY246Hu6Aq9AG95t-Dh7n-PA%40mail.gmail.com.


Re: [go-nuts] Re: Slices, backing array, goroutines, perhaps Considerations for Go2

2019-10-27 Thread roger peppe
On Sun, 27 Oct 2019, 12:33 Gert,  wrote:

>
> On Sunday, October 27, 2019 at 9:54:29 AM UTC+1, rog wrote:
>>
>>
>> On Sun, 27 Oct 2019, 00:04 Gert,  wrote:
>>
>>> I believe it's going to be to hard to write a go vet analyser that could
>>> warn to detect unintended state change on a array from two different
>>> pointers.
>>>
>>
>> Isn't that why we have the race detector?
>>
>
> I think it only catches concurrent access to the same address, so not sure
> if it catches everything.
>

If two things aren't writing concurrently to the same address, what's the
problem?

> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/39c04bde-2c9c-4396-84c1-a71143de5e39%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAJhgacj1P6bzWDMA77F1zE7A-2zzeGqFYhFfG95%2Beu9ZMfa4hQ%40mail.gmail.com.


Re: [go-nuts] Re: Slices, backing array, goroutines, perhaps Considerations for Go2

2019-10-27 Thread Gert

On Sunday, October 27, 2019 at 9:54:29 AM UTC+1, rog wrote:
>
>
> On Sun, 27 Oct 2019, 00:04 Gert, > wrote:
>
>> I believe it's going to be to hard to write a go vet analyser that could 
>> warn to detect unintended state change on a array from two different 
>> pointers.
>>
>
> Isn't that why we have the race detector?
>

I think it only catches concurrent access to the same address, so not sure 
if it catches everything.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/39c04bde-2c9c-4396-84c1-a71143de5e39%40googlegroups.com.


Re: [go-nuts] Re: [ANN] A BASIC compiler

2019-10-27 Thread JuciƊ Andrade
Today I learned a fellow programmer did just that! His name is Everton
Marques.

https://github.com/udhos/basgo

On Sat, Oct 26, 2019 at 12:33 PM Robert Engels 
wrote:

> Why not generate Go?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CALK_QVJdgGpp7TmT7px8iCrDyYKZ%3D_r1PB_sd6kH6uYMUh8U_g%40mail.gmail.com.


Re: [go-nuts] Re: Slices, backing array, goroutines, perhaps Considerations for Go2

2019-10-27 Thread roger peppe
On Sun, 27 Oct 2019, 00:04 Gert,  wrote:

> I believe it's going to be to hard to write a go vet analyser that could
> warn to detect unintended state change on a array from two different
> pointers.
>

Isn't that why we have the race detector?

-- 
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/30ac16bc-bc70-40a6-bc79-f41e3536d144%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAJhgachBNf8S_NMDZkq7AOjDsTvZ1pZy_Veo_S-XwgauZ0h_Ww%40mail.gmail.com.