Re: [go-nuts] Any non-split 'print' functions available?

2019-10-31 Thread Xiangdong JI
Thanks Ian, having difficulty figuring out how to print a pointer using write1, could you please shed a light? Thanks. On Friday, November 1, 2019 at 2:00:04 PM UTC+8, Ian Lance Taylor wrote: > > On Thu, Oct 31, 2019 at 5:10 AM Xiangdong JI > wrote: > > > > seeking utilities for diagnosing som

Re: [go-nuts] Any non-split 'print' functions available?

2019-10-31 Thread Ian Lance Taylor
On Thu, Oct 31, 2019 at 5:10 AM Xiangdong JI wrote: > > seeking utilities for diagnosing some 'nosplit' runtime functions. Thanks a > lot. b := []byte("my debug message\n") write1(2, &b[0], len(b)) Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts"

[go-nuts] Go 1.13.4 and Go 1.12.13 are released

2019-10-31 Thread Andrew Bonventre
Hello gophers, Happy Halloween! 🎃 We have just released Go versions 1.13.4 and 1.12.13, minor point releases. Go 1.13.4 includes fixes to the net/http and syscall packages. Both versions resolve an issue on macOS 10.15 Catalina where the non-notarized installer and binaries were being rejected

Re: [go-nuts] 'print' in runtime code causes panic "newstack at runtime.printlock" and "morestack on g0"

2019-10-31 Thread Ian Lance Taylor
On Thu, Oct 31, 2019 at 4:49 AM Xiangdong JI wrote: > > A few 'print' statements in runtime for diagnosing result in panic like the > following, what could be the root cause? any alternatives to display g's > value? > Thanks a lot. > > 1 g := getg() // exist

Re: [go-nuts] Re: Gofmt needs to allow newline-operator

2019-10-31 Thread Ian Lance Taylor
On Thu, Oct 31, 2019 at 5:06 PM wrote: > > I suppose the change I'm going for is a semicolon won't be inserted if the > next line starts with an operator. > > That seems to make pretty strait forward sense as no line will start with an > operator in the first place. The rule can't be that simpl

Re: [go-nuts] Re: Gofmt needs to allow newline-operator

2019-10-31 Thread mr . sanchke
I suppose the change I'm going for is a semicolon won't be inserted if the next line starts with an operator. That seems to make pretty strait forward sense as no line will start with an operator in the first place. -- You received this message because you are subscribed to the Google Groups

Re: [go-nuts] Re: Gofmt needs to allow newline-operator

2019-10-31 Thread Ian Lance Taylor
On Thu, Oct 31, 2019 at 1:49 PM Max wrote: > > It's not just a matter of gofmt: the "implicit semicolon" rule of Go syntax > is triggered at the end of this line > ``` > if Variable1 == true > ``` > causing it to be parsed as > ``` > if Variable1 == true; > ``` > Any operator in the following lin

Re: [go-nuts] Getting a function's linked address?

2019-10-31 Thread Ian Lance Taylor
On Thu, Oct 31, 2019 at 2:58 PM wrote: > > TBH, I just would like to know if getting a symbol address at link time is > possible. Because I actually found today a workaround to be able to add new > dependencies my -toolexec tool. But I may need to do this later on. I'm still not 100% clear on w

Re: [go-nuts] Getting a function's linked address?

2019-10-31 Thread julio . nemesis
> > You can create a lookup table at run time. What would change if you > could do it at link time? Can you show us the code you want to write? > This is actually linked to my remark on build-time source instrumentation on https://github.com/golang/go/issues/35204 : I insert hooks into func

[go-nuts] Re: Gofmt needs to allow newline-operator

2019-10-31 Thread Max
Indeed. It's not just a matter of gofmt: the "implicit semicolon" rule of Go syntax is triggered at the end of this line ``` if Variable1 == true ``` causing it to be parsed as ``` if Variable1 == true; ``` Any operator in the following line arrives too late to change that. So to implement what

[go-nuts] Re: Gofmt needs to allow newline-operator

2019-10-31 Thread Ilia Choly
Your code doesn't even compile. On Thursday, October 31, 2019 at 1:13:50 PM UTC-4, kevma...@gmail.com wrote: > > I apologize for submitting yet another go format "issue". I'm more so > gauging the community on this idea. Furthermore, I ask that you understand > I'm not sure if this type of code

[go-nuts] Re: Roadblock for user-implemented JIT compiler

2019-10-31 Thread Max
Update: I found a solution using AMD64 assembly trickery to call arbitrary Go functions from JIT code, while the JIT code is running on the Go stack and accessing Go memory. It is extremely hackish and guaranteed to break as soon as Go function call ABI changes. I will try to implement t

[go-nuts] Re: A possible issue with untyped literal numbers

2019-10-31 Thread Marc Vertes
Ok, thank you for your response. Marc Le jeudi 31 octobre 2019 19:07:34 UTC+1, alanfo a écrit : > > This in fact is correct behavior. > > As 100 is an untyped integer constant, 1e2 can not be implicitly converted > to the same type and so the % operation fails. > > You can fix it with: > > func

[go-nuts] Re: A possible issue with untyped literal numbers

2019-10-31 Thread alanfo
This in fact is correct behavior. As 100 is an untyped integer constant, 1e2 can not be implicitly converted to the same type and so the % operation fails. You can fix it with: func main() { println(int(100) % 1e2) } Now 1e2 is converted to 'int' and all is well :) Alan On Thursday, October

[go-nuts] http: superfluous response.WriteHeader call

2019-10-31 Thread thanhsang . dang
help me! web connect database and show view. when press f5 repeatedly command line show http: superfluous response.WriteHeader call... img detail view: [image: er1.png] -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscri

[go-nuts] Gofmt needs to allow newline-operator

2019-10-31 Thread kevmarschke
I apologize for submitting yet another go format "issue". I'm more so gauging the community on this idea. Furthermore, I ask that you understand I'm not sure if this type of code format has a proper name to it, I'm just calling it "newline-operator-chain" (in contrast to "operator-newline-chain

[go-nuts] A possible issue with untyped literal numbers

2019-10-31 Thread Marc Vertes
Hello, I see that the following code func main() { println(100 % 1e2) } is rejected by the compiler with "invalid operation: operator % not defined on untyped float" but the following func main() { i := 100; println(i % 1e2) } is happily accepted. Should I open an issue on this ? What should

[go-nuts] Any non-split 'print' functions available?

2019-10-31 Thread Xiangdong JI
seeking utilities for diagnosing some 'nosplit' runtime functions. Thanks a lot. -- 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...@googlegr

[go-nuts] 'print' in runtime code causes panic "newstack at runtime.printlock" and "morestack on g0"

2019-10-31 Thread Xiangdong JI
Hi, A few 'print' statements in runtime for diagnosing result in panic like the following, what could be the root cause? any alternatives to display g's value? Thanks a lot. 1 g := getg() // existing code 2 print(g, g.stack.lo, g.stack.hi)// new l