Related to the previous discussion that probably spawned the question,
the mutex acts as a load and store barrier, so you don't need to worry
about whether the temp[1] and temp[2] assignments are visible to
remote processors. When the mutex is acquired, that's guaranteed to be
globally visible. Thi
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
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 more
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: golan
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 Win
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
>
>
> 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 stop
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 su
github.com/Skellyboy38/SOEN-343-NullPointer/Layers/domain_layer/classes
github.com/lib/pq/oid
github.com/gorilla/mux
github.com/lib/pq
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 mess
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
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 golang-nuts+unsubscr...@googl
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 message
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,
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.
http://dave.cheney.net/2014/06/04/what-does-go-build-bui
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 io.Re
>
> 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 movin
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 smooth
* 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 resource
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 plug
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 channel
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 plu
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 g
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
lim
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. structs:
* 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 receiv
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
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, the
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 operati
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, wrote:
>>
>> The io package has the RuneReader i
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
I have a much simpler approach which works for me. Open the document with a
web browser and it displays it nicely formatted. If you want to put the result
back into the document, open it with a text editor and cut and paste.
I found that Chrome is much faster than Firefox for some large XML fi
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 https://groups.
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
> strings.Reader or bytes.
34 matches
Mail list logo