Re: [go-nuts] Clarification of memory model behavior within a single goroutine

2023-01-23 Thread Peter Rabbitson
On Mon, Jan 23, 2023 at 10:54 PM Ian Lance Taylor wrote: > There is a model of memory behavior in which programs use pure write > memory barriers and pure read memory barriers. However, Go does not > use that model. Go uses a different model, in which writers and > readers are expected to

Re: [go-nuts] Go routine as realtime thread without preemption?

2023-01-23 Thread Ian Lance Taylor
On Sun, Jan 22, 2023 at 11:48 PM TheDiveO wrote: > > > On Sunday, January 22, 2023 at 12:18:34 AM UTC+1 Ian Lance Taylor wrote: > > Using runtime.LockOSThread does not exempt the goroutine from GOMAXPROCS. > > I was asking to elaborate more on this previous answer of yours, as I >

Re: [go-nuts] Clarification of memory model behavior within a single goroutine

2023-01-23 Thread Ian Lance Taylor
On Sun, Jan 22, 2023 at 11:36 PM Peter Rabbitson wrote: > > That's a fair point. I avoided going into details not to risk tickling latent > design-urges of the readers ;) > > Setup: > - Single-writer multiple-readers scenario > - Writer is always exclusively single threaded, no concurrency

Re: [go-nuts] Re: Does go:embed embed.FS embeds directories or possible confusion with how it works

2023-01-23 Thread Ian Lance Taylor
On Mon, Jan 23, 2023 at 11:51 AM Shammi Shailaj wrote: > > There is no function named Sub() for the variable static of type embed.FS. > Hence, the handler: http.Handle("/static/", http.FileServer(http.FS(static. > Sub("files" shall not work and throw an error like: > > static.Sub undefined

[go-nuts] Re: Does go:embed embed.FS embeds directories or possible confusion with how it works

2023-01-23 Thread Shammi Shailaj
There is no function named *Sub()* for the variable *static* of type *embed.FS.* Hence, the handler: *http.Handle("/static/", http.FileServer(http.FS(static. Sub("files"* shall not work and throw an error like: *static.Sub undefined (type embed.FS has no field or method Sub)* Can anyone

Re: [go-nuts] Clarification of memory model behavior within a single goroutine

2023-01-23 Thread 'Keith Randall' via golang-nuts
Just to be clear, to get what you want just write data normally for steps 1-4 and use an atomic store for step 5. That guarantees that other processes will see steps 1-4 all done if they see the write from step 5. (But you *do* have to use an atomic read appropriate to your language to do

Re: [go-nuts] Clarification of memory model behavior within a single goroutine

2023-01-23 Thread fgergo
On 1/23/23, Peter Rabbitson wrote: ... > I guess I will spend some time to learn how to poke around the generated > assembly tomorrow... If I understand correctly you are trying to force your model of the world into the Go memory model. The models are different, so this won't work. Please also

[go-nuts] Re: Trying to import etherum in go

2023-01-23 Thread gbarr
There is no package called github.com/ethereum/go-ethereum/ethash perhaps you meant github.com/ethereum/go-ethereum/consensus/ethash On Saturday, January 21, 2023 at 2:17:01 PM UTC ramki...@hotmail.com wrote: > Example/Test Code: > > https://pastebin.com/PaeuHuJx > > But I get the error > > go

[go-nuts] liteide x38.1 released

2023-01-23 Thread vfc
Hi all, liteide x38.1 released! This version support Go1.18 generics. * LiteIDE Source code https://github.com/visualfc/liteide * Release downloads * https://github.com/visualfc/liteide/releases/latest * https://sourceforge.net/projects/liteide/files * [baidu

Re: [go-nuts] Pass SQL null values to Parquet

2023-01-23 Thread Brian Candler
If you're using a third-party parquet encoding library, you'll need to pass null/not-null using whatever convention that library requires. I took a quick look at xitongsys/parquet-go's front-page documentation, and it seems it handles null (OPTIONAL) using pointers: