Re: [go-nuts] About runtime.globrunqput/globrunqputhead

2016-08-31 Thread Ian Lance Taylor
On Wed, Aug 31, 2016 at 7:54 PM, Lin Hao wrote: > > I mean, sched.midle is a single linked list, but its mode of operation is > different from sched.runqhead/runqtail, why? (or, Why they used different > structure?) The midle list is a list of M's that aren't doing

Re: [go-nuts] About runtime.globrunqput/globrunqputhead

2016-08-31 Thread Lin Hao
Sorry, I haven't expressed clearly. I didn't suggest anything, just wondering, so I want to ask about it. I mean, sched.midle is a single linked list, but its mode of operation is different from sched.runqhead/runqtail, why? (or, Why they used different structure?) -- You received this message

Re: [go-nuts] Re: Who wants to use Go to process your camera's raw files?

2016-08-31 Thread Jonathan Pittman
Does the license need to be the same as the standard Go License if it starts in another repo and then moves over? On Wed, Aug 31, 2016 at 8:19 PM, Nigel Tao wrote: > On Mon, Aug 29, 2016 at 12:27 PM, Jonathan Pittman > wrote: > > To

[go-nuts] Go 1.7 vs Go 1.5 performance

2016-08-31 Thread lennykneller
Unfortunately, I don't have Go 1.6 numbers. I benchmarked my parallel 2-d convex hull program in Go 1.5 and Go 1.7 on Windows 64-bit platform. The code uses big rational numbers (math/big.Rat) which puts pressure on the GC. I observed noticeable reduction in run times: 1-core version of the Go

[go-nuts] Re: Unable to Get SID in golang

2016-08-31 Thread brainman
On Thursday, 1 September 2016 00:10:39 UTC+10, kumargv wrote: > I am getting SID of my system using WMI > > >wmic useraccount where name='vijay' get sid > SID > S-1-5-21-742204146-2006990925-2362806598-1001 > > But still i am not able to get sid structure . golang.org/x/sys/windows.SID is

Re: [go-nuts] unsupported GOOS/GOARCH pair darwin/x86_64 on mac installed from package

2016-08-31 Thread Dan Kortschak
On Wed, 2016-08-31 at 17:37 -0700, Ian Lance Taylor wrote: > Set GOARCH in the environment to amd64, not x86_64. Or don't bother > to set it at all. > Thanks Ian. Just went through and clean out many GO* vars from his .profile. -- You received this message because you are subscribed to the

Re: [go-nuts] unsupported GOOS/GOARCH pair darwin/x86_64 on mac installed from package

2016-08-31 Thread Ian Lance Taylor
On Wed, Aug 31, 2016 at 5:19 PM, Dan Kortschak wrote: > One of my users has struck a problem with an install of go1.7 from the > packages at [1] that has me baffled. I don't use a mac, so I've depleted > my knowledge of what might be going on here. Can anyone help?

[go-nuts] Re: unsupported GOOS/GOARCH pair darwin/x86_64 on mac installed from package

2016-08-31 Thread Dave Cheney
It looks like they've exported GOARCH=x86_64 which is the linux preferred word for amd64. They should either remove the GOARCH setting or set it to GOARCH=amd64 On Thursday, 1 September 2016 10:19:35 UTC+10, kortschak wrote: > > One of my users has struck a problem with an install of go1.7 from

Re: [go-nuts] Re: Who wants to use Go to process your camera's raw files?

2016-08-31 Thread Nigel Tao
On Mon, Aug 29, 2016 at 12:27 PM, Jonathan Pittman wrote: > To everyone, I really want to see this live in the golang.org/x/image repo. > Do we need to create a formal proposal for it to live there? Should we do > the initial development in another repo and then

[go-nuts] unsupported GOOS/GOARCH pair darwin/x86_64 on mac installed from package

2016-08-31 Thread Dan Kortschak
One of my users has struck a problem with an install of go1.7 from the packages at [1] that has me baffled. I don't use a mac, so I've depleted my knowledge of what might be going on here. Can anyone help? thanks Dan The OS is 10.11.6 on a macbook. $ go run hello.go cmd/go: unsupported

Re: [go-nuts] gomobile init should have a flag if we want only IOS or Android

2016-08-31 Thread Hyang-Ah Hana Kim
What do you think if the error message is modified to clearly include the instruction for xcode installation? On Mon, Aug 29, 2016 at 6:03 AM, Abhishek Sinha wrote: > While doing gomobile init on OSX, I get the following error > gomobile: xcrun --show-sdk-path: exit status

Re: [go-nuts] Re: In case you missed it: language benchmarks for Go 1.7, and language adoption

2016-08-31 Thread Tim Hawkins
I would have expected that aside from informing about general performance, one of the purposes for benchmarks would have been to create pressure for improvement of key features of the laguage, this seems to circumvent this, im not dure what they are trying to achive. Perhaps restrictions on only

Re: [go-nuts] Cgo Pointer Arithmetic

2016-08-31 Thread Ian Lance Taylor
On Wed, Aug 31, 2016 at 2:06 PM, Luke Mauldin wrote: > I modified my example based on the code example you gave at the bottom for > the pointer arithmetic and that compiled without any go vet errors. I > attempted to use the slice whose backing array is the C array >

[go-nuts] Re: Close a reader to quit a loop without closing its source

2016-08-31 Thread adonovan via golang-nuts
On Wednesday, 31 August 2016 07:48:12 UTC-4, Dave Cheney wrote: > > Unfortunately POSIX does not guarantee that close from one thread will > unblock another. To read from a file without waiting longer than a specified time, you need to use the POSIX 'select' system call, which you can find at

[go-nuts] Using go mobile with Cordova

2016-08-31 Thread Joe Blue
Building html5 Cordova apps is pretty easy. But I want to put a golang web server being it that is exposing a restful json API. The HTML5 GUI can then call it. I am using the recent json patch functionality to allow the GUI layer to constantly update the db ( boltdb) with changes. What are my

Re: [go-nuts] Cgo Pointer Arithmetic

2016-08-31 Thread Ian Lance Taylor
On Wed, Aug 31, 2016 at 12:47 PM, Luke Mauldin wrote: > > I have questions about pointer arithmetic illustrated by this Play example: > https://play.golang.org/p/-cZteTY_M2 > > Questions: > 1) Is this the best way to do pointer arithmetic in Go to process a C array > and

[go-nuts] Cgo Pointer Arithmetic

2016-08-31 Thread Luke Mauldin
I have questions about pointer arithmetic illustrated by this Play example: https://play.golang.org/p/-cZteTY_M2 Questions: 1) Is this the best way to do pointer arithmetic in Go to process a C array and convert it to a Go slice? 2) Go vet gives an error on line 18 but doesn't give much

Re: [go-nuts] Compiler plugins or something?

2016-08-31 Thread 'Samuel Tan' via golang-nuts
Got it. Thanks for the quick follow-up, Ian. On Wed, Aug 31, 2016 at 11:00 AM, Ian Lance Taylor wrote: > On Wed, Aug 31, 2016 at 10:31 AM, samueltan via golang-nuts > wrote: > > May I know what the status of compiler plugins are as of Go 1.7? I'm

Re: [go-nuts] Compiler plugins or something?

2016-08-31 Thread samueltan via golang-nuts
May I know what the status of compiler plugins are as of Go 1.7? I'm hoping to add an additional stage of static checking to the Go compilation process, and the only way to do this right now seems to be to write a go vet check. On Wednesday, October 7, 2015 at 9:59:26 AM UTC-7, Ian Lance

[go-nuts] What is the difference between fmt.Print and rand.Intn functions here?

2016-08-31 Thread T L
Why does the parameter passed to fmt.Print escape to heap? // 11.go package main import "fmt" import "math/rand" func f1(v int) { fmt.Print(v) // v escapes to heap } var a int func f2(v int) { a = rand.Intn(v) // v doesn't escape } func main() { } /* > go build -gcflags=-m 11.go #

[go-nuts] Unable to Get SID in golang

2016-08-31 Thread kumargv
I am getting SID of my system using WMI >wmic useraccount where name='vijay' get sid SID S-1-5-21-742204146-2006990925-2362806598-1001 But still i am not able to get sid structure . package main import ( "fmt" "golang.org/x/sys/windows" ) func main() { sid , domain, accType , err :=

Re: [go-nuts] About runtime.globrunqput/globrunqputhead

2016-08-31 Thread Ian Lance Taylor
On Tue, Aug 30, 2016 at 10:19 PM, Lin Hao wrote: > > I'm reading the runtime code, and there are some questions, as shown below: > > func globrunqput(gp *g) { > gp.schedlink = 0 > if sched.runqtail != 0 { > sched.runqtail.ptr().schedlink.set(gp)// My question: why? > >

[go-nuts] Re: bytes.Buffer and bufio.Reader are no seekers?

2016-08-31 Thread Guillaume LE STUM
I just ran into this as well, when buffering an io.ReadSeeker such as os.File it would be useful to have a bufio.ReadSeeker. I could work around it by calling Seek on the source os.File and using bufio.Reader.Reset(...) but this is wasteful when seeked data is already buffered On Thursday, May

[go-nuts] About runtime.globrunqput/globrunqputhead

2016-08-31 Thread Lin Hao
Hi, all: I'm reading the runtime code, and there are some questions, as shown below: func globrunqput(gp *g) { gp.schedlink = 0 if sched.runqtail != 0 { sched.runqtail.ptr().schedlink.set(gp)// My question: why?

[go-nuts] Close a reader to quit a loop without closing its source

2016-08-31 Thread Dave Cheney
Unfortunately POSIX does not guarantee that close from one thread will unblock another. -- 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: In case you missed it: language benchmarks for Go 1.7, and language adoption

2016-08-31 Thread Harald Weidner
Hello, On Tue, Aug 30, 2016 at 04:41:29PM -0700, 'Eric Johnson' via golang-nuts wrote: > I looked at the k-nucleotide program, and was unable to figure out a way to > make it faster. > This is, of course, exactly what the test is suppose to be checking - the > speed of the built in map. Anyone

[go-nuts] Re: dynamic frequency ticker

2016-08-31 Thread djadala
https://play.golang.org/p/FMs01ACKJv ? Djadala On Tuesday, August 30, 2016 at 8:46:23 PM UTC+3, seb@gmail.com wrote: > > In my application I select on a ticker channel, but sometimes need to have > the waiting time vary a bit. For not so frequent changes I could make a new > ticker