Re: [go-nuts] Strange Go runtime behavior related to xml.Unmarshal

2017-04-28 Thread Nikos Anastopoulos
Either through the /proc/PID/tasks entries, or using GODEBUG=schedtrace=1000.I get consistent results with both ways -- 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

Re: [go-nuts] Weird performance with exp/shiny

2017-04-28 Thread Zellyn
Yes, the racy boolean access made me cringe but I was going for short :-) Your suggestion to disentangle rendering from emulation is a good idea... now that I understand what's happening! The really funny thing is that my emulator looked suspiciously close to the right speed: since I was callin

Re: [go-nuts] Re: Find a string in a file and delete all occurences in the file

2017-04-28 Thread Michael Jones
Great! On Fri, Apr 28, 2017 at 6:14 PM, Vikas Kumar wrote: > Thanks again Michael and Ishan. My git-hook is completed now, running > perfectly :) > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop re

Re: [go-nuts] Re: Find a string in a file and delete all occurences in the file

2017-04-28 Thread Vikas Kumar
Thanks again Michael and Ishan. My git-hook is completed now, running perfectly :) -- 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...@google

Re: [go-nuts] Weird performance with exp/shiny

2017-04-28 Thread Nigel Tao
On Fri, Apr 28, 2017 at 12:28 PM, Zellyn wrote: > I'm sure I'm doing something hideously wrong with shiny, since my emulator > runs three times faster on my MacBook if I run it under VirtualBox/Ubuntu. > Yes, you read that right. > Here, I tweeted an animated gif of them running side by side: > ht

Re: [go-nuts] Strange Go runtime behavior related to xml.Unmarshal

2017-04-28 Thread Ian Lance Taylor
On Thu, Apr 27, 2017 at 4:47 AM, Nikos Anastopoulos wrote: > > I have a Go app that, among others, continuously parses XML files to extract > dynamic info. This seems to cause a strange behavior in the Go runtime, > according to which the underlying Go threads keep increasing over time. > > I veri

[go-nuts] Re: Ukrainian translation for tour.golang.org

2017-04-28 Thread yurisirenko
> > Maksyme, > This is awesome, great job! Minor for https://go-tour-ua.appspot.com/flowcontrol/4 нескінченний цикл виражений щільно I'd translate "compactly expressed" as "styslo" Thanks a lot, Yuri -- You received this message because you are subscribed to the Google Groups "golang-nuts

[go-nuts] Re: How to do OS Authentication in Oracle with Go?

2017-04-28 Thread Tieson Molly
Tamás, this is great news. Thank you -Ty On Wednesday, April 26, 2017 at 4:22:01 PM UTC-4, Tamás Gulácsi wrote: > > > > 2017. április 25., kedd 21:46:27 UTC+2 időpontban Tieson Molly a > következőt írta: >> >> Tamás, I was looking for a way to have the OS handle the authentication >> for the

[go-nuts] Re: a productive simple conf loader

2017-04-28 Thread Tong Sun
Excellent, thanks. On Friday, April 28, 2017 at 12:15:44 AM UTC-4, zsou...@gmail.com wrote: > > goconf > >- Read configuration automatically based on the given struct's field >name. >- Load configuration from multiple sources >- multiple fi

[go-nuts] [ANN] rest, a command line rest client

2017-04-28 Thread Pieter Slabbert
rest is a command line client for interacting with restish web services. I created this to explore web services that I intend to use, and to interactively test the services I'm creating at work. I have been using it for a few weeks and it does most of what I want it to. It can be found at https

Re: [go-nuts] How let go and c code work Alternately in the same thread

2017-04-28 Thread Ian Lance Taylor
On Thu, Apr 27, 2017 at 11:18 PM, hui zhang wrote: > > How let go and c code work Alternately in the same thread with > goroutine(corouting mechanism) I'm not sure but I think you may be looking for https://golang.org/pkg/runtime/#LockOSThread . Ian -- You received this message because you are

Re: [go-nuts] Defaulting build mode to PIE (and building go in PIE mode)

2017-04-28 Thread Ian Lance Taylor
On Thu, Apr 27, 2017 at 10:57 PM, wrote: > > We in Alpine Linux would like to ship Go so that it defaults to PIE > buildmode. We acknowledge that Go generally produces safer code, but we > still consider it to be viable protection when linking in C (or other) code > to Go applications. If the ext

[go-nuts] Re: Weird performance with exp/shiny

2017-04-28 Thread gary . willoughby
I'm just guessing but I don't think the emulated version is faster, just that it is not being throttled. Usually, when creating games or demos there is a throttle in the code to stop the main loop from executing as fast as it can. It looks like this is being respected on Mac but not in the emul

[go-nuts] Defaulting build mode to PIE (and building go in PIE mode)

2017-04-28 Thread timo . teras
Hi, We in Alpine Linux would like to ship Go so that it defaults to PIE buildmode. We acknowledge that Go generally produces safer code, but we still consider it to be viable protection when linking in C (or other) code to Go applications. If the external code has security issues, it is an add

Re: [go-nuts] Re: How let go and c code work Alternately in the same thread

2017-04-28 Thread hui zhang
The different framework decide c/go have to be in different loop ,,a c loop and a go loop. It is hard to change that, 2017-04-28 16:17 GMT+08:00 : > > > On Friday, April 28, 2017 at 9:18:03 AM UTC+3, hui zhang wrote: >> >> How let go and c code work Alternately in the same thread with >> goro

Re: [go-nuts] Re: How let go and c code work Alternately in the same thread

2017-04-28 Thread hui zhang
I tried , it is *not* in the same thread. if cwork and gowork call thread-unsafe api, it will crash package main // #include import "C" import ( _ "fmt" "time" "runtime" ) var go_done = make(chan bool, 1) var c_done = make(chan bool, 1) func init() { runtime.GOMAXPROCS(1) //

[go-nuts] Re: How let go and c code work Alternately in the same thread

2017-04-28 Thread djadala
On Friday, April 28, 2017 at 9:18:03 AM UTC+3, hui zhang wrote: > > How let go and c code work Alternately in the same thread with > goroutine(corouting mechanism) > Check the code below. c and go code in one thread they just do work 1 by > 1. > Expected Result > >> Do CWork >> Do GoWork >> D