Re: [go-nuts] Go 1.8 released. What's new?

2017-02-20 Thread Konstantin Khomoutov
On Mon, 20 Feb 2017 22:32:06 -0800 (PST) pltvs wrote: > What's new in Go 1.8 We gather what's new in the new releases via the officially published release notes. For Go 1.8 that's [1]. 1. https://golang.org/doc/go1.8 -- You received this message b

Re: [go-nuts] How to Build and Install Go 1.7.4 in OpenBSD 5.9

2017-02-20 Thread Konstantin Khomoutov
On Tue, 21 Feb 2017 11:33:47 +0530 Srikanth Chandika wrote: > openbsd/ports(https://github.com/openbsd/ports/tree/master/lang/go) > is a repository for openbsd linux. A nitpick: OpenBSD has nothing to do with Linux. Linux is an operating system kernel, and OpenBSD is an operating system featurin

Re: [go-nuts] How to Build and Install Go 1.7.4 in OpenBSD 5.9

2017-02-20 Thread Dave Cheney
It looks like one test in the os/exec package failed during the tests which are run during ./all.bash --- FAIL: TestStdinCloseRace (0.04s) exec_test.go:267: Kill: os: process already finished FAIL FAILos/exec 0.371s At this point Go is fully built, so you may wish to ignore this erro

Re: [go-nuts] How to Build and Install Go 1.7.4 in OpenBSD 5.9

2017-02-20 Thread Srikanth Chandika
I tried installing go1.8 from source(https://golang.org/doc/install/source) but I am getting error saying that "2017/02/21 17:05:18 Failed: exit status 1" Attached a file(output of ./all.bash) On Tuesday, February 21, 2017 at 1:13:53 AM UTC+5:30, Ian Lance Taylor wrote: > > On Mon, Feb 20, 20

[go-nuts] Go 1.8 released. What's new?

2017-02-20 Thread pltvs
What's new in Go 1.8 -- 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 mo

Re: [go-nuts] is this race condition normal?

2017-02-20 Thread Michael Jones
no. not only is there no guarantee, there is in fact a promise that you are mistaken to count on any order between the two. also, in an extreme case where func1 and func2 did not produce output (like a channel) consumed by someone who waits for them...in which case neither of them may run at all!

Re: [go-nuts] How to Build and Install Go 1.7.4 in OpenBSD 5.9

2017-02-20 Thread Srikanth Chandika
openbsd/ports(https://github.com/openbsd/ports/tree/master/lang/go) is a repository for openbsd linux. Now, I am trying as per the instructions in https://golang.org/doc/ install/source I am trying to upgrade go version from 1.5.3 to 1.7+ version because I need to build a filebeat from source cod

Re: [go-nuts] is this race condition normal?

2017-02-20 Thread Marwan abdel moneim
even if i wrote > go func1 go func2 is there any guarantee that func1 will run first? even just the first instruction? On Sunday, February 19, 2017 at 11:25:34 PM UTC+2, Jesper Louis Andersen wrote: > > On Sun, Feb 19, 2017 at 9:41 AM Marwan abdel moneim > wrote: > >> i wanted to do it w

Re: [go-nuts] How to Build and Install Go 1.7.4 in OpenBSD 5.9

2017-02-20 Thread Ian Lance Taylor
On Mon, Feb 20, 2017 at 9:36 PM, Srikanth Chandika wrote: > Ya I have compiled go from https://github.com/openbsd/ports > Successfully compiled go 1.7 but when I run go it gives the following error. > > go package: unsupported TLS program header What precisely do you do? What precisely happens?

Re: [go-nuts] How to Build and Install Go 1.7.4 in OpenBSD 5.9

2017-02-20 Thread Srikanth Chandika
Ya I have compiled go from https://github.com/openbsd/ports Successfully compiled go 1.7 but when I run go it gives the following error. *go package: unsupported TLS program header* On Tue, Feb 21, 2017 at 1:13 AM, Ian Lance Taylor wrote: > On Mon, Feb 20, 2017 at 2:55 AM, Srikanth Chandika >

[go-nuts] unexpected end of JSON input while unmarshal to struct

2017-02-20 Thread diogo . engsoftware
Could you help me to understand why I'm always getting the error unexpected end of JSON input while trying to unmarshal the following json to the LimitOrder struct? It works if I use golang playground https://play.golang.org/p/udPQ_TayXG but not locally running tests. P.S.: if I use map[stri

[go-nuts] Re: Issue with Goroutine and http.RedirectHandler

2017-02-20 Thread Rejoy
Hi, Yes it helps!. This is the output I get from curl -v ***output Trying 127.0.0.1... * connected * Connected to 127.0.0.1 (127.0.0.1) port 8000 (#0) > GET / HTTP/1.1 > User-Agent: curl/7.26.0 > Host: 127.0.0.1:8000 > Accept: */* > * additional stuff not fine trans

[go-nuts] Re: Go UDP performance

2017-02-20 Thread Rich
I would wireshark the data coming in to both sides so that you can see when the packet was transmitted, and when it was received by the other side. That way you can isolate if it's network or Go. On Monday, February 20, 2017 at 4:02:28 PM UTC-5, Tharaneedharan Vilwanathan wrote: > > Hi All, > >

[go-nuts] Import path search order?

2017-02-20 Thread so . query
What is the search order for the import path? for example, relative then vendor then workspace? -- 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+unsub

Re: [go-nuts] How do you implement and use Context.Done?

2017-02-20 Thread so . query
I see thanks for the additional detail. On Monday, February 20, 2017 at 11:42:48 AM UTC-8, Ian Lance Taylor wrote: > > On Sun, Feb 19, 2017 at 2:57 PM, > > wrote: > > Thanks, I see you build it up with decorators on a standard prototype. > > For example: https://play.golang.org/p/PJy5lE9QqF

Re: [go-nuts] Question about net/http package implementation

2017-02-20 Thread Dan Kortschak
Yep. I was lazy though - I should have read the example and I could have made a more careful parse of the text to see a lone *or" that might have prompted further investigation. Historical note: /, * and _ were used in text only mail and on usenet prior to html markup contaminating email. Variousl

[go-nuts] ANN: Sensu Client - in Go!

2017-02-20 Thread george . bolo
Nice, good work. I wish that the Sensu people would consider maintaining a client written in go which didn't require ruby. Seems like a no brainer for me. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop re

[go-nuts] Re: redeclaration in runtime/utf8.go after installing Go 1.8 on Windows

2017-02-20 Thread Sjon Kosse
I did the same thing and got this error as well. I upgraded from what I think was a 1.8 beta build to 1.8 release on Windows using the MSI installer. I thought it might have been something in the %GOPATH%\pkg directory so I removed that, didn't fix it. I'll do what you wrote worked in your post

[go-nuts] Re: Go UDP performance

2017-02-20 Thread Dave Cheney
Can you share some more details 1. which version of Go 2. which operating system 3. where are you sending from / to, is it over localhost, does the other side care about acknowledging receipt 4. can you show your code 5. have you profiled your code? What resource is limiting the throughput of yo

Re: go test -race much slower in 1.8 (was Re: [go-nuts] Go 1.8 is released)

2017-02-20 Thread Caleb Spare
Hey Will, it might help to get timings for just -race and -coverprofile (not both) to try to isolate timing increase a bit. On Mon, Feb 20, 2017 at 12:23 PM, Ian Lance Taylor wrote: > On Mon, Feb 20, 2017 at 12:06 PM, Will Newton wrote: >> On Thu, Feb 16, 2017 at 9:01 PM, Chris Broadfoot wrote:

[go-nuts] Go UDP performance

2017-02-20 Thread Tharaneedharan Vilwanathan
Hi All, I am trying to send a lot of UDP packets from Go code but I realized UDP performance is too low. The max I was able to do is about 160Mbps. This is in Ubuntu 16.10 on x86_64 (i7-6700HQ). I tried to google on this and it looks like this is about the performance we can get. I am a bit surpr

[go-nuts] Re: ActiveState seeking Go community feedback

2017-02-20 Thread Kevin Powick
On Wednesday, 2 November 2016 12:53:23 UTC-4, je...@activestate.com wrote: > respond to this thread, email me, or you can sign up to our mail list ( > http://www.activestate.com/go) > My favourite lines from that website. _COMING SOON: ACTIVEGO - THE WORLD'S BEST GO DISTRIBUTION_ Maybe

[go-nuts] Building a simple timesheet app with SlashDB, Go and Vue

2017-02-20 Thread Victor Olex
"Building a simple timesheet app with SlashDB, Go and Vue" Complete tutorial with full code on GitHub https://www.slashdb.com/2017/02/20/building-a-simple-timesheet-app-with-slashdb-go-and-vue/ -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

go test -race much slower in 1.8 (was Re: [go-nuts] Go 1.8 is released)

2017-02-20 Thread Ian Lance Taylor
On Mon, Feb 20, 2017 at 12:06 PM, Will Newton wrote: > On Thu, Feb 16, 2017 at 9:01 PM, Chris Broadfoot wrote: >> Hello gophers, >> >> We just released Go 1.8. >> >> You can read the announcement blog post here: >> https://blog.golang.org/go1.8 >> >> You can download binary and source distribut

Re: [go-nuts] Arguments for writing fast, high-load servers in Go instead of Scala?

2017-02-20 Thread Kevin Powick
You may have come across this already, but here is another example of a team moving from Scala to Go https://movio.co/blog/migrate-Scala-to-Go/ Though not a move from Scala, Uber has also published some articles on how they've built high-speed services with Go. https://eng.uber.com/go-geofence

Re: [go-nuts] Go 1.8 is released

2017-02-20 Thread Will Newton
On Thu, Feb 16, 2017 at 9:01 PM, Chris Broadfoot wrote: > Hello gophers, > > We just released Go 1.8. > > You can read the announcement blog post here: > https://blog.golang.org/go1.8 > > You can download binary and source distributions from our download page: > https://golang.org/dl/ > > To c

Re: [go-nuts] How to Build and Install Go 1.7.4 in OpenBSD 5.9

2017-02-20 Thread Ian Lance Taylor
On Mon, Feb 20, 2017 at 2:55 AM, Srikanth Chandika wrote: > How to Build and Install Go 1.7 from go src code in OpenBSD 5.9. It's no different from building Go from source on any other system. https://golang.org/doc/install/source Note that the current release is now 1.8, but the procedure hasn

Re: [go-nuts] How do you implement and use Context.Done?

2017-02-20 Thread Ian Lance Taylor
On Sun, Feb 19, 2017 at 2:57 PM, wrote: > Thanks, I see you build it up with decorators on a standard prototype. > For example: https://play.golang.org/p/PJy5lE9QqF > > So context.Done is a convenience function for those that require it? > Otherwise a context will expire after it leaves scope, so

[go-nuts] Re: Go Concurrency Patterns: Pipelines

2017-02-20 Thread Marco Ippolito
- What would be your rule of thumb regarding how many goroutines to start, considering to the parameters of the original question? - How would you generally go about deciding on a convenient fan-out level? On Monday, 20 February 2017 09:26:44 UTC+1, Tamás Gulácsi wrote: > > The general optimizat

Re: [go-nuts] Argument types of: anonymous function literals used as arguments of other function calls

2017-02-20 Thread Ian Lance Taylor
On Mon, Feb 20, 2017 at 6:44 AM, Marco Ippolito wrote: >> Are you asking for the language to be changed to allow it? > > Yes. Some previous discussion in this thread: https://groups.google.com/d/msg/golang-nuts/Kfm4t3TShTY/9mH173ZiReIJ . The way to pursue this would be to write up a full proposa

[go-nuts] Re: How to dllexport a value symbol within a windows binary executable with Go?

2017-02-20 Thread Hakan Guleryuz
I found a much simpler and cleaner solution without involving any ldflags and without using --export-all-symbols In my main.go (or whatever main package that contains the main func): /* #cgo LDFLAGS: ${SRCDIR}/main.def __declspec(dllexport) unsigned long NvOptimusEnablement = 0x0001; __de

[go-nuts] Re: Registering a Go app as a protocol handler under Mac OS X

2017-02-20 Thread Nathan Kerr
I managed to get this working. https://gist.github.com/nathankerr/38d8b0d45590741b57f5f79be336f07c I don't know what sort of app you are making, so I made a simple gui that displays the url received, with some filler text before any are. I think the non-ui parts should transfer to whatever you

Re: [go-nuts] Does Go spec assure that a substring shares the underlying bytes with the original string?

2017-02-20 Thread Ian Lance Taylor
On Mon, Feb 20, 2017 at 9:12 AM, T L wrote: > > I know gc assures this, but I don't know if it is compiler specified or a > spec rule. I can't think of any way that a Go program that does not unsafe could detect whether a string slice uses the same memory as the string being sliced. Also, I can

[go-nuts] Re: Does Go spec assure that a substring shares the underlying bytes with the original string?

2017-02-20 Thread T L
On Tuesday, February 21, 2017 at 1:12:37 AM UTC+8, T L wrote: > > I know gc assures this, but I don't know if it is compiler specified or a > spec rule. > > It looks that the function "Index(s, sep string) int" in strings package > has not a fromIndex parameter. > So I must use strings.Index(s[

[go-nuts] Re: IBM WebSphere MQ

2017-02-20 Thread rudra . sparky
Hai, can you just upload MQcontext.jar file. I couldn't find it On Wednesday, January 27, 2016 at 9:41:43 PM UTC+5:30, Jérôme LAFORGE wrote: > > Hello all, > Do you know a library for IBM WebSphere MQ in "pure" go? (without cgo) > > Thx in adv > Jérôme > -- You received this message because you

[go-nuts] Does Go spec assure that a substring shares the underlying bytes with the original string?

2017-02-20 Thread T L
I know gc assures this, but I don't know if it is compiler specified or a spec rule. It looks that the function "Index(s, sep string) int" in strings package has not a fromIndex parameter. So I must use strings.Index(s[fromIndex:], sep) to search a substr from a specified index. This implies th

Re: [go-nuts] Argument types of: anonymous function literals used as arguments of other function calls

2017-02-20 Thread Marco Ippolito
> Are you asking for the language to be changed to allow it? Yes. On 20/02/17 15:19, Matt Harden wrote: > It looks like you're asking if you can leave out the parameter types in > a function literal, and have them automatically derived from context. > You can't currently. Are you asking for the

Re: [go-nuts] Question about net/http package implementation

2017-02-20 Thread Matt Harden
Oh, interesting. The code inline to his sentences is italicized like *this*. It looks like that gets surrounded by asterisks in the text-only version, leading to confusion in this case. On Sun, Feb 19, 2017 at 6:44 PM Dan Kortschak wrote: > On Sat, 2017-02-18 at 23:15 +, Matt Harden wrote: >

Re: [go-nuts] Argument types of: anonymous function literals used as arguments of other function calls

2017-02-20 Thread Matt Harden
It looks like you're asking if you can leave out the parameter types in a function literal, and have them automatically derived from context. You can't currently. Are you asking for the language to be changed to allow it? On Sun, Feb 19, 2017 at 11:12 PM Marco Ippolito wrote: > Consider: > >

[go-nuts] Re: [Gobot v1.2] - I2C PiGlow [SN3218] driver help

2017-02-20 Thread Owen Waller
Done. The new issue is: https://github.com/hybridgroup/gobot/issues/372 I have also updated my sample code after spotting a stupid mistake. The result is exactly the same however.The code shows no errors and there are no lights n the PiGlow. The updated code is here: https://play.golang.org/p/Xm

[go-nuts] Re: Issue with Goroutine and http.RedirectHandler

2017-02-20 Thread Diego Medina
Most likely this is your browser that "remembers" that going to one url was redirecting to the "incorrect" url, and it doesn't even hit your local server any more. To make sure this is the case, use curl from the command line with the -v paarameter to see all the headers: curl -v http://127.0.

[go-nuts] Issue with Goroutine and http.RedirectHandler

2017-02-20 Thread Rejoy
Hi, I am trying to create a go routine to direct the request to another url: go http.ListenAndServe(":8000", http.RedirectHandler("https://127.0.0.1:8001",301)) I had earler made a mistake and had typed in "https://127.0.0.1/:8001"; for the url string. But now after rectifying the mistake to

Re: [go-nuts] Arguments for writing fast, high-load servers in Go instead of Scala?

2017-02-20 Thread Konstantin Khomoutov
On Fri, 17 Feb 2017 22:55:37 -0800 (PST) Will Faught wrote: > I want to make the case to a software architect where I work that we > should write some fast, high-load servers we need in Go rather than > Scala. What pragmatic arguments should I use? I do not do Scala but since I'm trying to keep

[go-nuts] How to Build and Install Go 1.7 in OpenBSD 5.9

2017-02-20 Thread Srikanth Chandika
How to Build and Install Go 1.7 from go source code in OpenBSD 5.9. -- 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

[go-nuts] How to Build and Install Go 1.7.4 in OpenBSD 5.9

2017-02-20 Thread Srikanth Chandika
How to Build and Install Go 1.7 from go src code in OpenBSD 5.9. -- 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 mor

[go-nuts] Re: Re[2]: Golang server background notofication process

2017-02-20 Thread egortictac3
Thank you a lot, Diego! I decided to implement this exatctly as you said (one goroutine for list of pairs user:location), and this is much more correct. понедельник, 20 февраля 2017 г., 4:27:10 UTC+3 пользователь Diego Medina написал: > > Hi, > > Instead of starting them from an http handler,

[go-nuts] Re: [Gobot v1.2] - I2C PiGlow [SN3218] driver help

2017-02-20 Thread Ron Evans
Hi, Owen Thanks for doing some work on this, it look cool. The current set of Gobot i2c drivers all use the sysfs Read() and Write() interface. The new SMBLOCK based interface is an experimental interface, and seems like it seems some additional work on Raspi. I will take a look into it, if yo

[go-nuts] Re: Arguments for writing fast, high-load servers in Go instead of Scala?

2017-02-20 Thread Haddock
I would say that CSP in Go using channels and goroutines make concurrent programming a lot easier than with actors in Scala (Akka). Reason is that it is easier to detect races and deadlocks in Go at development time (code using CSP easier to understand than code using asynchronous calls) and at

[go-nuts] Go Concurrency Patterns: Pipelines

2017-02-20 Thread Tamás Gulácsi
The general optimization problem is the packing problem, NP-complete. So no fast optimal solution exists. But fast-enough, suboptimal does. Search for a sat-solver. Btw time of computing md5 is size-dependent, so sort by size in descending order, and use a buffered channel as token bucket, with