Re: [go-nuts] Channels may not be the best solution in Go

2019-10-03 Thread JuciÊ Andrade
On Thursday, October 3, 2019 at 2:24:20 AM UTC-3, burak serdar wrote: > > It can be argued that you were misusing channels. Channels are > synchronization mechanisms between goroutines. They are not generic > data pipes. > I use channels exactly that way and they work pretty well. -- You rece

[go-nuts] Show rows affected from query

2019-10-03 Thread Rich
I've written a program that allows users to put in MySQL queries and get results from it. Those queries can be selects, inserts, update, delete etc. I would a better sample of the code but currently the code is over 1000+ lines, but I do something like this: db,err :=sql.Open(mysql, loginCreds)

Re: [go-nuts] Channels may not be the best solution in Go

2019-10-03 Thread burak serdar
On Thu, Oct 3, 2019 at 6:18 AM JuciÊ Andrade wrote: > > On Thursday, October 3, 2019 at 2:24:20 AM UTC-3, burak serdar wrote: >> >> It can be argued that you were misusing channels. Channels are >> synchronization mechanisms between goroutines. They are not generic >> data pipes. > > > I use chann

[go-nuts] Re: Call of a Go-function inside C-code

2019-10-03 Thread dr . ch . maurer
Dear Ian Lance Taylor, thankyou very much for your hint! Kind regards, Christian -- 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...@googleg

[go-nuts] Re: Go WASM question

2019-10-03 Thread Leopoldo Caballero
A map in Go is not ordered, so even the iteration is not the same between several iterations. You can see: https://blog.golang.org/go-maps-in-action I suppose something similar occurs with objects in JS. So, maybe you can iterate the map and output a slice and then sort the slice, that is maybe

[go-nuts] Re: Call of a Go-function inside C-code

2019-10-03 Thread dr . ch . maurer
Dear Ian Lance Taylor, thankyou very much for your hint! Kind regards, Christian Am Mittwoch, 2. Oktober 2019 04:36:4D8 UTC+2 schrieb Christian Maurer: > > Dear community, > > what is wrong with the following simple code, which yields "undefined > reference for F" ? > > > file f.go: > > package

Re: [go-nuts] Channels may not be the best solution in Go

2019-10-03 Thread JuciÊ Andrade
On Thursday, October 3, 2019 at 10:47:27 AM UTC-3, burak serdar wrote: > > On Thu, Oct 3, 2019 at 6:18 AM JuciÊ Andrade > wrote: > > I use channels exactly that way and they work pretty well. > > Then you're paying some penalty for synchronization where the same > thing can be achieved without

Re: [go-nuts] Channels may not be the best solution in Go

2019-10-03 Thread burak serdar
On Thu, Oct 3, 2019 at 8:40 AM JuciÊ Andrade wrote: > > On Thursday, October 3, 2019 at 10:47:27 AM UTC-3, burak serdar wrote: >> >> On Thu, Oct 3, 2019 at 6:18 AM JuciÊ Andrade wrote: >> > I use channels exactly that way and they work pretty well. >> >> Then you're paying some penalty for synchr

[go-nuts] ent: an entity framework for Go

2019-10-03 Thread Noam Schachter
Hi gophers, My team at Facebook Connectivity has just open-sourced a new ORM for Go and would love your feedback about it. GitHub repo at: https://github.com/facebookincubator/ent Story behind it in our blog post: https://entgo.io/blog/2019/10/03/introducing-ent/ Thanks! Noam -- You received

[go-nuts] encoding/json character escaping question

2019-10-03 Thread Poussier William
Hello The encoding/json package escapes 0xA (line feed), 0xD (carriage return) and 0x9 (horizontal tab) using the escape character '\'. However, when it comes to 0x8 (backspace) and 0xc (form feed), it uses the Unicode escape sequence staring with '\u'. Reproducer: https://play.golang.org/

[go-nuts] Show rows affected from query

2019-10-03 Thread Tamás Gulácsi
Query is for SELECT. Everything else needs Exec. -- 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. To view this discussion

Re: [go-nuts] ent: an entity framework for Go

2019-10-03 Thread Marcin Romaszewicz
That looks very nice, congrats! I like that it's simple and doesn't try to solve every problem, just simple relationships, so you can solve most of your simple DB schema needs (and most DB usage is quite simple in most services). Do you have any plans to add a Postgres driver? -- Marcin On Thu,

Re: [go-nuts] Channels may not be the best solution in Go

2019-10-03 Thread JuciÊ Andrade
Burak, feel free to correct me if I am wrong, but now I think I understood the heart of the matter: Your approach to software development is different from mine. Nothing wrong with that. . you normally write sequential code, and uses concurrent code where it fits best. That is fine. . I use to

Re: [go-nuts] Channels may not be the best solution in Go

2019-10-03 Thread Robert Engels
A point to consider though, is that often sequential code is used and concurrency is achieved by running multiple processes. This is pretty much the design of the cloud. A top-level coordinator partitions the work-load, and sequential programs process it, and the top-level assembles the results - t

Re: [go-nuts] Channels may not be the best solution in Go

2019-10-03 Thread burak serdar
On Thu, Oct 3, 2019 at 11:59 AM JuciÊ Andrade wrote: > > Burak, feel free to correct me if I am wrong, but now I think I understood > the heart of the matter: > > Your approach to software development is different from mine. Nothing wrong > with that. > > . you normally write sequential code, an

Re: [go-nuts] ent: an entity framework for Go

2019-10-03 Thread Ariel Mashraki
Yes. PostgreSQL support will be added soon. You can track its progress in our roadmap to v1 - https://github.com/facebookincubator/ent/issues/46 On Thursday, October 3, 2019 at 7:52:01 PM UTC+3, Marcin Romaszewicz wrote: > > That looks very nice, congrats! I like that it's simple and doesn't try

[go-nuts] PKCs8 generated using go has errors when doing a openssl check

2019-10-03 Thread rajesh nataraja
Hi All, I have the following piece of code to generate a private key in PKCS8 form and save it in a file. It does generate a file, but when I try to check using the openssl command openssl rsa -in rsapk.key -check I get the following errors 140092967139232:error:0D0680A8:asn1 encoding rout

[go-nuts] micro review and hello gio: portable GUI code, all in Go

2019-10-03 Thread Jason E. Aten
Somehow I missed Gio ( https://gioui.org/ ) on its first announcement earlier this year. Gio -- as a pure Go GUI framework -- really ought to be better known. Hence I offer here a short review, and a getting started example project. A) The micro review: I am impressed. Gio provides an immedi