Re: [go-nuts] An important proposal will fail without your support

2020-03-12 Thread Jon Perryman
On Wed, Mar 11, 2020 at 12:23 AM Levieux Michel wrote > It seems you missed something here. "Please like my proposal or everyone loses" is not an argument. No one has debated the power, importance and virtues of my proposal. Apparently you didn't read the comments in the proposal. The discussion

Re: [go-nuts] Is this code in package unix assuming machine endianess?

2020-03-12 Thread Robert Engels
No disrespect to Rob but it’s a bit more complex than that. Almost certainly the code was older and written in C and it used fixed length linked records, so back when machines were a lot slower it was far more efficient to point to the start of a struct in memory and read/write directly - they w

Re: [go-nuts] McAfee and the module cache on WSL: rename : permission denied

2020-03-12 Thread Jonathan Reiter
I don't think McAfee ENS officially supports WSL. At least that was the case in 2018 when I last tried. This would probably be evident in its labelling WSL /tmp writes as the beginnings of an attack - you could always check your scan logs (at %ProgramData%\McAfee\Endpoint Security\Logs) to see wha

Re: [go-nuts] Re: Mem-Leak in Go method

2020-03-12 Thread Michael Jones
That code looks wrong. I see the end but not the start. Look here and copy carefully: https://golang.org/pkg/runtime/pprof/ Call at end, on way out. Also, as shared by others above, there are no promises about how soon the dead allocations go away, The speed gets faster and faster version to vers

Re: [go-nuts] Locked and closed issue 30400 but has it resolved the OPS report?

2020-03-12 Thread Ian Lance Taylor
On Wed, Mar 11, 2020 at 4:20 AM Kevin Chadwick wrote: > > https://github.com/golang/go/issues/30400 > > It is still not clear without testing for yourself after the commit in the > docs > that "(before umask)" is referring to using os.umask after file creation or > the > executors inherited umas

[go-nuts] Re: Writing bitmap data to a canvas with WebAssembly

2020-03-12 Thread Scott Pakin
On Thursday, March 12, 2020 at 1:14:43 PM UTC-6, howar...@gmail.com wrote: > > If the was off-screen or hidden, couldn't you still reference it to > get the data into the canvas like: > var img = document.getElementById('targetImg'); > ctx.drawImage(img, 10, 10); > > Might not be the most eff

Re: [go-nuts] SFTPGo: a Golang performance story and some questions

2020-03-12 Thread Nicola Murino
Il 12/03/20 01:54, Adrian Ratnapala ha scritto: BTW: Thanks for all this investigation and writeups, they are interesting, and I look forward to your test results. Desipte my question, I think using a custom allocator is perfectly reasonable. go/issues/23199 is showing us that sync.Pool's inter

[go-nuts] McAfee and the module cache on WSL: rename : permission denied

2020-03-12 Thread Chris Burkert
Dear all, besides other environments I have a company laptop running Windows 10 Enterprise with WSL and Ubuntu. In Ubuntu I installed Go 1.14 and wanted to play around with Gio for fun. However it seems that McAfee doesn't want me to. In short this is what I do and (mostly) get: $ cd ~ $ mkdir t

Re: [go-nuts] Re: Where is the version number for a golang module declared?

2020-03-12 Thread Nick
Hi Wojciech, > We need to dance this quadrille because go tools won't look at the > go.mod.local (https://github.com/golang/go/issues/26640) > > Unfortunately "go.mod.local" was not invented at Google, so chances we > would ever have sane G-independent setup are miniscule now. Mind also > that GO

[go-nuts] Re: Writing bitmap data to a canvas with WebAssembly

2020-03-12 Thread howardcshaw
> > let blob = new Blob([buf], {'type': imageType}); >> document.getElementById('targetImg').src = URL.createObjectURL(blob); >> } >> > > I see. In your case, targetImg is an , right? Do you know how I > could use this same technique with a ? > > If the was off-screen or hidden, couldn't

[go-nuts] Re: Writing bitmap data to a canvas with WebAssembly

2020-03-12 Thread Scott Pakin
On Thursday, March 12, 2020 at 11:35:30 AM UTC-6, Agniva De Sarker wrote: > > There is no base64 conversion now anywhere. If you read the code below, > you'll see I use > > dst := js.Global().Get("Uint8Array").New(len(s.outBuf.Bytes())) > n := js.CopyBytesToJS(dst, s.outBuf.Bytes()) > s.console.C

[go-nuts] Re: panic: interface conversion: ... (types from different scopes)

2020-03-12 Thread yy0125
Just encountered the same problem. Would you mind sharing how you solved it? Thanks a lot. On Friday, February 8, 2019 at 8:11:47 AM UTC-6, clement...@gmail.com wrote: > > Hello > > i was playing with the plugin mode and i met this error > > *panic: interface conversion: interface {} is func(stri

[go-nuts] Re: Writing bitmap data to a canvas with WebAssembly

2020-03-12 Thread Agniva De Sarker
On Wednesday, 11 March 2020 18:52:15 UTC+5:30, howar...@gmail.com wrote: > > I've no relevant experience, but I can recommend a couple of projects to > look at in the absence of anyone chiming in with actual experience: > > https://agniva.me/wasm/2018/06/18/shimmer-wasm.html > https://github.com

Re: [go-nuts] Re: [ANN] Gio: portable immediate mode GUI programs in Go for iOS/tvOS, Android, macOS, Linux, Windows

2020-03-12 Thread Elias Naur
On Thu, Mar 12, 2020 at 6:03 PM husam alkdary wrote: > > where I can find a simple examples of GIO with golang so I can try it > There are 4 examples here: https://git.sr.ht/~eliasnaur/gio/tree/master/example You can run them from a Go module with `go run`. For example: $ go run gioui.

[go-nuts] Re: [ANN] Gio: portable immediate mode GUI programs in Go for iOS/tvOS, Android, macOS, Linux, Windows

2020-03-12 Thread husam alkdary
where I can find a simple examples of GIO with golang so I can try it On Sunday, March 31, 2019 at 3:16:44 PM UTC+2, ma...@eliasnaur.com wrote: > > Hi, > > I'm very happy to announce the first public release of Gio, a project for > writing portable, hardware accelerated, immediate mode GUI pro

Re: [go-nuts] Re: Mem-Leak in Go method

2020-03-12 Thread Nitish Saboo
Hi, I have compiled my Go binary against go version 'go1.7 linux/amd64'. I added the following code change in the main function to get the memory profiling of my service var memprofile = flag.String("memprofile", "", "write memory profile to `file`") func main() { flag.Parse() if *memprofile !=

Re: [go-nuts] Re: Where is the version number for a golang module declared?

2020-03-12 Thread Wojciech S. Czarnecki
Dnia 2020-03-11, o godz. 08:22:46 "'Bryan C. Mills' via golang-nuts" napisał(a): > (But note that you can always set up a local HTTP server using the remote > import path protocol, > and use a local DNS entry and the GOPRIVATE environment var

Re: [go-nuts] Is this code in package unix assuming machine endianess?

2020-03-12 Thread Tom Parkin
Thanks Rob, that was an interesting read. I think your pattern is good, and makes perfect sense when you think about it. It occurred to me when reading that another way of thinking about the pattern is that you're coding to the endianess of the byte stream, and letting the layout of the type in m

Re: [go-nuts] Where is the version number for a golang module declared?

2020-03-12 Thread 'Benjamin' via golang-nuts
Go programming language has no version mechanism. Like java jar files that contains class files. If you want to use special version, the version can be included in the import path > On Mar 11, 2020, at 13:32, Tamás Gulácsi wrote: > > AFAIK tags are for concrete version (vMajor.Minor.Patch), b

Re: [go-nuts] Re: Where is the version number for a golang module declared?

2020-03-12 Thread Volker Dobler
The go tool works well if you use package import path as arguments. On Wednesday, 11 March 2020 20:49:53 UTC+1, Dean Schulze wrote: > > Well here's what I get in my module with a single directory with a single > file with a single package called lib: > To be concrete let the module name be dean.