[go-nuts] [ANN] goey - Declarative, cross-platform GUIs

2018-09-05 Thread Robert Johnstone
This is an initial announcement of goey, a package for declarative, cross-platform GUIs. The range of controls, their supported properties and events, should roughly match what is available in HTML. However, properties and events may be limited to support portability. Additionally, styling

Re: [go-nuts] A thought on contracts

2018-09-05 Thread Sam Vilain
Is that the go team's job, though?  It's about go and automatically inferring duck types, so surely we should really be asking DuckDuckGo.Sam -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving

Re: [go-nuts] A thought on contracts

2018-09-05 Thread Steve Phillips
Interesting idea, but has the Go team expressed interest in creating such a tool? -- 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] Re: Go’s runtime vs virtual machine

2018-09-05 Thread Pablo Rozas Larraondo
This is awesome, thank you all very much for the background information and great examples that you've provided. I think it is quite clear now what the difference is between these two runtimes. Cheers, Pablo On Thursday, September 6, 2018 at 3:16:59 AM UTC+10, Michael Jones wrote: > > These

Re: [go-nuts] Re: Can't print GO2 draft documents with firefox 61.0.1 (64 bits) Ubuntu

2018-09-05 Thread peterGo
Sam, What happenned when you followed the instructions I gave to Christophe? Peter On Wednesday, September 5, 2018 at 6:34:00 PM UTC-4, Sam Whited wrote: > > On Wed, Sep 5, 2018, at 15:04, peterGo wrote: > > Print the draft documents from Firefox Quantum 61.0.1 (64-bit) for > Mozilla > >

Re: [go-nuts] Space-optimization question

2018-09-05 Thread Dan Kortschak
A minor modification to that; if the const declaration is done as shown here https://play.golang.org/p/CkztBS-Wkvm you get the constants rendered near the type rather than at the top of the godoc page. On Thu, 2018-09-06 at 09:58 +1000, Nigel Tao wrote: > You can implement a String method on that

Re: [go-nuts] Space-optimization question

2018-09-05 Thread Nigel Tao
On Thu, Sep 6, 2018 at 12:22 AM Eric Raymond wrote: > Matters in my case because the deserialization of a repository history can > contain hundreds of thousands of constants like "M", "D", "R", and "C" > representing fast-export stream file operation types. I could intern them > explicitly but

Re: [go-nuts] Re: Can't print GO2 draft documents with firefox 61.0.1 (64 bits) Ubuntu

2018-09-05 Thread Sam Whited
On Wed, Sep 5, 2018, at 15:04, peterGo wrote: > Print the draft documents from Firefox Quantum 61.0.1 (64-bit) for Mozilla > Firefox for Ubuntu canonical - 1.0. I'm using Firefox 63.0a1 nightly cut 2018-08-19 and am also getting only one page; I had to download a new browser to print. —Sam

Re: [go-nuts] go module for library developer workflow

2018-09-05 Thread Mirko Friedenhagen
The problem with replace is when you want to integrate this within a CI. Hello, IMO it would be be good, if I could specify a’s version with a branch name like “master” in b’s go.mod and had a way to call something like go mod pkg in a, which would compile a and put it in the pkg folder, maybe

[go-nuts] Re: modules: Using vendored transitive dependencies of primary dependency

2018-09-05 Thread Justin Israel
On Wednesday, September 5, 2018 at 6:31:03 PM UTC+12, Justin Israel wrote: > > I've been having some great results converting some of my internal > projects from glide to go modules, but I am looking at a specific workflow > right now that is confusing me. Hoping to get some clarification... >

Re: [go-nuts] Help

2018-09-05 Thread Kathiresh Kumar
Thank you friends. On Sep 5, 2018 11:31 PM, "Matthias B." wrote: > On Wed, 5 Sep 2018 19:14:43 +0530 > Kathiresh Kumar wrote: > > > How can I connect golang with mongoDB > > > > http://lmgtfy.com/?q=How+can+I+connect+golang+with+mongoDB%3F%3F%3F%3F > > -- > You received this message

[go-nuts] Re: Can't print GO2 draft documents with firefox 61.0.1 (64 bits) Ubuntu

2018-09-05 Thread peterGo
Christophe, Print the draft documents from Firefox Quantum 61.0.1 (64-bit) for Mozilla Firefox for Ubuntu canonical - 1.0. For example, print: Error Handling — Draft Design https://go.googlesource.com/proposal/+/master/design/go2draft-error-handling.md Firefox Menu -> Print -> Check Simplify

Re: [go-nuts] Help

2018-09-05 Thread Matthias B.
On Wed, 5 Sep 2018 19:14:43 +0530 Kathiresh Kumar wrote: > How can I connect golang with mongoDB > http://lmgtfy.com/?q=How+can+I+connect+golang+with+mongoDB%3F%3F%3F%3F -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

Re: [go-nuts] Space-optimization question

2018-09-05 Thread Eric Raymond
On Wednesday, September 5, 2018 at 10:38:16 AM UTC-4, Jan Mercl wrote: > > On Wed, Sep 5, 2018 at 4:23 PM Eric Raymond > wrote: > > > Matters in my case because the deserialization of a repository history > can contain hundreds of thousands of constants like "M", "D", "R", and "C" > >

Re: [go-nuts] Re: Go’s runtime vs virtual machine

2018-09-05 Thread Michael Jones
These are all great! If Pablo gets these points across to students, they will be well-informed. There is an interesting parallel to human languages. When I was a boy my father told me "you don't know a word if you can't define it." Sometimes people are comfortable with words they understand

[go-nuts] Re: Why does this struct escape to the heap?

2018-09-05 Thread pauldice
I wonder if this is to do with method values. According to the spec , when you declare a method value like x.M: The expression x is evaluated and saved during the evaluation of the method > value; the saved copy is then used as the receiver in any

[go-nuts] Access to initialized functions between packages

2018-09-05 Thread blueblank
I have 2 packages, one runs the main program('A' or 'core'), the other is a remote program that can send to the main program('B' or 'remote'). in A: type SendFn func(string, interface{}) error var ( sendSendFn NoSendError = xrr.Xrror("Send is not initialized!") ) func

Re: [go-nuts] Re: Os/Exec problematic quotation marks

2018-09-05 Thread Tyler Compton
Oh, you beat me to it :) Good luck on your project! On Wed, Sep 5, 2018 at 9:35 AM Tyler Compton wrote: > I believe what Volker is suggesting is to create your command in this way: > > cmnd := exec.Command("C:/Program Files/internet explorer/iexplore.exe", > "--nogui", "--start",

Re: [go-nuts] Re: Os/Exec problematic quotation marks

2018-09-05 Thread Tyler Compton
I believe what Volker is suggesting is to create your command in this way: cmnd := exec.Command("C:/Program Files/internet explorer/iexplore.exe", "--nogui", "--start", "AGT_BANCL_CobrosManuales") Have you given this a shot? The exec.Command function expects each space-separated argument of the

[go-nuts] Re: Os/Exec problematic quotation marks

2018-09-05 Thread Daniel Estiven Rico Posada
I founded the problem. When you send all the args as a string in the second parameter of exec.Command, this is left with quotation marks; but if you send each arg as a parameter independently (exec.Command(path, arg1, arg2, arg3) this is left without quotation marks. El miércoles, 5 de

[go-nuts] Re: Os/Exec problematic quotation marks

2018-09-05 Thread Daniel Estiven Rico Posada
Yeah, but i want that when i execute an application from Go exec, be the same that if i executed from cmd directly. But actually, the execution from go exec have quotation marks in the args. is there something possibility? El miércoles, 5 de septiembre de 2018, 3:32:44 (UTC-5), Daniel

[go-nuts] Re: Help

2018-09-05 Thread scott.lhommedieu via golang-nuts
Hi Kathiresh, I'm a Product Manager at MongoDB looking after all the Drivers, including the in-development golang driver. The team is currently releasing alpha builds every two weeks. A beta release is coming by November or earlier and we'll be getting the GA release out as quickly as possible

[go-nuts] Re: Help

2018-09-05 Thread Yamil Bracho
Just use a Mongo database driver, for example https://github.com/mongodb/mongo-go-driver HTH, Yamil El miércoles, 5 de septiembre de 2018, 10:07:08 (UTC-5), Kathiresh Kumar escribió: > > How can I connect golang with mongoDB > -- You received this message because you are subscribed to

[go-nuts] Help

2018-09-05 Thread Kathiresh Kumar
How can I connect golang with mongoDB -- 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

[go-nuts] Re: Performance regression of HTTP requests since Go 1.11

2018-09-05 Thread 'mrauh' via golang-nuts
Thanks for your help! -- 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

[go-nuts] Re: Go’s runtime vs virtual machine

2018-09-05 Thread K Davidson
Please give my seemingly redundant post. I got stiffled by the moderation process, and by the time my post was approved, others had said pretty much everything I had. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this

Re: [go-nuts] Space-optimization question

2018-09-05 Thread Jan Mercl
On Wed, Sep 5, 2018 at 4:23 PM Eric Raymond wrote: > Matters in my case because the deserialization of a repository history can contain hundreds of thousands of constants like "M", "D", "R", and "C" > representing fast-export stream file operation types. I could intern them explicitly but it

Re: [go-nuts] Space-optimization question

2018-09-05 Thread Eric Raymond
On Wednesday, September 5, 2018 at 10:12:51 AM UTC-4, Jan Mercl wrote: > > On Wed, Sep 5, 2018 at 4:00 PM Eric Raymond > wrote: > > > If I have multiple occurrences of a string constant in source code - > say, "M" - can I count on the compiler to create one static instance and > pass

Re: [go-nuts] Space-optimization question

2018-09-05 Thread Jan Mercl
On Wed, Sep 5, 2018 at 4:00 PM Eric Raymond wrote: > If I have multiple occurrences of a string constant in source code - say, "M" - can I count on the compiler to create one static instance and pass references to it everywhere? It's unspecified, so strictly speaking you cannot. (Also,

[go-nuts] Space-optimization question

2018-09-05 Thread Eric Raymond
If I have multiple occurrences of a string constant in source code - say, "M" - can I count on the compiler to create one static instance and pass references to it everywhere? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

Re: [go-nuts] Re: Why does this struct escape to the heap?

2018-09-05 Thread Silviu Capota Mera
Hi Paul, Perhaps my answer was a bit simplistic, and I admit that I answered without looking too much into it. Basically, in your index1, the opts.isDigit passed to IndexFunc is > syntactic sugar for ().isDigit -> then the compiler needs to move opts > on the heap. "*Why? Taking a reference to

Re: [go-nuts] go module for library developer workflow

2018-09-05 Thread Yulrizka
Thank you, that seems to work On Tuesday, September 4, 2018 at 5:31:06 PM UTC+2, Sam Whited wrote: > > On Tue, Sep 4, 2018, at 09:58, Yulrizka wrote: > > What is the recommended workflow to easily develop new functionality for > > lib 'a'? > > Add a replace directive to your go.mod file in 'b'

[go-nuts] Re: Os/Exec problematic quotation marks

2018-09-05 Thread Volker Dobler
Each argument to the command must be its own string in os.Exec. V. On Wednesday, 5 September 2018 10:32:44 UTC+2, Daniel Estiven Rico Posada wrote: > > Hello, > > Actually i'm working in a go application that receive a http request and > start some windows assistants. (RPA's) > > The

[go-nuts] Re: Why does this struct escape to the heap?

2018-09-05 Thread pauldice
FYI, here is the escape analysis output. $ go build -gcflags="-l -m=2" ./escape.go:20:10: capturing by ref: opts (addr=true assign=false width= 4) ./escape.go:9:38: (*options).isDigit opts does not escape ./escape.go:15:34: opts escapes to heap ./escape.go:15:34: from opts.isDigit (call

[go-nuts] Re: Why does this struct escape to the heap?

2018-09-05 Thread pauldice
Hi Silviu, Thanks for your reply. I'm not sure about the points you raise though. Basically, in your index1, the opts.isDigit passed to IndexFunc is > syntactic sugar for ().isDigit -> then the compiler needs to move opts > on the heap. Why? Taking a reference to a function argument

Re: [go-nuts] Re: Generics as builtin typeclasses

2018-09-05 Thread alanfo
Hehe, no problem Axel ;) Just glad to see that there are at least 3 of us on roughly the same page with the 'typeclass' idea. I was impressed that you'd managed to come up with a solution to the Graph example by using an intermediate type, AdjacencyList, to implement both the Nodes() and

Re: [go-nuts] Why does this struct escape to the heap?

2018-09-05 Thread roger peppe
I think the escape analysis is at fault here. The two index functions should have the same characteristics. Both opts.isDigit and the explicit closure capture the pointer to opts, and I don't see why the compiler shouldn't be able to detect that the former doesn't escape just as it does the

Re: [go-nuts] A thought on contracts

2018-09-05 Thread Tristan Colgate
One thing that has been occurring to me on this is that it is probably reasonably practical to have a tool infer and update the contracts. The tool could limit itself to a restricted set of statements, without the spec needing to actually limit them directly. On Wed, 5 Sep 2018 at 09:17 thwd

[go-nuts] Re: Go’s runtime vs virtual machine

2018-09-05 Thread K Davidson
\0, Pablo, IMHO although the runtime and VM both provide facilities such as garbage collection, scheduling ect they are not alike at all. Actually that is the ONLY way they are alike. VM run compiled bytcode like others stated, but the VM is a whole program on its own, which is run, and

[go-nuts] Os/Exec problematic quotation marks

2018-09-05 Thread danielrico . posada
Hello, Actually i'm working in a go application that receive a http request and start some windows assistants. (RPA's) The assistants are executed from windows cmd: > "C:/path/file.exe" --args When i start the assistant from cmd manually, in the task Manager i see the arguments without

[go-nuts] Re: Performance regression of HTTP requests since Go 1.11

2018-09-05 Thread Dave Cheney
This looks like an issue related to dns resolution in your environment with go 1.11. I suggest building a reproducer using the net,Lookup* functions as the net/http package is not the problem. Once you have a reproduction case, please log an issue golang.org/issue/new Thanks. -- You

Re: [go-nuts] A thought on contracts

2018-09-05 Thread thwd
If you can't use operations not explicitly stated in a contract: the more reason to copy-paste a function body into a contract. What I mean by implicit constraints is what the draft calls "implied constraints". -- You received this message because you are subscribed to the Google Groups

[go-nuts] Re: Performance regression of HTTP requests since Go 1.11

2018-09-05 Thread michael.rauh77 via golang-nuts
Please have a look at https://pastebin.com/hisAY7Ey The DNS Lookup with Go 1.10.4 takes only about 27 ms. The other values are nearly identical. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving

[go-nuts] Can't print GO2 draft documents with firefox 61.0.1 (64 bits) Ubuntu

2018-09-05 Thread Christophe Meessen
Hello, when I try to print the draft documents, only the first page is printed. It's not related with the printer because I get the same result when I try to print in a document (pdf). Is it possible to provide the documents also in pdf format ? -- You received this message because you are

[go-nuts] Performance regression of HTTP requests since Go 1.11

2018-09-05 Thread Dave Cheney
Can you post the output from httpstat? -- 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

[go-nuts] Performance regression of HTTP requests since Go 1.11

2018-09-05 Thread michael.rauh77 via golang-nuts
I noticed a huge performance issue with Go 1.11. A simple GET request to e.g. amazon.com now takes about 10 seconds. With Go 1.10.4, it only takes about 200 ms. Other domains like google.com are not affected, see: https://play.golang.org/p/hEECNquppHQ The same with

[go-nuts] Re: Godoc command in the future http server only?

2018-09-05 Thread Agniva De Sarker
> Any way to keep that feature when godoc is going http only in future releases? Yes, that will be done. https://github.com/golang/go/issues/25595 https://github.com/golang/go/issues/26715 On Tuesday, 4 September 2018 22:03:06 UTC+5:30, Jens-Uwe Mager wrote: > > I am using the godoc command

[go-nuts] modules: Using vendored transitive dependencies of primary dependency

2018-09-05 Thread Justin Israel
I've been having some great results converting some of my internal projects from glide to go modules, but I am looking at a specific workflow right now that is confusing me. Hoping to get some clarification... Project 'foo' has its dependencies vendored via "go mod vendor". This works great when

Re: [go-nuts] Re: Go’s runtime vs virtual machine

2018-09-05 Thread Christopher Nielsen
Michael, I agree that this is probably more useful in the long-term. Thank you for adding the detail. Cheers, Chris On Tue, Sep 4, 2018, 21:08 Michael Jones wrote: > I might tell students step by step: > > machine code is understood and executed by a machine. > -> the intel instruction to

Re: [go-nuts] Link: Getting specific about generics

2018-09-05 Thread roger peppe
On Tue, 4 Sep 2018, 5:52 pm xingtao zhao, wrote: My five cents: 1) the methods of the type template are defined by interface style 2) operators are retrieved implicitly from function body 3) function-calls inside are also retrieved implicitly from the function body For graph example, we may