Re: [go-nuts] strings: escape sequence translation

2021-09-07 Thread Jan Mercl
On Tue, Sep 7, 2021 at 4:40 AM 'nadashin' via golang-nuts wrote: > Why is the function in Go compiler that interprets escape sequences not > available in Go's standard library? FTR: This seems to be an unfortunate way of continuing the thread at

[go-nuts] Is it possible to link object files generated from the Go toolchain using clang linker (lld) ?

2021-09-07 Thread Thor Odinson
I've built an executable file using Go compiler, but the target environments loader expects the program sections to be in specific order and fails to execute. As a result, I'm trying to compile the Go source using 'go tool compile' to generate object files, which I want to link using the clang

Re: [go-nuts] GNU getopt-style Go packages?

2021-09-07 Thread Sandip Bhattacharya
You probably missed pflag (https://github.com/spf13/pflag) which is what I use for anything more than one off programs. That is not to say that other getopt libraries are not good. Just that when I started working on golang, I was looking for the same short-style/long-style support as you are,

[go-nuts] mkwinsyscall and handling HRESULT

2021-09-07 Thread 'Alex Crane' via golang-nuts
I recently used mkwinsyscall for the functions around creating AppContainers (e.g. https://docs.microsoft.com/en-us/windows/win32/api/userenv/nf-userenv-createappcontainerprofile) e.g. Something like: //sys CreateAppContainerProfile(name *uint16, displayName *uint16, description *uint16,

Re: [go-nuts] Does the module name have to include the repo name when you publish a Go module?

2021-09-07 Thread Dean Schulze
Your first paragraph seems to say "no" to my question. But then this seems to say "yes" to my question "In short, the go command needs to be able to form a valid URL from the module path," In my experience it is a definite yes. On Tuesday, September 7, 2021 at 1:51:16 PM UTC-6

Re: [go-nuts] Does the module name have to include the repo name when you publish a Go module?

2021-09-07 Thread 'Jay Conrod' via golang-nuts
The module path needs to be part of a valid URL, but it doesn't have to be the same as the repository URL. That's what my golang.org/x/mod example was meant to demonstrate. The repository is hosted on a different domain. On Tue, Sep 7, 2021 at 1:05 PM Dean Schulze wrote: > Your first paragraph

Re: [go-nuts] Re: slices grow at 25% after 1024 but why 1024?

2021-09-07 Thread 'Keith Randall' via golang-nuts
Sounds good. CL up for review at https://go-review.googlesource.com/c/go/+/347917 On Mon, Sep 6, 2021 at 7:30 PM Arnaud Delobelle wrote: > If the growing function is currently > > f(x) = 2x for x < 1024 > f(x) = x + x/4 otherwise > > (Which I haven't checked), couldn't a simple way be

Re: [go-nuts] Is it possible to link object files generated from the Go toolchain using clang linker (lld) ?

2021-09-07 Thread Ian Lance Taylor
On Tue, Sep 7, 2021 at 9:25 AM Thor Odinson wrote: > > I've built an executable file using Go compiler, but the target environments > loader expects the program sections to be in specific order and fails to > execute. > > As a result, I'm trying to compile the Go source using 'go tool compile'

[go-nuts] Re: Go Boring release schedule

2021-09-07 Thread ancientlore
In my experience, they lag maybe a week for a minor release like 1.16.6 to 1.16.7. I imagine it takes longer for a major release, especially if it's time to upgrade BoringCrypto (like b5 to b7). Mike On Friday, August 27, 2021 at 7:09:21 PM UTC-4 jonath...@gmail.com wrote: > Hey there, > > Go

Re: [go-nuts] strings: escape sequence translation

2021-09-07 Thread 'nadashin' via golang-nuts
On Tuesday, September 7th, 2021 at 20:05, Jan Mercl <0xj...@gmail.com> wrote: > On Tue, Sep 7, 2021 at 4:40 AM 'nadashin' via golang-nuts > > golang-nuts@googlegroups.com wrote: > > > Why is the function in Go compiler that interprets escape sequences not > > available in Go's standard library? >

Re: [go-nuts] Does the module name have to include the repo name when you publish a Go module?

2021-09-07 Thread 'Jay Conrod' via golang-nuts
The module path doesn't need to match the repo URL, but if other modules depend on your module, then the go command needs to be able to find your repository given your module path. The lexical constraints for module paths are documented at https://golang.org/ref/mod#go-mod-file-ident. In short,

[go-nuts] Generating go code using go templates

2021-09-07 Thread Amit Lavon
Hi gophers, I wrote https://github.com/fluhus/goat for generating go code in my projects. I hope it can help you too. It's a minimal tool that takes a text/template template as input, runs it on the given parameters and gofmt's the output. You can also use it

Re: [go-nuts] Does the module name have to include the repo name when you publish a Go module?

2021-09-07 Thread Amit Saha
On Wed, 8 Sept 2021, 5:34 am Dean Schulze, wrote: > If you are going to publish a Go module does the module name have to > include the repo name? I couldn't find this documented anywhere but > through trial and error I've discovered that it is required. > > I named my module like this and

[go-nuts] Does the module name have to include the repo name when you publish a Go module?

2021-09-07 Thread Dean Schulze
If you are going to publish a Go module does the module name have to include the repo name? I couldn't find this documented anywhere but through trial and error I've discovered that it is required. I named my module like this and published it to github: *module key-value-mod* In another

Re: [go-nuts] Various questions about posts from The Go Blog

2021-09-07 Thread Ian Lance Taylor
On Tue, Sep 7, 2021 at 3:40 AM Kamil Ziemian wrote: > > In the post "Concurrency is not parallelism" by Andrew Gerrand > (https://go.dev/blog/waza-talk) under the paragraph starting with "To clear > up this conflation, Rob Pike gave a talk at Heroku’s Waza" in my browser is > big blank space.

Re: [go-nuts] Re: WASM Performance

2021-09-07 Thread David Suarez
Did moving rendering to the browser side (just have the other side prep the data to be rendered) solve for the difference?  how much?  Did he do the same in the Doom article to get it to OK? On 09/07/2021 8:34 AM Stephen Illingworth wrote:

Re: [go-nuts] Re: WASM Performance

2021-09-07 Thread David Suarez
reading emails in reverse, apologies, may be similar to what I just sent.  Is it easy enough to try the request animation frame approach?  may help rule out an error in web worker code or approach if you emulate his flow to start, then start optimizing back to web worker if it solves

Re: [go-nuts] Does the module name have to include the repo name when you publish a Go module?

2021-09-07 Thread Dean Schulze
That's an entirely different issue. The module name in go.mod in both the module itself and any other module that will use the first module has to be a valid URL where the code is hosted, or in your case where you can setup another server (on port 80) with a tag. I was looking to avoid the

Re: [go-nuts] Re: WASM Performance

2021-09-07 Thread ma...@eliasnaur.com
In my experience (Gio projects), WASM is very slow compared to native code; my investigations are part of #32591. You may find https://github.com/golang/go/issues/32591#issuecomment-517835565 relevant, because I cut out rendering to eliminate the JS<=>Go crossing overhead. It was a ~10x

[go-nuts] Re: Questions raised by "Understanding Allocations: the Stack and the Heap - GopherCon SG 2019"

2021-09-07 Thread Brian Candler
> By the way, if someone can explain me what is going on with "println", I would be gratefully. This isn't important to me, since "fmt" give me what I need, but I just curious what Walker used it. https://golang.org/ref/spec#Bootstrapping https://golang.org/ref/spec#Predeclared_identifiers --

[go-nuts] Questions raised by "Understanding Allocations: the Stack and the Heap - GopherCon SG 2019"

2021-09-07 Thread Kamil Ziemian
Hello, I often punch above my weight trying to understand various problem, so when I saw talk "Understanding Allocations: the Stack and the Heap - GopherCon SG 2019" by Jacob Walker (https://www.youtube.com/watch?v=ZMZpH4yT7M0), I cannot resist it. I'm basically compiler front-end user and

Re: [go-nuts] strings: escape sequence translation

2021-09-07 Thread 'nadashin' via golang-nuts
On Tuesday, September 7th, 2021 at 08:55, Kurtis Rader wrote: > It does. See https://pkg.go.dev/strconv#Unquote. Try this hastily thrown > together example: > > package main > > import ( > "fmt" > "strconv" > ) > > func main() { > e := strconv.Quote("a\033\r\nb") > v,

Re: [go-nuts] Re: WASM Performance

2021-09-07 Thread Stephen Illingworth
Yes. I'm seeing a 10x difference in speed too. So at least I know I'm not doing anything fundamentally wrong. It's a general problem at the moment. Thanks. On Tuesday, 7 September 2021 at 09:31:41 UTC+1 ma...@eliasnaur.com wrote: > In my experience (Gio projects), WASM is very slow compared to

Re: [go-nuts] strings: escape sequence translation

2021-09-07 Thread Jan Mercl
On Tue, Sep 7, 2021 at 2:29 PM 'nadashin' via golang-nuts wrote: > > It does. See https://pkg.go.dev/strconv#Unquote. Try this hastily thrown > > together example: > > > > package main > > > > import ( > > "fmt" > > "strconv" > > ) > > > > func main() { > > e :=

Re: [go-nuts] Various questions about posts from The Go Blog

2021-09-07 Thread Kamil Ziemian
Hello, In the post "Concurrency is not parallelism" by Andrew Gerrand (https://go.dev/blog/waza-talk) under the paragraph starting with "To clear up this conflation, Rob Pike gave a talk at Heroku’s Waza" in my browser is big blank space. I believe that that I can see rectangle in it, with

[go-nuts] Re: Questions raised by "Understanding Allocations: the Stack and the Heap - GopherCon SG 2019"

2021-09-07 Thread Kamil Ziemian
Thank you Brian Candler. I finally need to learn EBNF, because it kill me when I tried to read Go Spec last time. Best Kamil wtorek, 7 września 2021 o 12:22:19 UTC+2 Brian Candler napisał(a): > > By the way, if someone can explain me what is going on with "println", I > would be gratefully.

Re: [go-nuts] Various questions about posts from The Go Blog

2021-09-07 Thread Jan Mercl
On Tue, Sep 7, 2021 at 12:40 PM Kamil Ziemian wrote: > In the post "Concurrency is not parallelism" by Andrew Gerrand > (https://go.dev/blog/waza-talk) under the paragraph starting with "To clear > up this conflation, Rob Pike gave a talk at Heroku’s Waza" in my browser is > big blank space.