Re: [go-nuts] Generics and parentheses

2020-07-19 Thread K Davidson
Not that I am for guillemets, but isn't attempting to push the industry towards a richer pallette than ASCII the whole point of building unicode into the core of go? We already include the middot in go assembly, and some core members of the go team love using unicode identifiers in personal code

Re: [go-nuts] political fundraising on golang.org!

2020-06-15 Thread K Davidson
This mailing list is for the Go Programming Language, there are other places on the internet to discuss unrelated topics. Please keep posts limited to things about go. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this gro

[go-nuts] Re: Aggressive Golang Garbage Collection Issues When Using cgo?

2019-05-23 Thread K Davidson
Since this is a mailing list, not sure if my comment could be deleted. If not, please disreguard my reply, it was a case of unchecked presumptions meets foot-in-mouth-disease ;/ Thanks, -K -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To uns

[go-nuts] Re: Aggressive Golang Garbage Collection Issues When Using cgo?

2019-05-23 Thread K Davidson
Hi Steve, I agree with al Jan said, but wanted to clarify one of the comments a bit, in case it's not imediately obvious. All throughout the bit of code I looked at I see things like: err = incrval.SetValStr(tptoken, errstr, &incr) if nil != err { panic(fmt.Sprintf("YDB: Unexpected e

[go-nuts] Re: Persistence of value, or Safely close what you expected

2019-03-13 Thread K Davidson
You may have to copy-paste the playground link as clicking appears to load a previous version of the message that I deleted. (Not sure if this is just a bug on my end) -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this gro

[go-nuts] Re: Persistence of value, or Safely close what you expected

2019-03-13 Thread K Davidson
Hi, Just wanted to put it out there, that one way of handling a situation where you try to close on a chanel which may already be closed is to catch the panic with a recover like so: https://play.golang.org/p/nEeZ6ddXRR_O -K -- You received this messag

[go-nuts] Re: Persistence of value, or Safely close what you expected

2019-03-13 Thread K Davidson
Hi, Just wanted to put it out there, that one way of handling a situation where you try to close on a chanel which may already be closed is to catch the panic with a recover like so: https://play.golang.org/p/8uRq8J2TH2i -K -- You received this message because you are subscribed to the Google

[go-nuts] gotcha: don't take the address of a for-range loop variable

2019-01-08 Thread K Davidson
You could also do: https://play.golang.org/p/zjNVeQNbCq5 -- 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 option

[go-nuts] Re: C++ 11 to Golang convertor

2019-01-07 Thread K Davidson
My original comment was in regaurd to c++11, but seeing as the discussion has drifted towards c, you may want to take a look at https://github.com/xlab/c-for-go, it is based off of its based off of https://github.com/cznic/cc, and has been used to create go bindings for portaudio, libvpx, and a few

[go-nuts] Re: C++ 11 to Golang convertor

2019-01-03 Thread K Davidson
I read somewhere that you can do some of the needed work using swig++, but like others have said, I don't think it would produce perfectly ported idiomatic code out of the box... -kdd -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscr

[go-nuts] Re: A single type to wrap text/template.Template and html/template.Template

2018-12-31 Thread K Davidson
Greetings, One way to accomplish this may be to use embedding to wrap both Templates into a new type: package main import ( txt "text/template" "html/template" ) // CsvTemplate wraps a html/template.Template and add text/template.Template field for CSV output. type CsvTemplate struc

[go-nuts] Re: A single type to wrap text/template.Template and html/template.Template

2018-12-31 Thread K Davidson
Greetings, One way to accomplish this may be to use embedding to wrap both Templates into a new type: package main import ( txt "text/template" "html/template" ) // CsvTemplate wraps a html/template.Template and adds a text/template.Template // field for CSV output. type CsvTemplate

[go-nuts] Re: A single type to wrap text/template.Template and html/template.Template

2018-12-31 Thread K Davidson
One way to accomplish this may be to use embedding to wrap both Templates into a new type: package main import ( txt "text/template" "html/template" ) // CsvTemplate wraps a html/template.Template and adds a text/template.Template // field for CSV output. type CsvTemplate struct {

[go-nuts] Re: Constraints for generics

2018-09-30 Thread K Davidson
Hi, Just a couple of friendly notes / impressions: I couldn't help but notice how many new gramars, or additions would need to be added to the language in order to support a feature aiming to be simple, in a language where one of the top driving goals it to be as simple as possible. Also no bui

[go-nuts] Re: Are C allocated memory completely isolated to Go memory in any cases?

2018-09-29 Thread K Davidson
Not sure if it would be of any help, but maybe you can gleem some insight from the way these packages did things? https://github.com/mattn/go-gtk https://github.com/gotk3/gotk3 -K -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe

[go-nuts] Re: Binary module and security reasons

2018-09-18 Thread K Davidson
Have you seen cgo? (more here and some examples ) On Friday, September 14, 2018 at 7:39:35 AM UTC-7, Vitold S wrote: > > Hello my friends, > > Right now I review go ui module ( https://github.com/andl

Re: [go-nuts] Is it possible to build a module without a hosted repository?

2018-09-15 Thread K Davidson
func main() { fmt.Println("Oi") } > > $ cat > go.mod > module totally/fake/project > > $ go build > > $ ./project > Oi > > > > On 15 Sep 2018, at 03:32, K Davidson > > wrote: > > I appologize if this has been asked before, I tried searc

Re: [go-nuts] Is it possible to build a module without a hosted repository?

2018-09-15 Thread K Davidson
Well, my embarrassingly incorrect assumption came about from a package I was writing recently; I was using the go mod tool to initialize my go.mod rather than writing the file myself, and as an import statement I first tried using the local filepath, which of coarse didn't work. Then I tried th

Re: [go-nuts] Is it possible to build a module without a hosted repository?

2018-09-14 Thread K Davidson
This seems to work, thanks. On Friday, September 14, 2018 at 6:38:15 PM UTC-7, Sam Whited wrote: > > On Fri, Sep 14, 2018, at 20:32, K Davidson wrote: > > Is there a way that I can build my package as a module without having to > > host it on the internet? > > I'v

[go-nuts] Is it possible to build a module without a hosted repository?

2018-09-14 Thread K Davidson
I appologize if this has been asked before, I tried searching but all the posts I could find of a similar nature were asking about dependencies, rather than about the module specifically. Is it possible to have a package as a module without having it hosted somewhere (like Github, or other inte

[go-nuts] Re: Go’s runtime vs virtual machine

2018-09-05 Thread K Davidson
Please give my seemingly redundant post. I got stiffled by the moderation process, and by the time my post was approved, others had said pretty much everything I had. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this grou

[go-nuts] Re: Go’s runtime vs virtual machine

2018-09-05 Thread K Davidson
\0, Pablo, IMHO although the runtime and VM both provide facilities such as garbage collection, scheduling ect they are not alike at all. Actually that is the ONLY way they are alike. VM run compiled bytcode like others stated, but the VM is a whole program on its own, which is run, and handled