Re: [go-nuts] Converting escaped unicode to utf8

2023-02-02 Thread Ben Song
strconv.Unquote returns invalid syntax if the string contains `"`. It is better to quote string before Unquote. https://go.dev/play/p/ndfEi9tSjaM On Thursday, December 29, 2016 at 7:44:07 AM UTC+8 Jakob Borg wrote: Both json.Unmarshal and strconv.Unquote seem to handle this fine: https://play.

[go-nuts] Go 1.19 stack size optimization

2023-02-02 Thread Elad Gavra
Hi, I understand go uses an average metric to predict stack size required for new go routines. Does it have minimum size? I was wandering if go optimizes "static stack size"? i.e. there are cases where the code is predictable and the compiler can analyze the stack size required for routines. In

Re: [go-nuts] Creating and Linking to Shared Library Version of Go Runtime? (with possible solution)

2023-02-02 Thread TheDiveO
If I read the 1.20 release notes correctly, there has been a change with how the compiled std lib not only is delivered (not anymore) and cached, so that it now ends up in the module cache. Maybe you can retry your experiments with 1.20 if this now works without the slightly ugly workarounds?

[go-nuts] Re: Go 1.19 stack size optimization

2023-02-02 Thread 'Keith Randall' via golang-nuts
Currently: - All stack sizes are a power of 2. - The minimum size is 2KB, hardcoded. - We reserve ~800 bytes of goroutine stacks for the runtime. So 1KB stacks are feasible, but just barely. I don't think you could fit much of a goroutine in 200 bytes of stack. So smaller sizes are possible, but

[go-nuts] recommendations please: go source level debugger for linux

2023-02-02 Thread Pat Farrell
I've been using PMD to debug my go code since I started. (PMD => Poor Man's Debugger, i.e fmt.Printf statements) and it was OK for my initial simple stuff. But as I am writing more complex code, I think its time to find a nice source level debugger. Any recommendations? I guess I could use an IDE

Re: [go-nuts] recommendations please: go source level debugger for linux

2023-02-02 Thread Kurtis Rader
FWIW, I still use the Poor Man's Debugger most of the time to understand the behavior of running programs where I can afford to iterate while trying to understand a problem. Having said that I do regularly use an actual debugger to examine core dumps (both user space and from a Unix operating syste

Re: [go-nuts] recommendations please: go source level debugger for linux

2023-02-02 Thread Ian Lance Taylor
On Thu, Feb 2, 2023 at 6:51 PM Pat Farrell wrote: > > I've been using PMD to debug my go code since I started. > (PMD => Poor Man's Debugger, i.e fmt.Printf statements) > and it was OK for my initial simple stuff. But as I am writing > more complex code, I think its time to find a nice source leve