[go-nuts] Pure Golang Online Mandelbrot Viewer and MORE

2016-07-20 Thread john
Godelbrot, a Unix-Style Mandelbrot renderer, is nearing 0.0.1 http://godelbrot.functorama.com https://github.com/johnny-morrice/godelbrot UI tested on iPad and modern desktop browsers. Frontend is GopherJS, rendering occurs on server side. Why? Read on. The idea for 0.0.1 is to lay out a

[go-nuts] Re: go on Windows 10 from the bash shell (and the cmd shell)

2017-10-17 Thread john
just a heads up regarding Ubuntu Bash Shell on Windows10: if you open the Ubuntu Bash Shell and type the command: "*lsb_release -a" *you might discover it is running Ubuntu 14.04 you might want to run an upgrade to Ubuntu 16.04 which is now available. See the following for installation

[go-nuts] Re: I am confused.

2018-05-22 Thread John
Is the visual code studio an compiler or a what, I tried it myself but I isn't able to program. -- 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: I am confused.

2018-05-23 Thread John
ot;go > build yourfilename.go". > > Did you get Go installed? > > On Tuesday, May 22, 2018 at 10:41:07 PM UTC-6, John wrote: >> >> Is the visual code studio an compiler or a what, I tried it myself but I >> isn't able to program. >> >> >> -- You

[go-nuts] I am confused.

2018-05-20 Thread John
Hello I am just a random person in this small planet of the creation that happens to think that artificial intelligence will take over the world of jobs in the future. With that point of I started to learn Java Script on Khan Academy but didn't quite make that much progress. So I think that

[go-nuts] Re: I am confused.

2018-05-26 Thread John
t. You can, > too. Persistence! There are lots of free, .pdf books online that teach > you Go programming. > > (notice my liberal use of the word 'Go') > > > On Wednesday, May 23, 2018 at 11:04:38 PM UTC-6, John wrote: >> >> Yes I did, what do you mean by top pa

[go-nuts] Re: I am confused.

2018-05-26 Thread John
Well I guess I would just use the Go playground so it is easier. On Saturday, May 26, 2018 at 8:27:59 PM UTC-7, John wrote: > > I tried to find the terminal button but did not find it. And also I don't > know but does the welcome screen say welcome using or something. Because I >

[go-nuts] Re: I am confused.

2018-05-27 Thread John
ng things up. > > On Sunday, 27 May 2018 11:37:48 UTC+8, John wrote: >> >> Well I guess I would just use the Go playground so it is easier. >> >> >> On Saturday, May 26, 2018 at 8:27:59 PM UTC-7, John wrote: >>> >>> I tried to find the termin

[go-nuts] To make AI with Golang

2018-08-17 Thread John
Hi I am trying to make an game of Connect Five using Golang, I have already made an player versus player mode so I am making the player versus computer mode. At first I attempted to use if functions that detect when they need to block the player but it can't win without placing blocks

[go-nuts] Working or Not

2018-09-02 Thread John
Sincerely John -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this grou

[go-nuts] Using modules with go test ./...

2018-09-20 Thread John
Just started playing with modules recently. Having an issue I don't understand, wondering if anyone has seen it, the few references to the error did not provide anything I saw relevant for what I'm doing. given a directory structure such as: /go/ src/ pkg/ bin/ GOPATH NOT SET

[go-nuts] Re: Using modules with go test ./...

2018-09-20 Thread John
gt; just set up my workflow to run tests where there are go.mod files. > > Best, > Scott > > > > On Thursday, 20 September 2018 21:21:32 UTC+2, John wrote: >> >> Just started playing with modules recently. Having an issue I don't >> understand, wondering if anyone has

[go-nuts] Re: Using modules with go test ./...

2018-09-20 Thread John
er folder. > > > > On Friday, 21 September 2018 05:21:32 UTC+10, John wrote: >> >> Just started playing with modules recently. Having an issue I don't >> understand, wondering if anyone has seen it, the few references to the >> error did not provide anything I saw relevan

[go-nuts] Re: Using modules with go test ./...

2018-09-20 Thread John
Gotcha. Thanks Dave. Well, looks like I'm going back to my old methods for the time being. Thanks everyone! On Thursday, September 20, 2018 at 4:26:37 PM UTC-7, Dave Cheney wrote: > > Sorry, I probably wasn’t clear or didn’t understand that you were asking. > I saw that you said GOPATH is

Re: [go-nuts] Re: Using modules with go test ./...

2018-09-21 Thread John
f I run "go env GOMOD" at src/, I get back a path to a go.mod file that is the one I deleted. Running "go mod tidy" gave the same error, so no auto cleanup And go init mod also throws the same error. I'm sure I can clean this up by removing some cached file somewhere. On Frida

Re: [go-nuts] Re: Using modules with go test ./...

2018-09-21 Thread John
AM UTC-7, thepud...@gmail.com wrote: > > > "What I would expect with 'go test ./...' is behavior similar to > what I had before modules." > > Hi John, all, > > Just to expand slightly on the points from Dave, Scott, and Paul... > > I suspect part of

[go-nuts] This Makes No Sense

2019-01-21 Thread John
Dear Gophers, I have recently made a project of Connect Five. When the imput is wrong it will have a goroutine problem that says something about out of index, as my game win function depends on if the x = b and x+1 = b and so on. But if the imput is not 1,2 1,3 and so on, or it is over 15, 15

[go-nuts] Arrays

2019-01-13 Thread John
Thank you, John

[go-nuts] Different Languages of a Program Project

2019-03-03 Thread John
I have come to a realization about programming and the different roles of each language in a project. Here below are what I thought, and hope that I may receive confirmation from my fellow programmers. Thank you. Golang: Main Project Management HTML: Website Formatting Javascript: Creating

[go-nuts] Diagnose

2019-02-01 Thread John
|| y == "8"|| y == "9"|| y == "10"|| y == "11"|| y == "12"|| y == "13"|| y == "14"|| y == "15" { wiwi() } else { showBoard() fmt.Println("Sorry you had entered wrong please enter again") fmt.Scanln(,) simple() }

[go-nuts] html/template: Unable to execute a method on non-pointer struct where method receiver is a pointer (can't evaluate field error)

2020-01-30 Thread John
[non-pointer struct]. cannot be invoked directly in a template. package main import ( "fmt" "bytes" "html/template" ) type Wrapper struct { raw []int } func (w *Wrapper) IsZero() bool { if len(w.raw) == 0{ return true } return false } var tmplText = ` {{.IsZero}} ` var tmpl =

Re: [go-nuts] Re: Attaching a Finalizer to a struct field holding a slice or the slice's underlying array

2019-12-31 Thread John
that removed the local reference, the oppositoe of KeepAlive() or there might be some way of using Unsafe on this to walk the array C style, but that just seems like a bad idea. On Tuesday, December 31, 2019 at 2:53:26 AM UTC-8, Michel Levieux wrote: > > Hi John, > > I'm not sure what I'm

[go-nuts] Attaching a Finalizer to a struct field holding a slice or the slice's underlying array

2019-12-28 Thread John
Looking for a little insight on if it is possible to do something: Given this type: type Blah struct { Payload []byte } What I'm looking for is to kick off a finalizer when a slice and all other slices backed by the same array get GC'd. In lieu of that, whenver the pointer to the array

[go-nuts] Re: Attaching a Finalizer to a struct field holding a slice or the slice's underlying array

2019-12-30 Thread John
teral, or by taking the address > of a local variable. > > The result of make isn't "an object created by calling new", but it it > close. > > On Saturday, December 28, 2019 at 9:27:29 PM UTC-8, John wrote: >> >> Looking for a little insight on if it is p

[go-nuts] Wasm test code, how to use syscall/js to create a document when invoked in node.js

2020-08-25 Thread John
I am using the following to run wasm tests: GOOS=js GOARCH=wasm go test -exec "node $(go env GOROOT)/misc/wasm/wasm_exec Because I'm in a node environment, the Global().Get("document") is empty. I need to be able to populate that with the correct document object so I can test DOM manipulation.

Re: [go-nuts] What should be a silly protoc golang question

2020-07-22 Thread John
ist if you know where i can find it. Cheers and thanks so much! On Wednesday, July 22, 2020 at 3:17:09 PM UTC-7, Matthew Walster wrote: > > John, > > On Wed, 22 Jul 2020 at 23:02, John > > wrote: > >> I then enter that directory and do: >> >> /usr/local/bin

[go-nuts] What should be a silly protoc golang question

2020-07-22 Thread John
In essence, I'm switching over to the new go protocol buffer lib and protoc libraries. In the new version, you are told to specify go_package option in the .proto file. So I updated all mine to have that: go_package = "path/to/my/proto"; I use a script that finds all my proto files and the

[go-nuts] Is embed.FS not expected to be walkable by fs.WalkDir()?

2021-06-20 Thread John
package main import ( "embed" "io/fs" "log" ) //go:embed somefile.txt var FS embed.FS func main() { err := fs.WalkDir( FS, "", func(path string, d fs.DirEntry, err error) error { log.Println("path: ", path) return nil }, ) if err != nil { log.Println("err:

Re: [go-nuts] Is embed.FS not expected to be walkable by fs.WalkDir()?

2021-06-21 Thread John
Thanks for that axel. I had tried "./" and "/". I guess I missed one :) On Sunday, June 20, 2021 at 11:53:03 PM UTC-7 axel.wa...@googlemail.com wrote: > You need to pass "." to `fs.WalkDir`, not "". > > On Mon, Jun 21, 2021 at 7:42 AM John

Re: [go-nuts] Allow a TCP connection, but not a TLS connection based on an ACL

2022-03-30 Thread John
use case, I can't imagine a change to support this getting into the net/http package. On Monday, March 28, 2022 at 8:28:31 PM UTC-7 John wrote: > Hey Sean and Robert, > > Thanks for the suggestions. > > I can see how the temporary error would work, but as Sean is saying, this &g

[go-nuts] Allow a TCP connection, but not a TLS connection based on an ACL

2022-03-28 Thread John
I'm looking to satisfy this: - If you are in an ACL, you can make a TLS connection - If you are not in an ACL, you can only a TCP connection, but not a TLS connection* ** It would be better if it didn't honor TCP either, unless it is a health probe* Basically I want to move my

[go-nuts] Re: Using generics to solve Optional argument problem for multiple methods

2022-07-28 Thread John
cs >> func WithShared(option WithSharedOption){} >> func WithANotShared(option OptionA){} >> >> //with generics >> func WithShared[T WithSharedOption](option T){} >> func WithANotShared(option OptionA){} >> ``` >> >> On Thursday, July 28, 2

[go-nuts] Using generics to solve Optional argument problem for multiple methods

2022-07-27 Thread John
With 1.18 generics, I'm curious if anyone has a good solution using generics to solve the optional argument that can be used in multiple method problem. So say I have two methods, .A() and .B(). Both accept optional arguments where some optional arguments might be shared. Here is a very

[go-nuts] Re: Using generics to solve Optional argument problem for multiple methods

2022-07-27 Thread John
As a note, this is how I solve this problem without generics: https://go.dev/play/p/nsDca0McADY On Wednesday, July 27, 2022 at 2:54:20 PM UTC-7 John wrote: > With 1.18 generics, I'm curious if anyone has a good solution using > generics to solve the optional argument that can b

[go-nuts] Library for printing a struct as a compiler recognized version

2022-08-15 Thread John
I know we have plenty of pretty printing out there, but i'm looking for a package that can print the Go representation of a Struct out to screen. So given: var x := { A: "hello" } someLib.Print(x) I get: { A: "hello" } I'm sure someone has used reflection to do this and figured out how

Re: [go-nuts] Library for printing a struct as a compiler recognized version

2022-08-15 Thread John
to a variable, add the needed imports and have it compile. On Monday, August 15, 2022 at 7:34:08 AM UTC-7 axel.wa...@googlemail.com wrote: > Does fmt.Printf("%#v", v) do what you want? > > On Mon, Aug 15, 2022 at 4:27 PM John wrote: > >> I know we have plenty of pretty printin

Re: [go-nuts] Library for printing a struct as a compiler recognized version

2022-08-15 Thread John
t think you can solve it in > full generality. So, at the very least, you have to be very deliberate > about what you want and what you are willing to give up. > > But. Maybe someone else has suggestions for a library doing an > approximation of this you'd like better.

Re: [go-nuts] Library for printing a struct as a compiler recognized version

2022-08-15 Thread John
:05 PM UTC-7 kortschak wrote: > On Mon, 2022-08-15 at 07:26 -0700, John wrote: > > I know we have plenty of pretty printing out there, but i'm looking > > for a package that can print the Go representation of a Struct out to > > screen. > > > > So given: &

Re: [go-nuts] Generics: Using runtime.FuncForPC() to get method name doesn't *seem* to work

2022-11-07 Thread John
:09:26 AM UTC-8 John wrote: > Thanks Ian for being generous with your time in answering this. I'll see > if I can drum up another way to make that check work. > > Cheers and have a good rest of your day. > On Monday, November 7, 2022 at 10:02:28 AM UTC-8 Ian Lance Taylor wrote: &

[go-nuts] Generics: Using runtime.FuncForPC() to get method name doesn't *seem* to work

2022-11-07 Thread John
Or maybe I'm just doing something wrong. I have a struct implementing generics where methods return the next method to execute. For tests, I wanted to make sure the returned method was the one expected, so I was using this: nextStageName :=

Re: [go-nuts] Generics: Using runtime.FuncForPC() to get method name doesn't *seem* to work

2022-11-07 Thread John
Thanks Ian for being generous with your time in answering this. I'll see if I can drum up another way to make that check work. Cheers and have a good rest of your day. On Monday, November 7, 2022 at 10:02:28 AM UTC-8 Ian Lance Taylor wrote: > On Mon, Nov 7, 2022 at 9:24 AM John wr

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

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] 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] Fast ConcurrentCounter without memory sharing

2016-08-14 Thread John Souvestre
Hello Gaurav. You might want to look at Jon Gjengset's project: https://github.com/jonhoo/drwmutex Also, I seem to recall Dmitry saying that sync.Pool distributes locking. So it might be worth looking into. Another type of lock which might be of interest is MCS (or K42, CLH, HCLH). John

Re: [go-nuts] Pure Golang Online Mandelbrot Viewer and MORE

2016-07-21 Thread John Morrice
hsmyers: as a pioneer I really appreciate your input! I was planning to run godelbrot on my Pi, so I will definitely check out your venerable FracZoom program for RISC. *However, *drawing an outline box is exactly what earlier versions did. I found that people just couldn't figure it out.

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] Biometric login (webauthn) in Go, need help in verifying signature

2016-08-17 Thread John Kemp
I’d say that you should look at the code in: > On Aug 13, 2016, at 3:51 PM, ayngl...@gmail.com wrote: > > rsa.VerifyPKCS1v15 (which is publicly available: https://go.googlesource.com/go/+/master/src/crypto/rsa/pkcs1v15.go) And see if it matches what your JS crypto.subtle.verify does… I do

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

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] 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: 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

[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] 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
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 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
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] 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 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] Re: Idiomatic way to reference custom error codes

2017-01-25 Thread John Beckett
Thanks Pierre, that looks like a simple and quite clean implementation. Although it's easier to use an iota for the numbering, does that open up any issues with keeping the documentation up to date? I know it's easier to program and extend, but it's also less obvious when codes change. Is there

Re: [go-nuts] Re: Idiomatic way to reference custom error codes

2017-01-25 Thread John Beckett
> > Since it is an HTTP Api, what about returning a standard HTTP status line, > maybe with some non standard status code) and additional details about the > error in the response body, JSON encoded? That is exactly what we do. We return a HTTP status, but in addition, we return a JSON encoded

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] 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] 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] 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] 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-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] 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
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] Given a `[]string` key list and a `map[string]interface{}`, can we find the value?

2017-02-12 Thread John Feminella
Thanks. I wound up doing this with a recursive traversal: https://play.golang.org/p/k9iy3sHOZ9 best,~ jf--John Feminella@jxxfhttp://jxf.me On Sun, Feb 12, 2017 3:05 PM, Paul Borman bor...@google.com wrote: Take a look at the reflect package, or if you know that the only internal maps

Re: [go-nuts] Given a `[]string` key list and a `map[string]interface{}`, can we find the value?

2017-02-12 Thread John Feminella
Agreed on the panic, and yours handles that better. (Although I hope it's obvious that this was just a toy example and not the real thing!) best,~ jf--John Feminella@jxxfhttp://jxf.me On Sun, Feb 12, 2017 3:23 PM, Paul Borman bor...@google.com wrote: Your code can panic. Take a look

Re: [go-nuts] Re: best working and maintaned golang oauth2 server package

2017-01-17 Thread Rithu John
Hi Simon, The coreos/go-oidc package enables OpenID Connect support for the golang.org/x/oauth2 package.( https://github.com/coreos/go-oidc). You can look through the examples ( https://github.com/coreos/go-oidc/tree/master/example) to get a better idea of

[go-nuts] Can somebody explain the importance of 'select'?

2017-01-19 Thread John C.
importance of select as a built-in feature is escaping me. Can somebody help me see the big "why" picture better? Thanks, John C. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop r

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

[go-nuts] Re: [ANN] A terminal based search engine for bash commands, built with Go

2016-09-11 Thread johnny-john
yle guide that has been explicitly donated to > the public domain, and should be a fertile resource for populating your > library. > > Howard > > On Sunday, September 11, 2016 at 12:52:12 PM UTC-5, johnny-john wrote: >> >> Hi all! >> >> Just thought about dro

[go-nuts] [ANN] A terminal based search engine for bash commands, built with Go

2016-09-11 Thread johnny-john
Hi all! Just thought about dropping this link here, the codebase is VERY small, so if you are a newbie looking for a project to get into, have a look: https://github.com/crufter/borg Cheers -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

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] Having difficulty testing this "cleanly"

2016-09-13 Thread John Souvestre
all of the tasks running? Then you want to wait till all of the tasks are complete? If so, I’m thinking that using 2 WaitGroups would do the job – one to show when all the tasks are running and one to show when all the tasks are done. No mutex and no blocking channels. John John

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
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
. 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] 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] 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] 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

[go-nuts] Re: Unexpected lack of parallel speedup

2016-10-30 Thread John Morrice
in more depth than I should write in an email at http://www.golangpatterns.info/concurrency/semaphores If you'd like me to look at some more Go code for you, send me email and we can arrange something! :) John Morrice j...@functorama.com On Saturday, October 29, 2016 at 8:42:02 PM UTC+1, Florian Weim

[go-nuts] Re: Unexpected lack of parallel speedup

2016-10-30 Thread John Morrice
Tidy solution, removing the songch, doh https://play.golang.org/p/2VppDS0U27 On Saturday, October 29, 2016 at 8:42:02 PM UTC+1, Florian Weimer wrote: > > I'm trying to parse OpenPGP key server dumps. Throughput is not too > bad so far, but I'd like to speed things up by introducing >

[go-nuts] Re: Unexpected lack of parallel speedup

2016-10-30 Thread John Morrice
fix: https://play.golang.org/p/EEKdbahp0o I.e. Ringo wrote Come Together John wrote Yellow Submarine George wrote I am the Walrus Paul wrote Eleanor Rigby On Saturday, October 29, 2016 at 8:42:02 PM UTC+1, Florian Weimer wrote: > > I'm trying to parse OpenPGP key server dumps. Thro

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] why "iota"?

2016-11-09 Thread John McKown
quot;i ought to" because, well, I'm a Texan! [grin]). BTW, it's also the 9th letter in the Greek alphabet.​ ​ref: https://www.youtube.com/watch?v=0T1sUNyqWPo which is not how I pronounce it, but more like Marvin says.​ -- Heisenberg may have been here. Unicode: http://xkcd.com/1726/ Maranatha

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] 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] 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&q

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

[go-nuts] Error handling and structured logging

2016-10-11 Thread John Jeffery
I have been following the progress of package github.com/pkg/errors, and have put it to much use. Thanks very much to Dave Cheney and the other authors. A few months ago an interesting issue was raised along the lines of being able to attach arbitrary data to the error

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

  1   2   3   >