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

2019-03-12 Thread Andrey Tcherepanov
Hello fellow Go devs, I have a question that probably is a bit weird and obvious, but here we go package main var c chan int func niller() { c = nil } func closer() { close(c) } func main() { c = make(chan int, 1) go closer() go niller() // checkpoint-1 if c != nil { // checkpoint-2 close

Re: [go-nuts] Pointer declaration syntax

2019-03-12 Thread Bakul Shah
On Tue, 12 Mar 2019 21:16:21 -0700 Lucio wrote: > > On Monday, 11 March 2019 04:55:26 UTC+2, Rob 'Commander' Pike wrote: > > > > > > Whether a pointer should be declared with & or * or "ptr" or anything else > > is an arbitrary decision made the way it was by the Go designers because, > > as Ian

[go-nuts] Re: Implementing an EventBus in Go

2019-03-12 Thread Kasun Vithanage
I wrote an article about the topic. Feel free to visit it https://medium.com/@kasvith/lets-write-a-simple-event-bus-in-go-79b9480d8997 On Monday, March 11, 2019 at 10:11:25 AM UTC+5:30, Kasun Vithanage wrote: > > Hi all, > > I've experience implementing event buses in Java. > In Java, I used a s

Re: [go-nuts] Pointer declaration syntax

2019-03-12 Thread Lucio
On Monday, 11 March 2019 04:55:26 UTC+2, Rob 'Commander' Pike wrote: > > > Whether a pointer should be declared with & or * or "ptr" or anything else > is an arbitrary decision made the way it was by the Go designers because, > as Ian says, C did it with *. > >> Not unlike "creat" or "umount", "*

Re: [go-nuts] Println output missing in Windows, but not Linux

2019-03-12 Thread Kurtis Rader
I'm a new Go programmer but a grey beard (I started programming in the 1970's). I'm just spit-balling but the behavior you describe suggest to me a locale problem. For example, the Go program is likely emitting UTF-8 but your MS Windows console is likely expecting a different encoding (e.g., code p

[go-nuts] Println output missing in Windows, but not Linux

2019-03-12 Thread rick
I ran this same program: https://www.thepolyglotdeveloper.com/2017/05/network-sockets-with-the-go-programming-language/ : in Linux, and the output was exactly as expected. But on Windows, I was seeing unexpected results. Sometimes just a newline printed. Sometimes the entire buffer printed, but

Re: [go-nuts] [CoC] screenshot images. Lazines or incompetence?

2019-03-12 Thread Tom Mitchell
On Mon, Mar 11, 2019 at 3:17 AM Wojciech S. Czarnecki wrote: > There is an emerging issue with screenshots of logs or code > being posted > ... > I also urge anyone who gives their time to look at the posted picture, > just because they can see, and who want to help a screenshot's OP > t

Re: [go-nuts] [CoC] screenshot images. Lazines or incompetence?

2019-03-12 Thread Wojciech S. Czarnecki
On Tue, 12 Mar 2019 14:49:54 -0700 Ian Lance Taylor wrote: > Thanks, I added a shorter version of that to the intro. I don't know > how many people read that--certainly many people don't notice the note > that the group is moderated--but we'll see if it helps. Thank you. Even in that short form

Re: [go-nuts] Re: [CoC] screenshot images. Lazines or incompetence?

2019-03-12 Thread 'David Chase' via golang-nuts
On Tuesday, March 12, 2019 at 5:45:36 PM UTC-4, Robert Engels wrote: > > I did just encounter a case though where trying to copy and paste a table > wasn’t happening, and there is no way I am going to type it all in or get > the author to change it, so screen shot it is... > I have done the same

Re: [go-nuts] [CoC] screenshot images. Lazines or incompetence?

2019-03-12 Thread Ian Lance Taylor
On Tue, Mar 12, 2019 at 4:09 AM Wojciech S. Czarnecki wrote: > > And I petition for the go-nuts list introduction [1] to be explicit about > screenshot attachments and about using playground for longer > snippets of code. Thanks, I added a shorter version of that to the intro. I don't know how m

Re: [go-nuts] Re: [CoC] screenshot images. Lazines or incompetence?

2019-03-12 Thread Robert Engels
I did just encounter a case though where trying to copy and paste a table wasn’t happening, and there is no way I am going to type it all in or get the author to change it, so screen shot it is... I understand the problem, but calling people lazy just isn’t correct in many cases. > On Mar 12,

Re: [go-nuts] Re: [CoC] screenshot images. Lazines or incompetence?

2019-03-12 Thread minegoboom
As screenshots are often posted by people unfamiliar with the group, it is unlikely that the issue would get resolved as it is more of a culture issue than these posts specifically. I doubt many users looking for help will seek out old emails to determine if they are allowed to post screenshots

Re: [go-nuts] Re: [CoC] screenshot images. Lazines or incompetence?

2019-03-12 Thread Ian Denhardt
(For those who can't see the image: it's a photo of a monitor with the original message in this thread, with the words "too incompetent to learn how to copy/paste text" highlighted). I feel like I'm missing something; I hate having to ask for a joke to be explained, but...? -Ian Quoting Chris Fr

Re: [go-nuts] [CoC] screenshot images. Lazines or incompetence?

2019-03-12 Thread David Riley
On Mar 12, 2019, at 7:44 AM, Wojciech S. Czarnecki wrote: > > On Mon, 11 Mar 2019 23:13:00 -0700 (PDT) > Lucio wrote: > >> It's clearly become a lot easier > > An that is the crux of the problem. > > It is so easy that it easily turns off the brain and suppress > the last faint of thought tha

Re: [go-nuts] Re: Performance comparison of Go, C++, and Java for biological sequencing tool

2019-03-12 Thread 'Isaac Gouy' via golang-nuts
On Monday, March 11, 2019, 3:54:56 PM PDT, Robert Engels wrote: > Yes, so use Java - for this synthetic benchmark. I’m not sure what the point is you are trying to make. > Both Java and Go outperform the C and C++ solutions using off the shelf memory management in the binary tree tests. In wh

Re: [go-nuts] Debugging & breakpoints in Go compiler source code

2019-03-12 Thread 'David Chase' via golang-nuts
Wouldn't mind knowing the version of that Go compiler. What you see there is a bug in generated debugging information (DWARF). You might be better off using Delve; parts of the compiler are multithreaded (with goroutines, not necessarily threads that gdb understands) and that is not best case for

Re: [go-nuts] How to properly set an http.Client limits and monitor connection pool

2019-03-12 Thread Javier
El lunes, 11 de marzo de 2019, 18:43:41 (UTC+1), Robert Engels escribió: > > You need to reuse the client http transport or you will run out of > connections at the os level due to them being in a closed wait state. > > > Hi Yes, I know. In fact, the part of the code where I am defining the tr

Re: [go-nuts] A simple key/value store written in pure Go named NutsDB. It supports transactions and many data structures.

2019-03-12 Thread Robert Engels
There is also github.com/robaho/keydb which uses LSM and transactions and it is very fast :) > On Mar 12, 2019, at 1:10 AM, xujiajun wrote: > > Hi, guys. i share you a key/value store named NutsDB. > > NutsDB is a simple, fast, embeddable and persistent key/value store written > in pure Go. >

[go-nuts] A simple key/value store written in pure Go named NutsDB. It supports transactions and many data structures.

2019-03-12 Thread xujiajun
Hi, guys. i share you a key/value store named NutsDB. NutsDB is a simple, fast, embeddable and persistent key/value store written in pure Go. It supports fully serializable transactions and many data structures such as list、set、sorted set. All operations happen inside a Tx. Tx represents a tra

Re: [go-nuts] [CoC] screenshot images. Lazines or incompetence?

2019-03-12 Thread Wojciech S. Czarnecki
On Mon, 11 Mar 2019 12:56:31 -0500 Robert Engels wrote: > colored formatted text like looks like a screenshot but it is not Neither form "looks" for the blind person. And only one reads. -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to

Re: [go-nuts] [CoC] screenshot images. Lazines or incompetence?

2019-03-12 Thread Wojciech S. Czarnecki
On Mon, 11 Mar 2019 23:13:00 -0700 (PDT) Lucio wrote: > It's clearly become a lot easier An that is the crux of the problem. It is so easy that it easily turns off the brain and suppress the last faint of thought that text turned into the image: * is not searchable * can neither be edited nor

Re: [go-nuts] [CoC] screenshot images. Lazines or incompetence?

2019-03-12 Thread Wojciech S. Czarnecki
On Mon, 11 Mar 2019 11:55:27 -0700 Ian Lance Taylor wrote: > In particular, read the "Gopher values" section. > The approach you are taking in these messages > is not going to encourage people to solve the problem. Yes, indeed. I humbly apologize for the form of raising my concerns. It was a

[go-nuts] Who uses GoDS (Go Data Structures) ?

2019-03-12 Thread Chris FractalBach
So, I wanted to mess around with some algorithms and needed a priority queue. I've written one from scratch before but I wanted to try using the container/heap package. I found it pretty confusing TBH. After trying to recreate my own version of the example ( https://golang.org/pkg/container/heap

Re: [go-nuts] goreadme - automate Github Go projects readme files.

2019-03-12 Thread eyal
It would make sense that gddo will support versioned documentation. On Tue, Mar 12, 2019 at 4:41 AM Sameer Ajmani wrote: > Any of the above :-) > On Mon, Mar 11, 2019 at 1:13 PM Eyal wrote: > >> >> >> On Sunday, March 10, 2019 at 12:10:23 AM UTC+2, Sameer Ajmani wrote: >>> >>> Very nice. As a p