profile
viewpoint

upspin/upspin 5454

Upspin: A framework for naming everyone's everything.

robpike/ivy 792

ivy, an APL-like calculator

robpike/filter 456

Simple apply/filter/reduce package.

go-proverbs/go-proverbs.github.io 206

Inspired by @rob_pike talk at Gopherfest SV 2015

google/licensecheck 196

The licensecheck package classifies license files and heuristically determines how well they correspond to known open source licenses.

robpike/translate 66

Translate is a command-line interface to the Google translate API.

robpike/now 34

Convenient global date printer

robpike/strings 29

Strings is a custom, Unicode-competent version of the BSD strings utility.

issue commentgolang/go

proposal: text/template,html/template: add ExecuteContext methods

I might be missing something, but @rogpeppe wrote,

ISTM that the main problem here is that functions are bound to the template at Parse time so there's no way to give them new per-Execute context later.

but that's just not true. There is one way, maybe two. One is to pass the context as a field of the struct passed to Execute, in which case it's .Context whenever you need it. A simple wrapper for Execute could take care of that nicely. The other is that it might be possible to some trickery with the documented fact that although Funcs must be called before Parse, it is legal to update the elements of the FuncMap.

I would like to understand what the real problem is here. There are several floating around: context is too hard, context is too explicit, context should be automatic but isn't. Which is it?

empijei

comment created time in 2 days

issue commentgolang/go

cmd/asm: riscv64 assembler claims that 4294967295 does not fit in 32 bits

Not only that, the message has bad grammar: s/32-bits/32 bits/ src/cmd/internal/obj/riscv/obj.go:884

The test seems to think you have a signed immediate, in which case the error is correct, if poorly worded.

josharian

comment created time in 5 days

push eventrobpike/ivy

Rob Pike

commit sha 865390eeb24f300c467b71d516b698f6fb317a35

value: fix precision bug in binary text operator Forgot to set the precision of the float we convert to.

view details

push time in 10 days

push eventrobpike/ivy

Rob Pike

commit sha 9ef5c50f396aae02da0f2aad4614ef1921ce5fe9

ivy: add dyadic (binary) text operator This is how APL formats text with user controls. The printf format %6.2f becomes "6 2 ⍕ value". We expand this by putting in an optional format character too. 10 4 'e' text sqrt iota 5 1.0000e+00 1.4142e+00 1.7321e+00 2.0000e+00 2.2361e+00 In doing this, I found a better way to print matrixes, related to how transpose was figured out, and I'll return to that issue shortly.

view details

Rob Pike

commit sha 4ec545b22c156690d9184127f5cfa178fa89bb0e

ivy: change Matrix.shape to be []int It was a Vector, but this caused far more trouble than it was worth. All we need is a slice of ints, except for a few error messages that never happen.

view details

push time in 10 days

push eventrobpike/ivy

Rob Pike

commit sha 58796f6268b13037d1138ed4fd9fc3f2404fd93b

ivy: implement unary transpose Binary (general) transpose is very odd, but shouldn't be too hard now that the groundwork is laid. An interesting challenge, writing a single routine to transpose a matrix of arbitrary rank and dimension. Solution is to notice that if we think of iterating over the elements we get an index sequence 0,0,0 0,0,1, 0,0,2, 0,1,0 and so on, in little-endian order. The transposition is made by iterating in big-endian order instead: 0,0,0, 1,0,0, 2,0,0, 0,1,0. Then it's easy. General transpose can be done by generalizing the endianness.

view details

push time in 10 days

issue commentgolang/go

proposal: os/signal: add WithContext function

Perhaps this should be a function of the context package instead, since it creates a context and it's pretty much all about contexts.

ctx, cancel := context.signal(context.Background(), syscall.SIGTERM, syscall.SIGINT)

Not sure it's the right idea at all, just throwing it out there.

henvic

comment created time in 11 days

Pull request review commentgoogle/licensecheck

add Checker API, make scans 7X faster, more

 func checkMatch(t *testing.T, m Match, name string, prevEnd int) { 		return 	} 	lic := findLicense(name)-	// Skip leading white space, almost certainly trimmed copyright lines. 	length := len(lic.doc.text)-	for _, c := range lic.doc.text {-		if c != ' ' && c != '\n' {-			break-		}-		length---	} 	// There is some fudge factor in the match lengths because of terminal spaces, so be forgiving. 	min, max := length-5, length+	if name == "BSD-2-Clause" {

why? comment. this looks like a hack.

rsc

comment created time in 15 days

CommitCommentEvent

push eventrobpike/ivy

Rob Pike

commit sha 9b15155eced46361931b8a04fc914140ad66f922

value: use big.MulRange to implement factorial Pointed out by @p9luv on Twitter; I had not heard of this function. Much faster: */iota 1e5 # 2.327s !1e5 # before 795ms !1e5 # after 47.3ms

view details

Rob Pike

commit sha 8d05f9e1681320f9017b6ea99ad8057a6303a0d4

value: fix aliasing in flip and rot for matrix The operations overwrote the arguments. We were missing a Matrix.Copy function.

view details

push time in 23 days

push eventgoogle/licensecheck

Rob Pike

commit sha 9240d01bd3575e7afec4b4341ef5be4e10c77bdf

licensecheck: replace leading copyrights with blanks We correctly replaced in-body copyright text with blanks, but missed the obvious initial case. Correct and unify the code so all copyright text is replaced by blanks. Add a test to lock in the correct match behavior in this case (and others) Fixes #8.

view details

push time in 23 days

issue closedgoogle/licensecheck

Match.Start is incorrect

The value given for Match.Start is sometimes wrong. I suspect that the copyright logic is to blame.

Example:

ISC License

Copyright (c) 2013-2017 The btcsuite developers
Copyright (c) 2015-2018 The Decred developers
Copyright (c) 2017 The Lightning Network Developers

Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Calling licensecheck.Cover with this and the default options returns the Match

{Name:ISC Type:Other Percent:93.75 Start:197 End:852 IsURL:false}

Byte offset 197 is the beginning of the word "distribute". I would have expected the start to be at "Permission", or maybe one of the Copyright lines.

closed time in 23 days

jba

issue commentgoogle/licensecheck

Match.Start is incorrect

I did think of the bug, but only fixed half of it!

jba

comment created time in 23 days

IssuesEvent

push eventrobpike/ivy

Rob Pike

commit sha 5dae5422f9e1c7b531382cfe81580bc71548de8f

testdata: add circle example Thanks to twitter's @p9luv for inspiration.

view details

push time in 24 days

push eventrobpike/ivy

Rob Pike

commit sha ebb389582f916602f2027a76ea3a45f2bb1e1a89

ivy: allow indexing a vector by an arbitrary matrix The result has the shape of the index. Cute example: " *"[1+x o.>= x=iota 3] * ** ***

view details

push time in 24 days

issue commentgolang/go

cmd/vet: method Seek() should have signature Seek(int64, int)

Or just change the name of the function.

sabey

comment created time in a month

issue commentgolang/go

cmd/vet: method Seek() should have signature Seek(int64, int)

Do Read and Write have the correct signatures? Please include a full example, not a snippet.

The error as shown here is correct: the standard Seek method takes two arguments.

sabey

comment created time in a month

push eventrobpike/ivy

Rob Pike

commit sha 8341531538e0646951ed515c1fb96f14aeb0d4f4

ivy: add ! (factorial, combinations) Add the ! operator. The unary form !A is A factorial. The binary form A!B is the number of combinations of taking A distinct things from B distinct things.

view details

push time in a month

issue closedgoogle/licensecheck

Match.Start is incorrect

The value given for Match.Start is sometimes wrong. I suspect that the copyright logic is to blame.

Example:

ISC License

Copyright (c) 2013-2017 The btcsuite developers
Copyright (c) 2015-2018 The Decred developers
Copyright (c) 2017 The Lightning Network Developers

Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Calling licensecheck.Cover with this and the default options returns the Match

{Name:ISC Type:Other Percent:93.75 Start:197 End:852 IsURL:false}

Byte offset 197 is the beginning of the word "distribute". I would have expected the start to be at "Permission", or maybe one of the Copyright lines.

closed time in a month

jba

issue commentgoogle/licensecheck

Match.Start is incorrect

Working as intended.

It has nothing to do with the copyright code - I disabled it and got the same result. (I thought of that bug long ago, and avoided it.)

The issue is that the license does indeed match starting at the word "distribute". The word before that is "and" but in the ISC license it is "and/or" so, technically, the first significant match starts at the word "distribute".

jba

comment created time in a month

push eventrobpike/ivy

Rob Pike

commit sha 75f2a67afd10ce97080c7b80d40b21a813748959

demo: add a fun deck-shuffling example Discovered this today. It uses the newly implemented binary ? operator, "deal".

view details

push time in a month

push eventrobpike/ivy

Rob Pike

commit sha 7ef67b9ba567edabc16f11072a8700a3ab6265b1

value: fix a typo and improve error checking for binary ? Make sure the vector isn't ridiculously large.

view details

push time in a month

push eventrobpike/ivy

Rob Pike

commit sha f36743ac21e23e37705d240c241f22ca6610f63b

scan: update type_string.go to new stringer output The tool has changed; the input has not.

view details

Rob Pike

commit sha 675b071076239328a0bc4b74c115823b0694a4cf

ivy: add binary ?, the deal operator 3?5 selects three unique integers in 1 through 5, in random order. Also fix a typo in helpgen.go and remember to run go generate.

view details

push time in a month

issue commentgolang/go

encoding/json: behavior change for go1.14 for paragraph-sep and line-sep characters

It is a behavior change that will need to be listed in the release notes.

twmb

comment created time in a month

issue commentgolang/go

encoding/json: behavior change for go1.14 for paragraph-sep and line-sep characters

This is a behavior change, but I didn't dig into how far back. Here is an easier way to see what's happening (https://play.golang.org/p/c-EBn0iL9DD):

% go run x.go [ 22 2028 2029 22] <nil>" 
", [22 2028 2029 22] % go1.4 run x.go [ 22 2028 2029 22] <nil>"\u2028\u2029", [22 5c 75 32 30 32 38 5c 75 32 30 32 39 22] %

This change was introduced here: https://github.com/golang/go/commit/900ebcfe4d592486dd5bc50f5e8101ba65e32948

I can't speak to its merits, but it's deliberate.

twmb

comment created time in a month

issue commentgolang/go

cmd/cover: (html output) UI accessibility issues

Reopening this issue is perhaps not the right action. The problem mentioned on the list is about having a non-visual way to see the data; this issue is arguing about the colors.

cznic

comment created time in a month

issue commentgoogle/licensecheck

Variable sections are not considered in license descriptions

Yes, this is an issue with the way this library works that may require some redesign.

kortschak

comment created time in a month

pull request comment9fans/plan9port

acme: send/receive incl attr in plumb message

Not sure I want to mix worlds like this, or to put it another way I'm not convinced this is the right approach.

scgehin

comment created time in a month

issue commentgolang/go

cmd/vet: false positive for user-defined verbs

If the type being printed implements fmt.Format, vet is supposed to allow any verb. I distinctly remember writing that code and I see its implementation in the source (although much has changed since then), but it depends on type checking working.

Or maybe it never worked, but it should.

kortschak

comment created time in a month

push eventrobpike/sid

Rob Pike

commit sha 83e29c5069ac86470bc7f49dfa943eb341091740

sid: fix custom import string This is in the 'cmd' subdirectory.

view details

push time in 2 months

create barnchrobpike/sid

branch : master

created branch time in 2 months

created repositoryrobpike/sid

Program to print sidereal time

created time in 2 months

push eventgoogle/licensecheck

Rob Pike

commit sha e43db20c11150f4881b8a1c61a34f3ccd896a9f7

licensecheck: report "Apache-2.0" for licenses that match "Apache-2.0-User" A previous change introduced a variant form of the Apache 2.0 license, but it erroneously then reports a distinct name. Make sure it identfies both forms of the license as "Apache-2.0", which is correct.

view details

push time in 2 months

push eventgoogle/licensecheck

Rob Pike

commit sha bcd885b47dfc9d2dca20078f87e0f3fbe962b528

licenses: add Apache-2.0-User, the text that Apache-2.0 suggests At the end of the the Apache-2.0 license text is a section that says, in effect, "use the following text". Most quote the whole license, but some, such as github.com/jmespath/go-jmespath, do as directed. Add that text as a separate license, which we call Apache-2.0-User.

view details

push time in 2 months

push eventgoogle/licensecheck

Rob Pike

commit sha aca499d57c3f11746a3779821865d7c57e386999

licenses: restore copyright notices in the reference files Might as well keep these files in sync with their standard copies as much as possible.

view details

push time in 2 months

push eventgoogle/licensecheck

Rob Pike

commit sha d686698f934af574dac33ebff0fa254f1a1fe638

licensecheck: remove copyright lines from consideration For many instances of license files, the only significant difference between the reference and actual text is one or more copyrights, almost always provided as a single line: Copyright Juan de Fuca 2020 This causes a number of problems, most notably poor confidence scores when there are many copyright lines attached to a short license, and also irrelevant variance in confidence scores depending on the volume of copyright text. Our solution is simple: Delete all copyright lines from the text we process. But we cannot just delete them, as the Match type includes location information, so we replace the text with spaces.

view details

push time in 2 months

issue openedgolang/go

cmd/go: generate shouldn't require a complete valid package

When developing a "go generate" script, it's easy to create an invalid program as the output. When that happens, one can no longer run "go generate" because the package must typecheck before "go generate" is allowed to run. The result can be confusing, and I see no vital reason why this property must be true; moreover, sometimes it could be impossible to satisfy without hand-editing some files to get the package to the state where it could be run.

% go version
go version devel +0377f06168 Tue Dec 17 20:57:06 2019 +0000 darwin/amd64
potoroo=% ls
x.go
% cat x.go
package main

//go:generate sh -c "echo foo > gen.go"

func() main () {
}
% go generate
% go generate
can't load package: package .: 
gen.go:1:1: expected 'package', found foo
% ls
gen.go	x.go
% cat gen.go
foo
% 

Let's lift this requirement.

created time in 2 months

issue commentgo-proverbs/go-proverbs.github.io

I could not find the proverb "Accept Interfaces Return Struct in Go" here

I still don't favor this one. It's very hard to be clear about where it applies, and it often doesn't.

cyantarek

comment created time in 2 months

issue commentgo-proverbs/go-proverbs.github.io

I could not find the proverb "Accept Interfaces Return Struct in Go" here

I'm not a great fan of that one. It's subtle and tricky to explain compactly. And although popular, it's not often easy to apply well.

cyantarek

comment created time in 2 months

push eventrobpike/ivy

Rob Pike

commit sha 3ab6a868dcb35a74443a68e0f9aa601af20b9126

ivy: mention in the docs that floats are always printed base 10 They could conceivably be shown in other bases, but they are not.

view details

push time in 2 months

push eventrobpike/ivy

Rob Pike

commit sha 2772a2720766cf842554b58edc77dd1a079fd5a2

ivy: have )op with no argument list the user-defined ops. Update the docs, and fix a minor vet issue.

view details

push time in 2 months

issue commentgolang/go

cmd/vet: printf analysis missing support for %O

Indeed, golang.org/x/tools/go/analysis/passes/printf/printf.go is missing the 'O' verb.

perillo

comment created time in 2 months

push eventrobpike/ivy

Rob Pike

commit sha dceac7e4ee1e24c6307b57eeed7f89429ba313a2

ivy/mobile: update help.go I ran go generate to update the HTML help text stored in this package.

view details

push time in 2 months

issue closedrobpike/ivy

value: binary iota is incorrect

Given

scalar binop vector

the scalar will be promoted to vector; that's how ivy works. But it's not how APL works. It usually doesn't matter, but for binary iota (index) it does. 3 iota 3 should yield 3, not 1. It yields 1 because the LHS becomes 3 3 3.

closed time in 2 months

robpike

issue commentrobpike/ivy

value: binary iota is incorrect

The analysis in this issue is incorrect. 3 iota 1 2 3 works fine, honoring the documentation even if tryapl.org says it's a rank error. So closing.

robpike

comment created time in 2 months

issue closedrobpike/ivy

Should floatPower be moved to the math/big package?

@robpike we're using this function in our code now and I was wondering if it was any reason for not having it in the math/big package. Cheers :)

closed time in 2 months

zboralski

issue commentrobpike/ivy

Should floatPower be moved to the math/big package?

Closing as not really about this program.

zboralski

comment created time in 2 months

push eventrobpike/ivy

Rob Pike

commit sha a0b4ddf4aab83b1a917ef13a1e914f41ed1c2764

ivy: document indexing notation It's not entirely obvious, and x[1 2 3] wasn't documented at all.

view details

Rob Pike

commit sha ba7fca0f70a341a411c6c80147a04df3e3a41e42

ivy: tweak some error messages regarding assignment

view details

push time in 2 months

push eventrobpike/ivy

Lars Lehtonen

commit sha bf4870881e5b9e596ef10dfeb5b367216562e16e

talks: fix dropped error

view details

push time in 2 months

issue closedrobpike/ivy

) help should print godoc content

The special command ) help print the special command list, but the mobile version prints the hole godoc content. I find it very useful to see the supported APL operators inside ivy.

closed time in 2 months

frederich

push eventrobpike/ivy

Rob Pike

commit sha 585a2fd4efb0555bf072482a72f002300a81fb3d

ivy: complete implementation of indexed assignment By using slices as the l-value, it's mostly just index arithmetic. More code than I'd like but pretty regular other than error checks, so I'm happy.

view details

push time in 2 months

push eventrobpike/ivy

Rob Pike

commit sha e9bfa506eb7cb2049a10cf3123f096368b28bc8a

testdata: add a test for assigning to an element of a char vector

view details

Rob Pike

commit sha e8439b35e821370a5c22e43458f1204096bd2aa5

ivy: make *Matrix implement value.Value instead of Matrix This will enable assignment to Matrix elements.

view details

Rob Pike

commit sha 8674699b425c0b83fe6bbed2c4069cd3f75ead00

ivy: implement simple forms of assignment to matrix elements Only works at the top level, and the index must be an integer, but the bare bones are there.

view details

push time in 2 months

push eventrobpike/ivy

Rob Pike

commit sha f087b1ccea310512ea40db11c83360471fa818ca

parse: use ProgString to report assignment type error I think a call to tree(expr) was left over from a debugging session. The result of expr.ProgString is much friendlier.

view details

Rob Pike

commit sha 1a3db6174eaabbd758d041b03ff78d7fddb2cfde

ivy: implement assignment to vector element Also add a Rank() int method to value.Value, which tidies up some things. Matrix assignmnt is not done; to do that we need a Matrix to be passed by pointer, not value. (Vectors work because they are slices; Matrix is a struct0. That shouldn't be too hard to do but should be a separate change. If that works, we could also move some of the logic for assignment into the value directory.

view details

push time in 2 months

issue openedgolang/go

runtime: pclntab grows superlinearly

This article contains results from applying a visualization tool: https://www.cockroachlabs.com/blog/go-file-size/ If the analysis is correct, pclntab needs a major redesign.

Separated from #6853 to keep the conversation focused.

created time in 2 months

push eventrobpike/ivy

Rob Pike

commit sha 32b5eec2a413f82ca3814d671dd6aefdf67fdd26

parse: provide more fine-grained help Rewrite the )help special command to be more exploratory, allowing things like )help unary and )help rho This is done by preprocessing doc.go into tables the command can use, which is a little fragile, but 'go generate' should recover it, and the tests will help (although they are not exhaustive). Fixes #13.

view details

push time in 2 months

issue commentgolang/go

proposal: unsafe: make the Pointer type declaration consistent with the ones in the "builtin" package

That won't parse. it's not a valid declaration of ArbitraryType. The trick works in the builtin package because when we say

type bool bool

The bool on the right is a name that has already been declared.

go101

comment created time in 2 months

issue commentgolang/go

x/tools/internal/telemetry: poor package comment

The original comment was more helpful. I'm curious why it was changed.

robpike

comment created time in 2 months

issue openedgolang/go

tools/internal/telemetry: poor package comment

I know it's an internal package, but the package doc for internal/telemetry is poorly conceived:

Package telemetry provides an opinionated set of packages that cover the
main concepts of telemetry in an implementation agnostic way. As a library
author you should look at...

It doesn't say what the package does. It claims that the package is "opinionated' (a passive-agressive way to say, we don't care what you think about the design) but gives no hint at what that opinion leads to. Avoid editorializing, just say what the package does. And it wouldn't hurt to say what "telemetry" is and what it's measuring, and for whom.

created time in 2 months

CommitCommentEvent

issue commentrobpike/translate

I have passed -key,-to,-from,but len(flag.Args) == 0

Without more information there's nothing I can do to help. Perhaps you're not using it correctly? I have $GOOGLEAPIKEY exported by my .bashrc. See also https://translatepress.com/docs/automatic-translation/generate-google-api-key/

% translate maison
House (fr)
% translate -to de maison
Haus (fr)
% translate -from fr -to de maison
Haus ()
% 

zhangwei412827

comment created time in 2 months

issue commentgolang/go

proposal: Go 2: reduce noise in return statements that contain mostly zero values

@avi-yadav That would be the first time _ is used as an identifier to be read rather than written. This issue has come up before, and ... is actually more consistent with Go usage. For instance, in array declarations it stands for the count of the array, or as one might say here, "the obvious thing".

jimmyfrasche

comment created time in 2 months

issue closedgolang/go

time: Colon not supported in fractional seconds

<!-- Please answer these questions before submitting your issue. Thanks! -->

What version of Go are you using (go version)?

<pre> $ go version go version go1.12.7 windows/amd64 </pre>

Does this issue reproduce with the latest release?

Yes, I can reproduce it on the playground

What operating system and processor architecture are you using (go env)?

GOOS=windows GOARCH=amd64 GOHOSTARCH=amd64

<details><summary><code>go env</code> Output</summary><br><pre> $ go env set GOARCH=amd64 set GOBIN= set GOCACHE=C:\Users\N555074\AppData\Local\go-build set GOEXE=.exe set GOFLAGS= set GOHOSTARCH=amd64 set GOHOSTOS=windows set GOOS=windows set GOPATH=D:\Development\go set GOPROXY= set GORACE= set GOROOT=D:\Go set GOTMPDIR= set GOTOOLDIR=D:\Go\pkg\tool\windows_amd64 set GCCGO=gccgo set CC=gcc set CXX=g++ set CGO_ENABLED=1 set GOMOD= set CGO_CFLAGS=-g -O2 set CGO_CPPFLAGS= set CGO_CXXFLAGS=-g -O2 set CGO_FFLAGS=-g -O2 set CGO_LDFLAGS=-g -O2 set PKG_CONFIG=pkg-config set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\N555074\AppData\Local\Temp\go-build289214998=/tmp/go-build -gno-record-gcc-switches </pre></details>

What did you do?

Attempt to parse a date/time string containing milliseconds preceded by a colon. Example: https://play.golang.org/p/eY-B7yU7cbT <!-- If possible, provide a recipe for reproducing the error. A complete runnable program is good. A link on play.golang.org is best. -->

What did you expect to see?

<code>Time is 02/12/2019 15:45:48:746</code>

What did you see instead?

<code> parsing time "02/12/2019 15:45:48:746" as "02/01/2006 15:04:05:000": cannot parse "746" as ":000" </code>

closed time in 2 months

trbroyles1

issue commentgolang/go

It would be really helpful if testing.T has assertion methods like t.AssertEqual(x, y), t.AssertNotEqual(x, y) etc?

This is covered in the FAQ: https://golang.org/doc/faq#testing_framework

cyantarek

comment created time in 2 months

issue commentgolang/go

math/rand: documentation on rng.go is lacking important context and information

The proposal has not even been accepted yet. If it does get accepted, it will still be a while, as the process described in the proposal makes clear.

Plazmaz

comment created time in 2 months

issue commentgolang/go

Documentation on rng.go is lacking important context and information

See https://github.com/golang/go/issues/21835. Perhaps this package should suggest using exp/rand.

Plazmaz

comment created time in 2 months

issue commentgolang/go

doc: go spec says grammar is "regular", but it is not regular in grammar sense

"compact and simple to parse".

ehdtee

comment created time in 3 months

issue commentgolang/go

proposal: reflect: add constants for size of int, bool, etc.

I will reiterate a point I made above: Much of the argument here is a consequence of the decision to put this in math/bits, where I don't think it belongs. Why not create a new package, called say size, and put them there? This also opens a place to put helpful functions to safely compute things like the size of an array or struct or slice or possibly? map.

robpike

comment created time in 3 months

push eventrobpike/ivy

Lars Lehtonen

commit sha 81f8f963e2ab89d216bd857d673f08bf30138700

talks: fix dropped error

view details

Rob Pike

commit sha 5feaa23cbcf3e302756e831a3ad0b6d184513bf0

Merge pull request #59 from alrs/fix-dropped-error talks: fix dropped error

view details

push time in 3 months

PR merged robpike/ivy

talks: fix dropped error

This picks up a dropped error in the talks package.

+1 -0

0 comment

1 changed file

alrs

pr closed time in 3 months

issue commentgolang/go

proposal: math/big: add Int.BytesWithSize

I'm a little unsettled by the absolute value thing, but that's what Bytes does.

FiloSottile

comment created time in 3 months

issue commentgolang/go

proposal: math/big: add Int.BytesWithSize

// FillBytes sets buf to the absolute value of x, storing it as a zero-extended
// big-endian byte stream. If the encoded value doesn't fit in buf, FillBytes will panic.
func (x *Int) FillBytes(buf []byte)
FiloSottile

comment created time in 3 months

issue commentgolang/go

proposal: x/exp/rand: add support for PRNG state serialisation and deserialisation

Seems reasonable to me, and since it's in exp the bar for change is very low. Send a CL?

kortschak

comment created time in 3 months

PR closed golang/glog

add log level with TRACE and DEBUG

In most cases, we need log levels in development, such as debug and trace.

+66 -6

5 comments

2 changed files

lingdor

pr closed time in 3 months

pull request commentgolang/glog

add log level with TRACE and DEBUG

As the README says,

The repository contains an open source version of the log package used inside Google. The master copy of the source lives inside Google, not here. The code in this repo is for export only and is not itself under development. Feature requests will be ignored.

lingdor

comment created time in 3 months

issue commentgolang/go

proposal: math/big: add Int.BytesWithSize

Yes, I like @griesemer's design. Panic is OK if documented. A nil argument could allocate, perhaps? That is, if you provide a buffer it must be big enough; otherwise one will be allocated.

FiloSottile

comment created time in 3 months

issue commentpackage-url/purl-spec

Go is called Go, not Golang

@pombredanne Thank you for your careful consideration. The background is interesting.

robpike

comment created time in 3 months

push eventrobpike/unicode

Rob Pike

commit sha b4228ffe0542f9ff33af2218819b1efc01749b50

unicode: update unicode.txt to Unicode version 12.1 Also add code to unicode.go to create the file, and fix a bug when combining -d and -U.

view details

push time in 3 months

push eventrobpike/ivy

Rob Pike

commit sha 4f7ab373d3a6cd9da84a6be627ca5cc564d1411c

demo: fix typo in comment s/numer/number/

view details

push time in 3 months

issue commentgolang/go

x/tools/cmd/stringer: stringer should not use go/types

@alandonovan Where are we with this issue? Stringer is still slow, although perhaps not unbearably so.

robpike

comment created time in 4 months

issue commentpackage-url/purl-spec

Go is called Go, not Golang

That commit does not provide an explanation but the comment above claims it is due to a mistaken belief that there is a different term for the module system than for the language.

robpike

comment created time in 4 months

push eventgoogle/licensecheck

Jesper Särnesjö

commit sha 34485a5997b22bdff79d8dca00b3dab36ac9093f

Correct Apache-2.0 license The canonical text version of the Apache-2.0 license [1], as well as the version used by GitHub when initializing a new repo, differs from the copy used by the licensecheck package in three ways, ignoring whitespace: 1. The subitems under item 4, "Redistribution", are enumerated using lowercase letters. 2. The terms and conditions end with the phrase "END OF TERMS AND CONDITIONS". 3. The terms and conditions are followed by an appendix, "How to apply the Apache License to your work". This commit updates the local copy to match the canonical one. [1] https://www.apache.org/licenses/LICENSE-2.0.txt

view details

Rob Pike

commit sha acad3136ad4ca6edf1965cbc23d0cf2a5ab714f2

Merge pull request #3 from sarnesjo/master Correct Apache-2.0 license

view details

push time in 4 months

PR merged google/licensecheck

Correct Apache-2.0 license

The canonical text version of the Apache-2.0 license [1], as well as the version used by GitHub when initializing a new repo, differs from the copy used by the licensecheck package in three ways, ignoring whitespace:

  1. The subitems under item 4, "Redistribution", are enumerated using lowercase letters.

  2. The terms and conditions end with the phrase "END OF TERMS AND CONDITIONS".

  3. The terms and conditions are followed by an appendix, "How to apply the Apache License to your work".

This commit updates the local copy to match the canonical one.

[1] https://www.apache.org/licenses/LICENSE-2.0.txt

+22 -6

3 comments

1 changed file

sarnesjo

pr closed time in 4 months

Pull request review commentgoogle/licensecheck

Correct Apache-2.0 license

 TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION  4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: -You must give any other recipients of the Work or Derivative Works a copy of this License; and-You must cause any modified files to carry prominent notices stating that You changed the files; and-You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and-If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. +(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and++(b) You must cause any modified files to carry prominent notices stating that You changed the files; and++(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and++(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.

This change means nothing to the checker, but if it is the canonical form we'll accept it.

sarnesjo

comment created time in 4 months

issue commentgolang/go

proposal: spec: support ... TODO statement

If go vet fails, tests don't run.

bradfitz

comment created time in 4 months

issue commentgolang/go

proposal: spec: support ... TODO statement

If go test fails with a ... anywhere, I could never use this feature, as I develop by running go test. I suspect many others are in this situation.

I admire the desire for a way to block out stuff for now, but I don't want that to preclude me testing other parts of the code.

bradfitz

comment created time in 4 months

issue commentgolang/go

proposal: file scope

One of Go's great clarifications compared to its ancestors is the simplicity of its scoping rules. Let's not complicate them again.

seebs

comment created time in 4 months

issue commentgolang/go

proposal: spec: support ... TODO statement

You'd have to make sure 'go vet' allowed it and 'cmd/vet' didn't, which is weird.

bradfitz

comment created time in 4 months

issue commentgolang/go

proposal: create a package `runes` with functionality similar to `bytes` to work with rune slices

Essentially if we want to work with mutable sets of unicode characters, then neither the bytes solution nor the strings solution seems efficient

And the runes solution is misleading and incorrect. Text is hard, and rune slices solve almost none of what makes text hard.

srinathh

comment created time in 4 months

issue commentgolang/go

proposal: Go 2: allow self-referencing closures

It would be unwise and profoundly incompatible to change Go's scoping rules.

pjebs

comment created time in 4 months

issue commentpackage-url/purl-spec

Go is called Go, not Golang

I'm not sure about your first point. The go tool is called go, not golang: one writes 'go mod' not 'golang mod'. So golang vs. go has nothing to do with modules.

Regarding compatibility, until 1.0 happens is the time to get things right. Things can change until 1.0 is settled, and this is one thing I'd like to see changed.

I value your goals here in setting up a proper standard for a messy place.

robpike

comment created time in 4 months

issue openedpackage-url/purl-spec

Go is called Go, not Golang

Since the language is called Go, even though its domain is golang.org, it would be nice (and short) if the package identifier for Go modules was "go" rather than "golang".

created time in 4 months

issue commentgolang/go

proposal: Go 2: integer comparison casting

Brad makes a good point. It's an interesting idea. The spec would get trickier, but maybe not too much. On the fence but interested.

Hucaru

comment created time in 4 months

issue commentgolang/go

proposal: Go 2: reduce noise in return statements that contain mostly zero values

Is this legal?

var err e
func f() error {
   return ..., e
}

Is this?

func f() {
   return ...
}
jimmyfrasche

comment created time in 4 months

issue commentvictorqribeiro/dial

should not need to keep mouse/button press in hole

Yes, exactly.

robpike

comment created time in 4 months

issue openedvictorqribeiro/dial

should not need to keep mouse/button press in hole

This is a cool hack but it doesn't feel right because it's too hard to use. As #4 says, the finger stop is essential.

It would also help if the dialing weren't so fussy about keeping the "finger" on the hole, since the physical device feels so different. Instead, all that should be necessary is a button press on the right number, and then rotation with no need to stay on the hole as it turns. Obviously in real life the finger must stay in the hole, but on the screen there is no way to do that, and forcing the user to do it makes it too hard to use. Once the number is known by the press, just let the user rotate the mouse around the center, without worrying about radius, and then lock up the rotation once that number hits the stop. If you do that, the feeling will be as close as it can be.

created time in 4 months

issue commentvictorqribeiro/dial

Finger stop

That's not really what the finger stop's primary function was: It was so you could just pull the dial and not worry about where to let go. Stick your finger in the hole, yank until it stopped, and let go. Really easy, no need to pay attention, just pull. It was a vital part of the interface.

froh

comment created time in 4 months

issue commentgolang/go

cmd/go: doc fails on case-insensitive search for identifier similar to keyword

This seems more annoying to fix than it's worth, since typing the actual name will work.

DeedleFake

comment created time in 5 months

issue commentgolang/go

proposal: testing: add -shuffle and -shuffleseed to shuffle tests

How about just one flag that handles a default value? -shuffle=seed. If seed is 0 (say), it means be random.

cristaloleg

comment created time in 5 months

issue commentgolang/go

proposal: cmd/go: ignore directories containing `.goignore` in file scans

Still not happy about this, and now that GOPATH is going away it seems even less suitable.

tj

comment created time in 5 months

more