[go-nuts] Re: Non-blocking Read from StdoutPipe and StderrPipe

2024-10-16 Thread Peter Bočan
Hey peeps, thank you for your input, I will try these options and see how it goes. Regards, Peter. On Tuesday 15 October 2024 at 10:12:15 UTC+1 Brian Candler wrote: > On Monday 14 October 2024 at 22:57:07 UTC+1 Peter Bočan wrote: > > What is the recommended way of reading whatever is on the b

Re: [go-nuts] Generic constant type parameters?

2024-10-16 Thread 'Robert Engels' via golang-nuts
I was able to convert the fixed package to use generics to allow a variable number of decimal places. benchmark old ns/op new ns/op delta BenchmarkAddFixed-8 0.98 0.96 -1.66% BenchmarkMulFixed-8 5.44 22.8 +318.15%

Re: [go-nuts] Generic constant type parameters?

2024-10-16 Thread Ian Lance Taylor
On Wed, Oct 16, 2024 at 6:24 AM robert engels wrote: > > Thanks. Is there something in the language spec that covers this ? The design > doc is the only thing that appears in a Google search. I have to admit that I don't see it in the current spec. Ian > > On Oct 16, 2024, at 8:09 AM, Ian Lanc

[go-nuts] Re: Iterator handling error

2024-10-16 Thread Nico Braun
>On Friday 30 August 2024 at 12:05:33 UTC+2 Christoph Berger wrote: >Opinionated answer: If a container type cannot iterate over its elements without fail, I would refrain from trying to build a standard iterator for this container type. You'd be shoehorning a >iterator that can fail into the ite

Re: [go-nuts] Generic constant type parameters?

2024-10-16 Thread Marvin Renich
* Robert Engels [241016 08:58]: > It does! Interestingly it jumps to 24 I’m I embed Places. That is expected. Embedding the interface needs to embed the value of the interface, which consists of two pointers. This way embeds the struct implementing the interface, which is empty. ...Marvin --

Re: [go-nuts] Generic constant type parameters?

2024-10-16 Thread 'robert engels' via golang-nuts
Thanks. Is there something in the language spec that covers this ? The design doc is the only thing that appears in a Google search. > On Oct 16, 2024, at 8:09 AM, Ian Lance Taylor wrote: > > On Tue, Oct 15, 2024 at 10:18 PM Robert Engels wrote: >> >> Hmm, I thought I had it “working” using

Re: [go-nuts] Generic constant type parameters?

2024-10-16 Thread Ian Lance Taylor
On Tue, Oct 15, 2024 at 10:18 PM Robert Engels wrote: > > Hmm, I thought I had it “working” using this code > https://go.dev/play/p/pzKacmi3aPe but there is a compiler error, but > according to the accepted proposal documentation this should be valid > https://go.googlesource.com/proposal/+/ref

Re: [go-nuts] Generic constant type parameters?

2024-10-16 Thread Robert Engels
It does! Interestingly it jumps to 24 I’m I embed Places. This looks like a compiler bug to me - as the down usages don’t show errors - adding a property shouldn’t be required. @Ian? > On Oct 16, 2024, at 5:57 AM, Marvin Renich wrote: > > * 'Robert Engels' via golang-nuts [241016 > 01:19]:

Re: [go-nuts] Generic constant type parameters?

2024-10-16 Thread Marvin Renich
* 'Robert Engels' via golang-nuts [241016 01:19]: > Hmm, I thought I had it “working” using this code > https://go.dev/play/p/pzKacmi3aPe > but there is a compiler error, but according to the accepted proposal > documentation this should be valid > https://go.go