Re: [go-nuts] Re: Possible Go 2 proposal for built-in Remove method for Slices.

2021-02-04 Thread Tyler Compton
You could imagine a `slices` standard library package that has a regular generic function called `slices.Remove` that removes one or a series of elements. This seems like a smart addition to me, as the current de-facto method isn't very expressive. I imagine this didn't exist before because adding

Re: [go-nuts] R.I.P. Michael Jones

2021-02-04 Thread Tyler Compton
Thank you Jan for posting this. From his incredible accomplishments to his day-to-day friendliness and insight on this mailing list, he will certainly be missed. On Thu, Feb 4, 2021 at 3:13 PM Jan Mercl <0xj...@gmail.com> wrote: > >

Re: [go-nuts] prevent unnecessary escape to heap

2021-02-04 Thread Jesse McNelis
On Fri, Feb 5, 2021 at 12:32 PM Steve Roth wrote: > > How can I implement a writeByte function, against an unknown io.Writer > implementation, that doesn't allocate heap memory? > > As you've correctly stated, because the call to .Write() is via an interface the compiler can't tell whether any

[go-nuts] prevent unnecessary escape to heap

2021-02-04 Thread Steve Roth
Hi, folks, I could use some assistance getting rid of some unnecessary heap allocations. I have code that needs to write individual bytes to an io.Writer. (The Writer implementation given to my code is probably buffered, but my code shouldn't rely on a particular concrete type.) The relevant

Re: [go-nuts] R.I.P. Michael Jones

2021-02-04 Thread Marcin Romaszewicz
I will miss MTJ. I've worked with him on and off over 23 years, starting at Silicon Graphics, then as a customer when he founded Intrinsic Graphics, and finally in Google's GEO division. He was incredibly intelligent, a great teacher, and an extreme pedant :) RIP, Michael. -- Marcin On Thu, Feb

Re: [go-nuts] x/image/font: Font serialization

2021-02-04 Thread Nigel Tao
On Fri, Feb 5, 2021 at 7:00 AM Sebastien Binet wrote: > but as I wrote in the OP, it's not completely satisfying. > one needs to keep track of the association font.Face/[]byte. > so that's either double the memory (give or take), or a filename/io.Reader > handle to keep around. > Two []byte

Re: [go-nuts] R.I.P. Michael Jones

2021-02-04 Thread Wojciech S. Czarnecki
Dnia 2021-02-05, o godz. 00:12:56 Jan Mercl <0xj...@gmail.com> napisał(a): > https://www.geospatialworld.net/blogs/goodbye-michael-jones-the-man-who-gave-the-power-of-maps-in-our-hands/ Great man of wisdom he was, :( such a sad day. -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You

[go-nuts] Re: Possible Go 2 proposal for built-in Remove method for Slices.

2021-02-04 Thread Uli Kunitz
Hi, You can always do a = append(a[:3], a[4:]...). If you want to remove 2 elements a = append(a[3:], a[:5]). You would need to call remove two times, which is slower and cumbersome. I have rather have two functions like copy and append than a dozen that I have to learn. One of the Go

[go-nuts] Possible Go 2 proposal for built-in Remove method for Slices.

2021-02-04 Thread Selahaddin Harmankaya
Hi, I wonder if there are any proposals for the Remove method for Slices, which removes an element from a Slice. Since the status of the latest generics draft is `likely accepted` and it'd be possible to implement this with `generics`. I believe such an addition to language would alleviate

Re: [go-nuts] Code coverage in error cases when compared to other languages

2021-02-04 Thread Uli Kunitz
The case of somelib.Bar() can be solved by replacing it with an interface. You can than inject a Bar function that always returns an error. Otherwise I would recommend to use fuzzers to increase code coverage. They will do a much better job than you do. For byte sequence interfaces that don't

Re: [go-nuts] x/image/font: Font serialization

2021-02-04 Thread Robert Engels
I think you want to include the original font data. When you parse the font in Go it only needs the hints/fidelity for the Go renderer. When you create the pdf you want to have the full font for optimum rendering. > On Feb 4, 2021, at 2:00 PM, Sebastien Binet wrote: > > yes. > but as I

Re: [go-nuts] R.I.P. Michael Jones

2021-02-04 Thread 'Dan Kortschak' via golang-nuts
On Fri, 2021-02-05 at 00:12 +0100, Jan Mercl wrote: > https://www.geospatialworld.net/blogs/goodbye-michael-jones-the-man-who-gave-the-power-of-maps-in-our-hands/ Thank you for letting us know, Jan. He will be missed. -- You received this message because you are subscribed to the Google

Re: [go-nuts] R.I.P. Michael Jones

2021-02-04 Thread Robert Engels
A sad day. A great tribute. Thanks. > On Feb 4, 2021, at 5:13 PM, Jan Mercl <0xj...@gmail.com> wrote: > >  > https://www.geospatialworld.net/blogs/goodbye-michael-jones-the-man-who-gave-the-power-of-maps-in-our-hands/ > -- > You received this message because you are subscribed to the Google

[go-nuts] R.I.P. Michael Jones

2021-02-04 Thread Jan Mercl
https://www.geospatialworld.net/blogs/goodbye-michael-jones-the-man-who-gave-the-power-of-maps-in-our-hands/ -- 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 it, send an email to

[go-nuts] Go 1.15.8 and Go 1.14.15 are released

2021-02-04 Thread Carlos Amedee
Hello gophers, We have just released Go versions 1.15.8 and 1.14.15, minor point releases. View the release notes for more information: https://golang.org/doc/devel/release.html#go1.15.minor You can download binary and source distributions from the Go web site: https://golang.org/dl/

Re: [go-nuts] Code coverage in error cases when compared to other languages

2021-02-04 Thread 'Charles Hathaway' via golang-nuts
Hey all, Thomas, I agree that the code you provide would benefit from unit tests, but I would like to focus my question on the very common case which simply throws the error without additional edge cases, such as the example given in the first email. Looking at the feedback given so far, I think

Re: [go-nuts] x/image/font: Font serialization

2021-02-04 Thread Sebastien Binet
yes. but as I wrote in the OP, it's not completely satisfying. one needs to keep track of the association font.Face/[]byte. so that's either double the memory (give or take), or a filename/io.Reader handle to keep around. -s ‐‐‐ Original Message ‐‐‐ On Thursday, February 4th, 2021 at

Re: [go-nuts] x/image/font: Font serialization

2021-02-04 Thread Robert Engels
If you have the data to pass to Parse then you have the data to embed the font in the pdf. > On Feb 4, 2021, at 12:02 PM, Sebastien Binet wrote: > > hi there, > > Right now, I am pretty happy with the state of the > x/image/font{,/sfnt,/opentype}} packages. I can load TTF/OTF files, draw >

[go-nuts] x/image/font: Font serialization

2021-02-04 Thread Sebastien Binet
hi there, Right now, I am pretty happy with the state of the x/image/font{,/sfnt,/opentype}} packages. I can load TTF/OTF files, draw some glyphs in a way that (almost) resembles LaTeX[1]. Great. (and many thanks, by the way.) We migrated gonum/plot[2] from freetype to x/image/font recently and

[go-nuts] Re: go compilation on ARM (aarch64) with goC and dynamic link

2021-02-04 Thread Christophe Valmir
I'm not getting along :) The -linkshared option creates a lib not an executable, otherwise it works. Le jeudi 4 février 2021 à 08:48:02 UTC+1, Christophe Valmir a écrit : > Something else interesting : > > ron :~/inceptionv3/test_go$ ldd ./test_go > linux-vdso.so.1 (0x007f7a3d1000) >