Re: [go-nuts] Suggestions for layout/structure/coding-patterns for GUI applications in Go?

2019-01-12 Thread Randall O'Reilly
Tom, One very common and seemingly effective structure is the tree / scenegraph, which is used in Qt and, as the DOM, in HTML, and lots of other places. GoGi https://github.com/goki/gi uses this, so you can see native Go examples there. In Qt and GoGi in particular, you leverage the Layout to

[go-nuts] Re: if/switch statements as expressions

2019-01-12 Thread Lucio
On Sunday, 13 January 2019 01:40:14 UTC+2, David Collier-Brown wrote: > > [ ... ] > Anyone here remember how algol68 addressed that, or what the hollering was > about? > > It's too easy, forty years later, to label algol68 a success. From my very remote location and no social media at the

[go-nuts] Re: if/switch statements as expressions

2019-01-12 Thread Lucio
On Saturday, 12 January 2019 13:04:32 UTC+2, alanfo wrote: > > Sorry for the delay in responding. > > [ ... ] > > Such cases crop up a lot in practice and I don't think I'm the only one > who finds it tedious having to write six lines of code when a single line > suffices in most other C-family

Re: [go-nuts] Re: Suggestions for layout/structure/coding-patterns for GUI applications in Go?

2019-01-12 Thread Bakul Shah
On Sat, 12 Jan 2019 15:55:01 -0800 David Collier-Brown wrote: > > I'm pleasantly mature (born in 1644), but I still don't understand > javascript GUIs (;-)) Amazing. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this

Re: [go-nuts] Transferring host's go-mod-download cache into docker container

2019-01-12 Thread Sam Whited
On Fri, Jan 11, 2019, at 23:03, grego...@unity3d.com wrote: > But now, I don't know how I can essentially copy the mod cache (or > whatever the right term is) like I'd have copied the vendor directory. If you're suggesting that you already have the module cached on the machine that builds your

[go-nuts] Re: Transferring host's go-mod-download cache into docker container

2019-01-12 Thread gregoryh
On Friday, January 11, 2019 at 10:23:01 PM UTC-8, Tamás Gulácsi wrote: > > Use the vendor directory, or use a replace directive with a relative path. Manually adding replace directives for all dependent packages (probably 30-40 now, who knows how many after a few years) sounds like a fairly

[go-nuts] Re: Suggestions for layout/structure/coding-patterns for GUI applications in Go?

2019-01-12 Thread David Collier-Brown
I'm pleasantly mature (born in 1644), but I still don't understand javascript GUIs (;-)) --dave On Friday, January 11, 2019 at 11:53:03 PM UTC-5, Lucio wrote: > > >> I think it's a maturity thing, with the added complexity that the need > for an immediate solution prevents any study of

[go-nuts] Re: if/switch statements as expressions

2019-01-12 Thread David Collier-Brown
Very *very* regular languages like lisp barely made a distinction between expressions and statements, so if was an expression. I'm not sure how well that would work in a c-like language like Go: the debate about that in algol68 was about 8 years before I became interested in computers. Anyone

[go-nuts] Getting public ipv6 address with active privacy extensions

2019-01-12 Thread marc.schubert via golang-nuts
Hi there, i developing a dynodes update client, for a mixed environment ipv4+ipv6 dual stack. For this it would be best to send/update the public ipv6 instead of the temporary address. For short conn, _ := net.Dial("udp6", "[2001:db8::1]:80") defer conn.Close() localAddr :=

[go-nuts] Re: if/switch statements as expressions

2019-01-12 Thread alanfo
Sorry for the delay in responding. Yes, that's a fair point though I was only intending the Iif function to be used for simple cases where the cost of evaluating both expressions is negligible. Such cases crop up a lot in practice and I don't think I'm the only one who finds it tedious having

Re: [go-nuts] Re: how do I make my function always run at exit in `go test`?

2019-01-12 Thread 김용빈
Hmm.. I tested it again and it works today. I think it was just my problem. Sorry for the confusion and thank you! 2019년 1월 10일 목요일 오후 5시 25분 12초 UTC+9, Justin Israel 님의 말: > > > > On Thu, Jan 10, 2019, 9:14 PM 김용빈 > wrote: > >> Hi, Justin. Thank you for the response. >> >> But it didn't work