[go-nuts] [NOTE] GOPL type theory at the receiver

2024-01-22 Thread John Pritchard
ceiver solve the disparity of point type object statelessness. Best, John -- 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...@googlegr

[go-nuts] [NOTE] GOPL Type Theory

2024-01-13 Thread John Pritchard
of concise semantics to the universe external to GOPL "native" interpretation may be represented as service and opportunity. Meanwhile, the benefit of concise type semantics to the universe internal to GOPL remains to be determined. Best, John ps. Interested in references to t

Re: [go-nuts] Any interest in nat.mulRange simplification/optimization?

2024-01-09 Thread John Jannotti
ation (N/2 multiplie, N/4 ...) and apply Karatsuba 2nd outer iteration > onwards. Not sure if this is easy in Go. > > On Jan 8, 2024, at 11:47 AM, Robert Griesemer wrote: > > Hello John; > > Thanks for your interest in this code. > > In a (long past) implementation of the factorial

Re: [go-nuts] Any interest in nat.mulRange simplification/optimization?

2024-01-07 Thread John Jannotti
.MaxUint64 - 3, math.MaxUint64 - 1, "6277101735386680760773248120919220245411599323494568951784"}, {math.MaxUint64 - 3, math.MaxUint64, "115792089237316195360799967654821100226821973275796746098729803619699194331160"} ``` On Sun, Jan 7, 2024 at 6:34 AM John Jannotti wrote:

Re: [go-nuts] Any interest in nat.mulRange simplification/optimization?

2024-01-07 Thread John Jannotti
ltiplication, which implies something deep is going on. I'll > add him to the conversation. > > -rob > > > > > On Sun, Jan 7, 2024 at 5:46 PM John Jannotti wrote: > >> I enjoy bignum implementations, so I was looking through nat.go and saw >> that `mulR

[go-nuts] Any interest in nat.mulRange simplification/optimization?

2024-01-06 Thread John Jannotti
I enjoy bignum implementations, so I was looking through nat.go and saw that `mulRange` is implemented in a surprising, recursive way,. In the non-base case, `mulRange(a, b)` returns `mulrange(a, (a+b)/2) * mulRange(1+(a+b)/2, b)` (lots of big.Int ceremony elided). That's fine, but I didn't

Re: [go-nuts] Re: [RFC] Syntactic Dissonance

2024-01-06 Thread John Pritchard
://blog.merovius.de/posts/2024-01-05_constraining_complexity/ a problem solved via parametric type abstraction. A fact which makes the case in favor of incrementing GOPL type theory. Best, John On Sat, Jan 6, 2024 at 7:38 AM 'Brian Candler' via golang-nuts < golang-nuts@googlegroups.com> wrote:

Re: [go-nuts] Re: [RFC] Syntactic Dissonance

2024-01-06 Thread John Pritchard
Hi, Thinking about types and their conception, I could avoid the type assertion boilerplate and rationalize the type membership relationship if this code compiled. Best, John On Sat, Jan 6, 2024 at 3:21 AM Tamás Gulácsi wrote: > Where does TestObject implement the Comparable interface,

[go-nuts] [RFC] Syntactic Dissonance

2024-01-05 Thread John Pritchard
nts? Best, John -- 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. To view this discussion on

[go-nuts] Re: Go 1.22 Release Candidate 1 is released

2023-12-24 Thread John David Lee
This is in the section titled "Why are yield functions limited to at most two arguments?" On Sunday, December 24, 2023 at 5:43:23 PM UTC+1 John David Lee wrote: > Hello. > > In the rangefunc experiment document > <https://go.dev/wiki/RangefuncExperiment> the iter

[go-nuts] Re: Go 1.22 Release Candidate 1 is released

2023-12-24 Thread John David Lee
Hello. In the rangefunc experiment document the iter package is said to export the following: type Seq[V any] func(yield func(V) bool) bool type Seq2[K, V any] func(yield func(K, V) bool) bool But after installing tip, it looks like the iter package

[go-nuts] Re: Why doesn't the database/sql package in Go support using placeholders "?" to replace the database name and username in SQL statements?

2023-09-21 Thread John Zh
Thanks for your reply. So does substituting placeholders in the driver still involve pre-compiling the SQL statement to prevent SQL injection? Acutally I am more concerned about security aspects rather than performance overhead. 在2023年9月19日星期二 UTC+8 07:45:35 写道: > Hi. I'm maintainer of

[go-nuts] Re: Why doesn't the database/sql package in Go support using placeholders "?" to replace the database name and username in SQL statements?

2023-09-21 Thread John Zh
ot;+1 for a legitmiate use of QUOTE() which is really the sanest thing >>> that can be done here, since CREATE USER doesn't support ? placeholders"* >>> >>> You can test this by trying a simple DML statement, e.g. >>> UPDATE users SET name=? where n

[go-nuts] Re: Why doesn't the database/sql package in Go support using placeholders "?" to replace the database name and username in SQL statements?

2023-09-21 Thread John Zh
ich is really the sanest thing >> that can be done here, since CREATE USER doesn't support ? placeholders"* >> >> You can test this by trying a simple DML statement, e.g. >> UPDATE users SET name=? where name=? >> >> On Sunday, 17 September 2023 at 01:02:08

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] Re: [rfc] build bug in type abstraction?

2023-08-16 Thread John Pritchard
Hi Brian, Thanks for the review. Your basic conclusion matches mine, that the ./main/main.go:46 and ./types.go are proven in the "go run" case, and disproven in the "go build" case. Best, John On Wed, Aug 16, 2023 at 9:58 AM Brian Candler wrote: > On Wednesday, 16

[go-nuts] [rfc] build bug in type abstraction?

2023-08-16 Thread John Pritchard
d. Comments? Issue? Thanks, John -- 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. To view this disc

[go-nuts] go11tag

2023-07-28 Thread John Pritchard
Hello, Debugging "go build" with dlv, which hungup at go/src/cmd/go/main.go:92:var _ = go11tag Looking around a bit, found no particular rationale for the existence of "go11tag". Best, John -- You received this message because you are subscribed to the Google

[go-nuts] Is OCSP Stapling supported in Go? If so, how?

2022-12-19 Thread John Wayne
I tried to google this for a while now, and all I find regarding this topic is: https://groups.google.com/g/golang-nuts/c/QC5FOysyVxg This is already many years old, and to me it seems like there is code inside Go which allows to perform server side OCSP stapling. However, I am unable to find

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

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

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

[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

[go-nuts] Using Go Lang as a tiny server program at localhost , won't execute request

2022-08-04 Thread John Dutcher
I have a tiny server program in Go language (main2.go) running and 'listening' on port 8080 in a Windows command prompt session. While running I point a browser to http://localhost:8080/main2.go and main2.go executes and places a small html form into the browser window to fill and submit. If

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

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] TODO comments in net/lookup_windows.go

2022-03-30 Thread John Dreystadt
Being a newbie to Go, I spent some time reading some of the standard packages and noticed a large number of TODO comments in lookup_windows.go. So I decided to see if I could resolve these comments. I now have a working proof of concept for lookupIP standalone and maybe I should be working to

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

2022-03-28 Thread John Doak
gt;> return err >>} >> >> >> >> On Mar 28, 2022, at 5:35 PM, 'Sean Liao' via golang-nuts < >> golang-nuts@googlegroups.com> wrote: >> >> I would just add a for loop around your code and only return when you >> have a connection yo

[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] Limit the number of goroutine while using errgroup

2021-11-05 Thread Reach John
How to control the number of goroutines when using errgroup? Is there a best practice? -- 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] New Releases: Command Line Interface Generator tool for Go

2021-10-25 Thread John Brown
Just released Gofire, a tool for Go that automatically generates a command line interface (CLI) for your functions and does all required plumbing in between, inspired by *https://github.com/google/python-fire.* *https://github.com/1pkg/gofire* - Gofire uses code generation to generate

[go-nuts] gctrace vs MemStats

2021-06-21 Thread John Rusk
on heap_live and the MemStats values are not (directly) based on the the same thing... but I'm guessing there's an indirect or approximate link. (I'm a bit puzzled by some gctrace output that I'm seeing.) John -- You received this message because you are subscribed to the Google Groups "golang

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

[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] I think I found a bug?

2021-05-27 Thread John Olson
gt; wrote: >> >> Could you send a https://play.golang.org/ <https://play.golang.org/> link >> showing a short example? >> >> Without much information it sounds like a you update the same slice at two >> different indices. It would be interesting to know how

Re: [go-nuts] I think I found a bug?

2021-05-26 Thread John Olson
ow you populate the temp > slice. > > On 27.05.21 01:52, John Olson wrote: >> I have a recursive function that seems to be reusing memory it shouldn't. >> I'm developing in Goland 2021.1.1 with go version 1.16.2. >> I've written a function to generate the partitions of an integer. T

[go-nuts] I think I found a bug?

2021-05-26 Thread John Olson
I have a recursive function that seems to be reusing memory it shouldn't. I'm developing in Goland 2021.1.1 with go version 1.16.2. I've written a function to generate the partitions of an integer. The partitions of n are all the sets of integers that add up to n, so the partitions of 3 are

Re: [go-nuts] Code Review Checklist: Go Concurrency

2021-03-31 Thread John Dreystadt
As still quite the newbie at Go, I agree about the usefulness. Several years ago I ran into a paper on this subject at a blog called the Morning Paper (sadly gone quiet). The paper itself is at https://songlh.github.io/paper/go-study.pdf . It has some examples and might be a useful addition to the

[go-nuts] Possible issue in docs for Listen and ListenPacket

2021-02-26 Thread John Dreystadt
The documentation for func (*ListenConfig) Listen ends with the line "See func Listen for a description of the network and address parameters". The next function called ListenPacket has the same line with the name changed to ListenPacket. I think that these should actually say "See func Dial

[go-nuts] New generic purpose throttler library for Go that comes with builtin integrations for popular Go libraries

2020-10-15 Thread John Brown
Library has vast amount of different built throttler conditions, among which are: - leaky-bucket - latency threshold - metrics - etc. Library allows to easily combine them into more complex throttling pipelines and also ships tools to easily integrate it into existing infrastructure, for e.g.

[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] New tool and vscode extension to optimize your structures: cpu cache alignment, memory packing, false sharing guarding, and more.

2020-06-13 Thread John Brown
Hello gophers, recently I published go tool and extension for vscode to help with some common performance transformations for structs, such as: - cpu cache alignment - memory packing - false sharing guarding - auto annotation - generic

Re: [go-nuts] Compiler error when using an interface type in a list

2020-06-12 Thread John Sturdy
join up. I'll try the solution you suggest. On Thursday, June 11, 2020 at 6:03:59 PM UTC+1, burak serdar wrote: > > On Thu, Jun 11, 2020 at 10:50 AM John Sturdy > wrote: > > > > I've defined an interface type, and a concrete type that I think > implements that i

[go-nuts] Re: Language proposal: labelled "with" statements to help make test code easier to write

2020-03-02 Thread John Arundel
On Saturday, 29 February 2020 18:11:53 UTC, Warren Stephens wrote: > > The influence that test code has on the structure of the application code > is highly undesirable. > On the contrary, I think designing for testability improves your architecture considerably! And if you develop test-first,

[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] RecvMsgUDP / SendMsgUDP

2020-01-07 Thread John Dreystadt
On Monday, January 6, 2020 at 5:42:04 PM UTC-5, Ian Lance Taylor wrote: > > On Mon, Jan 6, 2020 at 12:46 PM John Dreystadt > wrote: > > > > I noticed that the documentation for net.RecvMesgUDP and net.SendMesgUDP > seemed a bit odd because it referred t

[go-nuts] RecvMsgUDP / SendMsgUDP

2020-01-06 Thread John Dreystadt
MSG_OOB but there is no RecvMesgTCP. I have a proposal for changes but I wanted to see if anyone disagreed with the above. I would be especially interested in anyone using these two functions today. John Dreystadt -- You received this message because you are subscribed to the Google Groups

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] 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] 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: Scheduling - find the overlap size of two sequential date ranges and determine the actual dates of included in the intersection

2019-06-16 Thread John More
Updated playground code https://play.golang.org/p/qHufIG5ppww On Sunday, June 16, 2019 at 12:48:25 PM UTC-4, John More wrote: > > I have created a program to solve this problem ( > https://play.golang.org/p/BueQBahUUbk) but I am not a pro and do not know > if there is a better way.

[go-nuts] Scheduling - find the overlap size of two sequential date ranges and determine the actual dates of included in the intersection

2019-06-16 Thread John More
I have created a program to solve this problem (https://play.golang.org/p/BueQBahUUbk) but I am not a pro and do not know if there is a better way. Thanks for your time and a huge than You to Yudai the creator of "github.com/yudai/golcs" . I have also attached the code. -- You received

Re: [go-nuts] Re: Should IP.DefaultMask() exist in today's Internet?

2019-05-02 Thread John Dreystadt
>> >> >>> On Thursday, 2 May 2019 14:09:09 UTC+2, Louki Sumirniy wrote: >>> The function has a very specific purpose that I have encountered in several >>> applications, that being to automatically set the netmask based on the IP >>> being one of the several defined ones, 192, 10, and i

Re: [go-nuts] the Dominance of English in Programming Languages

2019-04-29 Thread John McKown
nt a complex algorithm in very little code, but it is also very hard to follow unless one has advanced knowledge of APL. life←{↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵} -- This is clearly another case of too many mad scientists, and not enough hunchbacks. Maranatha! <>< John McKown -- Y

[go-nuts] Re: Some issues with UDP and Go

2019-04-14 Thread John Dreystadt
Sorry it took so long for this post, other things intervened. Anyway, quick responses to the three people who commented. Shulhan, there is a better mechanism in Go than resetting the buffer. Have a second variable, say "var message []byte", and then after the call to ReadMsgUDP add this line

[go-nuts] Re: Some issues with UDP and Go

2019-04-07 Thread John Dreystadt
Thanks, that makes sense. So the documentation here needs some work since that is not at all clear. On Sunday, April 7, 2019 at 11:42:52 AM UTC-4, Pelle Johansson wrote: > > Hi John, > > The oob data used in these system calls are not for communicating with the > peer. UDP does

[go-nuts] Some issues with UDP and Go

2019-04-06 Thread John Dreystadt
I wrote some sample code (at the end of this message) to see how UDP worked in the Go environment. And I wound up with some issues because things did not seem to work as I expected. I am running go1.11.2 on both a Windows box and a Ubuntu box. Issue 1, when I call WriteMsgUDP with both a

Re: [go-nuts] Re: Should IP.DefaultMask() exist in today's Internet?

2019-03-11 Thread John Dreystadt
Yes, I was mistaken on this point. I got confused over someone's discussion of RFC 1918 with what the standard actually said. I should have checked closer before I posted that point. But I still don't see the reason for this function. In today's networking, the actual value you should use for a

Re: [go-nuts] Re: Should IP.DefaultMask() exist in today's Internet?

2019-03-08 Thread John Dreystadt
Lance Taylor wrote: > > On Thu, Mar 7, 2019 at 2:42 PM John Dreystadt > wrote: > > > > I have not seen any response to my last posting yet, and I think it is > still an open question. I also realized an additional point that I should > have pointed out before which i

[go-nuts] Re: Should IP.DefaultMask() exist in today's Internet?

2019-03-07 Thread John Dreystadt
I have not seen any response to my last posting yet, and I think it is still an open question. I also realized an additional point that I should have pointed out before which is that this is an IPv4 only thing. Which means that I really don't understand when you would use this function. Would

[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] Re: Should IP.DefaultMask() exist in today's Internet?

2019-03-03 Thread John Dreystadt
CIDR is an extension, not a > replacement, for IPv4 subnet specification, to give administrators more > flexibliity when configuring multiple address ranges in a fairly large > intranet. > > On Saturday, 2 March 2019 22:32:28 UTC+1, John Dreystadt wrote: >> >> I am new to Go so

[go-nuts] Should IP.DefaultMask() exist in today's Internet?

2019-03-02 Thread John Dreystadt
I am new to Go so feel free to point out if I am breaking protocol but I ran into the function DefaultMask() in the net package and did some research. This function returns the IPMask by assuming that you are using IP class A, B, and C addresses. But this concept is from the early days of the

[go-nuts] Re: Question for "net" package experts

2019-02-15 Thread John Dreystadt
Ah, thanks. Now I understand, the need was to distinguish the value. I wonder if there might be some way to document this a bit better. Not a high priority but I will see if I can come up with anything. -- You received this message because you are subscribed to the Google Groups "golang-nuts"

[go-nuts] Re: Question for "net" package experts

2019-02-14 Thread John Dreystadt
The docs state “Network returns the address's network name, "ip+net".” which is accurate but not really an answer. I was asking if there is some meaning for this value. If it was just “ip” this would actually make more sense to me because it would indicate that TCP and UDP were both supported,

[go-nuts] Question for "net" package experts

2019-02-14 Thread John Dreystadt
The Network function of the various Addr types in the "net" package sometimes returns the string "net+ip". I don't see any description of this value and the my best guess is that it is saying that the address is an IP network address (from the ip) and it is a network address (from the net) but

[go-nuts] Re: Missing well-known IPv4 address

2019-02-14 Thread John Dreystadt
Sigh, I see your point. One of those ugly issues where the standard allows a whole range of values but in reality people only ever use one specific value. But you don't want to hard code something because of the standard. -- You received this message because you are subscribed to the Google

[go-nuts] Missing well-known IPv4 address

2019-02-05 Thread John Dreystadt
The well known IPv4 addresses defined in ip.go do not include an entry for the loopback address but the IPv6 addresses does have this entry. I propose that IPv4loopback with a value of IPv4(127, 0, 0, 1) be added to ip.go. This is not a big issue but it looks inconsistent as it stands. -- You

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

Re: [go-nuts] Re: Channels: selecting the last element

2018-12-18 Thread Halderman, John
You are both correct, I somehow missed that they were buffered. Thanks for correcting me. On a side note, is there a reason not to use a wait all? Thanks. On Tue, Dec 18, 2018 at 10:05 AM Robert Engels wrote: > I don’t think that code is correct. You are using buffered channels do it > could

Re: [go-nuts] Calendar Integration Values

2018-10-24 Thread John More
admin account to access calendars in my domain. Thanks John On Tuesday, October 23, 2018 at 8:24:36 PM UTC-4, mingle wrote: > > John, > > Here's what I found. I believe this private URL includes what Google > refers to as a "magic cookie" for authentication. > &g

Re: [go-nuts] Calendar Integration Values

2018-10-23 Thread John More
brary code and can not see where this value is part of any structure. Thank you for your reply. John On Monday, October 22, 2018 at 12:51:02 AM UTC-4, mingle wrote: > > John, > > Can you provide more details on which "calendar library" you are referring > to? > &

[go-nuts] Calendar Integration Values

2018-10-21 Thread John More
I can not find any documentation indicating how to retrieve the Calendar Integration Values below. I can create and manipulate calendars add events etc using the calendar library. Is it possible that these values are simply not available? Thanks any assistance is appreciated. John More [image

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

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

[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

[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
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] 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: bufio.Writer's sticky errors & lost data

2018-09-20 Thread John Floren
On Thursday, September 20, 2018 at 5:50:51 AM UTC-6, Dean Wang wrote: > > >> new connection, new underlying io.Writer, why keep the previous pending > data? > > It's a new connection to the same destination. I want the bytes I wrote to reach that destination, even if we have to negotiate a

[go-nuts] bufio.Writer's sticky errors & lost data

2018-09-19 Thread John Floren
to handle this? Write our own bufio that lets us reset the error and io.Writer while preserving unwritten data? Thanks, John -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails fro

[go-nuts] Re: using go modules replace with old repos

2018-09-14 Thread John Shahid
Ping. John Shahid writes: > Hi all, > > Is there a way to use the go module `replace' directive for packages > that don't have go.mod yet ? I tried doing that and I get the following > error: > >> go: parsing ../pkg/go.mod: open /path/to/pkg/go.mod: no such file or &g

[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

Re: [go-nuts] Re: Is the go 1.11 godoc tool 'module-aware'?

2018-08-31 Thread John Shahid
e same. Great, thanks! > > On Friday, 31 August 2018 02:16:54 UTC+5:30, John Shahid wrote: >> >> >> Agniva De Sarker > writes: >> >> > Also - note that godoc cli mode is going to go away. So "godoc -links=0 >> > -html domain.com/group/proj

[go-nuts] using go modules replace with old repos

2018-08-29 Thread John Shahid
Hi all, Is there a way to use the go module `replace' directive for packages that don't have go.mod yet ? I tried doing that and I get the following error: > go: parsing ../pkg/go.mod: open /path/to/pkg/go.mod: no such file or > directory According to https://github.com/golang/go/issues/24110

[go-nuts]

2018-08-29 Thread John Shahid
-- 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.google.com/d/optout.

Re: [go-nuts] Re: Working with import "google.golang.org/api/admin/directory/v1"

2018-08-26 Thread John More
was increased go knowledge. Thanks Again John On Sun, Aug 26, 2018 at 9:17 AM, wrote: > Hi John > > If you look at the source code, you will notice that the User struct they > have makes use of a custom MarshallJSON method, which accepts > ForceSendFields (as defined insid

[go-nuts] Working with import "google.golang.org/api/admin/directory/v1"

2018-08-25 Thread John More
I am using the "google.golang.org/api/admin/directory/v1" to access a G Suite account and everything seems to work EXCEPT: The import defines a User structure that includes the following element among many others Suspended bool `json:"suspended,omitempty"` When

  1   2   3   >