Package iterable has outlived its utility.
It is an interesting demonstration, but it encourages
people to use iteration over channels where simple
iteration over array indices or a linked list would be
cheaper, simpler, and have fewer races.
R=dsymonds, r
CC=golang-dev
https://golang.org/cl/2436041
An exercise in reflection and an unusual tool.
From the usage message:
usage: gotry [packagedirectory] expression ...
Given one expression, gotry attempts to evaluate that expression.
Given multiple expressions, gotry treats them as a list of arguments
and result values and attempts to find a function in the package
that, given the first few expressions as arguments, evaluates to
the remaining expressions as results. If the first expression has
methods, it will also search for applicable methods.
If there are multiple expressions, a package directory must be
specified. If there is a package argument, the expressions are
evaluated in an environment that includes
import . "packagedirectory"
Examples:
gotry 3+4
# evaluates to 7
gotry strings '"abc"' '"c"' 7-5
# finds strings.Index etc.
gotry regexp 'MustCompile("^[0-9]+")' '"12345"' true
# finds Regexp.MatchString
R=rsc, PeterGo, r2
CC=golang-dev
https://golang.org/cl/2352043
This is a replacement for pending CL 2219042. It only contains
the raw suffixarray functionality with two methods:
- New create a new index from some data
- Lookup lookup occurences of a bytes slice in the data
Any other functionality (dealing with multiple data sets and
the corresponding position lists) is generic and doesn't have
to be part of this package.
Known performance bug: This implementation works fine for data sets
up to several megabytes as long as it doesn't contain very long
contiguous sequences of equal bytes. For instance, index creation for
all .go files under GOROOT (250KLOCs, approx. 9MB) takes ~50s on
2.66 GHz Intel Xeon as long as test/fixedbugs/257.go is excluded.
With that file, index creation times takes several days. 257.go contains
a string of 1M smiley faces.
There are more sophisticated suffixarray creation algorithms which
can handle very long common prefixes. The implementation can be
updated w/o the need to change the interface.
R=rsc, r, PeterGo
CC=golang-dev
https://golang.org/cl/2265041
Add windows NOTEST list to pkg make file.
5a make file. the change removes a space
character that was included when appending
an extension to TARG.
R=brainman, rsc
CC=golang-dev
https://golang.org/cl/2140046
- refine/define Scope, Object, and Type structures
(note: scope.go has the addition of types, the rest is only re-organized
for better readability)
- implemented top-level of type checker:
resolve global type declarations (deal with double decls, cycles, etc.)
- temporary hooks for checking of const/var declarations, function/method bodies
- test harness for fine-grained testing (exact error locations)
with initial set of tests
This is a subset of the code for easier review.
R=rsc
CC=golang-dev
https://golang.org/cl/1967049
Commands written in Go depend on Go packages, so they
cannot be built by src/cmd/make.bash. They have been
built by src/make.bash after all the packages are done, but
we want to be able to use cgo (written in Go) during the build
of package net. To make this possible, build the commands
from src/pkg/Makefile instead of src/make.bash, so that they
are included in the package dependency analysis.
R=r
CC=golang-dev
https://golang.org/cl/1972046
Generic text-based network protcol library for SMTP-like protocols.
HTTP and NNTP should be changed to use this package,
and I expect that SMTP and POP3 will be able to use it too.
R=cemeyer, nigeltao_golang, r
CC=golang-dev, petar-m
https://golang.org/cl/889041
Somewhat of a work-in-progress (in that MIME is a large spec), but this is
functional and enough for discussion and/or code review.
In addition to the unit tests, I've tested with curl and Chrome with
a variety of test files, making sure the digests of files are unaltered
when read via a multipart Part.
R=rsc, adg, dsymonds1, agl1
CC=golang-dev
https://golang.org/cl/1681049
- go/ast: removed StringList (not needed anymore)
- go/ast: changed import path and field list tag to a single string
- updated all dependencies
R=rsc
CC=golang-dev
https://golang.org/cl/217056