yao shucai | 16 Oct 21:49 2014
Picon

Segmented stack mechanism

I am doing research on segmented stack mechanisms, and in addition to academic papers, I am surveying whether segmented stack mechanism is still useful on 64-bit machines. On 64 bit machines, why they don’t just use a big enough stack, for example, 1GB or even larger? Are segmented stacks only useful for 32 bit machines? Are there other reasons for segmented stacks on 64 bit machines?
Any response is appreciated. Thanks, Shucai

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Js | 16 Oct 20:01 2014
Picon

text/template bug?

See http://play.golang.org/p/Dr3gVjctk6

It makes sense to me that printf requires multiple arguments, otherwise you should just use print. However, I think this should throw a parse error instead of panicking during Execute, so I just want to see if I'm missing something before filing a bug report.

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Alberto García Hierro | 16 Oct 17:55 2014

[ANN] Governator, a process manager for developers

Hi,

Today we're releasing our internal process manager, named governator.

governator is not a replacement for init, upstart or systemd. It's designed to run and manage programs
developed by yourself, since it provides very useful features for that use case, like automatic restarts,
watchdogs and logging.

governator is written in Go and uses asynchronous IO to avoid keeping an OS thread for every managed
process. As far as I know, this is the only process manager written in Go which does not have that problem.

For installation instructions and documentation, please see http://governator.io.

Regards,
Alberto

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
GaoPeng(高朋 | 16 Oct 17:13 2014
Picon

Could you share your ways to draw concurrent procedures on drafts?

Sometimes we do drafts on white papers for us to well  understand how code goes.

I draw a line for one routine,and write channel in and out on the line.
But always I can only present one possible situation,and can not well cover all the possible solutions,and it make me miss something important.







--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
varding | 16 Oct 10:57 2014
Picon

go build -race problem with sqlite3

I build the code with the -race flag on window 7 x64 ,when I run it ,windows popup a dialog indicate that the exe is stopped,and there is no other information display in the console

if I build the code without -race flag,ererything is fine.

go: is 1.3.3 x64 

code shows as below:

package main

import (
"database/sql"
"fmt"
)

func main() {
db, err := sql.Open("sqlite3", "./test.db")
if err != nil {
fmt.Println("err%+v", err)
return
}
defer db.Close()

err = db.Ping()
if err != nil {
panic(err.Error())
}
fmt.Println("ok")
}

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
baruchlubinsky | 16 Oct 12:17 2014
Picon

Suggest a new key word "in"

I would like to have the keyword "in" as syntactic sugar for ":= range".

So that we could write:

for index, val in slice {
}

instead of 

for index, val := range slice {
}



--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
GaoPeng(高朋 | 16 Oct 16:29 2014
Picon

What is a good way to draw a concurrent patterns for Golang on the drafts?

I am seeing the video in which Rob Pike are talking about concurrent patterns ,this is link https://www.youtube.com/watch?v=f6kdp27TYZs&list=PLA33D7F392AD11B41&index=5,and this is the code I copy http://play.golang.org/p/p_r492W_xk,it is said that in the final version of code each speaker need to wait for a go-ahead.But in fact it is assured that every turn there will be 2 different people speaks but is not assured to be  in order. Like
Joe0
Ann0
Ann1
Joe1

I am not sure if I miss something,but when I figure this out ,it is really hard to imagine,so I write on the drafts,if Ann goroutine runs very very fast,it will be like the pic below,Ann inputs the channel quicker then Joe.This pic I drew just shows one possible situation and I wonder is there  a more general way to describe how a concurrent pattern works when I study,learn or design some concurrent pattern , it can only be solved by programming to figure out all the possible results?

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
amirtaghavi2020 | 16 Oct 09:05 2014
Picon

problem in sum of two array

hi my problem is sum of two array 
my code is :
package main

import (
"fmt"
)

var(
i int
first [2]int
second [2]int
result [2]int
)

func main(){
fmt.Println("Enter first array:\r\n")
for i=0;i<2;i++{
fmt.Scanf("%d",&first[i])
}
fmt.Println("First[0]=",first[0],"First[1]=",first[1])
fmt.Println("\r\n Enter second array:\r\n")
for i=0;i<2;i++{
fmt.Scanf("%d",&second[i])
}
fmt.Println("Second[0]=",second[0],"Second[1]=",second[1]) //this is problem
for i=0;i<2;i++{
result[i] = first[i] + second[i]
}
for i=0;i<2;i++{
fmt.Printf("%d \t",result[i])
}
}

:result picture 

please help me...



--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Ingo Jaeckel | 16 Oct 04:03 2014
Picon

"Cannot find package" error when running "goapp tool cover"

Hi,

I am trying to convert my code coverage results into HTML by running the following.

$ goapp test -cover -test.v=true -test.coverprofile=c.out
$ goapp tool cover -html=c.out

I am using the Go GAE SDK (extracted to /Users/ingo/Downloads/go_appengine). I am running this from the root directory of my GAE app which is located in /Users/ingo/git/loyalty. This folder contains all my *.go files. All files belong to a package called "app".

The coverage information is collected just fine. But trying to convert them into HTML fails with this error:

goapp tool cover -html=c.out
cover: can't find "app.go": cannot find package "_/Users/ingo/git/loyalty/" in any of:
/Users/ingo/Downloads/go_appengine/goroot/src/pkg/_/Users/ingo/git/loyalty (from $GOROOT)
/Users/ingo/Downloads/go_appengine/gopath/src/_/Users/ingo/git/loyalty (from $GOPATH)

What does this mean and how can I fix it?

Thanks,
Ingo

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
bsr | 16 Oct 01:50 2014
Picon

how to test cookie is set after redirect

Hello,

I am trying to test a scenario, as described below, but not sure how to approach.

1. Client send an HTTP GET req
2. server do some processing, set a cookie, then redirects
3. I do not see any cookie set in client (browser) - on the redirect req, or the one after.

I wanted to see why the cookie is not set (may be because of some of the processing I do). But, to try out, I try just with std library, mostly looking through the tests in http package.
http://play.golang.org/p/qjK_7WQDEr

I don't have a full understanding of how redirects works, and who gets the response. Please help me to see the cookie being set after the redirect.

Thanks.
bsr





--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Andrew Greene | 16 Oct 01:00 2014
Picon

App Engine Dev Server errors

Hi,

When I run goapp serve and the app build fails with "Failed to build Go application: (Executed command:..." I sometimes get tracebacks with a list of errors, but I sometimes just get a few blank lines. This makes debugging much harder. Does anyone have a solution?

Thanks,
Andrew 

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.

Gmane