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

2016-09-11 Thread Matt Davies
Thanks for everyones help. I'm going to go with the subroutine for now. This is all the app does, download a file, manipulate it, then serve it up for pick up. It does the download and manipulate action once a day, and the upload happens once a day. We've got raven emailing us if anything goe

[go-nuts] Re: [ANN] A Go based map reduce system (second attempt)

2016-09-11 Thread Raj
>> However, it is still limited by the fact that Go code can not be sent and executed remotely. I am not sure if this makes the situation better for this particular use case, but I see that David Crawshaw is working on plugin mode for Go. It looks like it will be part of Go1.8. -- You receive

[go-nuts] Re: [ANN] A terminal based search engine for bash commands, built with Go

2016-09-11 Thread Pieter Slabbert
You have the build artifacts in the git repository. It really bloats the download size to have to download every architectures artifact when I want to get the source. Also for each release this will bloat the repo even more. On Sunday, 11 September 2016 19:52:12 UTC+2, johnny-john wrote: > > H

[go-nuts] [ANN] A Go based map reduce system (second attempt)

2016-09-11 Thread ChrisLu
Hi, This is a second attempt to build a Go based map reduce system. The first attempt, https://github.com/chrislusf/glow, can already be executed distributedly. However, it is still limited by the fact that Go code can not be sent and executed remotely. I just started to work on a Go+Lua appro

Re: [go-nuts] A compatible extension to the for construct

2016-09-11 Thread Ian Lance Taylor
On Sun, Sep 11, 2016 at 9:27 PM, Lucio wrote: > I threw away my efforts to explain my idea, lucidity seems to elude me. > > Instead, here's the gist: > >for continue; x < n; x++ { > ... >} > > Currently, the compiler rejects "continue" in the initialisation field and, > given that it'

Re: [go-nuts] What 5 things does Go need in 2017?

2016-09-11 Thread Ian Lance Taylor
On Sun, Sep 11, 2016 at 6:44 PM, Mark Richman wrote: > > I would definitely be interested in triage, backlog refinement, etc. Are > there product owners designated for each functional area? I could start by > making sure new issues are at least assigned to the correct PO for > prioritization. Onl

[go-nuts] Two Related Questions. (1) Map Concurrency (2) Making Multidimensional Arrays

2016-09-11 Thread davidmiller124
*I have two Golang questions that I hope someone could help me out with.* *1) Am I misunderstanding Golang maps?* *I'm trying to translate a project from PHP to Golang for the websockets and the concurrency. * *However, I can't do this.* * var MyArray [string]string* *Inst

Re: [go-nuts] Nil interface/pointer

2016-09-11 Thread Kiki Sugiaman
When making an example to reproduce a problem, I try to be as general as possible. The specific context of the question is a type that wraps multiple errors. It implements the error interface. It's useful when individual error handling is inconvenient, such as inside a defer block. I ended u

[go-nuts] A compatible extension to the for construct

2016-09-11 Thread Lucio
I threw away my efforts to explain my idea, lucidity seems to elude me. Instead, here's the gist: for continue; x < n; x++ { ... } Currently, the compiler rejects "continue" in the initialisation field and, given that it's called "initialisation", that makes sense. If instead the "c

Re: [go-nuts] What 5 things does Go need in 2017?

2016-09-11 Thread Dave Cheney
An 'official' deb/apt/yum repo for Go would be much appreciated, https://github.com/golang/go/issues/10965 On Monday, 12 September 2016 11:44:06 UTC+10, Mark Richman wrote: > > Ian, > > I would definitely be interested in triage, backlog refinement, etc. Are > there product owners designated for

Re: [go-nuts] What 5 things does Go need in 2017?

2016-09-11 Thread Mark Richman
Ian, I would definitely be interested in triage, backlog refinement, etc. Are there product owners designated for each functional area? I could start by making sure new issues are at least assigned to the correct PO for prioritization. With respect to packaging, I'm aware of the current effort

Re: [go-nuts] Nil interface/pointer

2016-09-11 Thread Dan Kortschak
On Mon, 2016-09-12 at 01:17 +0100, Julian Phillips wrote: > Um, no you don't ... > > If you want to get at the actual interface type being passed in then > you > need to do the dance, but in this case the question was about the > pointer in the interface - so we don't care about the Fooer type a

Re: [go-nuts] Re: Why a single go routine with sleep is using 100% cpu (1 core)

2016-09-11 Thread Ilya Kostarev
On 09/12/2016 03:01 AM, Sagar P. wrote: Ah, I see my mistake. Removed default to avoid a busy-loop. Thanks! Without `default` you need hot `for` and `select` at all. Just _ = <-channel: fmt.Println("Go routine has ended") os.Exit(0) would be enough. In real situations however `d

Re: [go-nuts] What 5 things does Go need in 2017?

2016-09-11 Thread aroman
There's also decimal128 support (first via a third-party library before inclusion into the language itself): https://github.com/golang/go/issues/12332 =) - Augusto On Sunday, September 11, 2016 at 5:01:21 PM UTC-7, Pablo Rozas-Larraondo wrote: > > Hi Mark, > > I can also suggest you to look in

Re: [go-nuts] Nil interface/pointer

2016-09-11 Thread Julian Phillips
On 12/09/2016 00:27, Dan Kortschak wrote: On Sun, 2016-09-11 at 19:41 +1000, Kiki Sugiaman wrote: Not exactly a solution for the faint hearted, hah! It's long, but not complicated, and in the context of Axel's comment would be placed in a helper of some variety. For those at home, it's necess

Re: [go-nuts] What 5 things does Go need in 2017?

2016-09-11 Thread Pablo Rozas-Larraondo
Hi Mark, I can also suggest you to look into the open discussion that's currently happening on how multidimensional slices should be implemented in future versions of Go. I particularly find that area and the proposed ideas very interesting: https://github.com/golang/go/issues/6282 Cheers, Pab

[go-nuts] Re: Why a single go routine with sleep is using 100% cpu (1 core)

2016-09-11 Thread Sagar P.
Ah, I see my mistake. Removed default to avoid a busy-loop. Thanks! On Sunday, September 11, 2016 at 4:11:26 PM UTC-7, Sagar P. wrote: > > go version > go version go1.6.3 linux/amd64 > > uname -r > 3.13.0-95-generic > > Below code is using 100% cpu (1 full core) > > package main > > import ( >

Re: [go-nuts] Nil interface/pointer

2016-09-11 Thread Dan Kortschak
On Sun, 2016-09-11 at 19:41 +1000, Kiki Sugiaman wrote: > Not exactly a solution for the faint hearted, hah! It's long, but not complicated, and in the context of Axel's comment would be placed in a helper of some variety. For those at home, it's necessary to take the address of the interface val

[go-nuts] Re: Why a single go routine with sleep is using 100% cpu (1 core)

2016-09-11 Thread Chris Hines
On Sunday, September 11, 2016 at 7:11:26 PM UTC-4, Sagar P. wrote: > > go version > go version go1.6.3 linux/amd64 > > uname -r > 3.13.0-95-generic > > Below code is using 100% cpu (1 full core) > > package main > > import ( > "fmt" > "os" > "time" > ) > > > func main() { > channe

[go-nuts] Why a single go routine with sleep is using 100% cpu (1 core)

2016-09-11 Thread Sagar P.
go version go version go1.6.3 linux/amd64 uname -r 3.13.0-95-generic Below code is using 100% cpu (1 full core) package main import ( "fmt" "os" "time" ) func main() { channel := make(chan bool, 1) go doSomething(channel) for { select { case <-chann

[go-nuts] Re: [ANN] A terminal based search engine for bash commands, built with Go

2016-09-11 Thread johnny-john
Hey, thanks for the feedback, and code review :)) The swap files, I am definitely removing. Printing without no limit is definitely a feature I want to get done! Sorting is a very good idea, I think it will be done on the server side though. That cookbook is epic, thanks for the heads up! The

Re: [go-nuts] Another divide by zero (float) question

2016-09-11 Thread Ian Lance Taylor
On Sun, Sep 11, 2016 at 11:40 AM, wrote: > https://play.golang.org/p/tLSyUw1Ojq > > This operation is caught by the compiler > > a:=float32(1) / float32(0) > > > ok This has been asked before - but not with a satisfactory answer afaict > > The spec says ( https://golang.org/ref/spec#Arithmetic_o

[go-nuts] Re: [ANN] A terminal based search engine for bash commands, built with Go

2016-09-11 Thread howardcshaw
Taking a quick look; you've got some Vim style .swp files in your git repository that should be removed. Next, in main.go (anyone else start thinking of tropical fruits at this point?) you use 'break Loop' when the number of lines exceeds 10, which means one long solution can crowd out less wor

[go-nuts] Another divide by zero (float) question

2016-09-11 Thread xiiophen
https://play.golang.org/p/tLSyUw1Ojq This operation is caught by the compiler a:=float32(1) / float32(0) ok This has been asked before - but not with a satisfactory answer afaict The spec says ( https://golang.org/ref/spec#Arithmetic_operators ) *The result of a floating-point or complex

Re: [go-nuts] What 5 things does Go need in 2017?

2016-09-11 Thread Ian Lance Taylor
On Sun, Sep 11, 2016 at 6:43 AM, Mark Richman wrote: > > I'm somewhat new to the community, and seek to understand its challenges > better. I'm also looking for opportunities to contribute. > > To that end, what 5 things does Go need in 2017? > > For example: language features, tooling, advocacy,

[go-nuts] [ANN] A terminal based search engine for bash commands, built with Go

2016-09-11 Thread johnny-john
Hi all! Just thought about dropping this link here, the codebase is VERY small, so if you are a newbie looking for a project to get into, have a look: https://github.com/crufter/borg Cheers -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To u

Re: [go-nuts] how to resolve the warning about composite literal uses unkeyed fields .

2016-09-11 Thread gaojingan
Thank you very much 在 2016年8月24日星期三 UTC+8下午2:07:52,Deshi Xiao写道: > > Thanks Matt > > 2016-08-23 9:56 GMT+08:00 Matt Harden >: > >> cluster.ImageFilterOptions has an embedded field of type >> types.ImageListOptions. When fields are embedded, the field name is set to >> the type. So you can write

Re: [go-nuts] Re: Can't understand untyped constant behavior

2016-09-11 Thread Manlio Perillo
Il giorno domenica 11 settembre 2016 13:30:40 UTC+2, Uvelichitel ha scritto: > > > On 09/10/2016 09:18 PM, Manlio Perillo wrote: > > Il giorno giovedì 8 settembre 2016 17:31:55 UTC+2, Uvelichitel ha scritto: >> >> >> func main() { >> const x, y = 5, 3 >> var f float32 = x

Re: [go-nuts] Re: Assigning +Inf to a float32 ..

2016-09-11 Thread Jakob Borg
Exported variables can be changed, which is unnecessary to allow in this case. //jb On Sun, 11 Sep 2016 at 15:32, wrote: > > > On Sunday, 11 September 2016 14:25:29 UTC+1, Ian Lance Taylor wrote: > >> On Sun, Sep 11, 2016 at 6:06 AM, wrote: >> > >> > Also curious as why the implementation is

[go-nuts] What 5 things does Go need in 2017?

2016-09-11 Thread Mark Richman
I'm somewhat new to the community, and seek to understand its challenges better. I'm also looking for opportunities to contribute. To that end, what 5 things does Go need in 2017? For example: language features, tooling, advocacy, community, platform support, etc. -- You received this message

Re: [go-nuts] Re: Assigning +Inf to a float32 ..

2016-09-11 Thread xiiophen
On Sunday, 11 September 2016 14:25:29 UTC+1, Ian Lance Taylor wrote: > > On Sun, Sep 11, 2016 at 6:06 AM, > > wrote: > > > > Also curious as why the implementation is as math.NaN() rather than just > > math.NaN (function/method not constant). It doesn't seem to help with a > > potential int

Re: [go-nuts] Re: Assigning +Inf to a float32 ..

2016-09-11 Thread Ian Lance Taylor
On Sun, Sep 11, 2016 at 6:06 AM, wrote: > > Also curious as why the implementation is as math.NaN() rather than just > math.NaN (function/method not constant). It doesn't seem to help with a > potential interfaces. Go constants are untyped, more or less unlimited, and do not support NaN or infin

[go-nuts] Re: Assigning +Inf to a float32 ..

2016-09-11 Thread xiiophen
ok thanks - that seems to be them all I think the library would benefit from more 'obvious' , built in constant, or single parameterless function to generate these - more commonly as values to test output against, rather than inputs. I'll put in that request and see if it gets picked up. Also

Re: [go-nuts] Re: Assigning +Inf to a float32 ..

2016-09-11 Thread Ian Lance Taylor
On Sun, Sep 11, 2016 at 5:46 AM, wrote: > afaict there is no support in /math to generate a signed zero. ? math.Copysign(0, -1) Ian -- 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

[go-nuts] Re: Assigning +Inf to a float32 ..

2016-09-11 Thread xiiophen
afaict there is no support in /math to generate a signed zero. ? -- 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 mor

Re: [go-nuts] Re: Can't understand untyped constant behavior

2016-09-11 Thread Ian Lance Taylor
On Sun, Sep 11, 2016 at 4:33 AM, Ilya Kostarev wrote: > > On 09/10/2016 09:18 PM, Manlio Perillo wrote: > > Il giorno giovedì 8 settembre 2016 17:31:55 UTC+2, Uvelichitel ha scritto: >> >> >> func main() { >> const x, y = 5, 3 >> var f float32 = x / y >> fmt.Println

Re: [go-nuts] Re: Can't understand untyped constant behavior

2016-09-11 Thread Ilya Kostarev
On 09/10/2016 09:18 PM, Manlio Perillo wrote: Il giorno giovedì 8 settembre 2016 17:31:55 UTC+2, Uvelichitel ha scritto: func main() { const x, y = 5, 3 var f float32 = x / y fmt.Println(f) } In your case the default type of x and y a

Re: [go-nuts] Nil interface/pointer

2016-09-11 Thread 'Axel Wagner' via golang-nuts
The reason is, that there should be no reason in practice to ask this question. There is nothing special about nil-pointers in a non-nil interface, they are a perfectly valid implementation of that interface. The only reason I could think of why you would need to ask that question is, if you want t

Re: [go-nuts] Nil interface/pointer

2016-09-11 Thread Kiki Sugiaman
Thanks, Dan. Not exactly a solution for the faint hearted, hah! -- 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 mor

RE: [go-nuts] Assigning +Inf to a float32 ..

2016-09-11 Thread John Souvestre
Ignore. math.NaN() is there! J John John Souvestre - New Orleans LA From: John Souvestre [mailto:j...@souvestre.com] Sent: 2016 September 11, Sun 02:39 To: 'golang-nuts' Subject: RE: [go-nuts] Assigning +Inf to a float32 .. This does beg the question: Why is there no math.NaN()

RE: [go-nuts] Assigning +Inf to a float32 ..

2016-09-11 Thread John Souvestre
This does beg the question: Why is there no math.NaN() function? John John Souvestre - New Orleans LA From: golang-nuts@googlegroups.com [mailto:golang-nuts@googlegroups.com] On Behalf Of Dave Cheney Sent: 2016 September 11, Sun 01:00 To: golang-nuts Cc: xiiop...@gmail.com Subject: R