[go-nuts] Re: [ANN] Go Brain Teasers (book)

2020-04-18 Thread Miki Tebeka
> give us a few samples to whet our appetite! > Sure (as long as 1 counts as "few" :) https://www.353solutions.com/go-brain-teasers -- 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

Re: [go-nuts] My solution to Web Crawler excercise

2020-04-18 Thread Vaibhav Kaushik
> On 18-Apr-2020, at 3:46 AM, Will S <92f...@gmail.com> wrote: > >  > Your deadlock comes from the channel never being closed so the for loop in > your main go routine never ends. This makes sense. Thank you. > You need to add some logic to figure out when to close the channel, or break >

Re: [go-nuts] Appending to a slice of an array on the stack

2020-04-18 Thread Ian Lance Taylor
On Sat, Apr 18, 2020 at 10:26 AM Miguel D wrote: > > Hello everyone. > I'm learning the go language and I have some questions regarding the > implementation of slices. > > $ cat slice_stack.go > package main > > import "fmt" > > func main() { > stack_array := [4]int{1,2,3,4} > // !- I ass

Re: [go-nuts] the size of the files compiled in GO

2020-04-18 Thread Josh Kamau
Because golang has a runtime that includes a garbage collector, goroutine scheduler etc On Sat, 18 Apr 2020 at 20:29, Chris Burkert wrote: > https://golang.org/doc/faq#Why_is_my_trivial_program_such_a_large_binary > > schrieb am Sa. 18. Apr. 2020 um 19:25: > >> Why does the simple Hello world p

Re: [go-nuts] Appending to a slice of an array on the stack

2020-04-18 Thread Brian Candler
And very nice explanation here: https://blog.golang.org/slices-intro -- 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...@googlegroups.com. To

Re: [go-nuts] Appending to a slice of an array on the stack

2020-04-18 Thread Marcin Romaszewicz
I added a little more to your example to illustrate my email points. https://play.golang.org/p/eT5tKUniC1E 1) stack_array may or may not be on the stack, Go makes that choice. 2) slice := stack_array[:] Doesn't copy the data, it creates a slice structure which wraps it. 3) Next, when you call sl

Re: [go-nuts] the size of the files compiled in GO

2020-04-18 Thread Chris Burkert
https://golang.org/doc/faq#Why_is_my_trivial_program_such_a_large_binary schrieb am Sa. 18. Apr. 2020 um 19:25: > Why does the simple Hello world program take 2 MB after compilation? > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To un

[go-nuts] Appending to a slice of an array on the stack

2020-04-18 Thread Miguel D
Hello everyone. I'm learning the go language and I have some questions regarding the implementation of slices. *$ cat slice_stack.go * package main import "fmt" func main() { stack_array := [4]int{1,2,3,4} // !- I assume this is on the stack, like a local int[4] would be in C. slic

[go-nuts] the size of the files compiled in GO

2020-04-18 Thread jarek . 1030
Why does the simple Hello world program take 2 MB after compilation? -- 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...@googlegroups.com. To

Re: [go-nuts] Re: DeepCloning a datastructure

2020-04-18 Thread Ankit R Gadiya
How about doing it manually? You can define a DeepCopy method on the type and manually allocate a new struct and initialize the maps and slices by looping over them. That way you get to have more control over all the fields and problem of private fields is solved as well. I would guess this would b

[go-nuts] Re: [ANN] Go Brain Teasers (book)

2020-04-18 Thread Amnon Baron Cohen
give us a few samples to whet our appetite! On Saturday, 18 April 2020 10:15:57 UTC+1, Miki Tebeka wrote: > > Hi, > > I'm happy to announce that my book is finally out. It contains 25 brain > teasers to tickle your mind. > - Gumroad (ePub & PDF) https://gum.co/Qkmou > - Amazon (mobi & dead tree)

[go-nuts] [ANN] Go Brain Teasers (book)

2020-04-18 Thread Miki Tebeka
Hi, I'm happy to announce that my book is finally out. It contains 25 brain teasers to tickle your mind. - Gumroad (ePub & PDF) https://gum.co/Qkmou - Amazon (mobi & dead tree) https://www.amazon.com/dp/B0876DBMFM/ Speical thanks to Dave Cheney for writing the foward and inspiring some of these

Re: [go-nuts] Re: [ANN] Gio: portable immediate mode GUI programs in Go for iOS/tvOS, Android, macOS, Linux, Windows

2020-04-18 Thread Elias Naur
On Fri Apr 17, 2020 at 6:38 PM, wrote: > > Thank you for your Contribution to ease the gioui. > Following link you mentioned for installation in your read file > > https://man.sr.ht/~eliasnaur/gio/install.md > > does not working now. > > Please explain me how to install goui. > Thank you again. >