RE: [go-nuts] Re: My Computer compiles go slower than my friends worse laptop

2016-11-06 Thread Dave Cheney
Yup, totally av. To demonstrate this, use the -x flag, that will show you, just by the named eye, which commands are being delayed by your av software. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

Re: [go-nuts] Multiple-reader single-writer map access is safe ?

2016-11-06 Thread Tamás Gulácsi
The second. The section in lock should be as short as possible. -- 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. For

RE: [go-nuts] Re: My Computer compiles go slower than my friends worse laptop

2016-11-06 Thread John Souvestre
You might add the Go directories/exe's to the exclusion list which most AV programs have. John John Souvestre - New Orleans LA -Original Message- From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Henry Sent: 2016 November 06, Sun 19:08 To:

[go-nuts] Re: printf in color

2016-11-06 Thread 'Константин Иванов' via golang-nuts
Hello. I wrote the library that allows to use ANSI-colors (unix and win10+). It allows to use colored printf such as fmt.Priintf("neutral, red %d, cyan %d, bold %s", Red(35), Cyan(100), Bold( "bold")) Check it out https://github.com/logrusorgru/aurora The library doesn't support Windows. But

Re: [go-nuts] Multiple-reader single-writer map access is safe ?

2016-11-06 Thread 刘桂祥
should I use ?? mu.Lock() temp := make(map[int]int) temp[1] = 100 temp[2] = 200 gMap = temp mu.Unlock() or temp := make(map[int]int) temp[1] = 100 temp[2] = 200 mu.Lock() gMap = temp mu.Unlock() 在 2016年11月4日星期五 UTC+8下午9:59:45,Ian Lance

[go-nuts] Re: My Computer compiles go slower than my friends worse laptop

2016-11-06 Thread gkolampas
> > > It is my anti-virus, I disabled it and now my build is down to > real0m0.511s user0m0.015s sys 0m0.000s -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and

[go-nuts] Re: My Computer compiles go slower than my friends worse laptop

2016-11-06 Thread gkolampas
I run it again after -i and do -v and get this command-line-arguments real0m7.048s user0m0.015s sys 0m0.000s On Sunday, November 6, 2016 at 2:51:49 PM UTC-5, Dave Cheney wrote: > > Can you please use the -v flag and compare the output between your friends > machine and your own. I

[go-nuts] Re: My Computer compiles go slower than my friends worse laptop

2016-11-06 Thread gkolampas
github.com/Skellyboy38/SOEN-343-NullPointer/Layers/domain_layer/classes github.com/lib/pq/oid github.com/gorilla/mux github.com/lib/pq

[go-nuts] Re: My Computer compiles go slower than my friends worse laptop

2016-11-06 Thread Henry
Anti virus software is also a possible culprit. I used to run bitdefender free on my windows machine. When I switched to Kaspersky, there is a noticeable slowdown when running go build and go test. However, it is still within an acceptable margin, so it's okay for me. -- You received this

[go-nuts] Re: XML Beautifier that doesn't rewrite the document

2016-11-06 Thread Tong Sun
On Saturday, November 5, 2016 at 3:51:55 PM UTC-4, Tong Sun wrote: > > > On Saturday, November 5, 2016 at 3:42:27 PM UTC-4, Tong Sun wrote: >> >> >> On Sat, Nov 5, 2016 at 12:26 PM, Sam Whited wrote: >> >>> On Fri, Nov 4, 2016 at 4:32 PM, Tong Sun wrote: >>> > How to beautify a given XML string

[go-nuts] state of the art code organisation api services

2016-11-06 Thread Tamás Gulácsi
See https://medium.com/@benbjohnson/standard-package-layout-7cdbc8391fc1#.ye6gzaf1s -- 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

[go-nuts] Re: My Computer compiles go slower than my friends worse laptop

2016-11-06 Thread mhhcbon
he says having it, > While my desktop that has a i7 6700k intel take 6 seconds. > I have 16gb of ram and sdd only so what gives? go build -i ? On Sunday, November 6, 2016 at 8:53:10 PM UTC+1, krolaw wrote: > > That XPS laptop has an SSD drive. Does your desktop? > -- You received this

[go-nuts] Re: My Computer compiles go slower than my friends worse laptop

2016-11-06 Thread krolaw
That XPS laptop has an SSD drive. Does your desktop? -- 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. For more options,

[go-nuts] Re: My Computer compiles go slower than my friends worse laptop

2016-11-06 Thread Dave Cheney
Can you please use the -v flag and compare the output between your friends machine and your own. I suspect one machine is building more than the other because there are stale packages which are being rebuilt every time, -v will show this.

[go-nuts] Re: Rune-by-rune through a stream

2016-11-06 Thread so . query
Thanks everyone for the examples and suggestions! I suppose the difference the between bufio.Reader versus bufio.Scanner is that Scanner provides specific tokenizing rules/functions designed for reading text while Reader is a more general data reader (and as Tamás stated adds buffering to

Re: [go-nuts] plugin - How to open and lookup for interface implementation

2016-11-06 Thread Mateusz Dymiński
> > I haven't played with the plugin feature yet, but some things stand out to > me about your code and I wonder if it is correct or not. > Is there a difference in using go build vs go run, in the same way as you > can get bad behaviour using go run with more complex apps? Have you tried

[go-nuts] Go-Routine, Concurrency Doubt

2016-11-06 Thread bob . hiestand
SJ, If what you're asking is whether the tasks will be evenly spread among the goroutines, the answer is no. You can't guarantee such an even distribution, though over time with many more tasks than threads, all taking approximately the same amount of time, I assume you'd see a mostly

Re: [go-nuts] SetDeadline for io.Writer - is this right?

2016-11-06 Thread Florian Weimer
* audrius butkevicius: > I am looking for advice how this could be implemented in a more robust way > without leaking resources. You can't with just an io.Writer. If a write operation cannot be canceled (and io.Writer does not provide this capability), a timeout will always result in a

Re: [go-nuts] plugin - How to open and lookup for interface implementation

2016-11-06 Thread Justin Israel
I haven't played with the plugin feature yet, but some things stand out to me about your code and I wonder if it is correct or not. Is there a difference in using go build vs go run, in the same way as you can get bad behaviour using go run with more complex apps? Have you tried moving those

[go-nuts] SetDeadline for io.Writer - is this right?

2016-11-06 Thread bob . hiestand
The simplest answer to the question as written is to change line 46 to make the response channel buffered: result: make(chan resp, 1), However, you don't have to worry about leaking open channels. For channels, close() is a signal, not resource management. Open

Re: [go-nuts] plugin - How to open and lookup for interface implementation

2016-11-06 Thread Mateusz Dymiński
Does it mean that I can't load the two different plugins ? I know that I can't load the same plugin twice, but I thought that I can load two different plugins. To be precise I was thinking about the MapReduce implementation where the client might build the go program which can be loaded as

[go-nuts] Re: My Computer compiles go slower than my friends worse laptop

2016-11-06 Thread gkolampas
go build main.go On Sunday, November 6, 2016 at 1:21:24 AM UTC-5, Dave Cheney wrote: > > What is the exact command you and your friend are using to build your > project? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this

[go-nuts] Re: building rss aggregator (thousands of goroutines sleeps at the same time)

2016-11-06 Thread Jaroslaw Lisicki
go is perfectly fine with such amount of goroutines. Of course you should be aware of memory consumption, probably few hundred of megabytes (each goroutiine need at least 2kB). I think you should focus on avoiding to many goroutines at the same time (this could slow down your webserver) and

[go-nuts] state of the art code organisation api services

2016-11-06 Thread denys . koch
Hi All! I'm new to go and mailing lists at all.. I need to build a REST-backend service for my app. first chi router looks good, isn't it? But more important, how to organise code? What are good practices/examples in golang world? Is it good idea to do it domain/module based? e.g.

Re: [go-nuts] Re: XML Beautifier that doesn't rewrite the document

2016-11-06 Thread Florian Weimer
* Tong Sun: > The dark voodoo regexp as described here works for many cases. > http://www.perlmonks.org/?node_id=261292 In general, whitespace is significant in XML, so you need a DTD or schema to make sure that you can make such edits without changing the meaning of the document. -- You

[go-nuts] Re: Concurrently read map entries into a channel

2016-11-06 Thread James Bardin
On Sunday, November 6, 2016 at 12:00:33 AM UTC-4, Keith Randall wrote: > > > You cannot modify the map in another goroutine while iterating. Iterating > is considered a read operation for the entire duration of the read. Writes > happening simultaneously with reads are a data race. > "Entire

Re: [go-nuts] Re: XML Beautifier that doesn't rewrite the document

2016-11-06 Thread Tong Sun
On Sun, Nov 6, 2016 at 5:08 AM, Simon Ritchie wrote: I have a much simpler approach which works for me. Open the document with > a web browser and it displays it nicely formatted. Yeah, I believe it is doable. If Chrome and/or Firefox can do it, beautifying XML without rewrite the document,

[go-nuts] Re: Concurrently read map entries into a channel

2016-11-06 Thread leobalduf
On Sunday, 6 November 2016 05:00:33 UTC+1, Keith Randall wrote: > > > > On Saturday, November 5, 2016 at 7:48:27 AM UTC-7, leob...@gmail.com > wrote: >> >> Hey, >> >> I have a scenario where I need to iterate over (as many as possible) map >> entries and send them into a channel. >> The

Re: [go-nuts] Re: Rune-by-rune through a stream

2016-11-06 Thread roger peppe
On 6 November 2016 at 07:29, 'Axel Wagner' via golang-nuts wrote: > You would use a bufio.Scanner: > https://play.golang.org/p/aZ_vrR3eDq bufio.Reader works pretty well too: https://play.golang.org/p/Z0b2GfAs3T > > On Sun, Nov 6, 2016 at 7:23 AM,

[go-nuts] context example and http.Request

2016-11-06 Thread Darren Hoo
I am trying to understand Context by reading https://blog.golang.org/context the code in https://blog.golang.org/context/google/google.go uses transport. CancelRequest Since http.Request now (I am using go 1.7.3) has context support now, I think the code can be simpler now. This is my version of

[go-nuts] My Computer compiles go slower than my friends worse laptop

2016-11-06 Thread Tamás Gulácsi
Who doees not have an antivirus? -- 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. For more options, visit

Re: [go-nuts] Re: Rune-by-rune through a stream

2016-11-06 Thread 'Axel Wagner' via golang-nuts
You would use a bufio.Scanner: https://play.golang.org/p/aZ_vrR3eDq On Sun, Nov 6, 2016 at 7:23 AM, wrote: > The io package has the RuneReader interface. > > You can wrap a generic io.Reader in a bufio.Reader > or if you already have a string or byte slice, you can use >

[go-nuts] Re: Rune-by-rune through a stream

2016-11-06 Thread mark
The io package has the RuneReader interface. You can wrap a generic io.Reader in a bufio.Reader or if you already have a string or byte slice, you can use strings.Reader or bytes.Reader respectively, to get a RuneReader. On Saturday, November 5, 2016 at 10:40:34 PM UTC-7, so.q...@gmail.com

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

2016-11-06 Thread Nigel Tao
On Tue, Oct 25, 2016 at 9:30 PM, roger peppe wrote: > Would there be some advantage in making the Rasterizer > types in shiny/iconvg and image/vector somewhat more > uniform in the types they use? For example, vector.Rasterizer > seems to use f32.Vec2 pairs everywhere, but

[go-nuts] My Computer compiles go slower than my friends worse laptop

2016-11-06 Thread Dave Cheney
What is the exact command you and your friend are using to build your project? -- 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

[go-nuts] My Computer compiles go slower than my friends worse laptop

2016-11-06 Thread gkolampas
My friends wh ouses a i5 6200 intel dell xps laptop compiles our project in 1.4s While my desktop that has a i7 6700k intel take 6 seconds. I have 16gb of ram and sdd only so what gives? here is my go env set GOARCH=amd64 set GOBIN=C:\Users\Something\Documents\CodeProjects\Go\bin set GOEXE=.exe

[go-nuts] Rune-by-rune through a stream

2016-11-06 Thread Tamás Gulácsi
bufio.Reader is just buffering reads, it won't make sure the full rune is read. bufio.Scanner is a general purpose reading machinery. It has prebuilt functions to make it spit out chunks separated by EOL, but you can make one to separate by line boundaries. AFAIK it uses bufio.Reader under the