[go-nuts] How to get asset by using gomobile in IOS?

2019-07-29 Thread wcr434858383
I use 'gomobile bind -target=ios xxx' to get an ios file xxx.framework(xx is a package with a subdirectory "assets", and there are a file 'config.json' in assets). And I try to get the 'config.json' asset by using asset.Open() and then get an error 'no such file or directory'(I

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

2019-07-29 Thread Steven Blenkinsop
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, just as we do not require interface > types to specify whether a method is a pointer method or a value method. > I'm not

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

2019-07-29 Thread Ian Lance Taylor
On Mon, Jul 29, 2019 at 2:35 PM Mandolyte wrote: > > In this code snippet: >> >> func Map(type S, Element)(s S, f func(Element) Element) S { >> r := make(S, len(s)) >> for i, v := range s { >> r[i] = f(s) >> } >> return r >> } > > Shouldn't the line in the loop be: r[i] = f(v) Yes. Thanks. Ian

[go-nuts] Re: Go coaching in palo alto, mountain view

2019-07-29 Thread dominiquedebergue
I live in Berkeley, and have a bunch of time to help! Shoot me an email, and we can talk about the specifics. - Dominique https://github.com/hewiefreeman dominiquedeber...@gmail.com -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

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

2019-07-29 Thread Mandolyte
In this code snippet: > func Map(type S, Element)(s S, f func(Element) Element) S { > r := make(S, len(s)) > for i, v := range s { > r[i] = f(s) > } > return r} > > Shouldn't the line in the loop be: r[i] = f(v) On Monday, July 29, 2019 at 2:17:22 PM UTC-4,

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

2019-07-29 Thread Ian Lance Taylor
On Mon, Jul 29, 2019 at 7:05 AM Ilia Choly wrote: > > When converting a non-pointer value to an interface, pointer methods cannot > be used to satisfy the interface. Even though the compiler could add > instructions to take the value's address, this is not allowed because it's > error prone.

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

2019-07-29 Thread Ian Lance Taylor
On Sun, Jul 28, 2019 at 1:15 PM Jon Bodner wrote: > > I did a first read through the proposal and it looks very good. I had one > question: when giving the example of how to implement Sorting using > orderedSlice, the type parameter is declared to be comparable. Should that be >

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

2019-07-29 Thread 'Tanguy ⧓ Herrmann' via golang-nuts
Mine actually died today, so I can't even reproduce that bug anymore… And it was my spare. Waiting for the repair of my S8 meanwhile. On juil. 29 2019, at 7:11 pm, Elias Naur wrote: > Hi, > > I'm trying to fix a Gio (gioui.org) bug where the rendering is > corrupted on a Samsung S5

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

2019-07-29 Thread Elias Naur
On Mon, Jul 29, 2019 at 7:15 PM Tanguy ⧓ Herrmann wrote: > > Mine actually died today, so I can't even reproduce that bug anymore… > And it was my spare. Waiting for the repair of my S8 meanwhile. > Heh. I suppose that's another way to fix the issue: killing all S5s one by one. - elias --

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

2019-07-29 Thread Elias Naur
Hi, I'm trying to fix a Gio (gioui.org) bug where the rendering is corrupted on a Samsung S5 (https://todo.sr.ht/~eliasnaur/gio/10). I can't reproduce it on my own devices, so on the off chance someone has a spare lying around I would greatly appreciate if you could send it to me. I'll cover the

Re: [go-nuts] MongoDB bulk write memory cost

2019-07-29 Thread Robert Engels
Did you try testing with the MongoDB driver code removed - that is, just the CSV processing ?Then maybe you can post the code as a simplified test.-Original Message- From: sharmasiddhan...@gmail.com Sent: Jul 29, 2019 2:04 AM To: golang-nuts Subject: [go-nuts] MongoDB bulk write memory

[go-nuts] Re: go 1.13 changes

2019-07-29 Thread jake6502
Also the blog: Next steps toward Go 2 On Sunday, July 28, 2019 at 1:49:31 PM UTC-4, peterGo wrote: > > rob solomon, > > Go 1.13 Release Notes: https://tip.golang.org/doc/go1.13 > > peter > > > On Sunday, July 28, 2019 at 12:02:14 PM UTC-4, rob wrote: >>

[go-nuts] MongoDB bulk write memory cost

2019-07-29 Thread sharmasiddhant50
I'm using the official golang driver for mongo. What I'm doing is that I'm reading a csv file upto a certain lines, parsing the data and then inserting the data in the DB. Let's say I have 10K contacts and the readLimit is 1000, then I read csv till 1000 lines and then do a bulk write with

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

2019-07-29 Thread Ilia Choly
When converting a non-pointer value to an interface, pointer methods cannot be used to satisfy the interface. Even though the compiler could add instructions to take the value's address, this is not allowed because it's error prone. Since pointer methods usually mutate the receiver, you don't

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

2019-07-29 Thread alanfo
Yes, it should be contracts.Ordered to justify the use of the '<' operator. The proposed new built-in comparable contract will only permit one to use '==' or '!='. I agree that the revised design is very good, contracts are now far more intelligible than they were and the whole thing just

Re: [go-nuts] Generating LSP protocol Go types

2019-07-29 Thread arnodel
Thank you both for your help. Looks like I will have to hack it somehow for the time being! On Saturday, 13 July 2019 18:48:17 UTC+1, Paul Jolly wrote: > > Just to add to Peter's response. > > The issue tracking making these packages non-internal is >