RE: [go-nuts] How ignore a subdirectory

2023-09-13 Thread 'John Souvestre' via golang-nuts
You are correct. However, “gofmt .” recurses. It turns out that they handle it differently. John John SouvestreNew Orleans LA, USA504-454-0899 From: golang-nuts@googlegroups.com On Behalf Of Brian Candler Sent: 2023-09-13, Wed 07:30 To: golang-nuts Subject: Re: [go

RE: [go-nuts] How ignore a subdirectory

2023-09-13 Thread 'John Souvestre' via golang-nuts
What is TIL? Installing WSL just to solve this seems like it might be overkill. A for loop in a batch file, or in DOSKEY, would suffice. John John SouvestreNew Orleans LA, USA504-454-0899 From: Jan Mercl <0xj...@gmail.com> Sent: 2023-09-13, Wed 05:33 To

RE: [go-nuts] How ignore a subdirectory

2023-09-13 Thread 'John Souvestre' via golang-nuts
I did try that also. I get this error message: CreateFile *.go: The filename, directory name, or volume label syntax is incorrect. John John SouvestreNew Orleans LA, USA504-454-0899 -Original Message- From: Jan Mercl <0xj...@gmail.com> Sent: 2023-09-13, Wed

[go-nuts] How ignore a subdirectory

2023-09-12 Thread 'John Souvestre' via golang-nuts
es to them in my code, however. Am I misunderstanding something? Or not doing something correctly? I’m doing this on Windows 10, by the way. Thanks, John John SouvestreNew Orleans LA, USA504-454-0899 -- You received this message because you are subscribed to t

RE: [go-nuts] question about GO and realtime GC interest by the user community

2017-11-26 Thread John Souvestre
Hi David. https://en.wikipedia.org/wiki/Real-time_computing#Firm Unfortunately I haven't seen much interest either. John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of David Beberman Sent: 2017 November 22

RE: [go-nuts] question about GO and realtime GC interest by the user community

2017-11-09 Thread John Souvestre
firm real-time would be a good first step? John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of David Beberman Sent: 2017 November 09, Thu 05:59 To: golang-nuts Subject: [go-nuts] question about GO and realtime GC

RE: [go-nuts] Converting uint to string

2017-11-05 Thread John Souvestre
You could also just the integers themselves as keys. John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Chun Zhang Sent: 2017 November 05, Sun 15:09 To: golang-nuts Subject: [go-nuts] Converting uint to string

RE: [go-nuts] Re: concurrency programing about go

2017-11-04 Thread John Souvestre
If you were to do that, yes. I guess it come to: How do you define “done” in your program? Waitgroup defines it as when all the goroutines which it counted are closed. John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com

RE: [go-nuts] time.AddDate() odd behavior

2017-10-31 Thread John Souvestre
its his situation? The current method and a new method with a slightly different name, ex: AddEOM? John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Alex Dvoretskiy Sent: 2017 October 31, Tue 16:20 To: golang-n

RE: [go-nuts] Re: select is still a little unfair if there are more than 4 cases?

2017-10-29 Thread John Souvestre
John Souvestre - New Orleans LA From: Axel Wagner [mailto:axel.wagner...@googlemail.com] Sent: 2017 October 29, Sun 02:18 To: John Souvestre Cc: golang-nuts Subject: Re: [go-nuts] Re: select is still a little unfair if there are more than 4 cases? Apart from practical concerns about how

RE: [go-nuts] Re: select is still a little unfair if there are more than 4 cases?

2017-10-29 Thread John Souvestre
ive as long as the goroutine does, so it has to be at the very top. Dynamic sounds like the better way. How do you think the run-time overhead would compare to the current random method? John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-n

RE: [go-nuts] Re: select is still a little unfair if there are more than 4 cases?

2017-10-29 Thread John Souvestre
-robined? An individual select statement across all goroutines? A select statement and goroutine pair? A select statement + function instance pair? An individual select in a goroutine. John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts

RE: [go-nuts] Re: select is still a little unfair if there are more than 4 cases?

2017-10-28 Thread John Souvestre
)? John John Souvestre - New Orleans LA -- 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 opti

RE: [go-nuts] will the following code always print two 1?

2017-10-22 Thread John Souvestre
Hi Dave. Oops! I read it as "pad". My bad. John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Dave Cheney Sent: 2017 October 22, Sun 22:27 To: golang-nuts Subject: Re: [go-nuts] will the foll

RE: [go-nuts] will the following code always print two 1?

2017-10-22 Thread John Souvestre
words, Go's atomics are full memory barriers/fences which guarantee sequential consistency for any number of goroutines. John John Souvestre - New Orleans LA -Original Message- From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Dave Cheney Sent: 2017 O

RE: [go-nuts] Latest Tiobe Ranking

2017-10-09 Thread John Souvestre
You could mention to your colleagues that if they scroll down on the Tiobe page they will find Go listed in their Hall of Fame as the "Programming Language of the Year" for 2009 and 2016. I second Ian's recommendation of Redmonk and IEEE - if you must reference any such lists. John

RE: [go-nuts] Are all running goroutines killed when main ends?

2017-10-05 Thread John Souvestre
Any easy way to make their defers run? John John Souvestre - New Orleans LA -Original Message- From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Dave Cheney Sent: 2017 October 05, Thu 23:36 To: golang-nuts Subject: [go-nuts] Are all running

RE: [go-nuts] Memory Safety

2017-10-04 Thread John Souvestre
Thanks for the info. I believe that Windows generally requires that user opt-in (set in the exe) for DEP and ASLR. However, it seems that Go exe's for Windows don't have the DEP opt-in set. Worth opening some issues? John John Souvestre - New Orleans LA -Original Message- From

[go-nuts] Memory Safety

2017-10-04 Thread John Souvestre
Does Go provide Data Execution Prevention (DEP) and Address space layout randomization (ASLR)? If not, any reasons why or any plans to implement? Thanks, John John Souvestre - New Orleans LA -- You received this message because you are subscribed to the Google Groups

RE: [go-nuts] Re: Running Go binary on a 56 core VM

2017-09-04 Thread John Souvestre
There are lots of variables, but even with a directly connected SSD drive (SATA bus, in my case) I can pretty well top out the file i/o, just doing sequential file reads, with about 3 – 4 CPUs. So increasing GOMAXPROCS (in this case) doesn’t help. John John Souvestre - New Orleans LA

RE: [go-nuts] golang gc stop the world how to stop cpu busy goroutine?

2017-09-04 Thread John Souvestre
then it can be a problem. An easy solution is to insert a call to runtime.Gosched() every so often. I believe that there is an ongoing discussion about a way for Go to plan ahead and be able to handle even these cases, but it’s something for the future. John John Souvestre - New Orleans LA

RE: [go-nuts] Go channels overused and hyped?

2017-08-18 Thread John Souvestre
as "passing on a channel the address of a data structure or an object ...". So I don't think that I'm alone in thinking that the focus of the proverb is to use channels to share memory, rather than any other way. And I find this somewhat wrong and certainly confusing. Am I really alo

RE: [go-nuts] Go channels overused and hyped?

2017-08-18 Thread John Souvestre
P.S. And if you want to reduce it to a one-liner, how about this? Communicating is better than sharing sometimes, and vice versa. John John Souvestre - New Orleans LA From: John Souvestre [mailto:j...@souvestre.com] Sent: 2017 August 18, Fri 14:03 To: 'golang-nuts

RE: [go-nuts] multiply and divide

2017-08-18 Thread John Souvestre
irst might be a better approach. John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Michael Jones Sent: 2017 August 18, Fri 11:50 To: golang-nuts Subject: [go-nuts] multiply and divide Here is a minor musing from

RE: [go-nuts] Is this bad concurrency?

2017-08-18 Thread John Souvestre
You might want to consider using a sync.WaitGroup. It’s for such situations. John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of bill.war...@talentinc.com Sent: 2017 August 18, Fri 13:01 To: golang-nuts Subject

RE: [go-nuts] Re: Goroutines chan to get data at specific time

2017-08-07 Thread John Souvestre
I’m not sure exactly what you are trying to accomplish, but I suspect that this article would help you. https://blog.golang.org/go-concurrency-patterns-timing-out-and John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com

RE: [go-nuts] Re: No Allman-Style, No go!

2017-07-27 Thread John Souvestre
Cognitive dissonance J John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Michael Jones Sent: 2017 July 27, Thu 15:38 To: Rob Pike Cc: Ecstatic Coder; golang-nuts Subject: Re: [go-nuts] Re: No Allman-Style

RE: [go-nuts] Re: No Allman-Style, No go!

2017-07-27 Thread John Souvestre
. John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of ecstatic.co...@gmail.com Sent: 2017 July 27, Thu 03:33 To: golang-nuts Cc: yout...@z505.com Subject: Re: [go-nuts] Re: No Allman-Style, No go! I don't know

RE: [go-nuts] Understanding least significant byte operation

2017-07-23 Thread John Souvestre
John Souvestre - New Orleans LA From: Jan Mercl [mailto:0xj...@gmail.com] Sent: 2017 July 23, Sun 13:52 To: John Souvestre; golang-nuts@googlegroups.com Subject: Re: [go-nuts] Understanding least significant byte operation On Sun, Jul 23, 2017 at 7:26 PM John Souvestre &l

RE: [go-nuts] Understanding least significant byte operation

2017-07-23 Thread John Souvestre
I believe that the result is the least significant bit, not byte. John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Pablo Rozas Larraondo Sent: 2017 July 23, Sun 07:51 To: golang-nuts Subject: [go-nuts

RE: [go-nuts] does Go memory model guarantee this program always prints 1?

2017-07-14 Thread John Souvestre
Ian confirm this in https://groups.google.com/forum/#!msg/golang-nuts/7EnEhM3U7B8/nKCZ17yAtZwJ John John Souvestre - New Orleans LA -Original Message- From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Marvin Renich Sent: 2017 July 10, Mon 12:09 To: golang-nuts S

RE: [go-nuts] Writing a non-blocking thread-safe buffer

2017-04-07 Thread John Souvestre
implemented this with channels first. If you need more throughput then I’d think mutexes next, and atomics as a last resort. Perhaps using an array as a circular buffer with read and write accesses synchronized by mutexes would be a good next step. John John Souvestre - New Orleans

RE: [go-nuts] Re: How can I implement a TCP server using a model which similar to epoll (or kqueue, IOCP) rather than just using goroutine for each client?

2017-03-06 Thread John Souvestre
use epoll, but not sharing the memory. It sounds like it might be a nice option for the future, however. John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Nick Rio Sent: 2017 March 06, Mon 02:26 To: golang-nuts

RE: [go-nuts] Re: [Newbie] Why this code is so slow?

2017-02-25 Thread John Souvestre
Changing just the mod operation to int32 made the whole program run about 2.5 times faster for me. Wow! I had no idea that there would be that much difference. John John Souvestre - New Orleans LA -Original Message- From: golang-nuts@googlegroups.com [mailto:golang-nuts

RE: [go-nuts] Debugging long GC pauses

2017-02-23 Thread John Souvestre
Or… Call runtime.Gosched(). I seem to recall benchmarking it a while back and found that it was very efficient. John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Jesper Louis Andersen Sent: 2017 February 23

RE: [go-nuts] Re: Trying to understand := and named return values

2017-02-22 Thread John Souvestre
) int Power(base, exponent int) int Yes, I think that using named parameters (both calling and return) is good in general. Yes, there are cases (such as Add) where it doesn’t help, but it also doesn’t hurt. John John Souvestre - New Orleans LA From: Thomas Bushnell, BSG

RE: [go-nuts] Re: Trying to understand := and named return values

2017-02-22 Thread John Souvestre
variables are new. I’ve taken to never using := in any multiple variable situation to avoid the problem. This is something that a ver or lint utility can check for now, too. J John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts

RE: [go-nuts] Re: Trying to understand := and named return values

2017-02-21 Thread John Souvestre
Ø Again, named return values are fine and cause no problems, but naked returns should never have been part of the language (at first they seem useful and cool, but in the end, they cause more problems than they solve). I agree. Perhaps in Go 2? J John John Souvestre - New Orleans

RE: [go-nuts] Re: Trying to understand := and named return values

2017-02-21 Thread John Souvestre
to use the function, right? So how can the disparity be justified? Oh, and the longer the function is the more benefit there is to using them. John John Souvestre - New Orleans LA -Original Message- From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf

RE: [go-nuts] 17.3 trace.exe malware flag on win32

2017-02-06 Thread John Souvestre
I don’t see any problem when I scan it with BitDefender. I’m running the Internet Security 2016 version, build 20.0.29.1550. How about you? John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of xiiop...@gmail.com

RE: [go-nuts] Is Go too strict for nesting function callings?

2017-01-31 Thread John Souvestre
Interesting! Thanks. John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Jonas August Sent: 2017 January 30, Mon 04:25 To: golang-nuts Subject: Re: [go-nuts] Is Go too strict for nesting function callings

[go-nuts] GOBIN Question

2017-01-29 Thread John Souvestre
see described in all three of these: https://golang.org/cmd/go/ https://golang.org/doc/install/source https://github.com/golang/go/wiki/InstallTroubleshooting Is this a bug or am I missing something? John John Souvestre - New Orleans LA -- You received this message becaus

RE: [go-nuts] Re: I know finalizers are not promised to be called, but is it too not promised?

2017-01-28 Thread John Souvestre
olang-dev/DMiUkpS1uyQ John John Souvestre - New Orleans LA -- 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.co

RE: [go-nuts] Re: I know finalizers are not promised to be called, but is it too not promised?

2017-01-28 Thread John Souvestre
> If finalizers were indeed totally useless, it would obviously be totally useless to implement support for them. If someone described a few cases where finalizers were useful perhaps it would help understand them. John John Souvestre - New Orleans LA -- You received this mess

RE: [go-nuts] Cross compile GOOS

2017-01-26 Thread John Souvestre
amp; go build The () prevents adding a space to the end of the environment variable. John John Souvestre - New Orleans LA -Original Message- From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Jakob Borg Sent: 2017 January 26, Thu 13:13 To: golang-nuts Sub

RE: [go-nuts] Is Go too strict for nesting function callings?

2017-01-25 Thread John Souvestre
riadac functions. But worst case an exception could handle this. J John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Dave Cheney Sent: 2017 January 25, Wed 22:12 To: golang-nuts Subject: Re: [go-nuts]

RE: [go-nuts] Is Go too strict for nesting function callings?

2017-01-25 Thread John Souvestre
Hi Ian. OK, I understand now. Btw - I wasn't proposing adding an exception, but removing a limitation and the exception due to it. :) John John Souvestre - New Orleans LA -Original Message- From: Ian Lance Taylor [mailto:i...@golang.org] Sent: 2017 January 25, Wed 19:18

RE: [go-nuts] Is Go too strict for nesting function callings?

2017-01-25 Thread John Souvestre
Hi Caleb. Thanks! I see both the limitation and the exception. Other than implementation complexity, is there a reason for the limitation of single-valued expressions? Is there some fundamental problem with allowing multi-valued expressions that I'm missing? John John Souvestre - New

RE: [go-nuts] Is Go too strict for nesting function callings?

2017-01-25 Thread John Souvestre
Then I'm still confused. Where is this inconsistency / limitation / non-orthogonal "syntactic sugar" defined? I'm trying to understand why it exists if perhaps it isn't necessary. John John Souvestre - New Orleans LA -Original Message- From: golang-nuts@google

RE: [go-nuts] Is Go too strict for nesting function callings?

2017-01-25 Thread John Souvestre
Hi Dave. I believe that the example I posed is more fundamental, but along the same lines, than the one posed by TL. Perhaps not... Regardless, what is the rule you referred to? And is there any disadvantage to allowing the "syntactic sugar" to work in all cases? John John

RE: [go-nuts] Re: Priority cases in select?

2017-01-25 Thread John Souvestre
. :) Digital designers generally classify races as either critical (bad) or non-critical (not bad). Indeed, some non-critical races are necessary else things wouldn't work. :) John John Souvestre - New Orleans LA -Original Message- From: golang-nuts@googlegroups.com [mailto:golang

RE: [go-nuts] Re: Priority cases in select?

2017-01-25 Thread John Souvestre
minute test run. On Windows I can’t sleep for less than 1ms, but I suspect that the real answer is more like 1us for practical (not absolutely guaranteed) usage. This is assuming the CPU isn’t loaded, too. J John John Souvestre - New Orleans LA From: John Souvestre [mailto:j

RE: [go-nuts] Re: Priority cases in select?

2017-01-25 Thread John Souvestre
I believe that there is a typo in your example. It seems that you have separate selects instead of nested selects. Try: https://play.golang.org/p/YWYhnLJsdS John John Souvestre - New Orleans LA From: Paul Borman [mailto:bor...@google.com] Sent: 2017 January 25, Wed 16:01

RE: [go-nuts] Is Go too strict for nesting function callings?

2017-01-25 Thread John Souvestre
Hi Dave. I'm trying to understand this. What is the rule? Does this mean that there is no way to call this function? func h(func()(int, bool)) {} Is there any disadvantage to not allowing the "syntactic sugar" to work in all cases? John John Souvestre - New Orleans LA ---

RE: [go-nuts] Re: Priority cases in select?

2017-01-25 Thread John Souvestre
. John John Souvestre - New Orleans LA From: Axel Wagner [mailto:axel.wagner...@googlemail.com] Sent: 2017 January 25, Wed 13:19 To: John Souvestre Cc: golang-nuts Subject: Re: [go-nuts] Re: Priority cases in select? Doesn't work. If no communication can proceed when entering the select

RE: [go-nuts] Re: Priority cases in select?

2017-01-25 Thread John Souvestre
case <- priorityLowest: ... } } } John John Souvestre - New Orleans LA From: 'Axel Wagner' via golang-nuts [mailto:golang-nuts@googlegroups.com] Sent: 2017 January 25, Wed 10:00 To: Egon Cc: golang-nuts Subject: Re: [go-nuts] Re: Priority cases in select? I don't believe the actual

RE: [go-nuts] Multiple goroutine timeout for waitgroup not working

2017-01-08 Thread John Souvestre
Hi Abhi. An afterthought: For the “done” case, add a check to clear out any “cs” values which might come in just before the “done” signal. You won’t need to worry about this in the “timeout” case. John John Souvestre - New Orleans LA From: John Souvestre [mailto:j

RE: [go-nuts] Multiple goroutine timeout for waitgroup not working

2017-01-08 Thread John Souvestre
, change GetWorkerValues to be an endless loop containing a select with three cases: “<-cs” (add new value to array), “<-done” (break), and “<-timeout” (break). After the loop, send the array. John John Souvestre - New Orleans LA From: desaiabhi...@gmail.com [mailto:

RE: [go-nuts] Multiple goroutine timeout for waitgroup not working

2017-01-08 Thread John Souvestre
are finished – timeout or not, thus it always contains the info for both workers. John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of desaiabhi...@gmail.com Sent: 2017 January 08, Sun 06:24 To: golang-nuts Subject

RE: [go-nuts] Multiple goroutine timeout for waitgroup not working

2017-01-08 Thread John Souvestre
Hi again. Did you perhaps intend to make the call to monitorWorker() as a goroutine? That would let it run in parallel with the rest of main. John John Souvestre - New Orleans LA From: John Souvestre [mailto:j...@souvestre.com] Sent: 2017 January 08, Sun 06:10 To: 'golang-nuts

RE: [go-nuts] Multiple goroutine timeout for waitgroup not working

2017-01-08 Thread John Souvestre
Hi Abhi. I believe that the wait group timeout (in monitorWorker) was set to 2 seconds in the code you posted. I put a debugging print in the timeout case, and it is taking place. What were you expecting to see? John John Souvestre - New Orleans LA From: golang-nuts

RE: [go-nuts] Multiple goroutine timeout for waitgroup not working

2017-01-08 Thread John Souvestre
d 2 items might make it work. messges := make(chan *TestStruct, 2) I’m guessing, but I suspect that you didn’t realize that if Work1 runs first, then Work2 will block since the channel is full (or until you close it). John John Souvestre - New Orleans LA From: go

RE: [go-nuts] Re: too many runtime.gcBgMarkStartWorkers ?

2016-12-30 Thread John Souvestre
nel to do some scheduling for them. John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of r...@golang.org Sent: 2016 December 30, Fri 09:53 To: golang-nuts Subject: [go-nuts] Re: too many runtime.gcBgMarkStartWork

RE: [go-nuts] Most efficient way to implement PubSub pattern using channels

2016-12-26 Thread John Souvestre
What is a partitioned channel? John John Souvestre - New Orleans LA -Original Message- From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Zeeshan Arif Sent: 2016 December 25, Sun 19:05 To: golang-nuts Subject: [go-nuts] Most efficient way

RE: [go-nuts] Re: Idiomatic way to remove duplicates in a slice

2016-12-14 Thread John Souvestre
Ø there is good gist. Ø this algorithm 10x faster … I don’t believe it is faster as the slice size increases. What you propose is O(N**2) vs O(N). Try a test with a slice 10 or 100 times the size. John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com

RE: [go-nuts] Is it a compiler bug?

2016-11-12 Thread John Souvestre
Ø Also, prefixing all of the need-to-be-commented-out lines with // is always safe: https://play.golang.org/p/8Cot8lssO3 Except for perhaps: https://play.golang.org/p/9xiWFI-SgB John -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

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

RE: [go-nuts] Compiler level memory barrier in Go i.e. asm volatile("" : : : "memory")

2016-11-04 Thread John Souvestre
+1 Please note my new email address: j...@souvestre.com John John Souvestre - New Orleans LA -Original Message- From: Ian Lance Taylor [mailto:i...@golang.org] Sent: 2016 November 04, Fri 17:09 To: tsuna Cc: Rob Pike; John Souvestre; golang-nuts; Dmitry Vyukov Subject: Re: [go

RE: [go-nuts] Custom collation

2016-11-01 Thread John Souvestre
require a binary search for each lookup. After building the array, how about using it to build a map which would connect each of the entries to its order number – a “reversed” array, so to speak. This would reduce the lookup time from O(log n) to O(1). John John Souvestre - New Orleans

RE: [go-nuts] Re: There has no Mutex.Trylock() implemention or similar method ?

2016-10-23 Thread John Souvestre
Take a look at https://github.com/LK4D4/trylock/blob/master/trylock.go . I believe that it is easier and performs better. John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of djad...@gmail.com Sent: 2016

RE: [go-nuts] Re: There has no Mutex.Trylock() implemention or similar method ?

2016-10-23 Thread John Souvestre
ooks like a TryLock function would look like this: > > func (m *Mutex) TryLock() bool { > return atomic.CompareAndSwapInt32(, 0, mutexLocked) > } > > Is this correct? If so, what's the problem? I don’t recall seeing an answer to his question, however. John J

RE: [go-nuts] Re: Go locking and channels much slower than Java equivalent, program spends most of time in sync.(*Mutex).Lock() and sync.(*Mutex).Unlock()

2016-10-12 Thread John Souvestre
uarantee. And I believe that this statement is meant to cover both CPU and compiler ordering. John John Souvestre - New Orleans LA -Original Message- From: Konstantin Khomoutov [mailto:flatw...@users.sourceforge.net] Sent: 2016 October 12, Wed 11:40 To: John Souvestre Cc: 'golang-nuts'

RE: [go-nuts] Re: Go locking and channels much slower than Java equivalent, program spends most of time in sync.(*Mutex).Lock() and sync.(*Mutex).Unlock()

2016-10-12 Thread John Souvestre
such as those in the <https://golang.org/pkg/sync/> sync and <https://golang.org/pkg/sync/atomic/> sync/atomic packages.” John John Souvestre - New Orleans LA From: hiatt.dus...@gmail.com [mailto:hiatt.dus...@gmail.com] Sent: 2016 October 12, Wed 09:05 To: golang-nuts Cc: j...@s

RE: [go-nuts] Re: Go locking and channels much slower than Java equivalent, program spends most of time in sync.(*Mutex).Lock() and sync.(*Mutex).Unlock()

2016-10-12 Thread John Souvestre
– which Go’s sync/atomic operations provide. And I would certainly agree. John John Souvestre - New Orleans LA From: Henrik Johansson [mailto:dahankz...@gmail.com] Sent: 2016 October 12, Wed 07:01 To: John Souvestre; golang-nuts Subject: Re: [go-nuts] Re: Go locking and channels much

RE: [go-nuts] Re: Go locking and channels much slower than Java equivalent, program spends most of time in sync.(*Mutex).Lock() and sync.(*Mutex).Unlock()

2016-10-12 Thread John Souvestre
unless you * really * need it for performance and you take the time to understand it well. A mutex lock would not prevent another goroutine from doing an atomic operation, for example. So mixing the two could be disastrous. But there are some cases where it can be done. John John Souve

RE: [go-nuts] Re: Go locking and channels much slower than Java equivalent, program spends most of time in sync.(*Mutex).Lock() and sync.(*Mutex).Unlock()

2016-10-12 Thread John Souvestre
. John John Souvestre - New Orleans LA From: Henrik Johansson [mailto:dahankz...@gmail.com] Sent: 2016 October 12, Wed 03:02 To: John Souvestre; golang-nuts Subject: Re: [go-nuts] Re: Go locking and channels much slower than Java equivalent, program spends most of time in sync.(*Mutex).Lock

RE: [go-nuts] Re: Go locking and channels much slower than Java equivalent, program spends most of time in sync.(*Mutex).Lock() and sync.(*Mutex).Unlock()

2016-10-12 Thread John Souvestre
platforms. Ø Don't I at least have to load the shared vars using atomic load (atomic.Value for example) or something similar? Not if everyone accessing them is using a mutex to synchronize the access. John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com

RE: [go-nuts] Re: Go locking and channels much slower than Java equivalent, program spends most of time in sync.(*Mutex).Lock() and sync.(*Mutex).Unlock()

2016-10-12 Thread John Souvestre
. John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of sphilip...@gmail.com Sent: 2016 October 04, Tue 04:10 To: golang-nuts Subject: [go-nuts] Re: Go locking and channels much slower than Java equivalent, program spends

RE: [go-nuts] infinite loop makes program stuck

2016-10-12 Thread John Souvestre
. If you get rid of the “select” then the loop will block until something comes in from the channel. John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of liminglang...@gmail.com Sent: 2016 October 11, Tue 21:26

RE: [go-nuts] Re: Just because we can add multiple logical processors for the scheduler to use doesn’t mean we should

2016-09-24 Thread John Souvestre
hyperthreading results in more CPUs than cores. John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of T L Sent: 2016 September 24, Sat 04:22 To: golang-nuts Subject: [go-nuts] Re: Just because we can add multiple

RE: [go-nuts] Having difficulty testing this "cleanly"

2016-09-13 Thread John Souvestre
. J John John Souvestre - New Orleans LA From: Evan Digby [mailto:evandi...@gmail.com] Sent: 2016 September 13, Tue 15:59 To: John Souvestre; golang-nuts Subject: Re: [go-nuts] Having difficulty testing this "cleanly" Hi John, What you've posted is a valid way to

RE: [go-nuts] Having difficulty testing this "cleanly"

2016-09-13 Thread John Souvestre
ll execute in a timely fashion. I think that you’d have to call it before the goroutine. John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Evan Digby Sent: 2016 September 13, Tue 14:59 To: golang-nuts Subject: Re

RE: [go-nuts] Having difficulty testing this "cleanly"

2016-09-13 Thread John Souvestre
in the same function (main) that the Add is taking place earlier, there is no race. John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Evan Digby Sent: 2016 September 13, Tue 14:19 To: golang-nuts Subject: Re

RE: [go-nuts] Having difficulty testing this "cleanly"

2016-09-13 Thread John Souvestre
nd can you elaborate on how it would help in this case? Thanks again! Evan On Tuesday, 13 September 2016 12:01:29 UTC-7, John Souvestre wrote: Have you considered using a sync.WaitGroup? John John Souvestre - New Orleans LA From: golan...@googlegroups.com [ma

RE: [go-nuts] Having difficulty testing this "cleanly"

2016-09-13 Thread John Souvestre
Have you considered using a sync.WaitGroup? John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Evan Digby Sent: 2016 September 13, Tue 13:56 To: golang-nuts Subject: [go-nuts] Having difficulty testing

RE: [go-nuts] Assigning +Inf to a float32 ..

2016-09-11 Thread John Souvestre
Ignore. math.NaN() is there! J John John Souvestre - New Orleans LA From: John Souvestre [mailto:j...@souvestre.com] Sent: 2016 September 11, Sun 02:39 To: 'golang-nuts' Subject: RE: [go-nuts] Assigning +Inf to a float32 .. This does beg the question: Why is there no math.NaN

RE: [go-nuts] Assigning +Inf to a float32 ..

2016-09-11 Thread John Souvestre
This does beg the question: Why is there no math.NaN() function? John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Dave Cheney Sent: 2016 September 11, Sun 01:00 To: golang-nuts Cc: xiiop...@gmail.com Subject

RE: [go-nuts] Fast ConcurrentCounter without memory sharing

2016-08-14 Thread John Souvestre
John Souvestre - New Orleans LA -Original Message- From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Ian Lance Taylor Sent: 2016 August 14, Sun 14:21 To: Gaurav Agarwal Cc: golang-nuts Subject: Re: [go-nuts] Fast ConcurrentCounter without memory

RE: [go-nuts] What dependency management tool do you use?

2016-07-16 Thread John Souvestre
n’t aware of them? John John Souvestre - New Orleans LA -Original Message- From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Mauro Toffanin Sent: 2016 July 15, Fri 04:48 To: golang-nuts@googlegroups.com Subject: Re: [go-nuts] What dependency managem

RE: [go-nuts] What dependency management tool do you use?

2016-07-16 Thread John Souvestre
ioning. John John Souvestre - New Orleans LA -Original Message- From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Mauro Toffanin Sent: 2016 July 16, Sat 10:59 To: golang-nuts@googlegroups.com Subject: Re: [go-nuts] What dependency management tool

RE: [go-nuts] Re: How to make the first character in a string lowercase?

2016-07-14 Thread John Souvestre
What if the first character is a combined code point? John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Viktor Kojouharov Sent: 2016 July 14, Thu 03:57 To: golang-nuts Subject: [go-nuts] Re: How to make

RE: [go-nuts] Go test to run over sub packages?

2016-06-22 Thread John Souvestre
Ø Symlinks and the go tools should be avoided. Was this done intentionally? If so, why? If not, is it a bug which should be fixed? John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Dave Cheney Sent: 2016

RE: [go-nuts] How to properly get basename under DOS?

2016-06-14 Thread John Souvestre
> Package path is for *nix paths only. import "path/filepath" instead. When should path be used? Or should it be deprecated in favor of path/filepath? John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On