Re: [go-nuts] Why fmt.Scan doesn't wait input while using in testing?

2020-03-27 Thread Ian Lance Taylor
On Fri, Mar 27, 2020 at 10:29 PM wrote: > > Hello Evan, where is this `set to /dev/null` operating in the source code of > golang? I tried to explore it, but I didn't find it You are replying to a message from 2012. Many things have changed since then. Ian > 在 2012年2月18日星期六

Re: [go-nuts] Why fmt.Scan doesn't wait input while using in testing?

2020-03-27 Thread ashinminisnake
Hello Evan, where is this `set to /dev/null` operating in the source code of golang? I tried to explore it, but I didn't find it 在 2012年2月18日星期六 UTC+8下午12:16:48,Evan Shaw写道: > > fmt.Scan reads from os.Stdin, which is set to /dev/null when testing. > Tests should be automated and self-contained

Re: [go-nuts] Re: Conversion to Complex numbers

2020-03-27 Thread Ian Lance Taylor
On Fri, Mar 27, 2020 at 9:27 AM wrote: > > > On Friday, 27 March 2020 16:16:18 UTC, Stephen Illingworth wrote: >> >> >> >> On Friday, 27 March 2020 15:58:19 UTC, Brian Candler wrote: >>> >>> On Friday, 27 March 2020 15:42:08 UTC, stephen.i...@gmail.com wrote: // float -> complex

Re: [go-nuts] Go course

2020-03-27 Thread Owen Waller
Hi Dave, As the original author of the post that Dan has referenced, I can say that Go does indeed make IMHO a good first programming language. It all comes down to how you explain things. Thanks Dan for the reference :) I'm not going to repeat what the original discussion said, but let me try to

[go-nuts] Re: Conversion to Complex numbers

2020-03-27 Thread stephen . illingworth
On Friday, 27 March 2020 16:16:18 UTC, Stephen Illingworth wrote: > > > > On Friday, 27 March 2020 15:58:19 UTC, Brian Candler wrote: >> >> On Friday, 27 March 2020 15:42:08 UTC, stephen.i...@gmail.com wrote: >>> >>> // float -> complex >>> >>> const constFloat = 1 >>> >>> >> Did you mean const

[go-nuts] Re: Conversion to Complex numbers

2020-03-27 Thread stephen . illingworth
On Friday, 27 March 2020 15:58:19 UTC, Brian Candler wrote: > > On Friday, 27 March 2020 15:42:08 UTC, stephen.i...@gmail.com wrote: >> >> // float -> complex >> >> const constFloat = 1 >> >> > Did you mean const constFloat = 1.0 ? > Yes. Results are the same. -- You received this message

[go-nuts] Re: Conversion to Complex numbers

2020-03-27 Thread Brian Candler
On Friday, 27 March 2020 15:42:08 UTC, stephen.i...@gmail.com wrote: > > // float -> complex > > const constFloat = 1 > > Did you mean const constFloat = 1.0 ? > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and

[go-nuts] Conversion to Complex numbers

2020-03-27 Thread stephen . illingworth
Hello, Conversion to complex numbers should be done with the complex builtin function, specifying a real and imaginary part. However, is casting to a complex type supported or not? Empirically, it seems to me that sometimes it is and sometimes it isn't. More confusing is that this behaviour

Re: [go-nuts] Re: Slice reuse + GC

2020-03-27 Thread Jan Mercl
On Fri, Mar 27, 2020 at 8:19 AM Leszek Kubik wrote: > A fix for the situation of the topic could be implemented by the slice type. > Imagine, if a slice value not only shared the pointer to the underlying > buffer but also a list with references to all other slices holding on to the >

[go-nuts] Re: Go course

2020-03-27 Thread Miki Tebeka
I'm curious if you find https://www.353solutions.com/annotated-go helpful? On Wednesday, March 25, 2020 at 6:57:23 PM UTC+2, Renato Marcandier wrote: > > Hello guys, > > What's the best course to start with Go? > > > > Regards > RG > -- You received this message because you are subscribed to

Re: [go-nuts] Re: Golang and the mobile framework

2020-03-27 Thread Wojciech S. Czarnecki
Dnia 2020-03-26, o godz. 22:18:40 husam alkdary napisał(a): > which one react-native or Flutter ? and how ? https://www.arputer.com/using-go-library-in-flutter hope this helps, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the

[go-nuts] Re: Golang and the mobile framework

2020-03-27 Thread Brian Candler
You can write your frontend UI in react-native (using Javascript) or flutter (using Dart), and the API backend in Go. -- 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

Re: [go-nuts] Re: Slice reuse + GC

2020-03-27 Thread Leszek Kubik
Wait, by saying it would be nice to have the GC not trace elements between len and cap, you mean it would be nice to have GC recognize unreferenced elements of a slice between len and cap and free them (presumably if they are pointer or interface types)? OK, I would say Go has quirks but I'm

[go-nuts] Re: Print something while read message from server with websocket

2020-03-27 Thread 洪嘉鴻
I'm sorry that I didn't remind that my Client code does not compile. I've tried your example with SetReadDeadline (). It seems like what I want to do. Thank you very much! Max Jake