Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Incorporate history from base #12

Merged
merged 35 commits into from
Jun 7, 2016

Conversation

rfourquet
Copy link
Member

This is a follow-up of JuliaLang/julia#16357 (comment) (cc @tkelman). I extracted from base the history of primes.jl. I thougth it was not necessary to bother with older history (which was in intfuncs.jl). I also didn't include changes to test/numbers.jl which have tests for primes functions (I don't know how to include only the parts relevant to primes). I see those possibilities (besides doing nothing!):

  1. Rebase the history of the package on this branch and make a PR of the result
  2. Merge as is (by first deleting base/primes.jl)
  3. Someone simply push this branch to the repo, unmerged, as a reference. It would simply be a convenience when hacking on Primes.jl, to avoid having to check the history in the julia repo.

I think I prefer option 3.
For reference, this is how I extracted the history:

function cherry() {
    while read c; do
        git cherry-pick --strategy=recursive -X theirs $c;
        if [ $? != 0 ]; then
            # could add: '! -wholename ./test/numbers.jl '
            find . -path ./.git -prune -o -type f ! -wholename ./base/primes.jl -exec rm {} +
            git add -u
            git commit --no-edit
        else
            find . -path ./.git -prune -o -type f ! -wholename ./base/primes.jl -exec rm {} +
            git add -u
            git commit --amend --no-edit
        fi
    done;
}

function rewriteprimes () {
    git reset --hard a9cbc036ac62dc5ba5200416ca7b40a2f9aa59ea # initial commit
    # last commit listed by 'git rev-list' is the removal of primes.jl
    git rev-list  --reverse master -- base/primes.jl | head -n 33 | cherry
}

What I wanted was to pick the file from base as is and the corresponding commit, I hope cherry-pick resulted in something equivalent.
I had to artificially rebase the result on the initial commit of the package to be able to open a PR here.

StefanKarpinski and others added 30 commits May 29, 2016 13:07
It is not recommended to use this code to factor large integers. The
primality testing for BigInts calls GMP, so should be pretty good.

# Conflicts:
#	base/gmp.jl
#	test/numbers.jl
export primes

# Conflicts:
#	base/exports.jl
#	base/gmp.jl
#	base/intfuncs.jl
#	base/mpfr.jl
# Conflicts:
#	base/pcre.jl
#	base/reduce.jl
#	base/reflection.jl
#	base/statistics.jl
#	base/util.jl
For smaller numbers of primes, the Sieve of Eratosthenes still seems
to be quite a bit faster. Perhaps we ought to use a polyalgorithm
here, only using the Sieve of Atkin for large N.
# Conflicts:
#	base/LineEdit.jl
#	base/REPL.jl
#	base/cartesian.jl
#	base/client.jl
#	base/combinatorics.jl
#	base/datafmt.jl
#	base/dates/adjusters.jl
#	base/dates/io.jl
#	base/dates/query.jl
#	base/dict.jl
#	base/latex_symbols.jl
#	base/loading.jl
#	base/multi.jl
#	base/pkg/generate.jl
#	base/pkg/github.jl
#	base/pkg/query.jl
#	base/pkg/resolve.jl
#	base/pkg/resolve/interface.jl
#	base/pkg/resolve/maxsum.jl
#	base/profile.jl
#	base/quadgk.jl
#	base/show.jl
#	src/jlfrontend.scm
#	src/julia-parser.scm
#	test/collections.jl
#	test/core.jl
#	test/dates/io.jl
#	test/dates/query.jl
#	test/hashing.jl
#	test/keywordargs.jl
#	test/lineedit.jl
#	test/repl.jl
#	test/resolve.jl
#	test/sparse.jl
#	test/spawn.jl
#	test/strings.jl
# Conflicts:
#	NEWS.md
#	base/REPL.jl
#	base/Terminals.jl
#	base/abstractarray.jl
#	base/array.jl
#	base/ascii.jl
#	base/base.jl
#	base/base64.jl
#	base/bitarray.jl
#	base/boot.jl
#	base/broadcast.jl
#	base/c.jl
#	base/char.jl
#	base/client.jl
#	base/combinatorics.jl
#	base/constants.jl
#	base/dSFMT.jl
#	base/datafmt.jl
#	base/deepcopy.jl
#	base/deprecated.jl
#	base/dict.jl
#	base/env.jl
#	base/error.jl
#	base/expr.jl
#	base/fftw.jl
#	base/file.jl
#	base/float.jl
#	base/float16.jl
#	base/floatfuncs.jl
#	base/fs.jl
#	base/gmp.jl
#	base/grisu.jl
#	base/grisu/bignum.jl
#	base/grisu/fastfixed.jl
#	base/grisu/fastprecision.jl
#	base/grisu/fastshortest.jl
#	base/grisu/float.jl
#	base/hashing.jl
#	base/hashing2.jl
#	base/int.jl
#	base/interactiveutil.jl
#	base/intfuncs.jl
#	base/intset.jl
#	base/io.jl
#	base/iobuffer.jl
#	base/iostream.jl
#	base/libc.jl
#	base/linalg/arpack.jl
#	base/linalg/bitarray.jl
#	base/linalg/blas.jl
#	base/linalg/cholmod.jl
#	base/linalg/lapack.jl
#	base/linalg/matmul.jl
#	base/loading.jl
#	base/math.jl
#	base/mmap.jl
#	base/mpfr.jl
#	base/multi.jl
#	base/multidimensional.jl
#	base/multimedia.jl
#	base/nullable.jl
#	base/operators.jl
#	base/osutils.jl
#	base/path.jl
#	base/pcre.jl
#	base/pkg/types.jl
#	base/pointer.jl
#	base/poll.jl
#	base/precompile.jl
#	base/printf.jl
#	base/process.jl
#	base/profile.jl
#	base/random.jl
#	base/range.jl
#	base/reduce.jl
#	base/reducedim.jl
#	base/reflection.jl
#	base/regex.jl
#	base/serialize.jl
#	base/sharedarray.jl
#	base/show.jl
#	base/socket.jl
#	base/stat.jl
#	base/statistics.jl
#	base/stream.jl
#	base/string.jl
#	base/sysinfo.jl
#	base/task.jl
#	base/tuple.jl
#	base/utf16.jl
#	base/utf32.jl
#	base/utf8.jl
#	base/utf8proc.jl
#	base/util.jl
#	base/version.jl
#	doc/helpdb.jl
#	doc/images/github_metadata_develbranch.png
#	doc/images/github_metadata_fork.png
#	doc/images/github_metadata_pullrequest.png
#	doc/images/travis-icon.png
#	doc/manual/calling-c-and-fortran-code.rst
#	doc/manual/conversion-and-promotion.rst
#	doc/manual/faq.rst
#	doc/manual/integers-and-floating-point-numbers.rst
#	doc/manual/mathematical-operations.rst
#	doc/manual/methods.rst
#	doc/manual/networking-and-streams.rst
#	doc/manual/strings.rst
#	doc/manual/style-guide.rst
#	doc/manual/types.rst
#	doc/stdlib/base.rst
#	examples/lru.jl
#	examples/lru_test.jl
#	examples/plife.jl
#	examples/typetree.jl
#	src/file_constants.h
#	src/init.c
#	src/julia-parser.scm
#	test/arrayops.jl
#	test/bigint.jl
#	test/bitarray.jl
#	test/ccall.jl
#	test/collections.jl
#	test/core.jl
#	test/dates/periods.jl
#	test/file.jl
#	test/grisu.jl
#	test/hashing.jl
#	test/iobuffer.jl
#	test/math.jl
#	test/mpfr.jl
#	test/netload/nettest.jl
#	test/nullable.jl
#	test/numbers.jl
#	test/parallel.jl
#	test/perf/kernel/actor_centrality.jl
#	test/perf/kernel/go_benchmark.jl
#	test/perf/kernel/ziggurat.jl
#	test/perf/micro/perf.jl
#	test/perf/shootout/fasta.jl
#	test/perf/shootout/mandelbrot.jl
#	test/perf/shootout/meteor_contest.jl
#	test/perf/shootout/revcomp.jl
#	test/pollfd.jl
#	test/random.jl
#	test/ranges.jl
#	test/reducedim.jl
#	test/repl.jl
#	test/show.jl
#	test/socket.jl
#	test/sorting.jl
#	test/sparse.jl
#	test/statistics.jl
#	test/strings.jl
#	test/unicode.jl
# Conflicts:
#	base/abstractarray.jl
#	base/bitarray.jl
#	base/char.jl
#	base/complex.jl
#	base/darray.jl
#	base/dates/ranges.jl
#	base/deprecated.jl
#	base/exports.jl
#	base/float.jl
#	base/float16.jl
#	base/floatfuncs.jl
#	base/grisu/float.jl
#	base/int.jl
#	base/interactiveutil.jl
#	base/intfuncs.jl
#	base/libc.jl
#	base/linalg/bidiag.jl
#	base/linalg/dense.jl
#	base/linalg/givens.jl
#	base/linalg/matmul.jl
#	base/linalg/tridiag.jl
#	base/mmap.jl
#	base/mpfr.jl
#	base/pkg/resolve/maxsum.jl
#	base/poll.jl
#	base/printf.jl
#	base/profile.jl
#	base/range.jl
#	base/rational.jl
#	base/sort.jl
#	base/sparse/sparsematrix.jl
#	base/special/gamma.jl
#	base/statistics.jl
#	doc/helpdb.jl
#	doc/manual/arrays.rst
#	doc/manual/mathematical-operations.rst
#	doc/stdlib/base.rst
#	src/intrinsics.cpp
#	test/arrayperf.jl
#	test/complex.jl
#	test/euler.jl
#	test/file.jl
#	test/linalg/triangular.jl
#	test/mpfr.jl
#	test/numbers.jl
#	test/random.jl
#	test/rounding.jl
#	test/sparse.jl
#	test/strings.jl
 * throw more specific Exception types
 * make error messages more consistent
 * give more context for the error when possible
 * update tests

# Conflicts:
#	base/abstractarray.jl
#	base/array.jl
#	base/ascii.jl
#	base/base64.jl
#	base/bitarray.jl
#	base/broadcast.jl
#	base/cartesian.jl
#	base/client.jl
#	base/collections.jl
#	base/combinatorics.jl
#	base/darray.jl
#	base/datafmt.jl
#	base/dict.jl
#	base/dsp.jl
#	base/env.jl
#	base/file.jl
#	base/fs.jl
#	base/gmp.jl
#	base/help.jl
#	base/intfuncs.jl
#	base/intset.jl
#	base/io.jl
#	base/iobuffer.jl
#	base/iostream.jl
#	base/libc.jl
#	base/linalg/arnoldi.jl
#	base/linalg/arpack.jl
#	base/linalg/bidiag.jl
#	base/linalg/bitarray.jl
#	base/linalg/bunchkaufman.jl
#	base/linalg/dense.jl
#	base/linalg/diagonal.jl
#	base/linalg/generic.jl
#	base/linalg/givens.jl
#	base/linalg/lapack.jl
#	base/linalg/triangular.jl
#	base/linalg/tridiag.jl
#	base/loading.jl
#	base/math.jl
#	base/mmap.jl
#	base/mpfr.jl
#	base/multidimensional.jl
#	base/operators.jl
#	base/osutils.jl
#	base/path.jl
#	base/pcre.jl
#	base/pointer.jl
#	base/poll.jl
#	base/printf.jl
#	base/process.jl
#	base/profile.jl
#	base/random.jl
#	base/range.jl
#	base/rational.jl
#	base/reduce.jl
#	base/reflection.jl
#	base/regex.jl
#	base/rounding.jl
#	base/sharedarray.jl
#	base/show.jl
#	base/socket.jl
#	base/sort.jl
#	base/statistics.jl
#	base/stream.jl
#	base/string.jl
#	base/subarray.jl
#	base/tuple.jl
#	base/utf16.jl
#	base/utf32.jl
#	base/utf8.jl
#	base/version.jl
#	test/base64.jl
#	test/broadcast.jl
#	test/dates/ranges.jl
#	test/dict.jl
#	test/file.jl
#	test/iobuffer.jl
#	test/mod2pi.jl
#	test/reduce.jl
#	test/sets.jl
#	test/socket.jl
#	test/spawn.jl
#	test/statistics.jl
not quite done with renaming

[ci skip]

# Conflicts:
#	base/LineEdit.jl
#	base/Makefile
#	base/Terminals.jl
#	base/abstractarray.jl
#	base/array.jl
#	base/ascii.jl
#	base/base.jl
#	base/base64.jl
#	base/bitarray.jl
#	base/bool.jl
#	base/broadcast.jl
#	base/char.jl
#	base/client.jl
#	base/combinatorics.jl
#	base/complex.jl
#	base/datafmt.jl
#	base/dates/conversions.jl
#	base/dates/ranges.jl
#	base/deprecated.jl
#	base/dict.jl
#	base/dsp.jl
#	base/env.jl
#	base/exports.jl
#	base/fastmath.jl
#	base/fftw.jl
#	base/file.jl
#	base/float.jl
#	base/float16.jl
#	base/fs.jl
#	base/gmp.jl
#	base/grisu/bignum.jl
#	base/grisu/fastfixed.jl
#	base/grisu/fastprecision.jl
#	base/grisu/fastshortest.jl
#	base/grisu/float.jl
#	base/hashing.jl
#	base/hashing2.jl
#	base/int.jl
#	base/intfuncs.jl
#	base/intset.jl
#	base/io.jl
#	base/iobuffer.jl
#	base/iostream.jl
#	base/latex_symbols.jl
#	base/libc.jl
#	base/linalg.jl
#	base/linalg/bitarray.jl
#	base/linalg/dense.jl
#	base/linalg/factorization.jl
#	base/linalg/lapack.jl
#	base/linalg/lu.jl
#	base/managers.jl
#	base/math.jl
#	base/mmap.jl
#	base/multi.jl
#	base/number.jl
#	base/operators.jl
#	base/path.jl
#	base/pcre.jl
#	base/pkg/generate.jl
#	base/pkg/github.jl
#	base/pkg/resolve/fieldvalue.jl
#	base/pkg/resolve/maxsum.jl
#	base/pkg/resolve/versionweight.jl
#	base/pointer.jl
#	base/printf.jl
#	base/process.jl
#	base/profile.jl
#	base/random.jl
#	base/range.jl
#	base/rational.jl
#	base/regex.jl
#	base/serialize.jl
#	base/sharedarray.jl
#	base/show.jl
#	base/socket.jl
#	base/sparse/cholmod.jl
#	base/sparse/cholmod_h.jl
#	base/sparse/sparsematrix.jl
#	base/sparse/spqr.jl
#	base/sparse/umfpack.jl
#	base/special/bessel.jl
#	base/special/gamma.jl
#	base/stat.jl
#	base/statistics.jl
#	base/stream.jl
#	base/string.jl
#	base/subarray.jl
#	base/sysinfo.jl
#	base/utf16.jl
#	base/utf32.jl
#	base/utf8.jl
#	base/utf8proc.jl
#	base/version.jl
#	test/arrayops.jl
#	test/bigint.jl
#	test/bitarray.jl
#	test/char.jl
#	test/combinatorics.jl
#	test/complex.jl
#	test/core.jl
#	test/dates/periods.jl
#	test/dates/types.jl
#	test/euler.jl
#	test/file.jl
#	test/grisu.jl
#	test/hashing.jl
#	test/intfuncs.jl
#	test/iobuffer.jl
#	test/llvmcall.jl
#	test/mod2pi.jl
#	test/mpfr.jl
#	test/netload/nettest.jl
#	test/numbers.jl
#	test/parallel.jl
#	test/perf/kernel/ziggurat.jl
#	test/perf/micro/perf.jl
#	test/perf/shootout/mandelbrot.jl
#	test/perf/shootout/meteor_contest.jl
#	test/perf/shootout/revcomp.jl
#	test/perf/sparse/getindex.jl
#	test/pollfd.jl
#	test/random.jl
#	test/ranges.jl
#	test/reduce.jl
#	test/serialize.jl
#	test/show.jl
#	test/socket.jl
#	test/strings.jl
#	test/version.jl
JuliaLang#11073 (comment)
JuliaLang#11023

Related pullrequests are:

JuliaLang#11079
JuliaLang#11084

# Conflicts:
#	base/Dates.jl
#	base/Enums.jl
#	base/LineEdit.jl
#	base/REPL.jl
#	base/REPLCompletions.jl
#	base/Terminals.jl
#	base/abstractarray.jl
#	base/array.jl
#	base/ascii.jl
#	base/base.jl
#	base/base64.jl
#	base/basedocs.jl
#	base/bitarray.jl
#	base/bool.jl
#	base/boot.jl
#	base/broadcast.jl
#	base/build.h
#	base/c.jl
#	base/cartesian.jl
#	base/char.jl
#	base/client.jl
#	base/collections.jl
#	base/combinatorics.jl
#	base/complex.jl
#	base/constants.jl
#	base/dSFMT.jl
#	base/datafmt.jl
#	base/dates/accessors.jl
#	base/dates/adjusters.jl
#	base/dates/arithmetic.jl
#	base/dates/conversions.jl
#	base/dates/io.jl
#	base/dates/periods.jl
#	base/dates/query.jl
#	base/dates/ranges.jl
#	base/dates/types.jl
#	base/deepcopy.jl
#	base/deprecated.jl
#	base/dict.jl
#	base/docs.jl
#	base/dsp.jl
#	base/emoji_symbols.jl
#	base/env.jl
#	base/errno.jl
#	base/error.jl
#	base/exports.jl
#	base/expr.jl
#	base/fastmath.jl
#	base/fftw.jl
#	base/file.jl
#	base/float.jl
#	base/float16.jl
#	base/floatfuncs.jl
#	base/fs.jl
#	base/functors.jl
#	base/gmp.jl
#	base/grisu.jl
#	base/hashing.jl
#	base/hashing2.jl
#	base/help.jl
#	base/i18n.jl
#	base/inference.jl
#	base/int.jl
#	base/interactiveutil.jl
#	base/intfuncs.jl
#	base/intset.jl
#	base/io.jl
#	base/iobuffer.jl
#	base/iostream.jl
#	base/iterator.jl
#	base/latex_symbols.jl
#	base/libc.jl
#	base/libdl.jl
#	base/linalg.jl
#	base/linalg/arnoldi.jl
#	base/linalg/arpack.jl
#	base/linalg/bidiag.jl
#	base/linalg/bitarray.jl
#	base/linalg/blas.jl
#	base/linalg/bunchkaufman.jl
#	base/linalg/cholesky.jl
#	base/linalg/dense.jl
#	base/linalg/diagonal.jl
#	base/linalg/exceptions.jl
#	base/linalg/factorization.jl
#	base/linalg/generic.jl
#	base/linalg/givens.jl
#	base/linalg/lapack.jl
#	base/linalg/ldlt.jl
#	base/linalg/lu.jl
#	base/linalg/matmul.jl
#	base/linalg/rectfullpacked.jl
#	base/linalg/special.jl
#	base/linalg/symmetric.jl
#	base/linalg/triangular.jl
#	base/linalg/tridiag.jl
#	base/linalg/uniformscaling.jl
#	base/loading.jl
#	base/lock.jl
#	base/managers.jl
#	base/markdown/Common/Common.jl
#	base/markdown/Common/block.jl
#	base/markdown/Common/inline.jl
#	base/markdown/GitHub/GitHub.jl
#	base/markdown/GitHub/table.jl
#	base/markdown/IPython/IPython.jl
#	base/markdown/Julia/Julia.jl
#	base/markdown/Julia/interp.jl
#	base/markdown/Markdown.jl
#	base/markdown/parse/config.jl
#	base/markdown/parse/parse.jl
#	base/markdown/parse/util.jl
#	base/markdown/render/html.jl
#	base/markdown/render/latex.jl
#	base/markdown/render/plain.jl
#	base/markdown/render/rich.jl
#	base/markdown/render/terminal/formatting.jl
#	base/markdown/render/terminal/render.jl
#	base/math.jl
#	base/meta.jl
#	base/methodshow.jl
#	base/mmap.jl
#	base/mpfr.jl
#	base/multi.jl
#	base/multidimensional.jl
#	base/multimedia.jl
#	base/nullable.jl
#	base/number.jl
#	base/operators.jl
#	base/options.jl
#	base/ordering.jl
#	base/osutils.jl
#	base/path.jl
#	base/pcre.jl
#	base/pkg.jl
#	base/pkg/cache.jl
#	base/pkg/dir.jl
#	base/pkg/entry.jl
#	base/pkg/generate.jl
#	base/pkg/git.jl
#	base/pkg/github.jl
#	base/pkg/query.jl
#	base/pkg/read.jl
#	base/pkg/reqs.jl
#	base/pkg/resolve.jl
#	base/pkg/resolve/fieldvalue.jl
#	base/pkg/resolve/interface.jl
#	base/pkg/resolve/maxsum.jl
#	base/pkg/resolve/versionweight.jl
#	base/pkg/types.jl
#	base/pkg/write.jl
#	base/pointer.jl
#	base/poll.jl
#	base/precompile.jl
#	base/printf.jl
#	base/process.jl
#	base/profile.jl
#	base/promotion.jl
#	base/quadgk.jl
#	base/random.jl
#	base/range.jl
#	base/rational.jl
#	base/reduce.jl
#	base/reducedim.jl
#	base/reflection.jl
#	base/refpointer.jl
#	base/regex.jl
#	base/replutil.jl
#	base/rounding.jl
#	base/serialize.jl
#	base/set.jl
#	base/sharedarray.jl
#	base/show.jl
#	base/simdloop.jl
#	base/socket.jl
#	base/sort.jl
#	base/sparse.jl
#	base/sparse/abstractsparse.jl
#	base/sparse/cholmod.jl
#	base/sparse/cholmod_h.jl
#	base/sparse/linalg.jl
#	base/sparse/sparsematrix.jl
#	base/sparse/spqr.jl
#	base/sparse/umfpack.jl
#	base/sparse/umfpack_h.jl
#	base/special/bessel.jl
#	base/special/erf.jl
#	base/special/gamma.jl
#	base/special/log.jl
#	base/stat.jl
#	base/statistics.jl
#	base/stream.jl
#	base/string.jl
#	base/subarray.jl
#	base/subarray2.jl
#	base/sysimg.jl
#	base/sysinfo.jl
#	base/task.jl
#	base/test.jl
#	base/tuple.jl
#	base/utf16.jl
#	base/utf32.jl
#	base/utf8.jl
#	base/utf8proc.jl
#	base/util.jl
#	base/version.jl
#	base/version_git.sh
#	contrib/build_executable.jl
#	contrib/build_sysimg.jl
#	contrib/check-whitespace.sh
#	contrib/filterArgs.sh
#	contrib/fixup-libgfortran.sh
#	contrib/fixup-libstdc++.sh
#	contrib/install.sh
#	contrib/julia-config.jl
#	contrib/mac/app/run-install-name-tool-change.sh
#	contrib/mac/juliarc.jl
#	contrib/mac/mac-gtk.sh
#	contrib/relative_path.sh
#	contrib/stringreplace.c
#	contrib/windows/juliarc.jl
#	contrib/windows/msys_build.sh
#	contrib/windows/winrpm.sh
#	examples/bubblesort.jl
#	examples/clustermanager/0mq/ZMQCM.jl
#	examples/clustermanager/0mq/broker.jl
#	examples/clustermanager/0mq/head.jl
#	examples/clustermanager/0mq/worker.jl
#	examples/clustermanager/simple/UnixDomainCM.jl
#	examples/clustermanager/simple/head.jl
#	examples/clustermanager/simple/test_simple.jl
#	examples/embedding.c
#	examples/hpl.jl
#	examples/juliatypes.jl
#	examples/lru.jl
#	examples/lru_test.jl
#	examples/modint.jl
#	examples/ndgrid.jl
#	examples/queens.jl
#	examples/quine.jl
#	examples/staged.jl
#	examples/time.jl
#	examples/typetree.jl
#	examples/wordcount.jl
#	src/alloc.c
#	src/array.c
#	src/ast.c
#	src/builtin_proto.h
#	src/builtins.c
#	src/ccall.cpp
#	src/cgutils.cpp
#	src/codegen.cpp
#	src/debuginfo.cpp
#	src/dlload.c
#	src/dump.c
#	src/fenv_constants.h
#	src/file_constants.h
#	src/gc.c
#	src/gf.c
#	src/init.c
#	src/interpreter.c
#	src/intrinsics.cpp
#	src/jl_uv.c
#	src/jlapi.c
#	src/jltypes.c
#	src/julia.h
#	src/julia_internal.h
#	src/llvm-simdloop.cpp
#	src/llvm-version.h
#	src/module.c
#	src/options.h
#	src/profile.c
#	src/simplevector.c
#	src/support/arraylist.c
#	src/support/arraylist.h
#	src/support/bitvector.c
#	src/support/bitvector.h
#	src/support/dirpath.h
#	src/support/dtypes.h
#	src/support/hashing.c
#	src/support/hashing.h
#	src/support/htable.c
#	src/support/htable.h
#	src/support/int2str.c
#	src/support/ios.c
#	src/support/ios.h
#	src/support/libsupport.h
#	src/support/libsupportinit.c
#	src/support/operators.c
#	src/support/platform.h
#	src/support/ptrhash.c
#	src/support/ptrhash.h
#	src/support/strtod.h
#	src/support/timefuncs.c
#	src/support/timefuncs.h
#	src/support/utf8.h
#	src/support/utils.h
#	src/sys.c
#	src/table.c
#	src/task.c
#	src/toplevel.c
#	src/uv_constants.h
#	test/TestHelpers.jl
#	test/arrayops.jl
#	test/arrayperf.jl
#	test/backtrace.jl
#	test/base64.jl
#	test/bigint.jl
#	test/bitarray.jl
#	test/blas.jl
#	test/broadcast.jl
#	test/ccall.jl
#	test/ccalltest.c
#	test/char.jl
#	test/choosetests.jl
#	test/cmdlineargs.jl
#	test/combinatorics.jl
#	test/complex.jl
#	test/copy.jl
#	test/core.jl
#	test/dates.jl
#	test/dates/accessors.jl
#	test/dates/adjusters.jl
#	test/dates/arithmetic.jl
#	test/dates/conversions.jl
#	test/dates/io.jl
#	test/dates/periods.jl
#	test/dates/query.jl
#	test/dates/ranges.jl
#	test/dates/types.jl
#	test/dict.jl
#	test/docs.jl
#	test/dsp.jl
#	test/enums.jl
#	test/euler.jl
#	test/examples.jl
#	test/fastmath.jl
#	test/fft.jl
#	test/file.jl
#	test/float16.jl
#	test/floatapprox.jl
#	test/functional.jl
#	test/functors.jl
#	test/git.jl
#	test/gitutils.jl
#	test/goto.jl
#	test/grisu.jl
#	test/hashing.jl
#	test/i18n.jl
#	test/intfuncs.jl
#	test/iobuffer.jl
#	test/keywordargs.jl
#	test/libgit2.jl
#	test/linalg/arnoldi.jl
#	test/linalg/bidiag.jl
#	test/linalg/cholesky.jl
#	test/linalg/diagonal.jl
#	test/linalg/givens.jl
#	test/linalg/lapack.jl
#	test/linalg/lu.jl
#	test/linalg/pinv.jl
#	test/linalg/symmetric.jl
#	test/linalg/triangular.jl
#	test/linalg/tridiag.jl
#	test/linalg1.jl
#	test/linalg2.jl
#	test/linalg3.jl
#	test/linalg4.jl
#	test/lineedit.jl
#	test/llvmcall.jl
#	test/markdown.jl
#	test/math.jl
#	test/meta.jl
#	test/misc.jl
#	test/mod2pi.jl
#	test/mpfr.jl
#	test/netload/memtest.jl
#	test/netload/nettest.jl
#	test/nullable.jl
#	test/numbers.jl
#	test/operators.jl
#	test/parallel.jl
#	test/parser.jl
#	test/path.jl
#	test/perf/blas/level1.jl
#	test/perf/blas/level2.jl
#	test/perf/blas/level3.jl
#	test/perf/blas/perf.jl
#	test/perf/cat/perf.jl
#	test/perf/kernel/actor_centrality.jl
#	test/perf/kernel/bench_eu.jl
#	test/perf/kernel/getdivgrad.jl
#	test/perf/kernel/gk.jl
#	test/perf/kernel/go_benchmark.c
#	test/perf/kernel/go_benchmark.jl
#	test/perf/kernel/indexing.jl
#	test/perf/kernel/json.jl
#	test/perf/kernel/laplace.jl
#	test/perf/kernel/laplace/c_laplace.c
#	test/perf/kernel/laplace/c_laplace_parallel_update.c
#	test/perf/kernel/laplace/c_laplace_parallel_update_pointer.c
#	test/perf/kernel/laplace/cilk_laplace.c
#	test/perf/kernel/perf.jl
#	test/perf/kernel/raytracer.jl
#	test/perf/kernel/simplex.jl
#	test/perf/kernel/stockcorr.jl
#	test/perf/kernel/ziggurat.jl
#	test/perf/lapack/eig.jl
#	test/perf/lapack/factorizations.jl
#	test/perf/lapack/perf.jl
#	test/perf/micro/java/setup.sh
#	test/perf/micro/perf.c
#	test/perf/micro/perf.jl
#	test/perf/perfcomp.jl
#	test/perf/perfgeneric.jl
#	test/perf/perfutil.jl
#	test/perf/report.jl
#	test/perf/shootout/binary_trees.jl
#	test/perf/shootout/fannkuch.jl
#	test/perf/shootout/fasta.jl
#	test/perf/shootout/k_nucleotide.jl
#	test/perf/shootout/mandelbrot.jl
#	test/perf/shootout/meteor_contest.jl
#	test/perf/shootout/nbody.jl
#	test/perf/shootout/nbody_vec.jl
#	test/perf/shootout/perf.jl
#	test/perf/shootout/pidigits.jl
#	test/perf/shootout/regex_dna.jl
#	test/perf/shootout/revcomp.jl
#	test/perf/shootout/spectralnorm.jl
#	test/perf/simd/axpy.jl
#	test/perf/simd/inner.jl
#	test/perf/simd/perf.jl
#	test/perf/simd/seismic_fdtd.jl
#	test/perf/simd/sum_reduce.jl
#	test/perf/sort/perf.jl
#	test/perf/sparse/fem.jl
#	test/perf/sparse/getindex.jl
#	test/perf/sparse/perf.jl
#	test/perf/spell/perf.jl
#	test/pkg.jl
#	test/pollfd.jl
#	test/priorityqueue.jl
#	test/profile.jl
#	test/random.jl
#	test/ranges.jl
#	test/readdlm.jl
#	test/reduce.jl
#	test/reducedim.jl
#	test/reflection.jl
#	test/regex.jl
#	test/remote.jl
#	test/repl.jl
#	test/replcompletions.jl
#	test/replutil.jl
#	test/resolve.jl
#	test/rounding.jl
#	test/runtests.jl
#	test/serialize.jl
#	test/sets.jl
#	test/show.jl
#	test/simdloop.jl
#	test/socket.jl
#	test/sorting.jl
#	test/sparse.jl
#	test/sparsedir/cholmod.jl
#	test/sparsedir/sparse.jl
#	test/sparsedir/spqr.jl
#	test/sparsedir/umfpack.jl
#	test/spawn.jl
#	test/staged.jl
#	test/statistics.jl
#	test/strings.jl
#	test/subarray.jl
#	test/sysinfo.jl
#	test/test.jl
#	test/test_sourcepath.jl
#	test/testdefs.jl
#	test/tuple.jl
#	test/unicode.jl
#	test/version.jl
# Conflicts:
#	base/LineEdit.jl
#	base/REPL.jl
#	base/REPLCompletions.jl
#	base/abstractarray.jl
#	base/array.jl
#	base/bitarray.jl
#	base/broadcast.jl
#	base/c.jl
#	base/client.jl
#	base/combinatorics.jl
#	base/complex.jl
#	base/constants.jl
#	base/coreimg.jl
#	base/datafmt.jl
#	base/dates/adjusters.jl
#	base/dates/periods.jl
#	base/dates/types.jl
#	base/deepcopy.jl
#	base/deprecated.jl
#	base/dict.jl
#	base/dsp.jl
#	base/expr.jl
#	base/fastmath.jl
#	base/fftw.jl
#	base/float.jl
#	base/fs.jl
#	base/gmp.jl
#	base/grisu.jl
#	base/inference.jl
#	base/int.jl
#	base/intfuncs.jl
#	base/libc.jl
#	base/libdl.jl
#	base/linalg.jl
#	base/linalg/bidiag.jl
#	base/linalg/bitarray.jl
#	base/linalg/blas.jl
#	base/linalg/cholesky.jl
#	base/linalg/dense.jl
#	base/linalg/eigen.jl
#	base/linalg/lu.jl
#	base/linalg/matmul.jl
#	base/linalg/qr.jl
#	base/linalg/schur.jl
#	base/linalg/special.jl
#	base/linalg/svd.jl
#	base/linalg/symmetric.jl
#	base/linalg/triangular.jl
#	base/linalg/uniformscaling.jl
#	base/loading.jl
#	base/markdown/render/html.jl
#	base/mmap.jl
#	base/mpfr.jl
#	base/multi.jl
#	base/multidimensional.jl
#	base/multimedia.jl
#	base/nofloat_hashing.jl
#	base/nullable.jl
#	base/operators.jl
#	base/ordering.jl
#	base/pkg.jl
#	base/pkg/entry.jl
#	base/pkg/generate.jl
#	base/pkg/query.jl
#	base/pkg/reqs.jl
#	base/pkg/resolve/versionweight.jl
#	base/pointer.jl
#	base/precompile.jl
#	base/printf.jl
#	base/process.jl
#	base/profile.jl
#	base/random.jl
#	base/range.jl
#	base/reduce.jl
#	base/reducedim.jl
#	base/regex.jl
#	base/replutil.jl
#	base/rounding.jl
#	base/sharedarray.jl
#	base/show.jl
#	base/socket.jl
#	base/sort.jl
#	base/sparse/cholmod.jl
#	base/sparse/cholmod_h.jl
#	base/sparse/csparse.jl
#	base/sparse/sparsematrix.jl
#	base/sparse/umfpack.jl
#	base/special/gamma.jl
#	base/stat.jl
#	base/statistics.jl
#	base/stream.jl
#	base/string.jl
#	base/subarray.jl
#	base/utf16.jl
#	base/utf32.jl
#	base/utf8.jl
#	base/utftypes.jl
#	base/version.jl
#	test/arrayops.jl
#	test/bitarray.jl
#	test/core.jl
#	test/functional.jl
#	test/linalg2.jl
#	test/numbers.jl
#	test/perf/array/indexing.jl
#	test/reducedim.jl
#	test/statistics.jl
#	test/tuple.jl
…nkcheck

# Conflicts:
#	DISTRIBUTING.md
#	README.md
#	README.windows.md
#	doc/devdocs/backtraces.rst
#	doc/devdocs/object.rst
#	doc/devdocs/stdio.rst
#	doc/manual/arrays.rst
#	doc/manual/calling-c-and-fortran-code.rst
#	doc/manual/constructors.rst
#	doc/manual/dates.rst
#	doc/manual/documentation.rst
#	doc/manual/functions.rst
#	doc/manual/integers-and-floating-point-numbers.rst
#	doc/manual/introduction.rst
#	doc/manual/linear-algebra.rst
#	doc/manual/mathematical-operations.rst
#	doc/manual/metaprogramming.rst
#	doc/manual/methods.rst
#	doc/manual/profile.rst
#	doc/manual/strings.rst
#	doc/manual/style-guide.rst
#	doc/manual/types.rst
#	doc/manual/variables-and-scoping.rst
#	test/dates/accessors.jl
#	test/dates/conversions.jl
# Conflicts:
#	NEWS.md
#	base/docs/helpdb.jl
#	base/exports.jl
#	doc/stdlib/numbers.rst
#	test/numbers.jl
pabloferz and others added 3 commits May 29, 2016 13:07
This patch does two things:
* It all but completely removes `unsafe_getindex` and `unsafe_setindex!` from the standard library. This merges their method definitions into the safe flavors with a `(at)boundscheck checkbounds(...)` clause, and it replaces call-sites with `(at)inbounds A[I...]`.  A few uses remain because the inbounds macro doesn't return its value, making the construct a little awkward in some cases.
* It changes *where* bounds are checked in SubArrays. Previously, SubArrays would defer bounds checks to their parent arrays; they wouldn't check the indices directly, but rather they'd transform the indices into the proper references into the parent array, and then index into the parent array safely. E.g., previously:

    julia> A = -.5:.1:.5
           S = sub(A, 7:11)
           S[-4], S[0], S[4]
    (-0.4,0.0,0.4)

    julia> S[-6]
    ERROR: BoundsError: attempt to access -0.5:0.1:0.5
      at index [0]

This behavior is neither tested nor depended upon in the Base library, but I believe some packages have historically depended upon this.  With this patch, the behavior is much more sane; `S[0]` now immediately throws a bounds error from the SubArray itself.  I believe this is a strong requirement for making views more prominent (regardless of the syntax).

# Conflicts:
#	base/abstractarray.jl
#	base/array.jl
#	base/bitarray.jl
#	base/linalg.jl
#	base/linalg/diagonal.jl
#	base/linalg/symmetric.jl
#	base/multidimensional.jl
#	base/number.jl
#	base/range.jl
#	base/simdloop.jl
#	base/subarray.jl
This also replaces several instances of `for i in eachindex(A); a = A[i]` with `for a in A`. The latter is presumably easier for automatic bounds-checking removal.

# Conflicts:
#	base/abstractarray.jl
#	base/arraymath.jl
#	base/combinatorics.jl
#	base/complex.jl
#	base/dates/periods.jl
#	base/floatfuncs.jl
#	base/io.jl
#	base/linalg/generic.jl
#	base/linalg/lapack.jl
#	base/math.jl
#	base/multidimensional.jl
#	base/operators.jl
#	base/sparse/linalg.jl
@tkelman
Copy link
Contributor

tkelman commented May 29, 2016

What does it look like if you do git mv base/primes.jl src/Primes.jl ? What would the diff be relative to the current package content? Since the package is already registered we shouldn't modify any existing history, but we can merge new commits into it. We also should have been more careful about acknowledging the license from base. This package is still MIT, but the copyright is held by the contributors to base.

@coveralls
Copy link

coveralls commented May 29, 2016

Coverage Status

Coverage remained the same at 96.094% when pulling dcdf586 on rfourquet:base-history into 6467a59 on JuliaMath:master.

@coveralls
Copy link

coveralls commented May 29, 2016

Coverage Status

Coverage remained the same at 96.094% when pulling a08d381 on rfourquet:base-history into 6467a59 on JuliaMath:master.

@rfourquet
Copy link
Member Author

After moving it's not directly mergeable, nor is it possible to rebase master onto this branch (option 1 above) without having conflicts to solve (in particular in master the src/Primes.jl file is created almost empty, containing the module declaration and comments). On the other hand, if I then 'git checkout master -- src/Primes.jl' and commit, we get a small diff (essentially docstrings added inline and a couple of small changes), I updated the branch accordingly.
Note that by option 1 I don't mean modifying this package history, but rather to create a parallel one based on master's one, which can then be merged in master.

@coveralls
Copy link

coveralls commented May 29, 2016

Coverage Status

Coverage remained the same at 96.094% when pulling a4de93f on rfourquet:base-history into 6467a59 on JuliaMath:master.

@@ -1,4 +1,13 @@
# This file is a part of Julia. License is MIT: http://julialang.org/license
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should keep this, just replace "is a part" with "was formerly a part"

@simonbyrne simonbyrne merged commit e2dfe86 into JuliaMath:master Jun 7, 2016
@rfourquet rfourquet deleted the base-history branch September 9, 2016 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.