Re: [go-nuts] Is it necessary to change the behavior of maps.Keys and maps.Values?

2024-12-30 Thread Xu Liu
On Tue, Dec 31, 2024 at 1:40 PM Axel Wagner wrote: > > Please note that "maps.Collect" is slow. > https://github.com/golang/go/issues/68261 > > Please note that I did address that in my message. > CollectN matters most for non-trivial iterators, e.g. where you first > transform an iterator using

[go-nuts] EasyView: an integrated pprof visualizer in vscode

2022-03-01 Thread 'Xu Liu' via golang-nuts
://docs.google.com/forms/d/e/1FAIpQLSf_5h6DeMtAJPazxjZzZR88yydvtaXbQ8s2E-iR7nIiSPekQg/viewform . Please feel free to forward this email to your colleagues. If you come across any problems, feel free to send an email to Prof. Xu Liu ( xli...@ncsu.edu). -- You received this message because you are subscribed to

Re: [go-nuts] go build error in darwin: duplicate symbol

2021-03-22 Thread Max Xu
But I didn't write cgo code in my project. The weird part is I can build success with *GOOS=linux go build*, but failed with *GOOS=darwin go build* On Friday, March 19, 2021 at 5:11:57 AM UTC+8 Ian Lance Taylor wrote: > On Thu, Mar 18, 2021 at 9:55 AM Max Xu wrote: > > > >

[go-nuts] go build error in darwin: duplicate symbol

2021-03-18 Thread Max Xu
Hi all, I'm running into a weird bug: Failed with command: GOOS=darwin go build Bug success with: GOOS=linux go build The failed Message: /usr/local/opt/go/libexec/pkg/tool/darwin_amd64/link: running clang failed: exit status 1 duplicate symbol '_readdrivestat' in: /var/folders/tx/5c8vkq

Re: [go-nuts] [generics] where to find predefined constraint aggregations?

2020-06-24 Thread 'Yongjian (Jim) Xu' via golang-nuts
On Wednesday, June 24, 2020 at 3:55:07 PM UTC-7 Ian Lance Taylor wrote: > On Wed, Jun 24, 2020 at 3:47 PM i3dmaster wrote: > > > > On Wednesday, June 24, 2020 at 3:02:43 PM UTC-7, Ian Lance Taylor wrote: > >> > >> The current generics design draft doesn't support the kind of > >> constrain

[go-nuts] A unofficial Go error handling proposal

2019-07-18 Thread 'Yongjian Xu' via golang-nuts
Inspired from reading https://github.com/golang/go/issues/32437#issuecomment-50187 After some careful thoughts on various different concerns and criticisms of the existing proposal, I'd want to give a try from a different approach. Using the famous example of CopyFile: func CopyFile(src

[go-nuts] Some questions about go plugin

2019-04-25 Thread xu
not be closed". Thank you for reading. go version 1.12.4 xu -- 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 golang-nuts+unsubscr...@go

[go-nuts] Re: View http open connections

2019-02-13 Thread Dany Xu
what does it means "heavy load"? if not in "heavy load", it can work ? On the other hand, do you want the tcp connections or the http req numbers? >From the go package, it appears that getting the basic tcp connections in http.server is impossible. 在 2019年2月12日星期二 UTC+8下午10:37:52,jose.albe...@

[go-nuts] Re: Handling connection retries on a highly-available service

2019-02-13 Thread Dany Xu
As discuss above, i think the answer is decoupling the P and logger, storing the logs when the logger is down.The push and pull pattern would be better.The p sends all logs and the logger pulls all logs.Just keep a bigger storage for un-consumed logs.Queue may be is a better way but using a sin

[go-nuts] Re: url.parse issue if the first character of a url is a number

2019-02-10 Thread mailme . xu
What I said is the url content without http/https . On Sunday, February 3, 2019 at 4:09:05 PM UTC+8, Tamás Gulácsi wrote: > > An url must start with a scheme (i.e. http://). -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from th

[go-nuts] golang websocket read method doesn't get error if the android client changes its network

2019-01-29 Thread mailme . xu
I wrote a both server and client side with golang, the server side runs on centos7, and I built client side as aar package runs at android, but I noticed If I close android network, the server side websocket.read not get a EOF error and it still keep hang. What is the reason? how can I solve it

Re: [go-nuts] Confusion about gcWork put in golang source code runtime/mgcwork.go

2018-08-17 Thread Tim Xu
I am too dumb that i thought it was a slice. Thanks a lot : ) On Fri, Aug 17, 2018 at 11:01 PM Ian Lance Taylor wrote: > On Fri, Aug 17, 2018 at 3:28 AM, wrote: > > > > I am new to golang source code, and recently met a problem about > > understanding golang gc. > > > > In runtime/mgcwork.go: 1

[go-nuts] panic propagation can be blocked by blocking defer function

2018-03-31 Thread 'Yongjian Xu' via golang-nuts
This program will make panic not panicking but silently blocking forever. func panicfunc() { panic("oops") } func run() { defer func() { select {} } panicfunc() } func main() { // not trigger runtime deadlock. go func() { ticker := time.NewTicker(1

[go-nuts] best practice to read/write shared map in a web application

2017-10-18 Thread woosley. xu.
Hi, I am writing an application here using echo framework, this application(*client node*) runs on every server and report its OS/Hardware facts to a master node. On master, it store all the server facts in a big map, the key is

Re: [go-nuts] Re: Choosing a framework

2017-09-13 Thread woosley. xu.
Personally when I started my project I chose to use a framework. I think it is ok to start with frameworks as long as you know what framework should do, what key concepts should be handled when dealing with Web app. Maybe Go provides all those solutions with standard pkgs, but if a framework can g

[go-nuts] 'Go install' fail to import package with 'Docker run'

2017-04-24 Thread Qing Xu
The symptom is that a single command docker run go install would fail at importing Go packages, but running them separately, i.e. docker run -it bash (with the source files copied over to same location) go install would work just fine. Details below: - The build comman

[go-nuts] Re: time.Sleep and sync.WaitGroup strange behavior

2017-01-21 Thread Xu Lei
if you get into the fmt.println, you will see the output device is os.Stdout, any println call will direct output into it nodelay 在 2017年1月21日星期六 UTC+8上午11:34:09,Rodolfo Azevedo写道: > > Hi all, > > I have a question, interesting: > > Why the executes is diferente in these both situations? > > Exec

[go-nuts] Re: time sub negative

2016-11-25 Thread Xu Lei
0:00 UTC. > sec int64 > // nsec specifies a non-negative nanosecond > // offset within the second named by Seconds. > // It must be in the range [0, 9]. > nsec int32 > loc *Location > } > > On Friday, November 25, 2016 at 3:38:23 PM UTC+8, Xu Lei wro

[go-nuts] Re: time sub negative

2016-11-25 Thread Xu Lei
os: windows7 version: go version go1.7 windows/amd64 On Friday, November 25, 2016 at 4:24:52 PM UTC+8, Dave Cheney wrote: > > You might want to try eTime.Sub(sTime) which returns a time.Duration which > can print itself. > > Which operating system are you using? Which version of Go are you usin

[go-nuts] Re: do i need to wait all child routine exit

2016-11-25 Thread Xu Lei
thanks for replying!!! the answers are great -- 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 golang-nuts+unsubscr...@googlegroups.com. For more options, visit ht

[go-nuts] Re: time sub negative

2016-11-25 Thread Xu Lei
2016-11-25 15:36:21.9983037 +0800 CST : [Success for beacons.gvt2.com. for 38] 2016-11-25 15:36:22.0083043 +0800 CST : [Success for timgsa.baidu.com. for -960] 2016-11-25 15:36:22.0153047 +0800 CST : [Success for sp0.baidu.com. for -953] 2016-11-25 15:36:22.0153047 +0800 CST : [Success for s

[go-nuts] time sub negative

2016-11-24 Thread Xu Lei
.. sTime := time.Now().Nanosecond() defer func() { eTime := time.Now().Nanosecond() debug("Success for ", qname, "for", (eTime-sTime)/100) }() .. i got negative value for (eTime - sTime) when defer function calls is there any thing