Re: [go-nuts] Generic symbol metaproposal

2020-07-27 Thread bugpowder
IMHO uppercase, single letter for denoting generic types would be a nice syntax / convention. Sure, that would limit to 26 generic types per function ("enough for everybody"?), and probably break some bizarro existing code (using uppercase single-letter characters for parameter names) -- thought

Re: [go-nuts] compress/bzip2:Why is there only a decompression function, no compression function.

2020-07-27 Thread Heisenberg
I added the issue in golang/issue. I have some time now. I want to work for you, but I don't know how to do it. 在2020年6月11日星期四 UTC+8 下午12:37:30 写道: > > Why has this code called Joe Tsai never been merged? > > I am Joe Tsai and the reason why my bzip2 encoder implementation has not > been

[go-nuts] Re: How to convert Antlr parse tree to JSON

2020-07-27 Thread adib . rastegarnia
Hi Gervasius, Do you have the final solution of your work? Thanks, On Thursday, August 22, 2019 at 10:18:21 AM UTC-7, Gervasius Ishuuwa wrote: > > Hi Guys, > > I am trying to replicate the following solution ( > https://stackoverflow.com/questions/49116223/convert-antlr-parse-tree-to-json) >

Re: [go-nuts] why "unsafe.Sizeof(a[0])" doesn't generate panic when a is nil

2020-07-27 Thread Benjamin
Thanks for the response, which makes sense. `unsafe.Sizeof` is indeed a magic package. The parameter of this function isn't evaluated at all, for example, the following code will not generate panic either, because the function test isn't executed at all. func test() int8 { panic("hell")

[go-nuts] Go Present, Decoration on the first and last page

2020-07-27 Thread Tong Sun
Hi, Any way to apply some decorations on the first and last page of the sides of Go Present? I used `.background` for each of my sides, which looks really nice, but now the first and last page of the sides looks really out of the league. Any comment welcome. thanks -- You received this

[go-nuts] Re: Send a mail with a service account using Gmail API

2020-07-27 Thread Vincent Jouglard
Hi John, Thanks for you answer, which led me to the correct configuration. It was all about the "subject" missing from my way of implementing the Service ; as the function gmail.New() is deprecated, gmail.NewService() is to be used instead...but it does not implement - yet - the "subject" prop.

Re: [go-nuts] why "unsafe.Sizeof(a[0])" doesn't generate panic when a is nil

2020-07-27 Thread 'Axel Wagner' via golang-nuts
`unsafe` is a magic package. It is provided by the language and entirely implemented as compiler-intrinsics - and at compile-time. In particular, the result of `unsafe.Sizeof` must be a compile-time constant . In

[go-nuts] why "unsafe.Sizeof(a[0])" doesn't generate panic when a is nil

2020-07-27 Thread Benjamin
The code is something like below, the a is a nil slice. I am curious why it doesn't generate panic. Could anyone educate me on this? Thanks. var a []int fmt.Println(unsafe.Sizeof(a[0])) -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

Re: [go-nuts] CGo-free SQLite database/sql driver for linux/amd64 v1.4.0-beta1 is released

2020-07-27 Thread Vasiliy Tolstov
Very cool! Thanks for you great work пн, 27 июл. 2020 г. в 00:01, Jan Mercl <0xj...@gmail.com>: > > (reddit X-post) > > From the change log at https://godoc.org/modernc.org/sqlite#hdr-Changelog > > 2020-07-26 v1.4.0-beta1: > > The project has reached beta status while supporting linux/amd64 only

Re: [go-nuts] [Generics] Constraints package name

2020-07-27 Thread Andrei Tudor Călin
The entire notion of the constraints package feels a little suspicious to me. What if the comparable and ordered constraints were pre-declared in the universe block, and the numeric constraint were named math.Numeric? What other universal (or close to universal) constraints would belong in this