Yesterday
shurcooL commented on Make flags local to the commands th… in github.com/gopherjs/gopherjs12h
> The only change that I see being possible is to create all flags within a dummy flag set, then look them up, and add to individual commands. I've done that in fe2b2c69b8d23430b4a6c8240ad44aa0b15…
shurcooL pushed to github.com/gopherjs/gopherjs12h
fe2b2c69Define all flags on a dummy flag set.
shurcooL commented on Make flags local to the commands th… in github.com/gopherjs/gopherjs12h
Ideally, what I want to do is create all the flags, then add them to the commands that need/use them. However, I don't see an API to create a standalone flag, only to create one within a flag set,…
shurcooL commented on CORS error in github.com/neelance/graphql-go16h
https://en.wikipedia.org/wiki/Cross-origin_resource_sharing serves as a good reference on the topic of CORS.
shurcooL commented on Add support for converting duration… in github.com/dustin/go-humanize16h
This seems pretty similar to #48. Can you elaborate on how this would be more useful than the [default string format](https://godoc.org/time#Duration.String) for a `time.Duration`, which has the f…
shurcooL commented on Add _test to testing file so it doe… in github.com/neelance/graphql-go20h
> I didn't know that the "one package per directory" rule was lifted in the case of tests. I've been moving my non-package tests to a different director for no reason apparently. @jargv It's not l…
This Week
shurcooL commented on Add _test to testing file so it doe… in github.com/neelance/graphql-go1d
> I started down that path. It introduced a cyclic dependency issue between the graphql and gqltesting packages. I have a feeling this will cascade further. I expect that `qltesting` should import…
shurcooL commented on Clean up Options struct and Markdow… in github.com/russross/blackfriday1d
Now that I've written up that idea, and thought more about it, I'm not completely confident it's a great fit for blackfriday's API. The goal is worthwhile, but it seems a Markdown parser is best thou…
shurcooL commented on Clean up Options struct and Markdow… in github.com/russross/blackfriday1d
Sorry for the delay, I had to prepare for a short guest talk on Friday. I've been able to look at this now, and I have further thoughts. Thanks for applying some of the ideas so far, @rtfb. This i…
shurcooL commented on Make flags local to the commands th… in github.com/gopherjs/gopherjs1d
@neelance Do you have a chance to review this?
shurcooL commented on Add _test to testing file so it doe… in github.com/neelance/graphql-go1d
> It's also problematic, in general, that our app has all of the testing flags registered (and displayed with -h) by just importing graphql-go. Yeah, importing `testing` package in a library is no…
shurcooL commented on Is slow running js code called from… in github.com/gopherjs/gopherjs1d
If the code is slow or even _potentially_ slow, depending on factors, it's best to to treat it as "blocking" and only call in a goroutine in callbacks. To treat code as non-blocking, you need to b…
shurcooL commented on Returning a variable in the same st… in github.com/gopherjs/gopherjs1d
Can confirm and reproduce. This is a compiler bug. @neelance I've seen you approach some select/switch statements with https://github.com/neelance/astrewrite, rewriting the AST into a simpler but …
shurcooL commented on non-master branches not being recog… in github.com/golang/gddo1d
@smasher164 Given that it uses slightly different code (although also in `./gosrc` package), it'd be best to open a separate issue to track that. You can refer to this issue, since it's related.
shurcooL commented on generated: Update for specification… in github.com/shurcooL/go1d
Updated in 799953c6d3ea4adca15b086950b1961fb2af012e, PTAL.
shurcooL pushed to github.com/shurcooL/go1d
799953c6generated: Factor out byte slices into package scope vars.
shurcooL commented on generated: Update for specification… in github.com/shurcooL/go1d
I see, thanks for the detailed analysis. Can you share the code for `BenchmarkHasPrefixVar` and `BenchmarkHasPrefixInline` so I can reproduce and learn more about this? I'll change it to use varia…
shurcooL commented on generated: Update for specification… in github.com/shurcooL/go1d
@dlsniper As far as I can tell, the compiler is already doing that (in 1.8), but it'd be nice to find a more thorough confirmation of that.
shurcooL commented on generated: Update for specification… in github.com/shurcooL/go1d
I like the idea of `len(prefix) + len(suffix)` though, thanks for sharing that.
shurcooL commented on generated: Update for specification… in github.com/shurcooL/go1d
Here's what I tested: ```diff diff --git a/generated/generated.go b/generated/generated.go index 9838aba..3be5327 100644 --- a/generated/generated.go +++ b/generated/generated.go @@ -63,8 +63…
shurcooL commented on generated: Update for specification… in github.com/shurcooL/go1d
See my reply to @bradfitz above. I tested this when writing the code and saw no performance difference.
shurcooL commented on generated: Update for specification… in github.com/shurcooL/go1d
Are you sure? I thought so too, and I tried it out, but I saw no difference in performance or allocations reported when I did `go test -bench=. -benchmem`. Perhaps the 1.8 compiler optimizes this?…
shurcooL commented on proposal: build: define standard wa… in github.com/golang/go1d
I've updated my generated comment parser Go implementation for the latest specification: https://github.com/shurcooL/go/pull/29 The implementation is simple, it uses `bufio.Reader` and `ReadByt…
shurcooL pushed to github.com/shurcooL/go1d
1b691a84README: Add "./generated" package.
shurcooL created branch in github.com/shurcooL/go1d
update-generated-spec
shurcooL commented on Improve VCS detection in github.com/Masterminds/vcs2d
Does `go get` work on git.launchpad.net? Is it a goal to have the same behavior for resolving import paths to underlying VCS information as `go get` does?
shurcooL commented on Headings w/o space are broken for n… in github.com/primer/primer-markdown2d
Yeah, it looks like the previous Markdown renderer handled headings without space incorrectly. Since GitHub uses a new renderer now that follows the spec more accurately, the best thing to do prob…
shurcooL commented on vcs/gitcmd: need a way to UpdateEve… in github.com/sourcegraph/go-vcs2d
> We've also considered adding additional ops to RemoteOpts like you suggested, and like you said, it did not seem to fit there. > > As a result, in the commit I made, I've added a new API, since w…
shurcooL commented on go get -u github.com/go-gl/glfw/v3.… in github.com/go-gl/glfw2d
Strange, it should work. Does the file `dlfcn.h` exist on your computer? In what locations? This is what I get: ``` $ sudo find / -name 'dlfcn.h' /Applications/Xcode.app/Contents/Developer…
shurcooL pushed to github.com/shurcooL/SLA2d
56961892Document my policy on breaking API changes and Go version.
shurcooL commented on go get -u github.com/go-gl/glfw/v3.… in github.com/go-gl/glfw2d
I have Xcode Version 8.2.1. What version of macOS are you using?
shurcooL commented on proposal: build: define standard wa… in github.com/golang/go2d
> we want tools not written in Go and without access to go/* parsing packages to recognize these files easily. For reference, this is what github/linguist, written in Ruby, currently does (it was …
shurcooL commented on Headings w/o space are broken for n… in github.com/primer/primer-markdown2d
According to https://daringfireball.net/projects/markdown/syntax#header, there should be a space.
shurcooL commented on Add json (un)marshalling methods on… in github.com/satori/go.uuid2d
> So, you removed `u.Valid = false` part. I thought it would be better to explicitly initialize all the fields and not rely on default initialization. I don't mind changing that if you want. I thi…
shurcooL commented on Proposal: minify flag automatically… in github.com/gopherjs/gopherjs2d
> This proposal is about point 1; I'm minded given the discussion to think we probably don't have evidence that the flag set `-m --tags minify` is sufficiently common to provide a shorthand version, …
shurcooL commented on proposal: build: define standard wa… in github.com/golang/go2d
> I guess if the files were hand generated and so didn't have a comment, it would require a full scan. Yes, the worst case is when all files are hand written. > It should be confined to a patte…
shurcooL commented on proposal: build: define standard wa… in github.com/golang/go2d
> is there any reason to even specify `N`? We could bring this proposal in line with the [`go generate` spec](https://github.com/golang/go/blob/178307c3a72a9da3d731fecf354630761d6b246c/src/cmd/go/int…
shurcooL commented on Write analysis to the database in github.com/bradleyfalzon/gopherci3d
Knowing the motivation/rationale would be nice, but oh well.
shurcooL commented on Write analysis to the database in github.com/bradleyfalzon/gopherci3d
Wanna find an existing issue or file a new one? I'm finding these somewhat related ones (but not quite exactly it) so far: - https://github.com/golang/lint/issues/275 - https://github.com/gola…
shurcooL commented on Write analysis to the database in github.com/bradleyfalzon/gopherci3d
I wonder what the motivation in `golint` was to not accept this type of comment style (and whether it was intentional).
shurcooL commented on Improve VCS detection in github.com/Masterminds/vcs3d
Just as an observation, it looks like that the [`detectVcsFromRemote`](https://github.com/Masterminds/vcs/blob/abd1ea7037d3652ef9833a164b627f49225e1131/vcs_remote_lookup.go#L81) function and most of …
shurcooL commented on Add json (un)marshalling methods on… in github.com/satori/go.uuid3d
I highly prefer being explicit about return values, I think it's much more readable to see `return err` or `return nil` than just seeing `return` and trying to infer what's being returned. Accordi…
shurcooL pushed to github.com/shurcooL/notificationsapp3d
83c9430bcomponent: Gray out the underline of anchors too.
shurcooL commented on Router implementation in github.com/gopherjs/vecty3d
/cc @albrow who created go-humble/router.
shurcooL commented on POC: allow users to get requested f… in github.com/neelance/graphql-go3d
This identifier name does not follow Go style. See https://github.com/golang/go/wiki/CodeReviewComments#initialisms.
shurcooL commented on vcs/gitcmd: need a way to UpdateEve… in github.com/sourcegraph/go-vcs3d
> the following "git fetch" command will put a warning message in stderr, even if the "git fetch" works correctly. What kind of warning message is it? Is it maybe possible to detect it in `parseRe…
shurcooL commented on Proposal: minify flag automatically… in github.com/gopherjs/gopherjs3d
That's actually very similar to the main concern that I've got so far. Introducing this creates the possibility of someone abusing the `minify` tag to have different behavior. As a result, when so…
shurcooL commented on cmd/go: define command-line API for… in github.com/golang/go3d
This issue came to exist because of the following exchange in #18653: > **rsc:** There is no intent to expose the internals of the go command for direct import by programs that want to behave like…
shurcooL commented on Incorrectly reports "no HEAD branch" in github.com/shurcooL/Go-Package-Store3d
I've created https://github.com/niemeyer/gopkg/issues/54 which I believe is the root issue that needs to be resolved. Once it is, everything here should work. I could try to add some hacky workaro…
shurcooL pushed to github.com/shurcooL/go3d
caf35955generated: Fix godoc formatting issue.
shurcooL commented on proposal: build: define standard wa… in github.com/golang/go3d
I've merged shurcooL/go#28, and so the [`github.com/shurcooL/go/generated`](https://godoc.org/github.com/shurcooL/go/generated) package is available for early testing now, if anyone wants to. Ther…
shurcooL deleted branch in github.com/shurcooL/go3d
issue13560generated
shurcooL pushed to github.com/shurcooL/go3d
82389cb7generated: Parser for Go issue 13560 proposed specification.
shurcooL commented on generated: Parser for Go issue 1356… in github.com/shurcooL/go3d
I've given this plenty of time to receive feedback before merging. Doing that now.
shurcooL commented on simple: detect mostly identical bra… in github.com/dominikh/go-tools3d
I didn't mean false positives in that it would change behavior, but in the sense that "such a change is not actually _simpler_ in some contexts." But now that I think about it more, perhaps if the…
shurcooL commented on Proposal: minify flag automatically… in github.com/gopherjs/gopherjs3d
I'm okay with doing this, as long as there are no good reasons why this shouldn't be done. So far, I can't think of why adding this would be bad... But still thinking. Once we add this, it'll be m…
shurcooL commented on simple: detect mostly identical bra… in github.com/dominikh/go-tools3d
Can this be done without false positives? It feels a lot like a "consider this potential change, maybe it's simpler in your context" type of suggestion in a general case. Unlike the other sugge…
shurcooL commented on proposal: Go 2: ints should be arbi… in github.com/golang/go4d
Can you discuss how such `int` variables would represented in mediums other than memory, and marshaled/unmarshaled? Encoding to JSON should be easy and map really well. As far as I know, JSON spec…
shurcooL commented on int64 IDs in github.com/google/go-github4d
Relevant issue (in a theoretical discussion sense, not practical one): https://github.com/golang/go/issues/19623
shurcooL pushed to github.com/shurcooL/talks4d
43442790Add "A journey in software development" guest talk at UOIT on 2017-03-17.
shurcooL pushed to github.com/shurcooL/talks4d
ce339ca2Add "A journey in software development" guest talk at UOIT on 2017-03-17.
shurcooL pushed to github.com/shurcooL/vfsgen4d
47fc2dcaREADME: Add togo to Alternatives section.
shurcooL commented on Add togo as alternative in github.com/shurcooL/vfsgen4d
Thanks for the heads up.
shurcooL pushed to github.com/shurcooL/notificationsapp4d
54b3ee1bAdjust read notifications to be more faded.
3359f614component: Gray out RepoNotifications header when read.
shurcooL commented on Error query in github.com/glfw/glfw4d
> @shurcooL Going with 1 or 2 wouldn't let you trivially expose the error query function, so I assume you wouldn't be doing that and would use the Go mechanisms only? Yes. The users of the library…
shurcooL commented on add tokentype=basic to example code in github.com/google/go-github4d
I cannot reproduce. Here's what I did. I went to https://github.com/settings/tokens/new and created a new personal access token without any scopes: ![image](https://cloud.githubusercontent.com/…
shurcooL commented on 6dc58d0bupdate post: [Golang] G… in github.com/siongui/userpages4d
You can also simplify this into one line: ```Go // r is a source of random numbers used in this package. var r = rand.New(rand.NewSource(time.Now().UnixNano())) ```
shurcooL commented on Common linter interface in github.com/mvdan/unparam4d
> `gotool` isn't only for linters, and its purpose is already defined and simple. IMO it should be a separate repository. Strongly agreed.
shurcooL commented on 77cd5534new post: [Golang] Gene… in github.com/siongui/userpages4d
You can use examples for that: ```Go func ExampleRandomString() { fmt.Println(RandomString(10) } ``` Examples are documented here: https://golang.org/pkg/testing/#hdr-Examples
shurcooL commented on 77cd5534new post: [Golang] Gene… in github.com/siongui/userpages4d
If you're using global `rand.Rand`, don't re-seed it. But if you want to, create your own instance of `rand.Rand`. For example: ```Go var r *rand.Rand // Rand for this package. func init() …
shurcooL commented on Can't get second attribute location in github.com/goxjs/gl4d
I could reproduce. I think it's because `aVertexPosition2` is unused in your shader code, so it gets optimized away. Try actually using it in the shader, then it works fine: ``` gl_Position = …
shurcooL commented on Can't get second attribute location in github.com/goxjs/gl4d
That looks correct to me, is expect it to work. I'll try to reproduce.
shurcooL commented on add tokentype=basic to example code in github.com/google/go-github4d
Thanks, I'll try to reproduce with that. How did you create the GitHub token? Is it a personal access token? With what scopes? Something else?
shurcooL commented on OrganizationsService: Add projects … in github.com/google/go-github4d
That change should apply to `RepositoriesService.ListProjects` method too. It was taken from there.
shurcooL commented on OrganizationsService: Add projects … in github.com/google/go-github5d
This is normal. `url` struct field tag controls how the field gets marshaled into a query parameter. Take a look at `addOptions` helper which operates on this struct: https://github.com/google/…
shurcooL commented on OrganizationsService: Add projects … in github.com/google/go-github5d
Because the change of signature of `RepositoriesService.ListProjects` method is a breaking change, can you bump up the version by one at https://github.com/shawncatz/go-github/blob/1fe303ba3b67891902…
shurcooL pushed to github.com/avelino/awesome-go5d
217aec21Add dep. (#1326)
shurcooL merged a pull request in github.com/avelino/awesome-go5d
shurcooL commented on OrganizationsService: Add projects … in github.com/google/go-github5d
Ah, I see. I think it should be in one of the two files, either `repos_projects.go` or `orgs_projects.go`. It doesn't really matter which of the two. You could move it to `repos_projects.go` si…
shurcooL commented on OrganizationsService: Add projects … in github.com/google/go-github5d
Yes, the filename looks good. It's consistent with `repos_projects.go` and all the other `orgs_*.go` files.
shurcooL commented on OrganizationsService: Add projects … in github.com/google/go-github5d
`ProjectListOptions` sounds better than `ProjectsListOptions`. Also, you'll need to update the comment to use the new name.
shurcooL commented on OrganizationsService: Add projects … in github.com/google/go-github5d
Thanks for working on this @shawncatz, it's looking great overall.
shurcooL commented on OrganizationsService: Add projects … in github.com/google/go-github5d
What do you think of `ProjectListOptions` as an alternative name for this struct? Also, we should probably update `RepositoriesService.ListProjects` method to also use it, given that https://devel…
shurcooL commented on staticcheck: promote sync.Pool chec… in github.com/dominikh/go-tools5d
Thanks, that helps. > I copied Bradley because he wrote the check, and Dmitri because he might've had experience with the check. This is also very useful to know. I haven't had experience wi…
shurcooL commented on Relax remote comparison in github.com/shurcooL/gostatus5d
Hi Filippo, thanks for contributing! Can I ask what's the problem you're trying to resolve with this PR? What's the rationale for applying this change? I'd also like to point your attention tow…
shurcooL commented on staticcheck: promote sync.Pool chec… in github.com/dominikh/go-tools5d
> No description provided. Can you provide a rationale for this issue?
shurcooL commented on add tokentype=basic to example code in github.com/google/go-github6d
> Apparently, the default value is something else. The default is "Bearer", it's documented here: https://godoc.org/golang.org/x/oauth2#Token.TokenType We try to keep the README and package …
Last Week
shurcooL starred github.com/ory/ladon6d
shurcooL starred github.com/raff/godet6d
shurcooL commented on Add json (un)marshalling methods on… in github.com/satori/go.uuid6d
Yes, I don't think you'll be able to use just `encoding.TextMarshaler` to achieve that, you'll need `json.Marshaler`.
shurcooL commented on lint: provide flag to target specif… in github.com/dominikh/go-tools6d
I just used this, very helpful. Thanks!
shurcooL commented on all: remove a couple of unused func… in github.com/dominikh/go-tools6d
The tools are collaborating and self-improving. What's next? 😆
shurcooL commented on simple: suggest against "copying" o… in github.com/dominikh/go-tools6d
> We do already catch the Sprintf one, though. Is there anything that catches `fmt.Sprint(s)` where `s` type is `string`?
shurcooL commented on Support new user blocking APIs and … in github.com/google/go-github6d
You should make sure there aren't unintended merge conflicts as part of that file. As a side note, if you want to create fenced code blocks, you should use 3 backtick (\`\`\`) characters, not sing…
shurcooL commented on Blackfriday no longer does HTML san… in github.com/spf13/hugo6d
Does hugo operate on any external user input which might be malicious? If so, using bluemonday needs to be done for safety. If the user input is trusted (e.g., own blog posts), then it's not neccessa…