[go-nuts] Go performance in regexdna

2016-09-01 Thread DrGo
What is the reason for Go particularly poor performance in regexdna as shown here? https://benchmarksgame.alioth.debian.org/u64q/performance.php?test=regexdna Cheers -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this

Re: [go-nuts] `go test -i` considered helpful?

2016-09-01 Thread Ian Lance Taylor
On Thu, Sep 1, 2016 at 11:24 AM, 'Tim Hockin' via golang-nuts wrote: > I was running tests against a new project, and it was really slow. > When I ran with -x I saw a bunch of build steps that didn't seem to be > necessary. Spelunking through docs, reveals that `go

Re: [go-nuts] Go performance in regexdna

2016-09-01 Thread Ian Lance Taylor
On Thu, Sep 1, 2016 at 1:34 PM, DrGo wrote: > What is the reason for Go particularly poor performance in regexdna as shown > here? > https://benchmarksgame.alioth.debian.org/u64q/performance.php?test=regexdna In several past discussions of this topic the consensus has

Re: [go-nuts] Re: dynamic frequency ticker

2016-09-01 Thread seb . stark
This works great, thank you! And with minimal changes to my existing code (that's why I didn't like so much the other proposals that use time.After or time.Timer, but thanks anyway!). Am Mittwoch, 31. August 2016 16:06:58 UTC+2 schrieb Marvin Renich: > > > Does this do what you want? > >

Re: [go-nuts] Go performance in regexdna

2016-09-01 Thread DrGo
Thanks Ian, Very helpful -- 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

[go-nuts] [ANN] cybozu-go/cmd for graceful commands

2016-09-01 Thread Hirotaka Yamamoto (ymmt2005)
We are happy to announce general availability of github.com/cybozu-go/cmd , a framework/toolkit to create commands that do stop/restart gracefully with helpful logs. Source: https://github.com/cybozu-go/cmd Tutorial: https://github.com/cybozu-go/cmd/wiki/Tutorial Features include: *

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

2016-09-01 Thread Nigel Tao
On Thu, Sep 1, 2016 at 12:46 PM, Jonathan Pittman wrote: > Does the license need to be the same as the standard Go License if it starts > in another repo and then moves over? IANAL, but that seems best. -- You received this message because you are subscribed to

[go-nuts] `go test -i` considered helpful?

2016-09-01 Thread 'Tim Hockin' via golang-nuts
I was running tests against a new project, and it was really slow. When I ran with -x I saw a bunch of build steps that didn't seem to be necessary. Spelunking through docs, reveals that `go test` doesn't install artifacts. `go test -i` does install artifacts but doesn't run the tests. So I

Re: [go-nuts] on GOPATH

2016-09-01 Thread Edward Muller
For projects that are mostly not go (or go is a component anyway) you could do $HOME/project/src/ and then point $GOPATH=$HOME/project. You can use 2 different segments in $GOPATH (GOPATH=/foo/bar:/bar/foo) and go get will place go gettable packages in the first segment of $GOPATH. On Thu, Sep 1,

Re: [go-nuts] flag: Stack overflow when return stringer with fmt.Sprint

2016-09-01 Thread Harald Weidner
Hello, On Thu, Sep 01, 2016 at 01:59:12AM -0700, Muhammad Shulhan wrote: > > type Slices []string > > > > func (sl *Slices) String() string { > > return fmt.Sprint(sl) > > } > runtime: goroutine stack exceeds 25000-byte limit > fatal error: stack overflow It is always dangerous to

Re: [go-nuts] why this code deadlocks?

2016-09-01 Thread Edward Muller
Thanks, I should have checked the spec. On Thu, Sep 1, 2016 at 11:14 AM Darren Hoo wrote: > I don't think so. > > see https://golang.org/ref/spec#Select_statements > > If one or more of the communications can proceed, a single one that can > proceed is chosen via a uniform

Re: [go-nuts] why this code deadlocks?

2016-09-01 Thread Edward Muller
I think you can still deadlock, but I'm not sure if the `default:` case is considered for random selection of a select like other branches are. It would just be less deterministic. On Thu, Sep 1, 2016 at 10:38 AM Darren Hoo wrote: > Got it, using buffered channel works for

[go-nuts] on GOPATH

2016-09-01 Thread Maurizio Vitale
hello gophers, How people do use GOPATH? having a single workspace for all my projects doesn't really work for me. Some project might involve more than a go portion and really shoehorning them into a go tree doesn't sound right. I'm completely fine with switching GOPATH every time I switch

Re: [go-nuts] `go test -i` considered helpful?

2016-09-01 Thread 'Tim Hockin' via golang-nuts
What's weird to me is that go test -i doesn't actually run tests. Maybe go test -I which does both? On Sep 1, 2016 11:41 AM, "Ian Lance Taylor" wrote: > On Thu, Sep 1, 2016 at 11:24 AM, 'Tim Hockin' via golang-nuts > wrote: > > I was running

[go-nuts] Re: flag: Stack overflow when return stringer with fmt.Sprint

2016-09-01 Thread Muhammad Shulhan
On Thursday, 1 September 2016 16:25:24 UTC+7, dja...@gmail.com wrote: > > Hi, > Do you know what infinite recursion is ? > Yes, I know. > fmt.String use your String method > > see https://play.golang.org/p/jeOilZW7JU > > By that logic, the first example should be stack overflow too, but it's

[go-nuts] Delve within Vim 8 or neovim?

2016-09-01 Thread Steve Mynott
Has any experimented with using delve within either vim 8 or neovim (both of which I believe have better async support for debuggers)? Delve works well under GUD mode in emacs with Evil vim emulation but it would be nice to use it directly. -- 4096R/EA75174B Steve Mynott

[go-nuts] Re: flag: Stack overflow when return stringer with fmt.Sprint

2016-09-01 Thread djadala
s/fmt.String/fmt.Sprintf/ On Thursday, September 1, 2016 at 12:25:24 PM UTC+3, dja...@gmail.com wrote: > > Hi, > Do you know what infinite recursion is ? > fmt.String use your String method > > see https://play.golang.org/p/jeOilZW7JU > > > On Thursday, September 1, 2016 at 11:59:12 AM UTC+3,

Re: [go-nuts] on GOPATH

2016-09-01 Thread Sam Vilain
Hi Maurizio, I tend to use go vendoring for this purpose. I set GOPATH to $HOME, and this is my "global" environment. Each project is checked out to its module path. Instead of using 'go get' to get dependencies, I use git submodules via vendetta. This checks out all of the dependencies for

Re: [go-nuts] Re: Glide for forks

2016-09-01 Thread Henrik Johansson
Can it work when the forked gh repo contains many packages that sometimes use each other? It feels weird to be masking the very repo I cloned to work in... Now I am using the approach outlined by Francesc Campoy in http://blog.campoy.cat/2014/03/github-and-go-forking-pull-requests-and.html Neat

Re: [go-nuts] go doc defaults to use a pager?

2016-09-01 Thread Dave Cheney
function godoc { ${GOBIN:-${GOROOT}/bin}/godoc $@ | ${PAGER:-less} } On Friday, 2 September 2016 10:40:42 UTC+10, anatoly techtonik wrote: > > And why is that? Is it because it is impossible to reliably detect > interactive user session? > > On Thursday, February 16, 2012 at 1:25:28 AM

[go-nuts] Re: How to write Window API in GOLANG

2016-09-01 Thread kumargv
I am running a (.exe) as service ,there am i am trying to create a process user and other things. I am getting this error OpenDesktop : error info -OpenWindowStation: Access is denied. OpenWindowStation: Access is denied.: SCRIPT_FAILED On Thursday, September 1, 2016 at 6:49:56 PM

[go-nuts] job queue with the ability to kill worker processes

2016-09-01 Thread Tieson Molly
Are there any go projects that implement a queue where workers that consume the queue could be tracked and potentially killed if the end user decides to cancel the job? Best regards, Ty -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

[go-nuts] Re: flag: Stack overflow when return stringer with fmt.Sprint

2016-09-01 Thread Uli Kunitz
fmt.Sprint(sl) is not the same as fmt.Sprint(*sl). That makes the String methods in both examples different. On Thursday, September 1, 2016 at 12:02:04 PM UTC+2, Shulhan wrote: > > On Thursday, 1 September 2016 16:25:24 UTC+7, dja...@gmail.com wrote: >> >> Hi, >> Do you know what infinite

[go-nuts] [ANN] j2p: A tool to help migrating from JIRA to Phabricator

2016-09-01 Thread Shulhan
Hi all, I would like to share a tool I made with Golang to help migrating from JIRA to Phabricator. It has been tested on our server, by migrating all projects and their issues, but have some limitations (due to time issue on development), - It does not migrate attachments - It does create

Re: [go-nuts] Cgo Pointer Arithmetic

2016-09-01 Thread James Bardin
On Thursday, September 1, 2016 at 8:45:02 AM UTC-4, Luke Mauldin wrote: > > After I added the unsafe.Pointer conversion the code compiled: > https://play.golang.org/p/QTPyhZzKZH > > So my understanding is that line 15 is jut a pointer type conversion to > slice that is backed by the C array,

[go-nuts] why this code deadlocks?

2016-09-01 Thread Darren Hoo
var wg sync.WaitGroup ints := make(chan int, 1) done := make(chan bool) go func() { for i := 0; i < 3; i++ { ints <- i } close(ints) }() f := func() { wg.Add(1) defer wg.Done() for { i, ok := <-ints if !ok { done <- true return } } } exit: for { select { case <-done: break exit default: f()

Re: [go-nuts] why this code deadlocks?

2016-09-01 Thread Edward Muller
If you execute it you are told on which lines the deadlock happens... fatal error: all goroutines are asleep - deadlock! goroutine 1 [chan send]: main.main.func2() /Users/emuller/go/src/github.com/freeformz/tt/main.go:25 +0xce main.main()