Re: [go-nuts] New fully featured bash completion for go - written in go

2017-05-13 Thread Eyal Posener
Frank, sweet! Notice that you can build custom completions, such as completing agent names in consul exec -node and service names after -service and so on. Also, you may suggest to add this code to the main consul repo. On Sunday, May 14, 2017 at 3:58:37 AM UTC+3, Frank Schröder wrote: > >

Re: [go-nuts] [HELP] How do I read SMART data from disk?

2017-05-13 Thread daniel . swarbrick
I realise this is a very old thread, but I am in the early stages of writing a pure Go library for reading SMART attributes from HDDs / SSDs. So far it works for simple SCSI block devices (i.e., those that have a sd* device name) via SCSI pass-through, and I am in the process of adding support

[go-nuts] When appending to arrays, gmp.Int values change for large number arrays

2017-05-13 Thread dantesepicsneeze
We're using gmp (library found at https://github.com/ncw/gmp) to run on large inputs, and we have arrays with thousands of elements at a time in our code. When we write these arrays to files, we find that the values of some of the elements have changed. We tested our by code by reading in

Re: [go-nuts] New fully featured bash completion for go - written in go

2017-05-13 Thread Eyal Posener
Thanks! On Saturday, May 13, 2017 at 10:03:25 PM UTC+3, Jonathan Yu wrote: > > Nifty! Do the bash completion scripts need to be dynamically regenerated? > I guess so for some of the features like completing on package names. > Not sure I understand your question, but the bash completion script

Re: [go-nuts] New fully featured bash completion for go - written in go

2017-05-13 Thread Jonathan Yu
Nifty! Do the bash completion scripts need to be dynamically regenerated? I guess so for some of the features like completing on package names. It seems useful to have some Go completions (e.g. go in == go install) available as part of distro packages. On Sat, May 13, 2017 at 1:29 AM, Eyal

Re: [go-nuts] How to get size of http request/stream size transferred over wire?

2017-05-13 Thread Jonathan Yu
Have you considered an external tool, like Wireshark or tcpdump? (The latter can capture pcap files for processing with the former) On Sat, May 13, 2017 at 12:04 AM, wrote: > I'm trying to make a comparison between http1.x and http2's long-polling. > Since headers

Re: [go-nuts] Are there any implicit type conversions in Go?

2017-05-13 Thread Jan Mercl
On Sat, May 13, 2017 at 8:19 PM st ov wrote: > Go appears to be very strict when using types. Even aliases need to be explicitly cast. > > Are there any contexts where types are implicitly cast? Or must all type conversions be specified? cast != conversion Otherwise for

[go-nuts] Are there any implicit type conversions in Go?

2017-05-13 Thread st ov
Go appears to be very strict when using types. Even aliases need to be explicitly cast. Are there any contexts where types are implicitly cast? Or must all type conversions be specified? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

[go-nuts] How to get size of http request/stream size transferred over wire?

2017-05-13 Thread mujtaba . altameemi
I'm trying to make a comparison between http1.x and http2's long-polling. Since headers are only sent once in http2, I'm trying to figure out the difference in the size of the data transferred over the wire. Is there a way to do that? Thanks -- You received this message because you are

Re: [go-nuts] would it be good a go runtime support both GC (garbage collection) and ARC (automatic reference counting)?

2017-05-13 Thread Jesper Louis Andersen
On Fri, May 12, 2017 at 4:55 PM T L wrote: > > The 100µs is STW duration. I mean the fps may decrease some during the > period of GC running. > This is true. But if a refcounter needs to use a bit of CPU power in the background to eventually collect data then it has the

Re: [go-nuts] LinkedList implementation

2017-05-13 Thread Keith Brown
forgot about that. thanks, I will study this. thinking of skipping linked list and going ahead to graphs and trees On Sat, May 13, 2017 at 8:52 AM, andrey mirtchovski wrote: > Perhaps looking at the history of the implementation will shed some light: > >

Re: [go-nuts] LinkedList implementation

2017-05-13 Thread andrey mirtchovski
Perhaps looking at the history of the implementation will shed some light: https://github.com/golang/go/commit/01389b966ed81fad6e5fac3e98fe46e162645659 On Sat, May 13, 2017 at 6:28 AM, Keith Brown wrote: > I am learning basic data structures and I chose golang since it

Re: [go-nuts] Re: adding context.Context to new code

2017-05-13 Thread 温博格
Hi. I was one of the people who failed in an attempt to auto-insert contexts in all of google3. I no longer remember all the obstacles I failed to overcome, but would encourage others to take on the project. One issue was libraries that were used both in paths from http requests (so they needed

Re: [go-nuts] would it be good a go runtime support both GC (garbage collection) and ARC (automatic reference counting)?

2017-05-13 Thread Dave Cheney
Maybe that tells us something about the prescience of the design decisions made by Go's authors. -- 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

Re: [go-nuts] would it be good a go runtime support both GC (garbage collection) and ARC (automatic reference counting)?

2017-05-13 Thread T L
On Saturday, May 13, 2017 at 3:42:36 PM UTC+8, Sokolov Yura wrote: > > 1. Go's GC is quite predictable. > 2. Go's runtime has no deallocation without GC for simplicity. You want to > return complexity to runtime. > 3. Why not use other language? Go is quite opinionated by its creators. >

[go-nuts] New fully featured bash completion for go - written in go

2017-05-13 Thread Eyal Posener
Simple to install (Assuming GOPATH and PATH are correct): go install github.com/posener/complete/gocomplete gocomplete -install Features: - Complete go command, sub commands and flags. - Complete package names, .go files and ellipsis when necessary. - Complete test names after -run

Re: [go-nuts] Re: adding context.Context to new code

2017-05-13 Thread mhhcbon
A reference i found about "reactive programming" https://github.com/dsyer/reactive-notes/blob/master/intro.adoc Hope this introduced the concept correctly, thanks for pointing that. Following are only some thoughts, Two things surprising here, 1/ a programmer prefers not to solve a problem 2/

Re: [go-nuts] would it be good a go runtime support both GC (garbage collection) and ARC (automatic reference counting)?

2017-05-13 Thread Sokolov Yura
1. Go's GC is quite predictable. 2. Go's runtime has no deallocation without GC for simplicity. You want to return complexity to runtime. 3. Why not use other language? Go is quite opinionated by its creators. Either you share that opinion, or use other language. For example, D language can use