Re: [go-nuts] liteide x30.1 released

2016-07-05 Thread vfc
The x30.1 has windows close bug, fix and reload download files x30.1-1 source: https://github.com/visualfc/liteide download1: https://sourceforge.net/projects/liteide/files/X30.1-1 download2: http://git.oschina.net/visualfc/liteide/attach_files 2016-07-06 8:20 GMT+08:00 vfc : > Hi, all. > LiteIDE

Re: [go-nuts] How to print a decrypted private RSA key?

2016-07-05 Thread Kiki Sugiaman
Pretty close, you need to encode in base64 (and divide with endlines, add header, etc.) https://play.golang.org/p/zvxfiLwp3h On 05/07/16 11:22, bentonrobe...@gmail.com wrote: Hello. I am trying to write code that takes the encrypted private half of an SSH key plus its password, and output

Re: [go-nuts] Re: Go-worker or goworker?

2016-07-05 Thread Charl Matthee
Hi, On Tue, 5 Jul 2016 at 10:13 pjmul...@gmail.com wrote: 1. How high do you put the concurrency? And what specs does that server > have? > we use the default and one queue. The host is a 16GB/8-core VM. 2. Are there thing you bumped into after a couple of week

Re: [go-nuts] What does -fm mean as a suffix for a runtime function name?

2016-07-05 Thread Gregory Golberg
Not really: https://play.golang.org/p/1-31t3prci ? [image: --] Gregory Golberg [image: http://]about.me/gregorygolberg On Tue, Jul 5, 2016 at 9:19 PM, Matt Harden wrote: > To distinguish it from main.(*T).Bar, which is a different thing (th

Re: [go-nuts] What does -fm mean as a suffix for a runtime function name?

2016-07-05 Thread Matt Harden
To distinguish it from main.(*T).Bar, which is a different thing (the method without receiver already supplied). On Tue, Jul 5, 2016 at 9:04 PM Gregory Golberg wrote: > Yes, it is noted - I specifically made this example like so. But why? > > If I were to parse the Name() string I could still fi

Re: [go-nuts] What does -fm mean as a suffix for a runtime function name?

2016-07-05 Thread Gregory Golberg
Yes, it is noted - I specifically made this example like so. But why? If I were to parse the Name() string I could still figure out that this is a method - because main.(*T).Bar-fm shows that it's on type T. So what's the point of the suffix? On Tue, Jul 5, 2016 at 8:20 PM, Matt Harden wrote:

Re: [go-nuts] encoding/xml Unmarshal problem

2016-07-05 Thread Hoping White
Thanks for the reply. After a careful compare, I found what I did wrong. Value string `xml:,chardata” `=> Value string `xml:”,chardata”`, missing a “ token. > 在 2016年7月6日,上午11:12,Matt Harden 写道: > > It works for me: https://play.golang.org/p/yCI68Zsg1E >

Re: [go-nuts] String Split Question

2016-07-05 Thread Matt Harden
One way to do it would be to use strings.Split to split at every "]", and then drop the leading "[" from each field. Are the fields themselves guaranteed not to contain "]", or is there some escaping mechanism that allows them, in which case things get more complex? You could also just drop the le

Re: [go-nuts] What does -fm mean as a suffix for a runtime function name?

2016-07-05 Thread Matt Harden
I'm not sure what it stands for (function from method?). But note that this is a Method Value https://golang.org/ref/spec#Method_values, so it's distinct from the method itself, which doesn't have a receiver already supplied. https://play.golang.org/p/P2TELvh1Ho On Tue, Jul 5, 2016 at 7:38 PM Gre

[go-nuts] String Split Question

2016-07-05 Thread Freeman Fridie
I have a data file with records in the following format: [field 1][field 2][field 3][field 4]... I need to be able to split the record into fields using [ ] as the delimeter. I assume I need to use regex, but I'm unsure how to proceed. thanks, -- You received this message because you are s

Re: [go-nuts] encoding/xml Unmarshal problem

2016-07-05 Thread Matt Harden
It works for me: https://play.golang.org/p/yCI68Zsg1E On Tue, Jul 5, 2016 at 8:04 PM Hoping White wrote: > > Hi, gophers > > > How do I unmarshal an xml as following: > > > data > > > I have tried with > > *type* Resources *struct* { > XMLName xml.Name `xml:"resources"` > Strings []String

Re: [go-nuts] liteide x30 released

2016-07-05 Thread Fino
DING our QT professional. BR fino -- 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://group

[go-nuts] encoding/xml Unmarshal problem

2016-07-05 Thread Hoping White
Hi, gophers How do I unmarshal an xml as following: data I have tried with type Resources struct { XMLName xml.Name `xml:"resources"` Strings []String `xml:"string"` } type String struct { Name string `xml:"name,attr"` Value string `xml:,chardata"` }

[go-nuts] What does -fm mean as a suffix for a runtime function name?

2016-07-05 Thread Gregory Golberg
Hi all, Consider this example: https://play.golang.org/p/uy6rPFu6Z9 Which prints main.Foo main.(*T).Bar-fm What does -fm mean? -g -- 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

[go-nuts] Re: Importing a main package

2016-07-05 Thread Konstantin Shaposhnikov
One way to solve this is to send a pull request to the author of the tool that extracts functionality that you want to reuse into a package. This will benefit any future users that are in the same situation. There might be reasons that the author of the tool will be against such change though.

[go-nuts] liteide x30.1 released

2016-07-05 Thread vfc
Hi, all. LiteIDE X30.1 released!. add quick open symbol (ctrl+shift+o), add open editor windows, fix gotools vendor error. This version gotools and gocode build on Go1.7 beta2. Quick Open: Ctrl+P Quick Open Ctrl+Alt+P Quick Open Editor ~ Ctrl+Shift+O Quick Open Symbol @ Ctrl+L Qui

[go-nuts] Importing a main package

2016-07-05 Thread Mike
Hi, I am interested in driving a command line written in go from my own go code but I do not want just to wrap the command line and would like to build it into my own binary. Most of the tool entry points are in its main package but I can't obviously import the main package. I can copy just its

Re: [go-nuts] Compiling very old version of Golang...

2016-07-05 Thread Mike Lee
fascinating, thanks rob :) On Wednesday, July 6, 2016 at 1:02:50 AM UTC+10, Rob 'Commander' Pike wrote: > > There was very little code Go code in the early days. This was bootstrap > time. The path was, by hand: run the compiler, run the linker, run the > binary. Makefiles showed up when there w

[go-nuts] Re: Go 1.7 beta1, linux/amd64: godoc command serves tour, no package documentation

2016-07-05 Thread Shawn Milochik
I figured out (just a little too late) that there's a 1.7 beta2 out, and it's fixed there. -- 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..

[go-nuts] Go 1.7 beta1, linux/amd64: godoc command serves tour, no package documentation

2016-07-05 Thread Shawn Milochik
When I run godoc with Go 1.7 beta1, I can't find any way to view the documentation on packages installed on my local system. If I run godoc it automatically launches the tour in my browser, and all links within that page are links to parts of the tour. If I manually change the relative URL from /

Re: [go-nuts] net/smtp Client.hello() returns a single error and drops the ehlo error entirely

2016-07-05 Thread 'Matthew Altman' via golang-nuts
Should I perhaps create a github issue to address this? On Friday, July 1, 2016 at 3:16:24 PM UTC-6, Ian Lance Taylor wrote: > > On Fri, Jul 1, 2016 at 1:17 PM, 'Matthew Altman' via golang-nuts > > wrote: > > https://github.com/golang/go/blob/master/src/net/smtp/smtp.go#L76-L79 > > > > This m

Re: [go-nuts] Vendored trace package causes panic because of implicit handlers

2016-07-05 Thread Chad
Seems to me that not leaking API outside of the package it is being used is a must for a vendored package. -- 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

Re: [go-nuts] Vendored trace package causes panic because of implicit handlers

2016-07-05 Thread Chad
On Tuesday, July 5, 2016 at 8:38:11 PM UTC+2, Peter Bourgon wrote: > > > > Exception to the rule: if a library vendors dependencies that don't > leak into the public API, and don't have potentially crashy func > inits, then it's OK to leave the vendor directory in place. > > This is of cours

Re: [go-nuts] function with goroutine returned will kill its goroutine?

2016-07-05 Thread Christoph Berger
In addition to that, all goroutines exit when the main function exits. In your code, this happens when i == 5. This explains the output that you get. Both goroutines are able to produce five numbers until the main loop finishes and the main function exits. On Monday, July 4, 2016 at 5:13:39 PM

Re: [go-nuts] Vendored trace package causes panic because of implicit handlers

2016-07-05 Thread Sam Whited
On Tue, Jul 5, 2016 at 1:52 PM, Peter Bourgon wrote: > Since you removed the vendor/ directory from jitsi/jap, everything is > working as expected, right? Yes, but the vendor dir was in the application code, not the library (eg. it was at jap/cmd/jap/vendor, not at jap/vendor). The library was do

Re: [go-nuts] Vendored trace package causes panic because of implicit handlers

2016-07-05 Thread Peter Bourgon
Since you removed the vendor/ directory from jitsi/jap, everything is working as expected, right? On Tue, Jul 5, 2016 at 8:46 PM, Sam Whited wrote: > On Tue, Jul 5, 2016 at 1:37 PM, Peter Bourgon wrote: >> As of today, if your binary vendors any other package, you need to >> ensure that package

[go-nuts] How to print a decrypted private RSA key?

2016-07-05 Thread bentonroberts
Hello. I am trying to write code that takes the encrypted private half of an SSH key plus its password, and output the decrypted secret key. I think I am using crypto/x509 and encoding/pem correctly to decrypt the data – if I change the password, the expected error results – but I can't seem to

[go-nuts] Sqlite linking error in windows

2016-07-05 Thread vijaykumar . giri
Hello guys, I am using github.com/xeodou/go-sqlcipher pkg But it is not compiling in windows any one have any idea How do i link to -lcrypto C:\Users\vijay\Desktop>go get github.com/xeodou/go-sqlcipher # github.com/xeodou/go-sqlcipher C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/5.1.0/../.

Re: [go-nuts] Vendored trace package causes panic because of implicit handlers

2016-07-05 Thread Sam Whited
On Tue, Jul 5, 2016 at 1:37 PM, Peter Bourgon wrote: > As of today, if your binary vendors any other package, you need to > ensure that package doesn't have a vendor/ directory anywhere in the > source tree. Library maintainers can be good citizens by ensuring > their libraries don't vendor their

Re: [go-nuts] Vendored trace package causes panic because of implicit handlers

2016-07-05 Thread Peter Bourgon
On Tue, Jul 5, 2016 at 7:24 PM, Sam Whited wrote: > On Tue, Jul 5, 2016 at 12:15 PM, Keith Rarick wrote: >> You don't have to vendor anything from your own repo, but you do have to >> vendor everything from outside your repo. (To be precise, the distinction is >> between inside and outside the di

Re: [go-nuts] Vendored trace package causes panic because of implicit handlers

2016-07-05 Thread Sam Whited
On Tue, Jul 5, 2016 at 12:15 PM, Keith Rarick wrote: > You don't have to vendor anything from your own repo, but you do have to > vendor everything from outside your repo. (To be precise, the distinction is > between inside and outside the directory containing the vendor directory.) In this case

Re: [go-nuts] Vendored trace package causes panic because of implicit handlers

2016-07-05 Thread Keith Rarick
You don't have to vendor anything from your own repo, but you do have to vendor everything from outside your repo. (To be precise, the distinction is between inside and outside the directory containing the vendor directory.) Aside from that, make sure that the dependency in question is being impor

[go-nuts] Oh-my-zh gb plugin

2016-07-05 Thread Henrik Johansson
Hi, For all Gb aficionados there is now a gb (http://getgb.io) plugin. https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/gb/README.md Hope it helps using this awesome tool from the cmd line. /Henrik -- You received this message because you are subscribed to the Google Groups "gol

Re: [go-nuts] Vendored trace package causes panic because of implicit handlers

2016-07-05 Thread Sam Whited
On Tue, Jul 5, 2016 at 10:17 AM, Konstantin Khomoutov wrote: > AFAIK, vendoring explicitly implements an all-or-nothing approach: > you're supposed to resolve transitive dependencies yourself, and vendor > them all. That's my understanding too, but it seems foolish to vendor a version of a librar

Re: [go-nuts] Vendored trace package causes panic because of implicit handlers

2016-07-05 Thread Konstantin Khomoutov
On Tue, 5 Jul 2016 10:05:27 -0500 Sam Whited wrote: > I'm running into a problem with the trace package; I'm trying to build > an application that has a vendored version of it, and one of the > modifications I've made imports a library that also uses the trace > package. > > As I've complained a

[go-nuts] Vendored trace package causes panic because of implicit handlers

2016-07-05 Thread Sam Whited
Hi all, I'm running into a problem with the trace package; I'm trying to build an application that has a vendored version of it, and one of the modifications I've made imports a library that also uses the trace package. As I've complained about on the issue tracker before, the trace package regis

Re: [go-nuts] Compiling very old version of Golang...

2016-07-05 Thread Rob Pike
There was very little code Go code in the early days. This was bootstrap time. The path was, by hand: run the compiler, run the linker, run the binary. Makefiles showed up when there was enough of a library to make one worth writing, and went away as soon as was feasible, when the go tool showed up

[go-nuts] go generate and import cycles

2016-07-05 Thread andrew
i use yacc and nex as part of a package. the generated code lives in another package (so that generated code is not mixed in with source-controlled code). occasionally, a mistake is made in my parse.y so that the generated parse.go causes an import cycle. at this point, i can't simply correct par

Re: [go-nuts] calling file.Write() concurrently

2016-07-05 Thread Jan Mercl
On Tue, Jul 5, 2016 at 11:38 AM Pierre Durand wrote: > It works as expected, but in my real code, I'd prefer to avoid mutex. Sounds like a case for using a writer goroutine and sending it the should-be-atomic log items via a chan string or chan []byte. -- -j -- You received this message b

Re: [go-nuts] calling file.Write() concurrently

2016-07-05 Thread Konstantin Khomoutov
On Tue, 5 Jul 2016 05:46:17 -0700 (PDT) Pierre Durand wrote: [...] > My real question is: is there a problem in the *writeBuffer()* > function ? It is very simple, and it looks that it works. I'd not reinvent the wheel and use bufio.NewWriter() to wrap your file object to a buffered writer. The

Re: [go-nuts] calling file.Write() concurrently

2016-07-05 Thread Dave Cheney
A better solution would be to compose a new Writer wrapping the existing one with a mutex. -- 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..

Re: [go-nuts] calling file.Write() concurrently

2016-07-05 Thread Pierre Durand
@Dave Cheney: I want to avoid a *global* mutex, because my function can write to different files. @Konstantin Khomoutov: You are right, I could use a map of mutexes. As Alex Bligh said, I also need to add a mutex on this map, which is a bit complicated... I'm not using concurrency to write fast

[go-nuts] Re: A proposal for generic in go

2016-07-05 Thread Henry
Doug Cheney is the generic version of Dave Cheney. ;) -- 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,

[go-nuts] Re: A proposal for generic in go

2016-07-05 Thread Chad
Hehe, perhaps. But I am not sure that it makes people much slower if that assertion is even true. The thing being that, what is more important for an application algorithm? The data or the datastructure ? I would tend to think that the data is more important. The choice of datastructure is ofte

Re: [go-nuts] calling file.Write() concurrently

2016-07-05 Thread Alex Bligh
> On 5 Jul 2016, at 10:38, Pierre Durand wrote: > > So, I've written writeMutex(), that uses a mutex. > It works as expected, but in my real code, I'd prefer to avoid mutex. > (in my real code write() can write to different files; the file's name is > given as argument) ... or more idiomatical

Re: [go-nuts] calling file.Write() concurrently

2016-07-05 Thread Alex Bligh
> On 5 Jul 2016, at 10:38, Pierre Durand wrote: > > Hello! > > My code: https://play.golang.org/p/pg-p17UuEW > I'm trying to append lines to a file concurrently. > > My first write() function is buggy, because WriteString() are called by > several goroutines in unexpected order. > > So, I've

Re: [go-nuts] calling file.Write() concurrently

2016-07-05 Thread Konstantin Khomoutov
On Tue, 5 Jul 2016 02:38:28 -0700 (PDT) Pierre Durand wrote: > My code: https://play.golang.org/p/pg-p17UuEW > I'm trying to append lines to a file concurrently. > > My first write() function is buggy, because WriteString() are called > by several goroutines in unexpected order. > > So, I've wr

[go-nuts] calling file.Write() concurrently

2016-07-05 Thread Dave Cheney
Why do you want to avoid a mutex? -- 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://groups

[go-nuts] Re: A proposal for generic in go

2016-07-05 Thread Dave Cheney
Lol, Doug Cheney. -- 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://groups.google.com/d/op

[go-nuts] Re: A proposal for generic in go

2016-07-05 Thread Mandolyte
On Saturday, July 2, 2016 at 9:12:54 AM UTC-4, Chad wrote: > > > > The appeal of generics is probably a false appeal. > > Then, if you accept the trilemma described at http://research.swtch.com/generic, that puts you in favor of "slow programmers"... just kidding. I went back to read all the comm

[go-nuts] calling file.Write() concurrently

2016-07-05 Thread Pierre Durand
Hello! My code: https://play.golang.org/p/pg-p17UuEW I'm trying to append lines to a file concurrently. My first write() function is buggy, because WriteString() are called by several goroutines in unexpected order. So, I've written writeMutex(), that uses a mutex. It works as expected, but in

Re: [go-nuts] Re: Go-worker or goworker?

2016-07-05 Thread pjmuller
Hi Charl, I used go-workers and so long it is also running fine, in a couple of months we'll know if this is stable too :). Maybe 3 follow up questions 1. How high do you put the concurrency? And what specs does that server have? 2. Are there thing you bumped into after a couple of weeks in pr