[go-nuts] HandleFunc pattern question

2023-02-17 Thread Joe McGuckin
I'm going to want to handle URL's with no trailing suffix (e.g. foo.com/ or just foo.com) as well as URL's with a suffix (foo.com/plugh). I don't want to register a function for every possible URL suffix - I want to have two functions: one for the URL with no trailing suffix and once for any

Re: [go-nuts] $GOPATH/go.mod exists but should not

2021-01-10 Thread 'JOE MCGUCKIN' via golang-nuts
OK, I was doing everything in the ~/go directory. I assumed that 'go get’ would create the appropriate directories under go/src. I have not followed your example yet, but I suspect that’s my problem. Thanks! Joe > On Jan 10, 2021, at 5:24 PM, Rick wrote: > > I'm not entirely following

[go-nuts] Pointers to allocated memory objects?

2020-07-17 Thread joe mcguckin
Do pointers have to point to the beginning of a heap object or can they point to the interior of the object? Thanks, Joe -- 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

[go-nuts] Go, git and github questions

2020-06-27 Thread Joe McGuckin
1). When I use ‘go get’ to download some source code from github, is the src directory a regular ‘git’ directory? 2).i want to download some go code from github and make a bunch of local changes. Just ‘go get’ and start editing? Nothing else I need to do? Thanks -- You received this message

Re: [go-nuts] chan chan question

2020-06-22 Thread joe mcguckin
Thanks! >> -- 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 the web visit

[go-nuts] chan chan question

2020-06-22 Thread joe mcguckin
I've been playing with this example code on the playground: https://play.golang.org/p/4l57Hqw9CLJ In func 'goroutine': select { case errChan := <-requestChan: How does this work? Does a channel send its name? Is 'errChan' some sort of special symbol? -- You received this

Re: [go-nuts] Re: GO on multi-processor systems

2020-06-11 Thread joe mcguckin
Yes, of course they have internet connections, but I don't run virtualization software. It's my understanding that most of these bugs have to do with information leaking from one process or VM to another or with a process trying to escape from it's user process into a higher privileged one.

Re: [go-nuts] Re: GO on multi-processor systems

2020-06-10 Thread joe mcguckin
Actually, I'd like to turn off all the cpu bug fixes (e.g. row hammer). It's my understanding that there is a significant performance penalty and I don't share my machines with anyone else, so I'm not concerned with information leaking between processes. Joe On Wednesday, June 10, 2020 at

[go-nuts] GO on multi-processor systems

2020-06-10 Thread joe mcguckin
I read somewhere that the default # of GO threads is the number of cores of the cpu. What about where there are multiple cpus? My servers have 2, 6 core Xeons. With hyper threading, it looks like 24 cores available to Linux. Will the GO scheduler schedule GO routines on both CPU's? If the

[go-nuts] Can someone please explain http.HandlerFunc() ?

2020-04-03 Thread joe mcguckin
I see some code like: r.NotFoundHandler =http.HandlerFunc(notfound) Where notfound() has the signature of func notfound(w http.ResponseWriter, r *http.Request) What is HandlerFunc() doing? It’s not a function. Is it some sort of type coercion or casting? I can see

[go-nuts] Sync.wait()?

2020-02-10 Thread Joe McGuckin
Various sources say wait() waits until the internal counter reaches zero. Does it cause a real pause (e.g.: control passing to another goroutine?) Looking at the code, it just seems to loop endlessly waiting for the counter to reach zero. Is that somehow optimized away? Sitting in a tight loop

[go-nuts] Question about 'import' statement

2020-02-03 Thread joe mcguckin
Do all the files listed in the 'import' statement get pulled in and compiled, or merely scanned to resolve function references etc. As someone who grew up on 'C', it seems a bit weird to not have an 'include' mechanism and its headers. Does the it matter what order the files appear in the

[go-nuts] Channels question

2019-09-29 Thread Joe McGuckin
If i have multiple goroutines listening on the same channel, then write something to the channel, will all goroutines receive the value, or only the ‘next’ available goroutine (as determined by the scheduler) Thanks, Joe -- You received this message because you are subscribed to the Google

Re: [go-nuts] HTTP:ListenAndServe questions

2019-09-23 Thread joe mcguckin
Thanks! That clears up a couple of nagging questions I had. Joe On Monday, September 23, 2019 at 7:45:16 PM UTC-7, Ben Burwell wrote: > > On Mon Sep 23, 2019 at 5:50 PM joe mcguckin wrote: > > In ListenAndServe, I see that it calls (*Server).Serve(ln), then 'go > c.serve(ctx

[go-nuts] HTTP:ListenAndServe questions

2019-09-23 Thread joe mcguckin
In ListenAndServe, I see that it calls (*Server).Serve(ln), then 'go c.serve(ctx)' I can't find a function named 'serve'. Where is this? Does HTTP manage a pool of coroutines or does it create one for every incoming HTTP request. It's clear where the first request gets handled but where do

[go-nuts] Is there a document that explains the inner workings of net/HTTP?

2019-09-22 Thread Joe McGuckin
I’m looking through this code, trying to understand the flow through the code starting with ListenAndServe(). Besides going through the code, is there a document that provides a concise explanation of what’s going on? Thanks, Joe -- You received this message because you are subscribed to

Re: [go-nuts] Re: How to build gollvm on arm platform

2019-09-18 Thread joe mcguckin
Ian, What's the advantage of an LLVM based compiler. GC seems to be fast and makes OK code. Is the llvm toolchain that much better? joe On Wednesday, September 18, 2019 at 5:08:16 PM UTC-7, Ian Lance Taylor wrote: > > On Wed, Sep 18, 2019 at 5:02 PM joe mcguckin > > wrote: >

[go-nuts] Re: x/net/Listen behaviours

2019-09-18 Thread joe mcguckin
Is listener() a blocking operation? -- 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 the web

[go-nuts] Re: How to build gollvm on arm platform

2019-09-18 Thread joe mcguckin
What's the difference between the standard GO compiler and GOLLVM? I thought there was an llvm based compiler that was abandoned? Thanks, Joe -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving

[go-nuts] Where are the GO compiler sources?

2019-09-16 Thread joe mcguckin
Also, what does the X (e.g. /X/) in the path of various runtime libraries mean? Thanks, Joe -- 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: VS + GO plugin questions

2019-09-16 Thread joe mcguckin
Why wouldn't it have an implementation? Does one have to set a path variable (or similar) to allow VS to find all the source and add-on packages? Joe On Monday, September 16, 2019 at 11:31:14 AM UTC-7, joe mcguckin wrote: > > I installed this on my Mac. For M$, it actually looks prett

[go-nuts] VS + GO plugin questions

2019-09-16 Thread joe mcguckin
I installed this on my Mac. For M$, it actually looks pretty nice. I had to remap the F12 key, is this normal? >From the docs, SHIFT+COMMAND+F12 is supposed to do something special. All I get is a popup that says "Implementation not found" or it brings up a window about a completely

[go-nuts] Is there a preferred REDIS driver or go psckage?

2019-09-09 Thread joe mcguckin
Thanks, Joe -- 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 the web visit

[go-nuts] Empty cpu profile file?

2019-08-20 Thread joe mcguckin
Using Dave Cheney's profile package to figure out the execution path of a library I'm trying to understand. The application starts, (it's a server), I hit ^c after a couple of minutes, and the console says Stopping Profiling Stopping Main() catches the console interrupt:

Re: [go-nuts] net library

2019-08-20 Thread joe mcguckin
https://golang.org/pkg/net/ -- 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 the web visit

[go-nuts] net library

2019-08-19 Thread joe mcguckin
I was perusing the NET library web page today. 1) Are the packages listed in any particular order? 2) What is the hierarchy? e.g., which functions correspond to the low level Unix network calls, then there must be some higher level convenience functions. Is there a list of how the

[go-nuts] functions with arguments vs. function with a receiver?

2019-08-10 Thread joe mcguckin
Is there a recommended usage for either style? Take ListenPacket for example. There a (*ListenConfig).ListenPacket version and a version that takes arguments. What's the difference and what is the desired usage of either? Thanks, Joe -- You received this message because you are subscribed

[go-nuts] Go coaching in palo alto, mountain view

2019-07-28 Thread joe mcguckin
I’m looking for an experienced go developer that I can rent for an hour a week to answer questions, explain thing about the go toolchain, libraries and runtime. Thanks, Joe -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

[go-nuts] go question about goroutines

2019-07-24 Thread joe mcguckin
I want to have some kind of server sitting a port and answering requests (Think HTTP or DNS). Can I tack on a AQMD client so that other software can query the server regarding it's health or various runtime variables like # goroutines that are active, etc? Does the AQMD client exist in it's own

[go-nuts] mutexes, etc

2019-07-17 Thread joe mcguckin
When do you need to use mutexes? Which begs the question: When can multiple coroutines trample on memory or a variable? Doesn't each instance of a go routine get it's own stack (so, it's own local copy of local vars). It would seem that the only entities that it's possible to access from