Re: [go-nuts] Confusing Behavior When Compiling an Assignment Using a Map

2019-03-29 Thread Jan Mercl
On Fri, Mar 29, 2019 at 4:16 PM wrote: > I wonder if what I'm seeing is expected. It is. The language specification defines the selector to produce a single value. -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

[go-nuts] Re: proposal: Go 2: add untyped() type conversion for integer constants #31076

2019-03-29 Thread Michael Jones
Very helpful. Thank you. I will edit my proposal based on this. On Thu, Mar 28, 2019 at 11:17 PM Jan Mercl <0xj...@gmail.com> wrote: > The Compatibility section of the proposal says: "I think that this would > break no existing code, as a user function invocation untyped(EXPR) is not > at

Re: [go-nuts] Re: Confusing Behavior When Compiling an Assignment Using a Map

2019-03-29 Thread Michel Levieux
Think of something like this https://play.golang.org/p/GyPlYefS7ZW (maybe the example could be simpler) --> ok means we found the most nested value or the least one? Le ven. 29 mars 2019 à 16:55, a écrit : > Yes, that is expected. The right hand side of the assignment is > `b[1].code`. That is

Re: [go-nuts] Re: proposal: Go 2: add untyped() type conversion for integer constants #31076

2019-03-29 Thread Ian Lance Taylor
On Thu, Mar 28, 2019 at 11:17 PM Jan Mercl <0xj...@gmail.com> wrote: > > The Compatibility section of the proposal says: "I think that this would > break no existing code, as a user function invocation untyped(EXPR) is not at > present allowed in constant specifications." > > It's true that user

[go-nuts] Re: Confusing Behavior When Compiling an Assignment Using a Map

2019-03-29 Thread jake6502
Yes, that is expected. The right hand side of the assignment is `b[1].code`. That is a single value. The "magic" that allows a two value return from a map lookup does not carry through to more complex expressions that use the value from that lookup. It would get confusing really fast if it

[go-nuts] Re: [ANN] another attempt at desktop ui

2019-03-29 Thread jake6502
No mention of what platforms it supports. You may want to add that to the docs also. On Friday, March 29, 2019 at 5:46:29 AM UTC-4, Johann Freymuth wrote: > > Over the last few months I've tried to write a desktop GUI library that > takes a slightly different approach to traditional GUI

Re: [go-nuts] Confusing Behavior When Compiling an Assignment Using a Map

2019-03-29 Thread Marvin Renich
* jlforr...@berkeley.edu [190329 11:16]: > I get the error > > assignment mismatch: 2 variable but 1 values > > for the assignment statement in Part 2 but the assignment statement in > Part 1 compiles. Both assignment statements have the same number of > values, but it appears that referencing

Re: [go-nuts] Confusing Behavior When Compiling an Assignment Using a Map

2019-03-29 Thread Jan Mercl
On Fri, Mar 29, 2019 at 8:27 PM wrote: > However, in the case that I illustrated there is no such problem. I would have thought that the > language would allow this construct with any expression on the right side, as long as it only has one > map access. Consider type v struct{

[go-nuts] What do the U, V, and W in function names in src/math/big stand for?

2019-03-29 Thread Neven Sajko
For example in mulWW or addVV? It seems to maybe have something to do with function arguments? -- 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

[go-nuts] GopherCon Europe 2019 Tenerife

2019-03-29 Thread GopherCon Europe
Last year's GopherCon Europe in the far-north (Iceland) was a great success! This year GopherCon Europe turns to the far south of the EU, the remote and volcanic coast of the Canaries, Tenerife! From the *30th until the 1st of June*, we will have full days of talks, workshops, community

Re: [go-nuts] Re: proposal: Go 2: add untyped() type conversion for integer constants #31076

2019-03-29 Thread Michael Jones
I updated https://github.com/golang/go/issues/31076 to reflect the comments here. Thank you both. On Fri, Mar 29, 2019 at 9:57 AM Ian Lance Taylor wrote: > On Thu, Mar 28, 2019 at 11:17 PM Jan Mercl <0xj...@gmail.com> wrote: > > > > The Compatibility section of the proposal says: "I think that

[go-nuts] Re: [URGENT] Pass array of string between Go and C library

2019-03-29 Thread Ashutosh Baghel
Well i did some something like this, seems to be working arr := make([]*C.char, count_emp) for i, s := range arr { cs := C.CString(C.GoString(s)) defer C.free(unsafe.Pointer(cs)) arr[i] = cs } k =

[go-nuts] Re: Vue-inspired library with Go+WebAssembly

2019-03-29 Thread Brad
Yeah, it's different. But it would certainly be cool to have a solution that provides an Electron-like shell around a Vugu application. I'll make an issue for it so it's noted for later. On Friday, March 29, 2019 at 9:12:31 PM UTC-7, Mike Schinkel wrote: > > Oops. I think I spoke to soon. I

[go-nuts] Re: Vue-inspired library with Go+WebAssembly

2019-03-29 Thread Mike Schinkel
Hi Brad, This sounds *very* interesting. We are currently building a product using Lorca ( https://github.com/zserge/lorca) but am worried that it is not mature and may never be, and that Chrome could change and disable to features that make it possible at any time. What are your plans for

[go-nuts] Re: Vue-inspired library with Go+WebAssembly

2019-03-29 Thread Mike Schinkel
Oops. I think I spoke to soon. I don't think what you have is an alternative to Lorca, but an alternative to Vue.js *(which might still be interesting.)* *Whoever is moderating **if you see this in time **please just delete both messages.* On Friday, March 29, 2019 at 12:39:42 AM UTC-4, Brad

Re: [go-nuts] What do the U, V, and W in function names in src/math/big stand for?

2019-03-29 Thread Ian Lance Taylor
On Fri, Mar 29, 2019 at 3:14 PM Neven Sajko wrote: > > For example in mulWW or addVV? It seems to maybe have something to do > with function arguments? W is a word (Word aka uint), V is a slice of word ([]Word). U is also a slice of word, but I'm not sure what the difference between V and U is.

Re: [go-nuts] Confusing Behavior When Compiling an Assignment Using a Map

2019-03-29 Thread Marvin Renich
* jlforr...@berkeley.edu [190329 15:28]: > Thanks everyone for responding! > > However, in the case that I illustrated there is no such problem. I > would have thought that the language would allow this construct with > any expression on the right side, as long as it only has one map > access. >

[go-nuts] Re: wasm output and modules

2019-03-29 Thread whitehexagon via golang-nuts
I took out the Funcs for now, but no difference. But good point about the signal! I currently dont have an exit button, Although I figure most people just close a tab, or close the browser, so I guess I need to find a way to make that work without an explicit button...? or maybe they just hit

[go-nuts] Re: [URGENT] Pass array of string between Go and C library

2019-03-29 Thread K.S. Bhaskar
You can see how the YottaDB (https://yottadb.com) Go wrapper does it. Documentation of the API is at https://docs.yottadb.com/MultiLangProgGuide/goprogram.html and source code is at https://gitlab.com/YottaDB/Lang/YDBGo Regards – Bhaskar On Friday, March 29, 2019 at 5:16:05 AM UTC-4, Ashutosh

[go-nuts] Re: proposal: Go 2: add untyped() type conversion for integer constants #31076

2019-03-29 Thread Jan Mercl
The Compatibility section of the proposal says: "I think that this would break no existing code, as a user function invocation untyped(EXPR) is not at present allowed in constant specifications." It's true that user function cannot be called in a constant expression. But conversion to a user

[go-nuts] Re: [URGENT] Pass array of string between Go and C library

2019-03-29 Thread Ashutosh Baghel
Thanks let me check. Will update. On Friday, 29 March 2019 09:23:31 UTC+5:30, Justin Israel wrote: > > > > On Friday, March 29, 2019 at 11:08:06 AM UTC+13, Ashutosh Baghel wrote: >> >> Hi folks, >> >> I am new to Go-Programming and having the following requirement, I need >> to have Array of

[go-nuts] [ANN] another attempt at desktop ui

2019-03-29 Thread Johann Freymuth
Over the last few months I've tried to write a desktop GUI library that takes a slightly different approach to traditional GUI libraries. It uses ideas from immediate mode UI in order to be very lightweight and hopefully somewhat idiomatic. https://github.com/jfreymuth/ui The API is now

[go-nuts] Re: Vue-inspired library with Go+WebAssembly

2019-03-29 Thread Rusco
Congrats, I am sure a lot of gophers waited for something like this ! I especially like this comment: "No node. No JS. No npm. No node_modules folder competing with your music library for disk space"  On Friday, 29 March 2019 04:39:42 UTC, Brad wrote: > > Now that WebAssembly is available as

[go-nuts] Go: Ast: better view of initialization

2019-03-29 Thread Константин Изюмов
Hello, gophers. My task: I have Go AST tree of next code: https://play.golang.org/p/bKz3LGZyNtn ``` type s struct { i int32 c byte } func main() { var a []s = []s{s{1, 'a'}, s{2, 'b'}} fmt.Println(a) } ``` How to modify AST tree for better look struct initialization