[go-nuts] [generics] cannot use generic type list.Element(type TElem) without instantiation

2020-07-01 Thread aurelien . rainone
Hi, Is this expected? import "list" // for 'std' list.go2 func main() { type intElement list.Element(int) _ = make(map[int]intElement) // ok: compiles // nok _ = make(map[int]list.Element(int)) // cannot use generic type list.Element(type TElem) without instantiation } I don't think it is, b

[go-nuts] Re: Bitstring package?

2020-07-01 Thread aurelien . rainone
https://godoc.org/github.com/arl/evolve/pkg/bitstring I made this bitstring package some time ago while I was experimenting with genetic algorithms in go. I'm the only to use but I used it a lot, there are a bunch of tests/benchmarks. Feel free to use it Le mardi 30 juin 2020 03:59:27 UTC+2, ha

[go-nuts] Looking for mentors for an open-source event

2019-06-27 Thread aurelien . rainone
Hi, At my company, we're organizing a 3 months event in which employees are invited to give back to open-source projects and technologies we're using in the company, Develer! A kind of 3-months contributor workshop if you like... We have already some experienced go developers and contributors

Re: [go-nuts] big.Int.SetString fails with string created with bytes.Buffer

2017-10-10 Thread aurelien . rainone
Oh yes, thank you. I totally missed that, thinking the bytes.Buffer was preallocated with 4 bytes, instead i filled it with 4x0 bytes Le mardi 10 octobre 2017 10:59:56 UTC+2, Ian Davis a écrit : > > > > > On Tue, 10 Oct 2017, at 09:51 AM, aurelien...@gmail.com > wrote: > > > func main() { > buf

[go-nuts] big.Int.SetString fails with string created with bytes.Buffer

2017-10-10 Thread aurelien . rainone
Hi everybody, I ran into this problem yesterday, I couldn't convert a string created with a bytes.Buffer into a big.Int by using SetString. On the other hand, with the same string value, created from literals or even from a byte slice, the conversion is successful. Find the code below or on th

[go-nuts] Equivalent of C++ std::find_first_not_of for bytes package

2017-05-18 Thread aurelien . rainone
I'm looking for an assembly optimized function in the bytes package to perform the same thing than C++ std::find_first_not_of function, that is, iterating over a slice of bytes and stopping at the first byte that is not in the byte i'm looking for, or not in the set of bytes i'm looking for. I k