[go-nuts] Re: C.dll callback golang func will stuck

2016-09-09 Thread Wanghb Wang
在 2016年9月10日星期六 UTC+8上午5:01:14,James Bardin写道: > > You have a busy loop in main. Use another method to block, like a read in > stdin, wait for a signal, etc. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and s

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

2016-09-09 Thread Dan Kortschak
Can you explain the rationale behind the classification of libraries as libraries or not libraries? It seems pretty arbitrary. (I'm interested from a sociological perspective, but not enough to bother to go to the benchmarks game discussion forum). On Fri, 2016-09-09 at 15:08 -0700, 'Isaac Gouy'

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

2016-09-09 Thread 'Isaac Gouy' via golang-nuts
On Wednesday, September 7, 2016 at 7:44:28 PM UTC-7, Jason E. Aten wrote: > > Observe that the java benchmark continues to be allowed to use an > accelerated hash table library. > "accelerated" ? By all means, post your reasons for *why that Java library should not be used* in the benchmarks

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

2016-09-09 Thread 'Isaac Gouy' via golang-nuts
On Wednesday, September 7, 2016 at 6:47:59 PM UTC-7, Clark Wierda wrote: > Apparently, you can only use approved libraries that produce the ranking > he wants. > Which one of us is the language advocate? :-) -- You received this message because you are subscribed to the Google Groups "gola

Re: [go-nuts] cgo and OSX "main thread"

2016-09-09 Thread Martin Bertschler
There is also a great wiki article on how to execute functions on the main thread from multiple goroutines. It helped me a lot when I did some GUI development experiments. https://github.com/golang/go/wiki/LockOSThread -- You received this message because you are subscribed to the Google Groups

[go-nuts] Re: difference between template.Execute and template.ExecuteTemplate()

2016-09-09 Thread Val
Hello It seems that the relevant part of the doc is here : > Each template is named by a string specified when it is created. Also, > each template is associated with zero or more other templates that it may > invoke by name; suc

[go-nuts] C.dll callback golang func will stuck

2016-09-09 Thread James Bardin
You have a busy loop in main. Use another method to block, like a read in stdin, wait for a signal, etc. -- 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-

Re: [go-nuts] reading long text without newline from stdin

2016-09-09 Thread Ian Lance Taylor
On Fri, Sep 9, 2016 at 12:36 PM, wrote: > > On Friday, 9 September 2016 18:45:24 UTC+2, Ian Lance Taylor wrote: >> >> On Fri, Sep 9, 2016 at 7:22 AM, wrote: >> > >> > I was trying to read a longer text from stdin, without any newline. I >> > tried >> > it with many ways: fmt.Scan, bufio.NewScan

Re: [go-nuts] reading long text without newline from stdin

2016-09-09 Thread vendelin8
On Friday, 9 September 2016 18:45:24 UTC+2, Ian Lance Taylor wrote: > > On Fri, Sep 9, 2016 at 7:22 AM, > wrote: > > > > I was trying to read a longer text from stdin, without any newline. I > tried > > it with many ways: fmt.Scan, bufio.NewScanner, bufio ReadLine, > > ioutil.ReadAll. A samp

Re: [go-nuts] cgo and OSX "main thread"

2016-09-09 Thread Ian Lance Taylor
On Fri, Sep 9, 2016 at 10:51 AM, Alex Flint wrote: > I am using cgo to wrap a library that creates an OSX UI, which requires > things to be run on the "main thread". Sometimes my cgo calls end up on the > main thread and sometimes they do not (I check this with [NSThread > isMainThread]). I unders

[go-nuts] cgo and OSX "main thread"

2016-09-09 Thread Alex Flint
I am using cgo to wrap a library that creates an OSX UI, which requires things to be run on the "main thread". Sometimes my cgo calls end up on the main thread and sometimes they do not (I check this with [NSThread isMainThread]). I understand that cgo threads are guaranteed to run on an OS-allocat

Re: [go-nuts] reading long text without newline from stdin

2016-09-09 Thread Ian Lance Taylor
On Fri, Sep 9, 2016 at 7:22 AM, wrote: > > I was trying to read a longer text from stdin, without any newline. I tried > it with many ways: fmt.Scan, bufio.NewScanner, bufio ReadLine, > ioutil.ReadAll. A sample code looks like this: > stackoverflow.com/questions/27196195/golang-read-from-pipe-rea

[go-nuts] C.dll callback golang func will stuck

2016-09-09 Thread Wanghb Wang
when I use C.dll call golang func, the programm will stuck. My golang code is : import ( "C" "fmt" "syscall" "unsafe" ) var times int func main() { cbStr := syscall.NewCallback(goCbStr) dll, error := syscall.LoadDLL("test0001.dll") fmt.Println(dll) var

[go-nuts] Re: Request to backport OSX Sierra fix in 1.6.4

2016-09-09 Thread 'Michael Crosby' via golang-nuts
Gary, Because we want to release a 0.0.x update and updating from 1.6.x to 1.7.1 for that type of update is not ideal for us. On Fri, Sep 9, 2016 at 12:53 AM, wrote: > Purely out of interest, why not upgrade to v1.7.1? > -- Michael Crosby @crosbymichael -- You received this message becaus

[go-nuts] Can I see all output of `go test` in VIM when i use vim-go plugin?

2016-09-09 Thread Luke
Hi, I am trying to figure out how to see the whole output of command `go test` (:GoTest) in VIM... I use vim-go. Right now, it just says if it was a failure or success, however I also print out some logs using t.Logf and this output is not being shown anywhere... thx -- You received this mes

[go-nuts] reading long text without newline from stdin

2016-09-09 Thread vendelin8
Hi, I was trying to read a longer text from stdin, without any newline. I tried it with many ways: fmt.Scan, bufio.NewScanner, bufio ReadLine, ioutil.ReadAll. A sample code looks like this: stackoverflow.com/questions/27196195/golang-read-from-pipe-reads-tons-of-data#answer-27196786 If the lengt

[go-nuts] [ANN] gta - test combinations of deps

2016-09-09 Thread Sam Boyer
hi folks, i've just gotten a new project to a vaguely-working-alpha state (release early, release often!) that facilitates automatically testing combinations of possible dependency versions: https://github.com/sdboyer/gta. it's gps-based (https://github.com/sdboyer/gps), and is at least sorta

[go-nuts] Re: interactive debugger for go ??

2016-09-09 Thread Tim Shannon
Visual Studio Code has a great Go implementation with the Delve debugger built in, and it runs on windows / mac / linux. On Tuesday, September 6, 2016 at 11:42:13 AM UTC-5, JM wrote: > > Will there be a debugger that will allow me to step into my code, watch > the flow, and go line by line in

Re: [go-nuts] difference between template.Execute and template.ExecuteTemplate()

2016-09-09 Thread Asit Dhal
In case of second one, in the name string parameter, you need to specify the template name. On 9/9/2016 14:04, mir.ansar...@gmail.com wrote: Hi, func (t *Template) Execute(wr io.Writer, data interface{}) error func (t *Template) ExecuteTemplate(wr io.Writer, name string, data inte

[go-nuts] difference between template.Execute and template.ExecuteTemplate()

2016-09-09 Thread mir . ansari90
Hi, func (t *Template) Execute(wr io.Writer, data interface{}) error func (t *Template) ExecuteTemplate(wr io.Writer, name string, data interface{}) error Can someone tell me the difference between the above two functions ? -- You received this message because you are subscribed to the Google

[go-nuts] Re: [database/sql] Scan rows to string arrays

2016-09-09 Thread jnaradajayasingha
TX!, This works for me On Tuesday, March 12, 2013 at 2:38:15 AM UTC+5:30, Frank Blechschmidt wrote: > > Found it. > > Working solution: > var result [][]string > rows := repo.dbHandler.Query(sQuery) > cols := rows.Columns() > pointers := make([]interface{}, len(cols)) > container := make([]string,

Re: [go-nuts] What is the correct usage for the -msan flag?

2016-09-09 Thread Ian Lance Taylor
On Fri, Sep 9, 2016 at 1:01 AM, Markus Zimmermann wrote: > > I am trying to integrate -msan for testing into > https://github.com/go-clang/bootstrap using Go 1.7.1 and LLVM 3.9.0 inside > an Ubuntu Trusty 64bit VM. The Kernel is 3.13.0. > > I am executing a test using the following command: > >> C

[go-nuts] Re: Handling multiple things happening at the same time

2016-09-09 Thread Caleb Doxsey
It looks like gocron.Start() runs the jobs in another goroutine, so you can just do both things in your main function: func main() { s := gocron.NewScheduler() s.Every(3).Seconds().Do(task) stopper := s.Start() defer close(stopper) err := http.

[go-nuts] What is the correct usage for the -msan flag?

2016-09-09 Thread Markus Zimmermann
Hi gophers! I am trying to integrate -msan for testing into https://github.com/go-clang/bootstrap using Go 1.7.1 and LLVM 3.9.0 inside an Ubuntu Trusty 64bit VM. The Kernel is 3.13.0. I am executing a test using the following command: CC=clang CGO_LDFLAGS="-L`llvm-config --libdir` -fsanitize=m

[go-nuts] Re: Request to backport OSX Sierra fix in 1.6.4

2016-09-09 Thread gary . willoughby
Purely out of interest, why not upgrade to v1.7.1? -- 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, vis

[go-nuts] Re: Dynamic json unmarshaling map[string]int and errors

2016-09-09 Thread hbhaskaran
Assuming the strings in the first example are actually unique and not the same strings, you can just declare a struct with three fields type foo struct { String1 int String2 int Error string } Error will empty string, the default in the first case. Similarly other columns will be empty

[go-nuts] Request to backport OSX Sierra fix in 1.6.4

2016-09-09 Thread michael.crosby via golang-nuts
Now that we know the release date for the new OSX version, Sierra, and the gold master has been released can we have the patches for fixing gettimeofday backported into a go 1.6.4 release? The first patch was included in 1.6.3 but it broke again in beta 4. Since the gold master is out now thes