Re: [go-nuts] Re: SIGSEGV in io.copyBuffer

2019-07-30 Thread Dan Kortschak
Do you have any reason to believe that it's not QEMU (have you done this on real hardware)? It has past form for this kind of problem. I have just tried to replicate this on a pi and both 1.11.5 and 1.11.9 complete successfully. BTW 1.11 is not the the current release and for 1.11, the most

Re: [go-nuts] systemstack stop traceback

2019-07-30 Thread Ian Lance Taylor
On Tue, Jul 30, 2019 at 8:58 PM wrote: > > I read go runtime code,but I'm poor in assembly language, > i can't understand the following code > // switch to g0 > MOVQDX, g(CX) > MOVQ(g_sched+gobuf_sp)(DX), BX > // make it look like mstart called systemstack

[go-nuts] Re: [wasm] net/http crashes application

2019-07-30 Thread Jihoon Chung
Because the syscall/js doc says, (from https://golang.org/pkg/syscall/js/#FuncOf ) > A wrapped function triggered during a call from Go to JavaScript gets > executed on the same goroutine. A wrapped function triggered by > JavaScript's event loop gets executed on an extra goroutine. Blocking

[go-nuts] systemstack stop traceback

2019-07-30 Thread wangjinjinjin0
I read go runtime code,but I'm poor in assembly language, i can't understand the following code // switch to g0 MOVQDX, g(CX) MOVQ(g_sched+gobuf_sp)(DX), BX // make it look like mstart called systemstack on g0, to stop traceback SUBQ$8, BX

[go-nuts] Re: SIGSEGV in io.copyBuffer

2019-07-30 Thread Antony Rheneus
The same when executed with latest version got "malloc deadlock" Also note, it happens only for the URL used here, with different get URL it works fine. $ go version go version go1.11.9 linux/arm $ go env GOARCH="arm" GOBIN="" GOCACHE="/var/arheneus/.cache/go-build" GOEXE="" GOFLAGS=""

[go-nuts] Re: SIGSEGV in io.copyBuffer

2019-07-30 Thread Antony Rheneus
Please dont jump into conclusion on qemu. -Antony On Tuesday, July 30, 2019 at 6:15:43 PM UTC+5:30, Antony Rheneus wrote: > > > Seeing segfault during go get -v URL > > > > $ go version > go version go1.11.5 linux/arm > > > > $ go env > GOARCH="arm" > GOBIN="" >

Re: [go-nuts] How to implement a file download service in GRPC

2019-07-30 Thread Burak Serdar
On Tue, Jul 30, 2019 at 5:49 PM Rampradeep Nalluri wrote: > > It is easy to pipe a file reader to http.ResponseWriter object using > io.copy() when I implement a large file download service over REST. But how > do we handle similar requirement with gRPC server to REST client? > > what is the

[go-nuts] How to implement a file download service in GRPC

2019-07-30 Thread Rampradeep Nalluri
It is easy to pipe a file reader to http.ResponseWriter object using io.copy() when I implement a large file download service over REST. But how do we handle similar requirement with gRPC server to REST client? what is the standard way? -Ram -- You received this message because you are

Re: [go-nuts] Re: Contracts Draft: why are method pointers allowed

2019-07-30 Thread 'Axel Wagner' via golang-nuts
Ah, thanks, I think I understand now. AIUI this would essentially require that the author of a generic function or type would have to write a contract to specifically allow or disallow pointer/value receivers to satisfy the contract? I personally don't really like the idea of putting that

Re: [go-nuts] Re: Contracts Draft: why are method pointers allowed

2019-07-30 Thread Henrik Johansson
Why make any distinction between pointers and non pointers? Isn't the (usual) point to allow the caller to decide upon instantiation? We define a contract in terms of an unknown set of types and then let whoever uses it fullfil the contract however they want? On Tue, Jul 30, 2019, 21:57 wrote:

Re: [go-nuts] Code coverage for Automated api tests

2019-07-30 Thread Anila Saifan
Hi Brian-Thanks for the reply.But in this case I am looking for measuring Api Automation test coverage written in Java or karate against the application code (app developed in go). Will below article shared help in this case ? Many Thanks On Tue, 30 Jul 2019 at 9:47 PM, Brian Hatfield wrote:

Re: [go-nuts] Re: Contracts Draft: why are method pointers allowed

2019-07-30 Thread alan . fox6
On Tuesday, July 30, 2019 at 7:47:05 PM UTC+1, Axel Wagner wrote: > > On Tue, Jul 30, 2019 at 8:31 PM > wrote: > >> My suggestion was that you can't use a pointer type as a type parameter >> if the latter is subject to a contract. >> > > I'm not sure I understand you. Wouldn't that preclude

Re: [go-nuts] Code coverage for Automated api tests

2019-07-30 Thread Brian Hatfield
I'm not 100% sure what you're asking here - if you're asking "can Go parse Java and emit code coverage reports", the answer is of course that you'd have to develop that yourself. If you're asking "can Go emit code coverage reports for Go code LIKE what Java emits for Java code", have a look at:

[go-nuts] Code coverage for Automated api tests

2019-07-30 Thread Anila Saifan
Hi -Does go supports in generating code coverage for Automated api tests written in Java or some other language?Kindly share the steps to generate code coverage reports for the same . -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

Re: [go-nuts] Re: Contracts Draft: why are method pointers allowed

2019-07-30 Thread 'Axel Wagner' via golang-nuts
On Tue, Jul 30, 2019 at 8:31 PM wrote: > My suggestion was that you can't use a pointer type as a type parameter if > the latter is subject to a contract. > I'm not sure I understand you. Wouldn't that preclude using a generic map with pointers as keys? > In the case you mention, the contract

Re: [go-nuts] Re: Contracts Draft: why are method pointers allowed

2019-07-30 Thread alan . fox6
My suggestion was that you can't use a pointer type as a type parameter if the latter is subject to a contract. In the case you mention, the contract could be expressed as a disjunction of value and pointer methods: contract stringer(T) { T String() string, *T String() string } However, if

[go-nuts] Re: Can you spare a Samsung S5 for the Gio project?

2019-07-30 Thread Robert Solomon
I have one that works. I'm in nyc area. -- 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. To view this discussion on

[go-nuts] [wasm] net/http crashes application

2019-07-30 Thread Patrick Gaubatz
Hi! When compiled to wasm, the following small application involving the net/http client completely crashes the Go runtime: // +build js,wasm package main import ( "fmt" "net/http" "syscall/js" ) func doFetch() { res, err := http.Get("http://localhost:8181;)

Re: [go-nuts] Re: Contracts Draft: why are method pointers allowed

2019-07-30 Thread roger peppe
On Tue, 30 Jul 2019 at 14:58, wrote: > One way of avoiding this muddle between pointer and value methods would be > to require that any type parameter (T say) which is subject to a contract > cannot be replaced by a pointer type. > What do you mean by this? Do you mean you can't use a pointer

Re: [go-nuts] Re: Contracts Draft: unsatisfiable contracts

2019-07-30 Thread Ian Lance Taylor
On Tue, Jul 30, 2019 at 7:04 AM wrote: > > I suspect they won't want to make this a compiler error because of other > possible conflicts that may arise when one contract is embedded within > another. > > A vet warning should be feasible though. I agree. Ian -- You received this message

Re: [go-nuts] Quick question about the new Contracts Draft Proposal

2019-07-30 Thread alan . fox6
Yes, it should. Alan -- 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. To view this discussion on the web visit

[go-nuts] Re: Contracts Draft: unsatisfiable contracts

2019-07-30 Thread alan . fox6
I suspect they won't want to make this a compiler error because of other possible conflicts that may arise when one contract is embedded within another. A vet warning should be feasible though. Alan -- You received this message because you are subscribed to the Google Groups "golang-nuts"

[go-nuts] Re: Contracts Draft: why are method pointers allowed

2019-07-30 Thread alan . fox6
One way of avoiding this muddle between pointer and value methods would be to require that any type parameter (T say) which is subject to a contract cannot be replaced by a pointer type. The contract could then be absolutely explicit about whether a method's receiver were T or *T and any

Re: [go-nuts] Contracts Draft: why are method pointers allowed

2019-07-30 Thread Ilia Choly
This completely answers my question. On Monday, July 29, 2019 at 8:49:31 PM UTC-4, Steven Blenkinsop wrote: > > On Mon, Jul 29, 2019 at 2:25 PM, Ian Lance Taylor > wrote: > >> The motivation is to avoid requiring contracts to specify whether >> a method is a pointer method or a value method,

Re: [go-nuts] SIGSEGV in io.copyBuffer

2019-07-30 Thread Dan Kortschak
This looks like a QEMU thing more than a Go thing. On Tue, 2019-07-30 at 02:15 -0700, antony.rhen...@gmail.com wrote: > Seeing segfault during go get -v URL > > > > $ go version > go version go1.11.5 linux/arm > > > > $ go env > GOARCH="arm" > GOBIN="" >

[go-nuts] SIGSEGV in io.copyBuffer

2019-07-30 Thread antony . rheneus
Seeing segfault during go get -v URL $ go version go version go1.11.5 linux/arm $ go env GOARCH="arm" GOBIN="" GOCACHE="/var/arheneus/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="arm" GOHOSTOS="linux" GOOS="linux" GOPATH="/var/arheneus/go" GOPROXY="" GORACE="" GOROOT="/usr/local/go"

Re: [go-nuts] Quick question about the new Contracts Draft Proposal

2019-07-30 Thread Qais Patankar
In this: func Map(type S, Element)(s S, f func(Element) Element) S { Why is Slice not mentioned anywhere? Shouldn't it be: func Map(type S, Element Slice) [..] On Tuesday, 30 July 2019 09:04:26 UTC+9, Ian Lance Taylor wrote: > > On Mon, Jul 29, 2019 at 2:35 PM Mandolyte > > wrote: > >

[go-nuts] Contracts Draft: unsatisfiable contracts

2019-07-30 Thread Qais Patankar
For unsatisfiable contracts like the one mentioned just above this , copied below: > Another, pedantic, example: > contract unsatisfiable(T) { > T int > T uint > } > This