[go-nuts] Re: Go as your first language

2018-01-17 Thread christophberger . com
Author of the Master Go course here. I am exited to see my course being recommended in this group, thank you Kevin! I am positively surprised to see that you consider the course suitable for learning programming from scratch. The course was designed for people who already know another

[go-nuts] Avoiding duplication in parallel tests

2018-01-17 Thread Kevin Burke
I have a bunch of tests I would like to run in parallel; I think this is a common situation for database backed tests where you might need to establish a connection or a transaction, run a bunch of queries, and then truncate the database. Right now I have something like this: func testA(t

[go-nuts] Re: Having a Model Package

2018-01-17 Thread Keith Brown
is there a page such as "https://github.com/yksz/go-design-patterns; I can refer to for golang design-patterns? I wish there were some official ones, which can help language newbies and give them confidence that what they are doing is the "right way". I understand it depends on the problem but

Re: [go-nuts] Re: iconvg: a compact, binary format for simple vector graphics

2018-01-17 Thread Nigel Tao
On Thu, Jan 18, 2018 at 1:53 AM, wrote: > I'm wondering if you know any c/cpp implementation of your renderer I don't know of a C/C++ implementation, sorry. If you find (or write) one, let me know! -- You received this message because you are subscribed to the Google

[go-nuts] Re: Race detector for Windows GUI apps. "go build -race" asks for gcc. Why?

2018-01-17 Thread Tad Vizbaras
Summary: adding *.syso file to main packages directory stops normal race detector enabled build on windows/amd64. This in essence prevents race detection on Windows apps with GUI interface that use binary resources (icons, etc.). -- You received this message because you are subscribed to the

[go-nuts] Race detector for Windows GUI apps. "go build -race" asks for gcc. Why?

2018-01-17 Thread Tad Vizbaras
This is windows/amd64 setup. go build -race works in other scenarios. Example: building console apps. It also works if *.syso file with binary resources (icons, etc.) is NOT in the build directory. Once you place rsrc.syso or any *.syso "go build -race" stops working. There is the output: go

[go-nuts] Re: Slice of structs element swap performance

2018-01-17 Thread lemire
> My understanding is that when something is assigned to an interface the > thing is copied. > In the context of the code in question, the interface refers to pointers. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

[go-nuts] Re: iconvg: a compact, binary format for simple vector graphics

2018-01-17 Thread rxboucher
Hi Nigel, I'm looking for a compact vg format and I found your iconvg format. This seems to be exactly what I'm looking for. I'm wondering if you know any c/cpp implementation of your renderer (into image buffer). This is to be used in a small embedded system. Great job. Regards Eric Le

[go-nuts] Re: go.net/websocket framing problem

2018-01-17 Thread adumandix
Oh,It helps me a lot,thanks 在 2012年11月9日星期五 UTC+8下午5:03:56,Timo Savola写道: > > Hello > > I would like to receive intact WebSocket frames with controlled buffer > sizes (to prevent excessive memory usage caused by bad peers). The > websocket.Message codec doesn't seem to allow that, but

[go-nuts] Re: [golang-dev] Go 1.10 Beta 2 is released

2018-01-17 Thread bob . hiestand
On Thursday, January 11, 2018 at 2:28:36 PM UTC-6, Ian Lance Taylor wrote: > > > Please do test this if you can. There are significant changes to the > go tool. Please report bugs now, so that we can fix them before the > final release. > > In particular, there are significant changes to

[go-nuts] Re: Slice of structs element swap performance

2018-01-17 Thread matthewjuran
My understanding is that when something is assigned to an interface the thing is copied. Maybe the swap is causing a copy of the interface contents? I'm not sure what Xcode does but pprof and package testing benchmark are more common. For benchmarking be sure to disable power management

[go-nuts] Re: Writing correct response writer wrappers

2018-01-17 Thread matthewjuran
If you use struct embedding I think you may get what you are looking for: type retryResponseWriter struct { http.ResponseWriter attemptsExhausted bool } Now retryResponseWriter has all of the methods of the http.ResponseWriter you assign to it and can be cast to those http interfaces

Re: [go-nuts] Effective Go recommends reading the language specification first

2018-01-17 Thread Matt McClure
Cool! On Wed, Jan 17, 2018 at 08:27 Ian Lance Taylor wrote: > On Wed, Jan 17, 2018 at 3:30 AM, Matt McClure > wrote: > > > > Hard to say until I read both. My original message is based on my > experience > > with other languages and their specs. > >

Re: [go-nuts] Effective Go recommends reading the language specification first

2018-01-17 Thread Ian Lance Taylor
On Wed, Jan 17, 2018 at 3:30 AM, Matt McClure wrote: > > Hard to say until I read both. My original message is based on my experience > with other languages and their specs. The Go spec is intended to be as readable as possible. Ian > On Wed, Jan 17, 2018 at 01:09

[go-nuts] Slice of structs element swap performance

2018-01-17 Thread Maciej Biłas
Hi, I've ran into an interesting performance problem. I've made a small change in the struct that I'm swapping (like in heap Swap function example: h[i], h[j] = h[j], h[i]), namely I've removed a reference to a interface object. After this change the swap operation speed increased by 10x (at

Re: [go-nuts] Effective Go recommends reading the language specification first

2018-01-17 Thread Matt McClure
Hard to say until I read both. My original message is based on my experience with other languages and their specs. On Wed, Jan 17, 2018 at 01:09 Ian Lance Taylor wrote: > On Tue, Jan 16, 2018 at 6:40 PM, wrote: > > > > It strikes me as odd that

[go-nuts] Re: Writing correct response writer wrappers

2018-01-17 Thread Marco Jantke
Thanks for the response Matt. Some examples to explain my use-case better. First of all, it's important to know that the proxy I am working on uses HTTP handler wrapper to provide additional functionality. The retry handler + response writer wrapper look like the following (code examples are