[go-nuts] Re: Experience report on a large Python-to-Go translation

2020-02-04 Thread Brian Candler
On Monday, 3 February 2020 23:10:01 UTC, Jon Conradt wrote: > > While names arguments like foo(x= 1.0, y = 23) may look like syntactic > sugar, I think you are right that they improve readability, especially of > long argument lists. The counter argument I suppose if that you could pass > struct

[go-nuts] Re: Experience report on a large Python-to-Go translation

2020-02-04 Thread Jason E. Aten
Here's an idea for named arguments. Given: type fArg struct { x float64 y float64 i int } func f(a fArg) { ... } func f2(a *fArg) { ... } ## Then, consider call example 1: f(x:1.9, i:2) -> this would be translated into an implicit struct creation either value or value plus a poi

[go-nuts] gollvm: Interpret llvm-goc LLVM-IR with lli

2020-02-04 Thread arssh70
Hello! I am doing a project in which I need to generate LLVM IR file by use gollvm . but the result that I get can not exec the .ll file by lli command any suggestion best wishes -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscrib

[go-nuts] runtime/cgo: pthread_create failed: Resource temporarily unavailable

2020-02-04 Thread jnaderlowe
Hi everyone, I posted this question on StackOverfow here with a 200 point bounty, but per the git issue I opened here , someone suggested

Re: [go-nuts] Re: x/mobile: Samples for reverse binding in gomobile

2020-02-04 Thread psyhonut
Hello, Jay. Can I ask you some questions about gomobile reverse binding in private messaging? On Thursday, September 12, 2019 at 3:23:24 PM UTC+3, Jay Sharma wrote: > > Hello Elias, > > *First of all, Thank you very much for help. :)* > > > *After I remove the static from function it worked well.

[go-nuts] Re: forbid downloading package without go.mod enabling

2020-02-04 Thread seankhliao
a bit of a hack but you could use one of the new language features that are gated behind go1.13 in module mode? https://golang.org/doc/go1.13#language On Wednesday, January 29, 2020 at 1:49:18 PM UTC+1, Vasiliy Tolstov wrote: > > I'm work on go-micro project and usually users try to use package

Re: [go-nuts] runtime/cgo: pthread_create failed: Resource temporarily unavailable

2020-02-04 Thread Robert Engels
When you reassign the file descriptors you need to close the old ones - this does not happen automatically. You also need to close the ffmpeg fds. By not closing the descriptors the pipe structures are remaining in the kernel. That’s my first guess anyway. > On Feb 4, 2020, at 7:21 AM, jnade

Re: [go-nuts] gollvm: Interpret llvm-goc LLVM-IR with lli

2020-02-04 Thread 'Than McIntosh' via golang-nuts
Hello, You wrote: >> .. . result that I get can not exec the .ll file by lli command Go programs depend on the Go runtime and standard library -- you can't really do anything interesting in Go without involving these packages. Consider a toy program like this: https://play.golang.org/p/MAohLsrz7

Re: [go-nuts] gollvm: Interpret llvm-goc LLVM-IR with lli

2020-02-04 Thread alshamar
in this case is Only GOLLVM does not allow to go direct to .ll or it is general issue. on the other hand, Is any way or tools that compile/interpret/convert from GO to .LL best wishes On Tuesday, February 4, 2020 at 8:59:14 AM UTC-5, Than McIntosh wrote: > > Hello, > > You wrote: > >> .. . res

Re: [go-nuts] gollvm: Interpret llvm-goc LLVM-IR with lli

2020-02-04 Thread 'Than McIntosh' via golang-nuts
>>in this case is Only GOLLVM does not allow to go direct to .ll or it is general issue It's a general issue. Hypothetically if someone were to write another LLVM-IR-producing Go compiler (not gollvm), you would no doubt have the same problem. Than On Tue, Feb 4, 2020 at 9:55 AM wrote: > in t

Re: [go-nuts] gollvm: Interpret llvm-goc LLVM-IR with lli

2020-02-04 Thread arssh70
Thank very much for your response and clarifying this issue On Tuesday, February 4, 2020 at 12:48:24 PM UTC-5, Than McIntosh wrote: > > >>in this case is Only GOLLVM does not allow to go direct to .ll or it is > general issue > > It's a general issue. Hypothetically if someone were to write anot

[go-nuts] [Proposal] Add the omitzero tag for JSON encoding

2020-02-04 Thread Manlio Perillo
Hi. I'm writing a module providing packages wrapping go env, go list, go list -m and go mod download commands After reviewing the implementation of the go list -m wrapper I noted that the Time field is defined as a pointer: Time *time.Time`json:",omitempty"` // time version was cre

Re: [go-nuts] runtime/cgo: pthread_create failed: Resource temporarily unavailable

2020-02-04 Thread jnaderlowe
After spending some time in the gophers slack chat, I ended up changing the fuction to this func pipeThruFfmpegToMp4(vi *VideoInfo, rw web.ResponseWriter) error { var ffmpeg *exec.Cmd ffmpeg = exec.Command( "ffmpeg", "-i", "-", "-i", "pipe:3", "-c:v", "cop

Re: [go-nuts] runtime/cgo: pthread_create failed: Resource temporarily unavailable

2020-02-04 Thread jnaderlowe
I also thought the Wait() took care of closing the file descriptors? Are you saying I should add a pipe3.Close()? Or a youtube.Close()? -- 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

Re: [go-nuts] runtime/cgo: pthread_create failed: Resource temporarily unavailable

2020-02-04 Thread Robert Engels
I will take a more in-depth look this evening. > On Feb 4, 2020, at 2:19 PM, jnaderl...@gmail.com wrote: > >  > I also thought the Wait() took care of closing the file descriptors? Are you > saying I should add a pipe3.Close()? Or a youtube.Close()? > -- > You received this message because yo

Re: [go-nuts] runtime/cgo: pthread_create failed: Resource temporarily unavailable

2020-02-04 Thread Robert Engels
Are you certain you are not just starting too many processes? Ie use a “worker pool” so you have at most N conversions happening at the same time. > On Feb 4, 2020, at 2:34 PM, Robert Engels wrote: > >  > I will take a more in-depth look this evening. > >>> On Feb 4, 2020, at 2:19 PM, jnade

[go-nuts] how to use gc script for checking gopacket repo (newbie question)?

2020-02-04 Thread ek . arjun
Hi everyone, I was working on a project which uses igmp packet processing and implemented a serialization function for the same(which was not available in gopacket lib). I thought it would be helpful to add the feature in the gopacket repo for other users but, I'm having trouble in using gc scr

[go-nuts] Seeking new custodian for godoc.org

2020-02-04 Thread Liam
Legal advice will apparently force the Go team to close godoc.org [1] But the site could be taken over by a new custodian, for instance a non-profit funded by donations. A first step is to identify a place to host the site. Perhaps a well-known Go shop like Cloudflare? Then we'd apply to join

[go-nuts] Re: Seeking new custodian for godoc.org

2020-02-04 Thread uldericofilho
I mentioned twice in this thread that I am willing to join a community-wide effort to keep it working if pkg.go.dev is kept closed source and not feature parity with godoc.org On Tuesday, February 4, 2020 at 1:44:12 PM UTC-8, Liam wrote: > > Legal advice will apparently force the Go team to cl

[go-nuts] HTTP/2 performance issues

2020-02-04 Thread Nicholas Feinberg
I’ve been profiling a program that has network latency issues. The baseline latency between client and server is about 0.2ms and overall bandwidth use is low, but when running about ~15k requests/second of size about ~10kb each, latency spikes to about ~75ms. Looking at `pprof` stack traces and pr

Re: [go-nuts] Re: Experience report on a large Python-to-Go translation

2020-02-04 Thread Nigel Tao
On Tue, Feb 4, 2020 at 8:56 PM Jason E. Aten wrote: > b := helper(i: 2) > > would give you the whole new &fArg{x:0, y:0, i:2} back in b. I'm not sure how helpful that really is, given that you can already write: b := &fArg{i: 2} -- You received this message because you are subscribed to the

Re: [go-nuts] Re: Experience report on a large Python-to-Go translation

2020-02-04 Thread Nigel Tao
On Sun, Jan 26, 2020 at 9:16 AM Eric Raymond wrote: > And that's the insight that led be to the extension I proposed. I asked > myself what the most natural way to pass out a soft close might be. If you're proposing combining generators and exceptions, be aware of how complicated the exact seman

Re: [go-nuts] runtime/cgo: pthread_create failed: Resource temporarily unavailable

2020-02-04 Thread jnaderlowe
I don't think that is the issue. I have tried it on a few different servers. Most recent one with 100 gig's of ram and 50 cores. The load average never goes above 9, but the ram slowly but surely on htop starts to go up. The go binary ends up climbing slowly in it's ram use over time, then