Re: [go-nuts] Re: Generating code into module cache?

2020-10-21 Thread Matt Mueller
Thanks for your thoughts! > I'm not sure what the advantages would be over doing the normal approach of generating the files and committing them? Mostly trying to improve the UX by avoiding generated code clutter during development. I concede that storing all your generated code in one

Re: [go-nuts] Proposal to add Index operator methods

2020-10-21 Thread Raanan Hadar
Hi everyone, The proposal was closed about a week ago with the conclusion that: "There was further discussion, but no change in consensus on this particular proposal." First of all, let me begin that I am always humbled by the wisdom and passion of the Go community and that this whole process

Re: [go-nuts] Any embedded scripting language for Go

2020-10-21 Thread Aravindhan K
Thanks for the suggestions, I will check it out. Go as interpreted language seems an interesting idea, I will surely try that. https://goplay.space#draw wonderful idea! to teach programming to kids. Thanks, Aravindhan K On Wed, Oct 21, 2020 at 11:48 PM Wojciech S. Czarnecki wrote: > Dnia

[go-nuts] Help shape the future of Go via the 2020 Go Developer Survey

2020-10-21 Thread 'Alice Merrick' via golang-nuts
Hey folks, It's time again for the annual Go Developer Survey! There have been a few changes to this year's survey you can read about at the blog . We'd love to hear from everyone who uses Go, used to use Go, or is interested in using Go, to help ensure the

Re: [go-nuts] Golang slow performance inside for loop MySQL Queries

2020-10-21 Thread David Riley
On Oct 21, 2020, at 6:41 AM, Bill wrote: > > Hello, > I created the sql to fetch all info in one call instead of multiple calls per > each row. > > One thing I noticed about golang is that when I ping my Remote DB from > localhost (running in vscode) I get ping -> 1.573826274s. So I think

Re: [go-nuts] schedule a job executing in future

2020-10-21 Thread Urjit Singh Bhatia
Hi James, I had a similar need a few years ago and wrote this https://github.com/chronomq/chronomq We've been using it in production for more than 2 years now and the project is fairly stable. On Tuesday, October 20, 2020 at 1:40:59 AM UTC-7 gzh...@gmail.com wrote: > Hello Uday and Jesper, >

[go-nuts] Re: Any embedded scripting language for Go

2020-10-21 Thread Max
It's also possible to embed a Go interpreter in a Go App - in this way, the scripting language is Go itself. There are several fairly complete Go interpreters around, including at least: https://github.com/cosmos72/gomacro (disclaimer: I am the author) https://github.com/traefik/yaegi

[go-nuts] Re: CSS-like selectors for Go AST?

2020-10-21 Thread Max
Yes, it could be extracted to a separate module, but package github.com/cosmos72/gomacro/ast2 already has very few dependencies. In particular, it does *not* depend on the Go interpreter github.com/cosmos72/gomacro/fast The integer arguments are simple: `y.Get(0)` means "get the first (index =

Re: [go-nuts] Any embedded scripting language for Go

2020-10-21 Thread Wojciech S. Czarnecki
Dnia 2020-10-21, o godz. 11:01:58 Aravindhan K napisał(a): > Hi, > > I am looking for a way to build interactive app,where user will be giving > instructions to draw as a script,rendering of the script will be displayed > live. There is such one ready, awaiting you: https://goplay.space#draw

Re: [go-nuts] Re: Generating code into module cache?

2020-10-21 Thread Paul Jolly
I would personally steer clear of writing anything to the module cache. If you are only code generating into the module cache and not publishing this generated code, by definition that generated content will not be available remotely. Hence any code you publish that depends on this generated

Re: [go-nuts] Golang slow performance inside for loop MySQL Queries

2020-10-21 Thread Bill
Hello, I created the sql to fetch all info in one call instead of multiple calls per each row. One thing I noticed about golang is that when I ping my Remote DB from localhost (running in vscode) I get ping -> 1.573826274s. So I think this is the reason that all my calls to db are delayed.

Re: [go-nuts] Golang slow performance inside for loop MySQL Queries

2020-10-21 Thread Tamás Gulácsi
To reuse connections, and pay the slowness only on the first connection, set Config.DB.SetMaxIdleConns(2) Or something like that. As *sql.DB is a pool, this can keep two connections alive - one for your main query, and one for the per-row extra queries. Bill a következőt írta (2020.

Re: [go-nuts] Any embedded scripting language for Go

2020-10-21 Thread Marcin Romaszewicz
Lua is probably your easiest bet: https://github.com/Shopify/go-lua On Tue, Oct 20, 2020 at 10:33 PM Aravindhan K wrote: > Hi, > > I am looking for a way to build interactive app,where user will be giving > instructions to draw as a script,rendering of the script will be displayed > live. > I

Re: [go-nuts] Golang slow performance inside for loop MySQL Queries

2020-10-21 Thread Marcin Romaszewicz
Can you connect to that DB any faster from the same machine not using Go? -- Marcin On Wed, Oct 21, 2020 at 3:43 AM Bill wrote: > Hello, > I created the sql to fetch all info in one call instead of multiple calls > per each row. > > One thing I noticed about golang is that when I ping my

[go-nuts] Installing go buffalo with go 14

2020-10-21 Thread Sayan Dey
I am very new to golang. I am trying to work with the gomod. Trying to explore the go buffalo framework. But finding a bit of difficulty in installing that. ***What I have done:*** 1. I saw that go get is nomore supported for buffalo and so switched to go modules. 2. Created a module by

Re: [go-nuts] Golang slow performance inside for loop MySQL Queries

2020-10-21 Thread David Riley
On Oct 20, 2020, at 1:18 PM, Marcin Romaszewicz wrote: > > Go's database layer is generally pretty quick, I use it a lot, but your code > immediately sets off my DB alarms, because you are doing queries within the > body of another query loop, which means you're opening up lots of >