golang/dep 13230
Go dependency management tool experiment (deprecated)
golang/tour 1266
[mirror] A Tour of Go
Additional operations for the standard library big.Float type
A fuzzer that generates random Go programs
A Ruby library for the RESTful Ensembl API.
A number theory library written in pure Ruby.
Fractal Image Compression
PLIS on CUDA
dct2 su bmp
issue commentgolang/tour
Concurrency - Buffered Channels
Maybe write the first two sentences as: Sending data to a buffered channel is blocked only when the buffer is full. Receiving data is blocked when the buffer is empty.
comment created time in 5 hours
issue commentgolang/tour
Concurrency - Buffered Channels
Original: Sends to a buffered channel block only when the buffer is full. Receives block when the buffer is empty. Modify the example to overfill the buffer and see what happens.
But when we send more items than the buffer size (or in other words, when the buffer is full), we get an error (fatal error: all goroutines are asleep - deadlock!)
comment created time in 13 hours
issue openedgolang/tour
tour: [REPLACE WITH SHORT DESCRIPTION]
Context: https://tour.golang.org/flowcontrol/14
Change the title above to describe your issue and add your feedback here, including code if necessary
created time in 6 days
issue openedgolang/tour
Concurrency - Buffered Channels
Sends to a buffered channel block only when the buffer is full. Receives block when the buffer is empty.
Maybe it should be like this:
Sends block to a buffered channel only when the buffer is NOT full. Receives block when the buffer is NOT empty.
created time in 8 days
issue commentgolang/tour
tour: Appending to a slice enhancement
... I'll bet you could answer this question regarding slices: #1111 .
I find that odd as well.
comment created time in 9 days
issue commentgolang/tour
tour: Appending to a slice enhancement
That's a very good point, it may be useful for it to be it's own post, such as the next page or something.
comment created time in 9 days
issue commentgolang/tour
tour: Appending to a slice enhancement
... I'll bet you could answer this question regarding slices: https://github.com/golang/tour/issues/1111 .
comment created time in 10 days
issue commentgolang/tour
tour: Appending to a slice enhancement
Interesting, but still a little confusing. Shows your point that the underlying slice was impacted by the append to new-slice. But, am not clear on why it should have over-written slice s's next element rather than inserting and growing s, too.
IMO, there's enough going here that your addition should be its own, new page in the tour and not merely appended to "moretype/15".
comment created time in 10 days
issue openedgolang/tour
tour: setting the GOPATH env var is not mentioned
Context: https://tour.golang.org/welcome/3
After running,
go get golang.org/x/tour
The tour binary file was not executable (in local) before setting the $GOPATH and $PATH env variable. hence it may be better to mention about it here (page3).
created time in 10 days
issue openedgolang/tour
tour: [REPLACE WITH SHORT DESCRIPTION]
Context: https://tour.golang.org/moretypes/15 Is not clear in this example why appending 1 item to a slice causes both capacity and length to grow by 1 (makes sense), but when 3 items are appended in one operation, the length grows by 3 (as expected), but the capacity grows by 4! and this was not expected. Here is output from unmodified code-run:
len=0 cap=0 []
len=1 cap=1 [0]
len=2 cap=2 [0 1]
len=5 cap=6 [0 1 2 3 4]
created time in 10 days
issue openedgolang/tour
tour: [REPLACE WITH SHORT DESCRIPTION]
Context: https://tour.golang.org/welcome/1add n Bitcoin.com to all google accounts Chikita Isaac
Change the title above to describe your issue and add your feedback here, including code if necessary
created time in 13 days
issue openedgolang/tour
tour: [REPLACE WITH SHORT DESCRIPTION]
Context: https://tour.golang.org/moretypes/8
Change the title above to describe your issue and add your feedback here, including code if necessary
created time in 13 days
issue commentgolang/tour
tour: [Show Image example is now working properly]
Oh, this is embarrassing :sweat_smile: Apologies and thanks for the heads up @ALTree My mistake
comment created time in 22 days
issue openedgolang/tour
tour: [Show Image example is now working properly]
Context: https://tour.golang.org/methods/25
Most likely the library behavior has changed but the given tour example is not updated accordingly;
Here is the output from the given example without any changes;
go: finding module for package golang.org/x/tour/pic
go: downloading golang.org/x/tour v0.0.0-20201207214521-004403599411
go: found golang.org/x/tour/pic in golang.org/x/tour v0.0.0-20201207214521-004403599411
./prog.go:9:15: cannot use m (type Image) as type image.Image in argument to pic.ShowImage:
Image does not implement image.Image (missing At method)
Go build failed.
created time in 22 days
issue openedgolang/tour
tour: Exercise: Slices Implement Pic.
Context: https://tour.golang.org/moretypes/18
Hi, I like the idea behind this exercise, but there seems to be some missing points that need to be expressed before asking the reader to tackle this exercise --so as to not waste their time etc.
Specifically, this exercise has some tacit/implied context, which makes it unclear how to approach the solution.
It could be resolved by explicitly stating the "hidden" meanings. I understand it is difficult to know what is implicit, when one is used to working in the solution set, so I'll give some examples as questions, in order that they may help clarify what is missing and intended, because this exercise should not be about trying to second guess the meaning of the exercise:
- There are no prior cases in the tour of two dimensional slices. I understand that these are like arrays. And yet
- How does one graph a "function" f(x) here? Does Pic() generate a 3D graph where z = (x+y)/2 for example? Or is it 2D and solve for X first?
- Does Pic() supply default values? If not, what kind of range of values are expected?
- How does one return the slice in the expected format? There are no prior 2D examples to draw from.
This is as far as I got in a reasonable amount of time, where the error messages seemed to not lend to meaningful diagnostics:
`package main import "golang.org/x/tour/pic"
func Pic(dx, dy int) [][]uint8 { var fdyx [][]uint8 for i := 0; i < dy; i++ { for j := 0; j < dx; j++ { append(fdyx[i], uint8((dx+dy)/2.)) } } return fdyx }
func main() { pic.Show(Pic) } ` The error shows as:
./prog.go:10:10: append(fdyx[i], uint8((dx + dy) / 2)) evaluated but not used
And when I comment out that line with: // append(fdyx[i], uint8((dx+dy)/2.)) Running returns this error which doesn't appear to be very useful:
panic: runtime error: index out of range [0] with length 0 goroutine 1 [running]: golang.org/x/tour/pic.Show(0x4f0dd8...
I'm sure I can search for the answer and will, but just thought I'd pass this on, as I have written documentation and appreciate this kind of feedback.
ps. Okay, I saw some solutions. Apparently, I should use 'make' to define the slices. That wasn't clear from: https://tour.golang.org/moretypes/13 To me, that page on use of 'make' doesn't show any examples of slices being defined without fixed lengths, such as a slice with no indexes; So, I interpreted from the examples that may use 'make' to start with a slice with n number of zeroed indexes. This is confirmed with the sentence:
Slices can be created with the built-in make function
Would it be clearer to rephrase the following way?
Slices are created using the built-in make function;
Thank you again. I am really loving to re-learn Go. Now I have a good excuse to use it (and remember it). new year cheers! Ben
created time in 22 days
issue commentgolang/tour
Ha should read the exercise first ;)
comment created time in a month
issue closedgolang/tour
Context: https://tour.golang.org/moretypes/18
closed time in a month
seanmcbreenissue closedgolang/tour
tour: methods/25 library variable namespace issue
Context: https://tour.golang.org/methods/25
Error output
./exercise-images.go:10:15: cannot use m (type Image) as type image.Image in argument to pic.ShowImage:
Image does not implement image.Image (missing At method)
Compilation finished with exit code 2
////////////////////////
Did the library path change?
Image --> image.Image
seeing this on the live: https://tour.golang.org/methods/25
as well as locally: http://127.0.0.1:3999/methods/25
closed time in a month
nargetdevissue commentgolang/tour
tour: methods/25 library variable namespace issue
apologies, I see that was an intentional part of the "tour".
Closing this.
P.s. for reference, solution
import (
"image"
"image/color"
"golang.org/x/tour/pic"
)
type Image struct {
Height, Width int
}
func (m Image) ColorModel() color.Model {
return color.RGBAModel
}
func (m Image) Bounds() image.Rectangle {
return image.Rect(0, 0, m.Height, m.Width)
}
func (m Image) At(x, y int) color.Color {
c := uint8(x ^ y)
return color.RGBA{c, c, 255, 255}
}
func main() {
m := Image{256, 256}
pic.ShowImage(m)
}
comment created time in a month
issue openedgolang/tour
tour: methods/25 library variable namespace issue
Context: https://tour.golang.org/methods/25
Output:
command-line-arguments
./exercise-images.go:10:15: cannot use m (type Image) as type image.Image in argument to pic.ShowImage: Image does not implement image.Image (missing At method)
Compilation finished with exit code 2
////////////////////////
Did the library path change?
Image --> image.Image
seeing this on the live: https://tour.golang.org/methods/25
as well as locally: http://127.0.0.1:3999/methods/25
created time in a month
issue openedgolang/tour
Context: https://tour.golang.org/moretypes/1
In line 15 (fmt.Println(p) // read i through the pointer
) it should read:
fmt.Println(p) // read the pointer to i
created time in a month
issue openedgolang/tour
Context: https://tour.golang.org/moretypes/1
In line 15 (fmt.Println(p) // read i through the pointer
) it should read:
fmt.Println(p) // read the pointer to i
created time in a month
issue closedgolang/tour
Context: https://tour.golang.org/welcome/1
Change the title above to describe your issue and add your feedback here, including code if necessary
closed time in a month
MoonJianissue openedgolang/tour
Context: https://tour.golang.org/welcome/1
Change the title above to describe your issue and add your feedback here, including code if necessary
created time in a month
issue closedgolang/tour
Context: https://tour.golang.org/methods/22
Change the title above to describe your issue and add your feedback here, including code if necessary
closed time in a month
tzaiyangissue openedgolang/tour
Context: https://tour.golang.org/methods/22
Change the title above to describe your issue and add your feedback here, including code if necessary
created time in a month