Re: [go-nuts] Could the go Tour be clearer on WHY recent make := zeroes

2019-06-21 Thread fgergo
(I forgot in my previous message: the email subject seems to imply that := or make() was changed since 1.0. No it wasn't.) This for later reference: new and make and initialization is very easy to parse in the faq in the spec and in the effective go document: https://golang.org/doc/faq#new_and_mak

Re: [go-nuts] How many times gc stw ?

2019-06-21 Thread Chou Yan
thx 在 2019年6月21日星期五 UTC+8下午12:38:50,Ian Lance Taylor写道: > > On Thu, Jun 20, 2019 at 7:22 PM Chou Yan > wrote: > > > > The describe 'release the physical memory' may not be rigorous. Because > gc remand the span,obj, or big obj to heap or central area, may not release > the physical memory. >

Re: [go-nuts] Could the go Tour be clearer on WHY recent make := zeroes

2019-06-21 Thread Kevin Chadwick
On 6/21/19 10:42 AM, fge...@gmail.com wrote: > (I forgot in my previous message: the email subject seems to imply > that := or make() was changed since 1.0. No it wasn't.) That was simply based on this, perhaps prior to 1.0?: "https://groups.google.com/forum/#!searchin/golang-nuts/make$20new$20ze

Re: [go-nuts] The Seven Finest Go Books (to popularize and 'socialize' Go).

2019-06-21 Thread Bhagvan Kommadi
hi akram, My book is on Data Structures & Algorithms. Please add my book to your list. https://www.amazon.com/Learn-Data-Structures-Algorithms-Golang-ebook/dp/B07KYJYSMC/

Re: [go-nuts] The Seven Finest Go Books (to popularize and 'socialize' Go).

2019-06-21 Thread Akram Ahmad
While I've heard great things about Pike and Kernighan’s *The Practice of Programming*, that is one book I have not got around to picking up; clearly, you think highly of it, so I'm going to check it out, thanks for the pointer! Does it address some of the same areas as, say, *The Pragmatic Pro

[go-nuts] Marshaling Struct Print

2019-06-21 Thread Shishir Jakati
Say I have a struct type MyStruct struct { string `json:",inline"` int `json:"omitempty"` } Is there any way to utilize the JSON tags to omit the empty fields when I call a function like fmt.Sprintf("%#v",s) where s is an instance of my struct? -- You received this message because you are

Re: [go-nuts] Marshaling Struct Print

2019-06-21 Thread Ian Lance Taylor
On Fri, Jun 21, 2019 at 7:06 AM Shishir Jakati wrote: > > Say I have a struct > type MyStruct struct { > string `json:",inline"` > int `json:"omitempty"` > } > > Is there any way to utilize the JSON tags to omit the empty fields when I > call a function like > fmt.Sprintf("%#v",s) > where s i

Re: [go-nuts] The Seven Finest Go Books (to popularize and 'socialize' Go).

2019-06-21 Thread Akram Ahmad
- Great! I'll add your golang-oriented *Data Structures & Algorithms book* to my list of Go books—the list just keeps growing, yay!—to check out and tell my blog-readers (and others!) to check out in turn :) - Thanks, Bhagvan. - I remain a polyglot programmer, and in fact have been *programming

Re: [go-nuts] The Seven Finest Go Books (to popularize and 'socialize' Go).

2019-06-21 Thread Michael Jones
Agree about Lisp (and in same way, Forth and J etc.). About the book I recommended, it is a missionary book; one of the Bell Labs diaspora on the topic of why people like UNIX so much, what's not so obvious about programming (that it is really about people more than machines), and a point of view b

[go-nuts] Concurrent Routines in WASM

2019-06-21 Thread samuel . warfield2
Does the golang WASM compiler support concurrent routines with WASM threads yet? If not is there a place that I can contribute to its development? -- 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] Digital Certificate - PFX Handling

2019-06-21 Thread Daniel Silva Costa
Hi, I created this https://github.com/danielscosta/pfxToPem/blob/master/pfxtopem.go (Issue: https://github.com/golang/go/issues/14015) to handling with pfx format in go. I usage C code and openssl library. If anyone have any suggestions I appreciate. Thanks Daniel S. Costa -- Y

[go-nuts] Concerning the level required to contribute to Go

2019-06-21 Thread Levieux Michel
Hi all, I've been thinking a lot about that lately and can't seem to find an answer on my own. I would be soo glad and fulfilled if I could contribute to the go project. However, I am wondering about whether or not it is my lack of knowledge of the go language that prevents me from taking the

[go-nuts] Re: Concurrent Routines in WASM

2019-06-21 Thread 'Keith Randall' via golang-nuts
No, it doesn't. Do wasm threads exist yet? When the wasm port was first developed, they didn't exist. If the spec is now complete, we would just need a builder than can test threads, and then we would implement threading support in tip (for 1.14, presumably). Feel free to submit patches. It loo

[go-nuts] Does your Windows app rely on os.Rename() or .Remove() ?

2019-06-21 Thread Liam
On Windows (but not elsewhere) this fails with a "sharing violation": path := "rename-after-open" fd, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE, 0600) if err != nil { ... } err = os.Rename(path_a, path_b)// or os.Remove(path) if err != nil { ... } // sharing v

Re: [go-nuts] Marshaling Struct Print

2019-06-21 Thread mlevieux42
Course you could think of something like: func (ms MyStruct) String() string { b, err := json.Marshal(ms) if err != nil { panic(err) } return string(b) } but this is not really performant, since you're calling the JSON parser for real (however, any empty field marked as "

Re: [go-nuts] Concerning the level required to contribute to Go

2019-06-21 Thread Marcin Romaszewicz
So, I'm not a Go contributor, but I've been doing this software-for-a-living thing for about 25 years now, but never in these years have I experience some kind of read/not ready transition. When I was less experienced, I thought I knew a lot more than I did, now that I know an order of magnitude mo

Re: [go-nuts] Concerning the level required to contribute to Go

2019-06-21 Thread Levieux Michel
Hi! Thank you very very much for your feedback on this 'feeling'. I (think I) know four years is not a huge amount of experience. And I hope I'll be able to learn as much as I have learned recently (learning about computer science is so vast and long and everything, but s interesting!) during