Re: [go-nuts] dep: Roadmap for merging into the toolchain

2017-03-13 Thread Albert Tedja
I was using godeps before and now govendor, and never felt 100% happy with either one. I have some feedback of how I think the package management tool should work from the developer perspective, and here some features that I think is crucial. 1. Standardize the package file. With govendor, t

Re: [go-nuts] RSQL, a lighweight clone of Microsoft SQL Server written in Go

2017-03-13 Thread Konstantin Khomoutov
On Mon, 13 Mar 2017 13:13:39 -0700 (PDT) nicolas riesch wrote: > I have developed RSQL, a *lighweight clone of Microsoft SQL Server*, > which runs on Linux and can execute T-SQL scripts. [...] Do I understand correctly that RSQL does not speak (any version of) MS-TDS over the wire, and the compa

Re: [go-nuts] Re: Gracefully Shutdown File Server

2017-03-13 Thread amkguo
Maybe this is a bug or need clear documentation about this. I've filed a bug report here: https://github.com/golang/go/issues/19541 Andrew -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails

Re: [go-nuts] dep: Roadmap for merging into the toolchain

2017-03-13 Thread Sam Boyer
Hi Russ - thanks, this is great. I think all of this will be much easier with these discussions happening in the open. On Monday, March 13, 2017 at 5:09:19 PM UTC-4, Russ Cox wrote: > > On Tue, Mar 7, 2017 at 6:47 AM, Sam Boyer > wrote: > >> Hi folks, >> >> Since we opened up the dep project

[go-nuts] Re: Does sync.Cond call Lock() twice on the underlying Locker?

2017-03-13 Thread Albert Tedja
Ugh. It makes sense now. cond.L.Lock() gets called from the first goroutine, then immediately followed by another Lock() from the second. Therefore, in order to properly implement Lock(), it actually has to be blocking. On Monday, March 13, 2017 at 4:35:04 PM UTC-7, dja...@gmail.com wrote: > >

Re: [go-nuts] cross compile windows from linux failed with -H=windowsgui

2017-03-13 Thread brainman
I think we should just get rid of Hwindowsgui. I am pretty sure it is only different from Hwindows in one place in cmd/link. I will try and implement this when I have time. Alex -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe fr

[go-nuts] Re: Does sync.Cond call Lock() twice on the underlying Locker?

2017-03-13 Thread djadala
On Tuesday, March 14, 2017 at 12:10:31 AM UTC+2, Albert Tedja wrote: > > I am writing a custom Locker which does a check if Lock() is being called > more than once and throws a panic if it does. > I tested it to see if I can use it with sync.Cond, and for the most part, > it was running as inte

[go-nuts] Re: Does sync.Cond call Lock() twice on the underlying Locker?

2017-03-13 Thread Albert Tedja
$ go version go version go1.8 linux/amd64 -- 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 options, visit https:

[go-nuts] Does sync.Cond call Lock() twice on the underlying Locker?

2017-03-13 Thread Albert Tedja
I am writing a custom Locker which does a check if Lock() is being called more than once and throws a panic if it does. I tested it to see if I can use it with sync.Cond, and for the most part, it was running as intended, except once in a while the panic check triggered. Here's the dumbed down v

Re: [go-nuts] RSQL, a lighweight clone of Microsoft SQL Server written in Go

2017-03-13 Thread Jan Mercl
On Mon, Mar 13, 2017 at 10:10 PM 'simon place' via golang-nuts < golang-nuts@googlegroups.com> wrote: > i see Apache 2 licence file in the root.(github) That repository seems to contain only "Go driver for connecting to RSQL database server". I followed OP's link chain - http://rsql.ch/ - [Sour

Re: [go-nuts] RSQL, a lighweight clone of Microsoft SQL Server written in Go

2017-03-13 Thread mhhcbon
https://github.com/rin01/rsql/blob/master/LICENSE did you mean the license is not packed into the dist archives ? in my concern i wonder where is the cli source, i can t find it. Also it is said to be 140k LOC, but i can t see them all in the repo, i must miss something. Are they the C part ment

Re: [go-nuts] Re: What happens when appending to a slice exceeds the backing capacity?

2017-03-13 Thread Dave Cheney
A few clarifications, b does not point to a. a and b are variables of type []int. The value of each slice's ptr fields point to a backing array of some capacity. If you append to a, this does not change th length or cap fields of b. If you do this enough times that ptr field of a will be updat

Re: [go-nuts] RSQL, a lighweight clone of Microsoft SQL Server written in Go

2017-03-13 Thread 'simon place' via golang-nuts
i see Apache 2 licence file in the root.(github) -- 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 options, visit

Re: [go-nuts] dep: Roadmap for merging into the toolchain

2017-03-13 Thread Russ Cox
On Tue, Mar 7, 2017 at 6:47 AM, Sam Boyer wrote: > Hi folks, > > Since we opened up the dep project in > late January, there's been flurry of contributions, which has been great. > However, the plans and end goal of dep haven't been entirely clear to > everyone. >

Re: [go-nuts] RSQL, a lighweight clone of Microsoft SQL Server written in Go

2017-03-13 Thread John McKown
On Mon, Mar 13, 2017 at 3:36 PM, Jan Mercl <0xj...@gmail.com> wrote: > > On Mon, Mar 13, 2017 at 9:13 PM nicolas riesch > wrote: > > > But it would help me to have your first impression or opinion on this > project. > > Sounds very very interesting, but... Here are the first impressions: > > - I

Re: [go-nuts] RSQL, a lighweight clone of Microsoft SQL Server written in Go

2017-03-13 Thread Jan Mercl
On Mon, Mar 13, 2017 at 9:13 PM nicolas riesch wrote: > But it would help me to have your first impression or opinion on this project. Sounds very very interesting, but... Here are the first impressions: - I can see no LICENSE or similar file in the root directory. I consider it unsafe to look

[go-nuts] RSQL, a lighweight clone of Microsoft SQL Server written in Go

2017-03-13 Thread nicolas riesch
I have developed RSQL, a *lighweight clone of Microsoft SQL Server*, which runs on Linux and can execute T-SQL scripts. It has been successfully tested with millions of records. The source code is *written in Go*, and contains 140,000 lines. It would help me very much if some of you could downl

[go-nuts] Re: Add Equals to sort.Interface?

2017-03-13 Thread pauledwardbuis
See https://github.com/zephyrtronium/sort/blob/master/2pqs.go for a dual pivot quicksort implementation that just uses Less without duplicate calls to Less to simulate Equals! On Thursday, December 3, 2009 at 8:05:04 PM UTC-5, baldmountain wrote: > > I was having a go at porting the dual pivot q

Re: [go-nuts] cross compile windows from linux failed with -H=windowsgui

2017-03-13 Thread Ian Lance Taylor
On Mon, Mar 13, 2017 at 8:05 AM, wrote: > I use Kubuntu 16.10, when compile a project over to windows, I get this > error: > > crosscall2: adddynsym: unsupported binary format > _cgo_panic: adddynsym: unsupported binary format > _cgo_topofstack: adddynsym: unsupported binary format > adddynlib: u

Re: [go-nuts] Re: What happens when appending to a slice exceeds the backing capacity?

2017-03-13 Thread xiiophen
On Monday, 13 March 2017 07:20:57 UTC, Jan Mercl wrote: > On Mon, Mar 13, 2017 at 8:05 AM st ov > > wrote: > > > I know it can be accessed the question relates to this > > > http://stackoverflow.com/questions/36706843/how-to-get-the-underlying-array-of-a-slice-in-go > > Let me ask what do

Re: [go-nuts] Re: Simple design question: method or function?

2017-03-13 Thread Peter Herth
One important difference is polymorphism/namespacing. If you have the types X,Y,Z, each of them could implement a Quack() method, while you would have to write a QuakX, QuakY, and QuakZ function, if you wanted to wanted to have the three different implementations. So the method approach looks and r

[go-nuts] GO Developer Job Opportunity - CINCINNATI

2017-03-13 Thread Abby Recker
Hi everyone! One of my clients here in Cincinnati is looking for 3 GO Developers - high pay, great benefits, cool team. This position is a year long contract, which will then be converted to permanent. Please call/email Francesca or Andrew at my office for more details if you are interested at

[go-nuts] cross compile windows from linux failed with -H=windowsgui

2017-03-13 Thread xrfang
I use Kubuntu 16.10, when compile a project over to windows, I get this error: crosscall2: adddynsym: unsupported binary format _cgo_panic: adddynsym: unsupported binary format _cgo_topofstack: adddynsym: unsupported binary format adddynlib: unsupported binary format adddynlib: unsupported bi

[go-nuts] Re: thread safety of map when each goroutine access a different key

2017-03-13 Thread Marvin Stenger
Why do you even use a shared map, if you only use distinct keys per goroutine. There probably is a better pattern for your use case. Am Montag, 13. März 2017 07:39:59 UTC+1 schrieb Albert Tedja: > > Hello, > > I know map itself isn't threadsafe, but I am just wondering how threadsafe > it is if

[go-nuts] Re: How to pass value in nested template if possible?

2017-03-13 Thread mhhcbon
template func takes an extra argument to send data, {{ template "inner" .}}{{end}} I can t find a link to doc for that matter :s nothing here https://golang.org/pkg/text/template/#hdr-Nested_template_definitions or here https://golang.org/pkg/text/template/#hdr-Functions The only related ex

[go-nuts] How to pass value in nested template if possible?

2017-03-13 Thread Ilya Kostarev
How to pass value in nested template if possible? Template package has terse documentation and not much examples. In brief I want to if err := template.Must(template.New("").Parse(`{{ define "inner" }}{{ . }}{{end}}{{ define "outer" }}{{ template "inner"}}{{end}}`)).ExecuteTemplate(os.Stdout

[go-nuts] Re: thread safety of map when each goroutine access a different key

2017-03-13 Thread Haddock
Forgot to mention that ConcurrentHashMap has 256 segments (if I remember right). So you can have 256 map operations going on concurrently. Am Montag, 13. März 2017 11:58:15 UTC+1 schrieb Haddock: > > You can download Java (JDK5 or later) and have a look at class > ConcurrentHashMap. This will gi

[go-nuts] Re: thread safety of map when each goroutine access a different key

2017-03-13 Thread Haddock
You can download Java (JDK5 or later) and have a look at class ConcurrentHashMap. This will give you a blueprint about how this can be implemented using segments. After segment lookup for a given hash code only the segment needs to be locked, but not any more the entire map. Note, that you stil

Re: [go-nuts] thread safety of map when each goroutine access a different key

2017-03-13 Thread Albert Tedja
Great. Thanks! Looks like it's just better if I return a struct if these goroutines are operating independently anyway. On Monday, March 13, 2017 at 12:20:42 AM UTC-7, Konstantin Khomoutov wrote: > > On Sun, 12 Mar 2017 23:39:59 -0700 (PDT) > Albert Tedja > wrote: > > > I know map itself isn't

Re: [go-nuts] Re: What happens when appending to a slice exceeds the backing capacity?

2017-03-13 Thread st ov
just a thought experiment :) On Monday, March 13, 2017 at 12:20:57 AM UTC-7, Jan Mercl wrote: > > On Mon, Mar 13, 2017 at 8:05 AM st ov > > wrote: > > > I know it can be accessed the question relates to this > > > http://stackoverflow.com/questions/36706843/how-to-get-the-underlying-array-of-a-

Re: [go-nuts] Re: What happens when appending to a slice exceeds the backing capacity?

2017-03-13 Thread Konstantin Khomoutov
On Sun, 12 Mar 2017 17:36:53 -0700 (PDT) st ov wrote: > > > What happens when appending to a slice exceeds the backing > > > capacity? > > > > If the capacity of s is not large enough to fit the additional > > values, append allocates a new, sufficiently large underlying array > > that fits both

Re: [go-nuts] Re: What happens when appending to a slice exceeds the backing capacity?

2017-03-13 Thread Jan Mercl
On Mon, Mar 13, 2017 at 8:05 AM st ov wrote: > I know it can be accessed the question relates to this > http://stackoverflow.com/questions/36706843/how-to-get-the-underlying-array-of-a-slice-in-go Let me ask what do you need the backing array for which cannot be done using the slice value? Using

Re: [go-nuts] thread safety of map when each goroutine access a different key

2017-03-13 Thread Konstantin Khomoutov
On Sun, 12 Mar 2017 23:39:59 -0700 (PDT) Albert Tedja wrote: > I know map itself isn't threadsafe, but I am just wondering how > threadsafe it is if you can be absolutely sure that each goroutine > accesses a different key in the map. > Say, goroutine 1 accesses mymap["1"] > and goroutine 2 acces

Re: [go-nuts] Re: What happens when appending to a slice exceeds the backing capacity?

2017-03-13 Thread st ov
I know it can be accessed the question relates to this http://stackoverflow.com/questions/36706843/how-to-get-the-underlying-array-of-a-slice-in-go On Sunday, March 12, 2017 at 10:01:11 PM UTC-7, Jan Mercl wrote: > > What is a reference to the array? To access the array use the slice itself > a