Re: [go-nuts] Change slice type

2019-11-27 Thread Jan Mercl
On Thu, Nov 28, 2019 at 3:16 AM Michael Jones wrote: > > The general rule -- if there can be a general rule for risk behavior -- is > that CPUs like having addresses aligned on an integer multiple of the data > element size. So: > > access-as-byte data may be on any address (address&(1-1)==0),

Re: [go-nuts] Change slice type

2019-11-27 Thread Michael Jones
The general rule -- if there can be a general rule for risk behavior -- is that CPUs like having addresses aligned on an integer multiple of the data element size. So: access-as-byte data may be on any address (address&(1-1)==0), access as 2-byte data on a multiple of two address

Re: [go-nuts] Change slice type

2019-11-27 Thread Ian Lance Taylor
On Wed, Nov 27, 2019 at 9:26 AM wrote: > > Hi Ian, thanks for the help... quick question about alignment because i may > be doing something wrong but it shows me that it doesn't matter for the slice > type, everything is alignment the same way. Can you comment on this? All slices have the same

[go-nuts] Symlink warnings in 'go mod' tool output

2019-11-27 Thread Caleb Spare
I'm experimenting with converting a large source tree into a Go module. This went pretty smoothly. However, I'm wondering why 'go mod tidy' and 'go mod why' print warnings about symlinks. These look like: $ go mod tidy warning: ignoring symlink /path/to/some/symlink/dir ... Where a warning line

[go-nuts] Re: Unable to lock versions when converting to go.mod

2019-11-27 Thread Brian Candler
I tried blowing away my entire ~/go tree to be sure. Starting from a fresh checkout (outside the ~/go tree), and a fresh checkout and go mod init ..., here's what the build does: $ go build ./... go: downloading github.com/go-kit/kit v0.5.1-0.20170917202734-0d313fb5fb3a *go: downloading

[go-nuts] Unable to lock versions when converting to go.mod

2019-11-27 Thread Brian Candler
I am having a problem with go.mod. I'm using go 1.13.4 and you can easily replicate what I'm seeing. I am trying to convert https://github.com/RobustPerception/nrpe_exporter from vendor/vendor.json to go.mod. Here's how I start: $ git clone https://github.com/RobustPerception/nrpe_exporter $

Re: [go-nuts] Change slice type

2019-11-27 Thread gregto83
Hi Ian, thanks for the help... quick question about alignment because i may be doing something wrong but it shows me that it doesn't matter for the slice type, everything is alignment the same way. Can you comment on this? On 32 bit it'll always return 4 and for 64 bit - 8... even for char or

[go-nuts] Re: Is anyone aware of a blocking ring buffer implementation?

2019-11-27 Thread Jason E. Aten
https://github.com/glycerine/rbuf very hardened. Implements Reader and Writer. You would have to add your desired blocking strategy. -- 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