[go-nuts] Re: About 64bits alignment

2017-03-28 Thread Dave Cheney
I don't know of anyone working on windows/arm. On Wednesday, 29 March 2017 13:19:28 UTC+11, T L wrote: > > > > On Wednesday, March 29, 2017 at 5:04:26 AM UTC+8, Dave Cheney wrote: >> >> Arm means arm as in linux/arm. > > > so WinRT is not supported? > but will? > -- You received this message b

Re: [go-nuts] Re: go-swagger dynamic API creation

2017-03-28 Thread Kevin Conway
Having used go-swagger (https://github.com/go-swagger/go-swagger) at one point, I'd say that these YAML generators are possibly useful for generating documentation from your code. One pain point of the documentation generators, though, is that most require that I create and maintain code objects ex

[go-nuts] Re: Unexpected behavior with panic/defer/recover

2017-03-28 Thread T L
http://www.tapirgames.com/blog/golang-panic-recover-mechanism On Wednesday, March 29, 2017 at 6:48:52 AM UTC+8, Stefan Engstrom wrote: > > Playing with recovery from a panic - this code does what i expect: ( > https://play.golang.org/p/p5KvOYc1sx) > > package main > > import "fmt" > > func main()

[go-nuts] Re: About 64bits alignment

2017-03-28 Thread T L
On Wednesday, March 29, 2017 at 5:04:26 AM UTC+8, Dave Cheney wrote: > > Arm means arm as in linux/arm. so WinRT is not supported? but will? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving e

[go-nuts] Re: Unexpected behavior with panic/defer/recover

2017-03-28 Thread Johnny Luo
That's kind of expected behavior , "*1. A deferred function's arguments are evaluated when the defer statement is evaluated." * refer to https://blog.golang.org/defer-panic-and-recover On Wednesday, March 29, 2017 at 9:48:52 AM UTC+11, Stefan Engstrom wrote: > > Playing with recovery from a panic

Re: [go-nuts] Connect to a mainframe

2017-03-28 Thread Ian Lance Taylor
On Tue, Mar 28, 2017 at 3:12 PM, Rodolfo wrote: > Hi, not work for me, show this error: > > package ibm.com/mainframe: unrecognized import path "ibm.com/mainframe" Unfortunately I think that was a joke. You are going to need to provide more information. What kind of connection do you want? Wh

Re: [go-nuts] Unexpected behavior with panic/defer/recover

2017-03-28 Thread Steven Hartland
You second example isn't calling recover inside the defer. See: https://golang.org/pkg/builtin/#recover On 28/03/2017 23:00, Stefan Engstrom wrote: Playing with recovery from a panic - this code does what i expect: (https://play.golang.org/p/p5KvOYc1sx) | packagemain import"fmt" func main(){

[go-nuts] Unexpected behavior with panic/defer/recover

2017-03-28 Thread Stefan Engstrom
Playing with recovery from a panic - this code does what i expect: ( https://play.golang.org/p/p5KvOYc1sx) package main import "fmt" func main() { defer func() { fmt.Println("main:",recover()) }() a() } func a() { panic("yikes") } Results in: main: yikes A simpler version with

Re: [go-nuts] Connect to a mainframe

2017-03-28 Thread Rodolfo
Hi, not work for me, show this error: package ibm.com/mainframe: unrecognized import path "ibm.com/mainframe" Can you help me? Thanks 2017-03-28 18:03 GMT-04:00 Aram Hăvărneanu : > go get ibm.com/mainframe > -- You received this message because you are subscribed to the Google Groups "golan

Re: [go-nuts] Connect to a mainframe

2017-03-28 Thread Rodolfo
Thanks for fast answer :D 2017-03-28 18:03 GMT-04:00 Aram Hăvărneanu : > go get ibm.com/mainframe > -- 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+

Re: [go-nuts] Connect to a mainframe

2017-03-28 Thread Aram Hăvărneanu
go get ibm.com/mainframe -- 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.c

[go-nuts] Connect to a mainframe

2017-03-28 Thread Rodolfo Azevedo
Someone has an example to how to connect to a mainframe? I am searching in the web and not found. Thanks and regards, Rodolfo Azevedo -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails fro

Re: [go-nuts] DeepEqual of maps with pointers as keys (bug?)

2017-03-28 Thread Carl
Sorry to resurrect an old thread, but I just thought it worth mentioning that this is also the case if the key is a type from another package and the type contains an unexported pointer. Case in point: map[time.Time] I'm not sure how deep this goes - what i

[go-nuts] Re: About 64bits alignment

2017-03-28 Thread Dave Cheney
Arm means arm as in linux/arm. -- 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.g

Re: [go-nuts] Re: About 64bits alignment

2017-03-28 Thread Michael Hudson-Doyle
On 29 March 2017 at 04:44, T L wrote: > > > On Thursday, February 2, 2017 at 12:03:59 AM UTC+8, T L wrote: >> >> the sync/atomic docs, https://golang.org/pkg/sync/atomic/, says in the >> end of the docs >> >> >> On x86-32, the 64-bit functions use instructions unavailable before the >>> Pentium M

Re: [go-nuts] Re: plugins (Go 1.8) and packages

2017-03-28 Thread Basile Starynkevitch
On Wednesday, March 22, 2017 at 11:00:24 PM UTC+1, Ian Lance Taylor wrote: > > On Wed, Mar 22, 2017 at 3:06 AM, Basile Starynkevitch > > wrote: > > > > First, is Svetlin's golang-sharing-libraries tutorial still exactly > correct > > for Go1.8 specifically? Its title Sharing Golang packages

Re: [go-nuts] Go -> C++ transpiler idea: Miracle child or horrible abomination?

2017-03-28 Thread Andy Balholm
If global ownership inference, with enough flexibility to replace a garbage collector, were practical, I suppose the Rust compiler would have it already. But if you want to prove the Rust developers wrong, go ahead and do it in a transpiler. Andy -- You received this message because you are s

[go-nuts] Re: LLDB only works for project contains one go source file

2017-03-28 Thread Derek Parker
You could try using Delve for debugging: https://github.com/derekparker/delve On Wednesday, October 26, 2016 at 4:20:01 AM UTC-7, Leopold Freeman wrote: > > Hi: > I upgraded my MBP to macOS Sierra, and gdb was broke because Apple > tightened security policy. So I compiled LLDB from trunk acc

Re: [go-nuts] Issue building binaries using cgo on macOS Sierra 10.12.4

2017-03-28 Thread Rob Pike
Are you running Xcode 8.3? See https://github.com/golang/go/issues/19741. -rob On Tue, Mar 28, 2017 at 7:32 AM, wrote: > Hello, > > Upgraded my mac to 10.12.4 yesterday, tried to run a binary built using > go1.8. I immediately get Killed: 9 as output. > > The binary includes many C/C++ librar

[go-nuts] Re: About 64bits alignment

2017-03-28 Thread T L
On Thursday, February 2, 2017 at 12:03:59 AM UTC+8, T L wrote: > > the sync/atomic docs, https://golang.org/pkg/sync/atomic/, says in the > end of the docs > > > On x86-32, the 64-bit functions use instructions unavailable before the >> Pentium MMX. >> > On non-Linux ARM, the 64-bit functions

[go-nuts] Re: Overwritten pointer value on channel

2017-03-28 Thread Danilo Cianfrone
Yeah, I eventually found out the reason. The factory method for the *stuff.Stuff object was using a value by refecence, produced on a writer goroutine and read by the goroutine that handled the multiplexer.Handler() function. Simply passing by value the variable on stuff.Stuff factory method solv

[go-nuts] Issue building binaries using cgo on macOS Sierra 10.12.4

2017-03-28 Thread martin . ostrovsky
Hello, Upgraded my mac to 10.12.4 yesterday, tried to run a binary built using go1.8. I immediately get Killed: 9 as output. The binary includes many C/C++ libraries via cgo but everything was fine under 10.12.3 I then built the binary using -ldflags -s and that was OK. I saw a similar issue

[go-nuts] Re: Overwritten pointer value on channel

2017-03-28 Thread djadala
ok, 1st guess is wrong. do you run your code with race enabled ? On Tuesday, March 28, 2017 at 4:08:17 PM UTC+3, Danilo Cianfrone wrote: > > Doesn't work, and doesn't make sense, even. > I assume the problem is in the channel, but can't figure out which and why. > > Il giorno martedì 28 marzo 2017

[go-nuts] Re: Go -> C++ transpiler idea: Miracle child or horrible abomination?

2017-03-28 Thread Ruby Spring
Probably a weird and orthogonal suggestion : transpile go-->rust and eliminate the gc overhead without dealing with the horrible syntax, if that is even feasible.. > > On Friday, March 24, 2017 at 8:32:20 PM UTC-7, Brad wrote: >> >> Interested in any feedback about the idea of making a Go -> C++

[go-nuts] Re: Overwritten pointer value on channel

2017-03-28 Thread Danilo Cianfrone
Doesn't work, and doesn't make sense, even. I assume the problem is in the channel, but can't figure out which and why. Il giorno martedì 28 marzo 2017 14:47:40 UTC+2, dja...@gmail.com ha scritto: > > >> go func(j tengin.Job) { m.OnJob(j); m.Done() }(job) > func(j tengin.Job) { go func(){ m.OnJob(

[go-nuts] Re: Overwritten pointer value on channel

2017-03-28 Thread djadala
>> go func(j tengin.Job) { m.OnJob(j); m.Done() }(job) func(j tengin.Job) { go func(){ m.OnJob(j); m.Done()}() }(job) Djadala On Tuesday, March 28, 2017 at 3:27:34 PM UTC+3, Danilo Cianfrone wrote: > > I'm experiencing a weird bug. > I have a microservice that uses FBP architecture, with a structu

[go-nuts] Re: HTTP/2 Server Push - what is happening during 'Reading Push' ?

2017-03-28 Thread rasmusj . se
I am also experiencing issues with server push in Go/1.8 using the http.Pusher interface. I think my problem relate to yours, when I use pusher I expect to get a near instant load time on a pushed resource when I request it through the JS console a couple of seconds later. But I also get stuck i

[go-nuts] Overwritten pointer value on channel

2017-03-28 Thread Danilo Cianfrone
I'm experiencing a weird bug. I have a microservice that uses FBP architecture, with a structure *graph* as main graph and *multiplexer* as first component. The code is the following: type graph struct { loggable fetchable multiplexer fetcher nodeEvaluator joiner treeEvaluator closed atomic.

[go-nuts] Re: Reading Json file from s3 and want to keep all values in-memory structure.

2017-03-28 Thread Christian Joergensen
On Tuesday, March 28, 2017 at 12:23:02 PM UTC+2, Christian Joergensen wrote: > > Take a look at his function: > https://godoc.org/github.com/aws/aws-sdk-go/service/s3#GetObjectOutput > Correction; I meant this function: https://godoc.org/github.com/aws/aws-sdk-go/service/s3#S3.GetObject Cheers,

[go-nuts] Re: Reading Json file from s3 and want to keep all values in-memory structure.

2017-03-28 Thread Christian Joergensen
On Monday, March 27, 2017 at 9:17:05 PM UTC+2, hunt wrote: > > Just wanted to know how can i achieve this. > What did you try? Take a look at his function: https://godoc.org/github.com/aws/aws-sdk-go/service/s3#GetObjectOutput The Body attribute of the resulting GetObjectOutput struct can be pa

Re: [go-nuts] Algorithm Club

2017-03-28 Thread gary . willoughby
Parametric polymorphism is enabled by generics. On Friday, 24 March 2017 19:16:24 UTC, Rob 'Commander' Pike wrote: > > Algorithms are not helped by generic types as much as by polymorphism, a > related but distinct subject. > > -rob > > -- You received this message because you are subscribed to

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

2017-03-28 Thread Peter Bourgon
On Tue, Mar 28, 2017 at 3:14 AM, Russ Cox wrote: > On Mon, Mar 13, 2017 at 5:09 PM, Russ Cox wrote: >> >> By far the most important things to do with dep right now are (1) build >> something people can use and get benefit from today and eliminate blockers >> to adoption and (2) based on experienc

[go-nuts] Re: golang cpu usage question

2017-03-28 Thread 刘桂祥
yes ,I do a str += str0 so many in my program now I change to use bytes,Buffer to solve it And I really need to do a gc monitor that notice me my code is worse now gc frequency and pause time do not notice me does the runtime gc_cpu_fraciton (the same as GODEBUG=gctrace=1 CPU occupy ) say some

[go-nuts] Re: Algorithm Club

2017-03-28 Thread Egon
On Tuesday, 28 March 2017 07:56:57 UTC+3, Will Faught wrote: > > Something I've never seen addressed in the generics tradeoffs debate (not > saying it hasn't been, but I haven't see it personally) > See https://docs.google.com/document/d/1vrAy9gMpMoS3uaVphB32uVXX4pi-HnNjkMEgyAHX4N4/edit#heading=

[go-nuts] Re: golang cpu usage question

2017-03-28 Thread Dave Cheney
It looks like your program is generating in excess of 4gb of garbage a second. I suggest generating a memory profile with pkg/profile and looking at your allocation hotspots. gc 708 @641.202s 11%: 9.2+1025+0.50+0.31+32 ms clock, 55+1025+0+9983/0.013/9124+194 ms cpu, 8189->8363->4389 MB, 8399 M