[go-nuts] A team using Go won ISUCON10

2021-09-21 Thread mattn
As usual on the each years, in this year too, many Japanese web developers attended on ISUCON (an event to improve the HTTP server in a good fast). And in this year most of developers choiced Go. # Preliminary stage (language, teams, ratio) Go 328 62.2% Ruby59 11.2% Python 47 8.9% N

[go-nuts] gollvm for LLVM13

2021-09-21 Thread Khanh TN
Hi, While running the latest commit of gollvm (with latest commit of gofrontend, libbacktrace, libffi) with LLVM13 (commit llvmorg-13.0.0-rc3), I encountered this error: llvm-project/build13/tools/gollvm/libgo/version.go:9:6: error: redefinition of 'ArchFamilyType' llvm-project/llvm/tools/gol

[go-nuts] gollvm for LLVM13

2021-09-21 Thread Khanh TN
Hi, While running the latest commit of gollvm (with latest commit of gofrontend, libbacktrace, libffi) with LLVM13, I encountered this error: llvm-project/build13/tools/gollvm/libgo/version.go:9:6: error: redefinition of 'ArchFamilyType' llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/runtime

Re: [go-nuts] how atomic instruction work?

2021-09-21 Thread 'Dan Kortschak' via golang-nuts
Also, https://research.swtch.com/mm. On Tue, 2021-09-21 at 16:22 -0500, robert engels wrote: > This may be of interest to you: > https://github.com/golang/go/issues/5045 > > > On Sep 21, 2021, at 4:17 PM, Ian Lance Taylor > > wrote: > > > > On Tue, Sep 21, 2021 at 12:54 PM xie cui > > wrote: > >

Re: [go-nuts] how atomic instruction work?

2021-09-21 Thread robert engels
This may be of interest to you: https://github.com/golang/go/issues/5045 > On Sep 21, 2021, at 4:17 PM, Ian Lance Taylor wrote: > > On Tue, Sep 21, 2021 at 12:54 PM xie cui > wrote: >> >> >> https://stackoverflow.com/questions/2599238/are-memory-barriers-necessary-

Re: [go-nuts] how atomic instruction work?

2021-09-21 Thread Ian Lance Taylor
On Tue, Sep 21, 2021 at 12:54 PM xie cui wrote: > > > https://stackoverflow.com/questions/2599238/are-memory-barriers-necessary-for-atomic-reference-counting-shared-immutable-dat > this answer say that: > On x86, it will turn into a lock prefixed assembly instruction, like LOCK > XADD. > Being a

[go-nuts] Generic error handling with panic, recover, and defer

2021-09-21 Thread Marcos César de Oliveira
With go 1.18 generics implementation it is now possible to provide error handling functions in a fashion similar to the "try" proposal. I wrote a small library that implements this approach: https://github.com/mcesar/must. An example of usage is as follows: package main import ( "fmt" "

[go-nuts] Re: What is up with memo.com?

2021-09-21 Thread Brian Candler
I've seen the same too. Sadly memo.com don't provide any opt-out link in their messages. Based on IP addresses in headers, the parent appears to be https://joylabs.com/. I tried contacting them via their web contact form, but have had no response. On Tuesday, 21 September 2021 at 17:48:20 U

Re: [go-nuts] how atomic instruction work?

2021-09-21 Thread xie cui
https://stackoverflow.com/questions/2599238/are-memory-barriers-necessary-for-atomic-reference-counting-shared-immutable-dat this answer say that: On x86, it will turn into a lock prefixed assembly instruction, like LOCK XADD. Being a single instruction, it is non-interruptible. As an added "feat

Re: [go-nuts] What is the total max size of embed content?

2021-09-21 Thread Glen Newton
Hello Ian, Yes, I think it is time I explain the 'why' of my inquiries into this. :-) My use case is this: Go, with its fast startup, pretty fast execution and pretty small memory footprint, as well as it's ability to deploy as a single binary, makes it a great language for cloud function-as-a-

Re: [go-nuts] What is the total max size of embed content?

2021-09-21 Thread Ian Lance Taylor
On Tue, Sep 21, 2021 at 6:23 AM Glen Newton wrote: > > Looking at https://groups.google.com/g/golang-codereviews/c/xkHLQHidF5s and > https://github.com/golang/go/issues/9862 and the code to which they refer, it > seems to me that the limit is 2GB independent of platform (is this true?), as > th

[go-nuts] Re: What is up with memo.com?

2021-09-21 Thread peterGo
Ian, I received some gmail from memo.com for a golang-nuts conversation that I participated in. I marked the gmail messages as spam. Peter On Tuesday, September 21, 2021 at 12:11:31 PM UTC-4 Ian Lance Taylor wrote: > I'm seeing random repeats of golang-nuts messages sent from memo.com > with b

[go-nuts] What is up with memo.com?

2021-09-21 Thread Ian Lance Taylor
I'm seeing random repeats of golang-nuts messages sent from memo.com with bad formatting. I'm also seeing regular messages telling me that someone has connected with golang-nuts on memo.com, which I've been rejecting at the moderation stage. Does anybody know what is going on? I don't want to st

Re: [go-nuts] Idea extending xerror.As

2021-09-21 Thread David Finkel
On Mon, Sep 20, 2021 at 10:52 PM Andrey T. wrote: > > ... or, to put a crazy idea out there, we need to ask for extension of > switch statement to support (v, err) tuples for a case argument... That's not a particularly crazy idea. It's just one that's unlikely to make it through with one use-c

Re: [go-nuts] go/types: differentiate b/w defined named types

2021-09-21 Thread 'Sebastien Binet' via golang-nuts
Axel, On Tue Sep 21, 2021 at 15:56 CET, Axel Wagner wrote: > The underlying type is defined recursively > : > > Each type T has an underlying type: If T is one of the predeclared > boolean, > > numeric, or string types, or a type literal, the corresponding underl

Re: [go-nuts] go/types: differentiate b/w defined named types

2021-09-21 Thread 'Axel Wagner' via golang-nuts
The underlying type is defined recursively : Each type T has an underlying type: If T is one of the predeclared boolean, > numeric, or string types, or a type literal, the corresponding underlying > type is T itself. Otherwise, T's underlying type is *the underly

[go-nuts] go/types: differentiate b/w defined named types

2021-09-21 Thread 'Sebastien Binet' via golang-nuts
hi there, I am a bit confused by go/types and defined named types: https://play.golang.org/p/izESp473jOq the above link shows a program using the go/types package and shows how the four types T0, T1, T2 and T3: ``` package p type T0 struct { F int} type T1 struct { T0 } type T2 T1 type T3 T0 `

Re: [go-nuts] What is the total max size of embed content?

2021-09-21 Thread Glen Newton
Hello, Looking at https://groups.google.com/g/golang-codereviews/c/xkHLQHidF5s and https://github.com/golang/go/issues/9862 and the code to which they refer, it seems to me that the limit is 2GB independent of platform (is this true?), as the linker is limited to 2e9. Again, should have done mo

Re: [go-nuts] Have you seen any static analysis checker for sync.Mutex.Unlock() call?

2021-09-21 Thread Aram Hăvărneanu
Congratulations on solving the halting problem! PS: use defer otherwise you aren't panic-safe. -- Aram Hăvărneanu -- 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

[go-nuts] Have you seen any static analysis checker for sync.Mutex.Unlock() call?

2021-09-21 Thread たふみ
Hi, I'm seeking the static analysis checker (go vet tool) for missed call sync.Mutex.Unlock(). For example: source code is like type T struct { mu sync.Mutex } func (t *T) A(a bool) { t.mu.Lock() if (a) { // here missing t.mu.Unlock() return } t.mu.Unlock() } and by running