Re: [go-nuts] About Go 1.19 memory model clarificaitons on atomic operations.

2022-08-14 Thread 'Axel Wagner' via golang-nuts
Why wouldn't it? > If the effect of an atomic operation A is observed by atomic operation B, > then A is synchronized before B. To me, it seems pretty clear that it will. Line 13 is synchronized before line 14, which is synchronized before any load observing its effects (i.e. any execution of lin

[go-nuts] About Go 1.19 memory model clarificaitons on atomic operations.

2022-08-14 Thread tapi...@gmail.com
By the latest version of Go Memory Model article: https://go.dev/ref/mem, will the following program always print 1? https://go.dev/play/p/RICYGip5y8M -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop recei

[go-nuts] Wrote a language in Go --- how to do FFI, ineteroperability etc?

2022-08-14 Thread Tim Hardcastle
I was just showing my lang to people and someone said "What do Charm's FFI capabilities look like? It sounds like it would be pretty well suited for writing wrappers that provide APIs for existing software, so an excellent FFI would be nice." Well, that's still a little way down my todo list b

[go-nuts] Re: Go 1.19 average goroutine stack

2022-08-14 Thread 'Keith Randall' via golang-nuts
The initial allocation size is exported, you can use the runtime/metrics package to look at it. Something like this: package main import ( "fmt" "runtime/metrics" ) func main() { s := []metrics.Sample{{Name: "/gc/stack/starting-size:bytes"}} metrics.Read(s) fmt.Printf("%d\n"