Re: [go-nuts] Using structs, pointers, and maps

2024-10-09 Thread Ken Lee
hange one's already established opinion. On Wednesday 9 October 2024 at 5:56:03 pm UTC+8 Axel Wagner wrote: On Wed, 9 Oct 2024 at 09:54, Ken Lee wrote: So can I say that, if I'm not writing concurrency code, it's acceptable for me to mix pointer and value receiver? Note that you c

Re: [go-nuts] Is "When in doubt, use a pointer receiver" misleading advice?

2024-10-09 Thread Ken Lee
Hi Oliver is the link already available? Would like to learn more about this On Tuesday 14 November 2023 at 7:23:44 am UTC+8 Oliver Lowe wrote: > > I'd be curious to hear thoughts on this topic. > > There was a fun talk at GopherConAU just a few days ago: "What's > The Point? A Guide To Using Poin

Re: [go-nuts] Using structs, pointers, and maps

2024-10-09 Thread Ken Lee
>>>> Many places and books I've read generally say: If a function needs to >>>>> update a variable, or if an argument is so large that we want to avoid >>>>> copying it, we should pass the pointer. Same for methods (pointer >>>>> receiver

[go-nuts] Re: Using structs, pointers, and maps

2024-10-07 Thread Ken Lee
--- There is a consideration to make, though: historically it has been considered bad form in Go to give a type a mix of value and pointer receivers in methods without a very specific reason for doing so. --- Is this still the case now? As in 2024. On Sunday 13 January 2013 at 7:03:29 am UTC+8

[go-nuts] Chromebook golang environment?

2022-12-11 Thread Ken
Hi, does a golang dev environment exist for Chromebook computers? Sent from my iPhone -- 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...@goo

Re: [go-nuts] Refresher tutorial

2022-12-10 Thread Ken MacDonald
Thanks, Sean & Eli for the recommendations- I’ll check them out. - Ken Sent from my iPad > On Dec 10, 2022, at 1:01 PM, 'Sean Liao' via golang-nuts > wrote: > >  > consider something like https://learnxinyminutes.com/docs/go/ > if you just need a brief r

[go-nuts] Refresher tutorial

2022-12-10 Thread Ken
Hi, when I first learned golang, there was a nice tutorial avaiable. I’m in need of a refresher as I haven’t used it in quite a while, but know there are 100’s of tutorials. Would like to find a recommended one where I could quickly brush up on functionality and syntax. Thanks! Ken Sent from

[go-nuts] Asynq - A simple asynchronous task queue library for Go ~ Contributors welcome!

2020-01-28 Thread Ken Hibino
Asynq is a simple Go library for queueing tasks and processing them in the background with workers. It is backed by Redis and it is designed to have a low barrier to entry. It should be integrated in your web stack easily. Please check it out at github.com/hibiken/asynq It's an early-stage pr

[go-nuts] Re: Need help with godbus.

2019-11-20 Thread Ken Bassford
Hi Folks, Made some progress. I removed the "Foo" routine (it was the last call I made to Export()) and the "Ping" routine I added using the above routine worked. So it would appear that each call to Export() overwrites the last, thus it is not cumilitive as I had expected. Now I'm focused on

[go-nuts] Re: Need help with godbus.

2019-11-19 Thread Ken Bassford
On Tuesday, November 19, 2019 at 11:21:17 AM UTC-5, Ken Bassford wrote: > > Hi Folks, > > I have been trying to implement godbus's Export function to no avail. > Looking at server.go (under the examples folder) is not very helpful as an > inspection of export.go con

[go-nuts] Need help with godbus.

2019-11-19 Thread Ken Bassford
Hi Folks, I have been trying to implement godbus's Export function to no avail. Looking at server.go (under the examples folder) is not very helpful as an inspection of export.go contains what appear to be cheater functions that enable the example to work. Rename "Foo" to "Ping and it fails.

Re: [go-nuts] Re: Are Go floats smarter?

2018-08-31 Thread Ken MacDonald
Financial applications are, indeed, typically written using some sort of integer representation; some that I've worked with require smaller than "penny" level representations, say, for commodity pricing. I have seen accounting done with floating point. It didn't end well. One of the problems is tha

Re: [go-nuts] Re: Go 1.11 Beta 3 is released

2018-08-10 Thread Ken MacDonald
Thanks guys. Inherited this system, and basic "go" worked fine, but had some GOPATH/PATH issues. Now seems good! - Ken On Thu, Aug 9, 2018 at 10:29 PM 'Bryan Mills' via golang-nuts < golang-nuts@googlegroups.com> wrote: > Did you happen to install it using anothe

[go-nuts] Re: Go 1.11 Beta 3 is released

2018-08-09 Thread Ken MacDonald
Hi, Just attempted to install 1.11beta3. Using the following instructions, the "go get" portion appears to have succeeded, but "go1.11beta3 download" fails with "bash: go1.11beta3: command not found". This worked fine on my Mac, but trying on a CentOS system now. Suggestions welcome. > If you

[go-nuts] Implementing JDBC Driver

2018-04-13 Thread Ken Bailey
Does anyone have any experience writing a JDBC driver? 3. Is this a worthwhile endeavor? Is there a reason a full featured Go JDBC driver doesn't exist? 4. Would anyone like to join me on this journey? I appreciate your time. Ken -- You received this message because you are subscribed to the

[go-nuts] Will Go 1.9 have entirely concurrent Garbage Collection?

2017-07-06 Thread ken . kofi . acquah
Within the release notes for Go 1.9 it is stated: "Library functions that used to trigger stop-the-world garbage collection now trigger concurrent garbage collection. Specifically, runtime.GC , debug.SetGCPercent

[go-nuts] Re: Program gets "stuck" after saving a string of certain length

2017-06-27 Thread ken . kofi . acquah
; > GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments > -fmessage-length=0 > -fdebug-prefix-map=/var/folders/rw/y6pvhwns1ll84hmqj713bhts3lrtvf/T/go-build011121998=/tmp/go-build > > -gno-record-gcc-switches -fno-common" > > CXX="clang++" > > CGO_ENABLED="1" > > PKG_CONFIG="pkg-config" > > CGO_CFLAGS="-g -O2" > > CGO_CPPFLAGS="" > > CGO_CXXFLAGS="-g -O2" > > CGO_FFLAGS="-g -O2" > > CGO_LDFLAGS="-g -O2" > > > Thanks, > > Ken > -- 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.

[go-nuts] Program gets "stuck" after saving a string of certain length

2017-06-27 Thread ken . kofi . acquah
OGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/rw/y6pvhwns1ll84hmqj713bhts3lrtvf/T/go-build011121998=/tmp/go-build -gno-record-gcc-switches -fno-common" CXX="clang++" CGO_ENABLED="1"

[go-nuts] Meaning of GC (Dedicated) and GC (Idle) in tracing profile visualizer?

2017-06-26 Thread ken . kofi . acquah
portion of GC that runs concurrently with the program and GC dedicated is the portion of GC that stops the world, but I wanted to be sure of this. Thanks, Ken -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this grou

[go-nuts] What does the #+#/#/#+# formatting of the gctrace out put represent, how can I interpret this to discover the total cputime of each of these three phases, what do the / and + demilters mean?

2017-06-26 Thread ken . kofi . acquah
Thanks, Ken -- 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] http.Server handlers seem to stick around forever

2017-04-18 Thread Ken Simon
On Tuesday, April 18, 2017 at 8:19:06 AM UTC-7, Peter Mogensen wrote: > > > and even if one was > > still open, I'm making a new http.Client object, too! > > Yes. But you don't make a new Transport. > Both your clients use DefaultTransport - which has the connection pool. > > /Peter > > Bingo.

Re: [go-nuts] http.Server handlers seem to stick around forever

2017-04-18 Thread Ken Simon
On Tuesday, April 18, 2017 at 5:51:40 AM UTC-7, Yuwei Ba wrote: > > Disabling the HTTP connection keep-alive may help for this situation by > calling: `srv.SetKeepAlivesEnabled(false)` and get the expected output > **sometimes** > > $ go run a.go > In handler wrapper, f = 0xc4200111a0 > 1 > In ha

Re: [go-nuts] http.Server handlers seem to stick around forever

2017-04-18 Thread Ken Simon
On Monday, April 17, 2017 at 10:30:43 PM UTC-7, Peter Mogensen wrote: > > However... If you call net/http.Server.Close() between the two calls you > get the expected result... which indicates you might be struggling with > the client side connection pool still having a keepalive HTTP connection

[go-nuts] http.Server handlers seem to stick around forever

2017-04-17 Thread Ken Simon
Hello golang-nuts! I have some code that creates a short-lived HTTP server, and I'm trying to write tests for it. I'm hitting a case where HTTP handlers seem to stick around even though I'm creating a brand new `http.ServeMux`, `http.Server`, and `net.Listener` objects. How do I get rid of ol

[go-nuts] Correct naming of Go !

2016-12-27 Thread Ken Nakagama
Hi Everyone Across the ether of the Internet, Go! is referred to and keyworded differently. This may seem pretty insignificant, but the consideration has merits. What is the proper way to keyword Go ? 1) Golang or preferably GoLang ? 2) Go! 3) Go+ 4) Go Language 5) Go#,, nah or #Go 6) Perhaps so

Re: [go-nuts] XML parsing of simple array of tags

2016-10-25 Thread Ken MacDonald
riant items that may change such as timestamps, etc. so that they don't "pollute" the diffs as well. Ken On Tue, Oct 25, 2016 at 9:23 AM, Kiki Sugiaman wrote: > Does either of the two results from the following code give you what you > want? > > https://play.golang.org/p/Dh1N1xP

Re: [go-nuts] do i need to wait all child routine exit

2016-10-25 Thread Ken MacDonald
You should not need to wait for more than a single response if any of the responses will do the job. I've done this querying several distributed DBs for an answer, and just taking the one that comes back fastest. On Tue, Oct 25, 2016 at 2:53 AM, wrote: > in my case, i have serval child routine f

[go-nuts] XML parsing of simple array of tags

2016-10-25 Thread Ken MacDonald
got an array of garbage chars. Suggestions appreciated! Ken -- 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...@googleg