[go-nuts] Snapshot data with Go

2018-09-15 Thread Kasun Vithanage
I'm developing a *redis **like *server with Go. You can see the code repo here . I need to dump my *Mutex Protected map* to a *file*. Simply *snapshot data to a file*. In redis, it take snapshots of data using a fork as described in here

Re: [go-nuts] efficient way to csv.Reader() from a chan of string

2018-09-15 Thread Yannic Bonenberger
You can use a bytes.Buffer to create a single csv.Reader and write the log lines into that buffer. The code will look roughly like this https://play.golang.org/p/gbCPwSsx5gy . However, depending on the implementation of strings.Reader and the level of optimization the Go compiler does, your appro

[go-nuts] efficient way to csv.Reader() from a chan of string

2018-09-15 Thread Sherif Eldeeb
Greetings all, I have a channel of 'string', where each item is a single CSV log line that I want to convert to columns using "encoding/csv" Currently, I am creating a new csv.Reader at each iteration for each item, which is much more work than it needs to be. for i := range feederChan {

Re: [go-nuts] modules and package cyclic dips

2018-09-15 Thread Sameer Ajmani
Thanks. The relationship between semantic versioning and Go packages is described in detail here: https://research.swtch.com/vgo-import On Sat, Sep 15, 2018 at 3:52 PM wrote: > Hi all, > > One additional set of brief comments. > > This was a fairly nuanced and long thread, and I'm pretty sure I d

Re: [go-nuts] modules and package cyclic dips

2018-09-15 Thread thepudds1460
Hi all, One additional set of brief comments. This was a fairly nuanced and long thread, and I'm pretty sure I did not follow all of it, but I think a question related to the conversation here is -- what does 'require foo v1.1.1' really mean? Perhaps one way to think about that usage of the ve

Re: [go-nuts] Contracts and fused multiply add

2018-09-15 Thread robert engels
> On Sep 15, 2018, at 7:31 AM, Wojciech S. Czarnecki wrote: > > On Sat, 15 Sep 2018 06:36:35 -0500 > Robert Engels wrote: > >> Why do you need the for... > > Because 'for type' means 'contract' > Because CGG contracts are for each typeholder > and expressed in terms of already familiar type

Re: [go-nuts] modules and package cyclic dips

2018-09-15 Thread Scott Cotton
Thanks! Very useful. +1 for aliasing "go mod list" to "go list -m" On 15 September 2018 at 18:59, wrote: >> "Maybe having a way for "go mod" to output what is used would be less > confusing?" > > Hi all, > > To see a list of the selected module versions, one way is to use use 'go > lis

Re: [go-nuts] modules and package cyclic dips

2018-09-15 Thread thepudds1460
> "Maybe having a way for "go mod" to output what is used would be less confusing?" Hi all, To see a list of the selected module versions, one way is to use use 'go list -m all'. This shows the actual versions used based on all of the various requirements in a build. Sample output: $

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-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

[go-nuts] Create a tcp proxy cluster

2018-09-15 Thread sebassch
Hello I want to create a tcp proxy that support seamless fail over I will like to know if there is a way to sync net.conn objects between 2 server active standby. I use keepalived to have a flooting ip address but if one machine goes down all the users need to reconnect. Thanks! -- You rec

Re: [go-nuts] Contracts and fused multiply add

2018-09-15 Thread Robert Engels
Why do you need the for... Keywords with dual meaning is never a good idea. Sent from my iPhone > On Sep 15, 2018, at 4:53 AM, Wojciech S. Czarnecki wrote: > > On Wed, 12 Sep 2018 10:54:15 -0700 > jimmy frasche wrote: > >> because that misses cases like >> type Float float64 > > I am work

Re: [go-nuts] modules and package cyclic dips

2018-09-15 Thread Scott Cotton
Thanks for the clarification. Maybe having a way for "go mod" to output what is used would be less confusing? I would have found so at least. Cycles crossing major versions may be more problematic. similarly in the case of coordinating a collection of modules, dependency cycles may lead uni

[go-nuts] liteide x34.2 released

2018-09-15 Thread visualfc
Hi, all. LiteIDE X34.2 released! This version fix and update x34.1 to better support go1.11 modules * LiteIDE Home   * LiteIDE Source code   * Release downloads * *

Re: [go-nuts] Contracts and fused multiply add

2018-09-15 Thread Wojciech S. Czarnecki
On Wed, 12 Sep 2018 10:54:15 -0700 jimmy frasche wrote: > because that misses cases like > type Float float64 I am working on constraint examples for CGG. [https://github.com/ohir/gonerics] (Appendix A) With CGG `for type` contracts now you can use constraint that allows for any custom type o