Skip to content

Commit

Permalink
Many more deprecation doc cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
tkelman committed May 25, 2016
1 parent 3fcea09 commit 60c269d
Show file tree
Hide file tree
Showing 22 changed files with 32 additions and 82 deletions.
2 changes: 2 additions & 0 deletions base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,8 @@ function rem1{T<:Real}(x::T, y::T)
depwarn("`rem1(x,y)` is discontinued, as it cannot be defined consistently for `x==0`. Rewrite the expression using `mod1` instead.", :rem1)
rem(x-1,y)+1
end
rem1(x::Real, y::Real) = rem1(promote(x,y)...)
export rem1

# Filesystem module updates

Expand Down
9 changes: 1 addition & 8 deletions base/docs/helpdb/Base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3294,7 +3294,7 @@ Redirect I/O to or from the given `command`. Keyword arguments specify which of
command's streams should be redirected. `append` controls whether file output appends to the
file. This is a more general version of the 2-argument `pipeline` function.
`pipeline(from, to)` is equivalent to `pipeline(from, stdout=to)` when `from` is a command,
and to `pipe(to, stdin=from)` when `from` is another kind of data source.
and to `pipeline(to, stdin=from)` when `from` is another kind of data source.
**Examples**:
Expand Down Expand Up @@ -4961,13 +4961,6 @@ The distance between `x` and the next larger representable floating-point value
"""
eps(::AbstractFloat)

"""
rem1(x, y)
(Deprecated.) Remainder after division, returning in the range `(0, y]`.
"""
rem1

"""
isalpha(c::Union{Char,AbstractString}) -> Bool
Expand Down
2 changes: 0 additions & 2 deletions base/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,6 @@ export
reim,
reinterpret,
rem,
rem1,
round,
sec,
secd,
Expand Down Expand Up @@ -1275,7 +1274,6 @@ export
isblockdev,
ischardev,
isdir,
isexecutable,
isfifo,
isfile,
islink,
Expand Down
1 change: 0 additions & 1 deletion base/promotion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ rem(x::Real, y::Real) = rem(promote(x,y)...)
mod(x::Real, y::Real) = mod(promote(x,y)...)

mod1(x::Real, y::Real) = mod1(promote(x,y)...)
rem1(x::Real, y::Real) = rem1(promote(x,y)...)
fld1(x::Real, y::Real) = fld1(promote(x,y)...)

max(x::Real, y::Real) = max(promote(x,y)...)
Expand Down
2 changes: 1 addition & 1 deletion base/strings/types.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is a part of Julia. License is MIT: http:https://julialang.org/license

# SubString, RevString, RepString, and RopeString types
# SubString, RevString, and RepString types

## substrings reference original strings ##

Expand Down
40 changes: 2 additions & 38 deletions contrib/BBEditTextWrangler-julia.plist
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
<string>@ip_str</string>
<string>@label</string>
<string>@less</string>
<string>@math_const</string>
<string>@MIME</string>
<string>@MIME_str</string>
<string>@noinline</string>
Expand Down Expand Up @@ -216,7 +215,6 @@
<string>bkfact</string>
<string>blas_set_num_threads</string>
<string>blkdiag</string>
<string>bool</string>
<string>break</string>
<string>brfft</string>
<string>broadcast!</string>
Expand All @@ -232,7 +230,6 @@
<string>c_malloc</string>
<string>c_realloc</string>
<string>call</string>
<string>cartesianmap</string>
<string>cat</string>
<string>catalan</string>
<string>catch</string>
Expand All @@ -244,7 +241,6 @@
<string>cell</string>
<string>cfunction</string>
<string>cglobal</string>
<string>char</string>
<string>charwidth</string>
<string>checkbounds</string>
<string>chmod</string>
Expand All @@ -270,9 +266,6 @@
<string>code_warntype</string>
<string>collect</string>
<string>colon</string>
<string>complex128</string>
<string>complex32</string>
<string>complex64</string>
<string>complex</string>
<string>cond</string>
<string>condskeel</string>
Expand Down Expand Up @@ -457,14 +450,7 @@
<string>fldmod</string>
<string>flipbits!</string>
<string>flipdim</string>
<string>fliplr</string>
<string>flipsign</string>
<string>flipud</string>
<string>float16</string>
<string>float32</string>
<string>float32_isvalid</string>
<string>float64</string>
<string>float64_isvalid</string>
<string>float</string>
<string>floor</string>
<string>flush</string>
Expand All @@ -480,7 +466,6 @@
<string>functionloc</string>
<string>gamma</string>
<string>gc</string>
<string>gc_disable</string>
<string>gc_enable</string>
<string>gcd</string>
<string>gcdx</string>
Expand Down Expand Up @@ -554,13 +539,6 @@
<string>init_worker</string>
<string>insert!</string>
<string>instances</string>
<string>int128</string>
<string>int16</string>
<string>int32</string>
<string>int64</string>
<string>int8</string>
<string>int</string>
<string>integer</string>
<string>interrupt</string>
<string>intersect!</string>
<string>intersect</string>
Expand Down Expand Up @@ -595,7 +573,6 @@
<string>isempty</string>
<string>isequal</string>
<string>iseven</string>
<string>isexecutable</string>
<string>isfifo</string>
<string>isfile</string>
<string>isfinite</string>
Expand Down Expand Up @@ -672,7 +649,6 @@
<string>lexless</string>
<string>lfact</string>
<string>lgamma</string>
<string>linrange</string>
<string>linreg</string>
<string>linspace</string>
<string>listen</string>
Expand Down Expand Up @@ -739,8 +715,6 @@
<string>mktemp</string>
<string>mktempdir</string>
<string>mmap</string>
<string>mmap_array</string>
<string>mmap_bitarray</string>
<string>mod1</string>
<string>mod2pi</string>
<string>mod</string>
Expand Down Expand Up @@ -795,15 +769,12 @@
<string>parent</string>
<string>parentindexes</string>
<string>parse</string>
<string>parsefloat</string>
<string>parseint</string>
<string>peakflops</string>
<string>permute!</string>
<string>permutedims!</string>
<string>permutedims</string>
<string>pi</string>
<string>pinv</string>
<string>pipe</string>
<string>pipeline</string>
<string>plan_bfft!</string>
<string>plan_bfft</string>
Expand Down Expand Up @@ -919,7 +890,6 @@
<string>reinterpret</string>
<string>reload</string>
<string>relpath</string>
<string>rem1</string>
<string>rem</string>
<string>remotecall</string>
<string>remotecall_fetch</string>
Expand Down Expand Up @@ -1046,15 +1016,13 @@
<string>srand</string>
<string>start</string>
<string>start_reading</string>
<string>start_timer</string>
<string>start_watching</string>
<string>startswith</string>
<string>stat</string>
<string>std</string>
<string>stdm</string>
<string>step</string>
<string>stop_reading</string>
<string>stop_timer</string>
<string>strerror</string>
<string>strftime</string>
<string>stride</string>
Expand Down Expand Up @@ -1163,7 +1131,6 @@
<string>whos</string>
<string>widemul</string>
<string>widen</string>
<string>with_env</string>
<string>withenv</string>
<string>workers</string>
<string>workspace</string>
Expand Down Expand Up @@ -1201,6 +1168,7 @@
<string>AbstractFloat</string>
<string>AbstractMatrix</string>
<string>AbstractRNG</string>
<string>AbstractRemoteRef</string>
<string>AbstractSparseArray</string>
<string>AbstractSparseMatrix</string>
<string>AbstractSparseVector</string>
Expand Down Expand Up @@ -1313,7 +1281,6 @@
<string>FFTW</string>
<string>FileMonitor</string>
<string>Filter</string>
<string>FloatingPoint</string>
<string>FloatRange</string>
<string>Function</string>
<string>GeneralizedSchur</string>
Expand Down Expand Up @@ -1405,10 +1372,8 @@
<string>RegexMatch</string>
<string>RegexMatchIterator</string>
<string>RemoteException</string>
<string>RemoteRef</string>
<string>RepString</string>
<string>RevString</string>
<string>RopeString</string>
<string>RoundDown</string>
<string>RoundFromZero</string>
<string>RoundingMode</string>
Expand All @@ -1431,7 +1396,6 @@
<string>SharedArray</string>
<string>SharedMatrix</string>
<string>SharedVector</string>
<string>SparseMatrix</string>
<string>SparseMatrixCSC</string>
<string>SpawnNullStream</string>
<string>StatStruct</string>
Expand Down Expand Up @@ -1477,7 +1441,7 @@
<string>UInt</string>
<string>UnicodeError</string>
<string>UniformScaling</string>
<string>UnionType</string>
<string>Union</string>
<string>UnitRange</string>
<string>UpperTriangular</string>
<string>UTF16String</string>
Expand Down
2 changes: 1 addition & 1 deletion contrib/Julia_Notepad++.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<Keywords name="Folders in comment, middle"></Keywords>
<Keywords name="Folders in comment, close"></Keywords>
<Keywords name="Keywords1">true false C_NULL Inf NaN Inf32 NaN32 nothing</Keywords>
<Keywords name="Keywords2">AbstractArray AbstractMatrix AbstractSparseMatrix AbstractString AbstractVector Any ArgumentError Array Associative AsyncStream BigFloat BigInt BitArray BitMatrix BitVector Bool BunchKaufman Cchar Cdouble Cfloat Char CharString CholeskyDense CholeskyPivotedDense Cint Cintmax_t Clong Clonglong Colon Complex Complex128 Complex64 ComplexPair Cptrdiff_t Cshort Csize_t Cuchar Cuint Cuintmax_t Culong Culonglong Cushort DArray Dict Dims DisconnectException EOFError EachLine EnvHash ErrorException Exception Expr Factorization Filter Float Float32 Float64 Function GSVDDense IO IOBuffer IOStream ImaginaryUnit InsertionSort Int Int128 Int16 Int32 Int64 Int8 IntSet Integer KeyError LDLTTridiagonal LUDense LUTridiagonal LoadError LocalProcess Matrix MergeSort MethodError NTuple Number ObjectIdDict ObjectIdDict OrdinalRange ParseError PipeBuffer ProcessGroup Ptr QRDense QRPivotedDense QuickSort Range Range1 RangeIndex Ranges Rational Real Regex RegexMatch RegexMatchIterator RemoteRef RepString RevString Reverse RopeString SVDDense Set Signed SparseMatrixCSC SpawnNullStream Stat StridedArray StridedMatrix StridedVecOrMat StridedVector String SubArray SubDArray SubOrDArray SubString SymTridiagonal Symbol SystemError Task TCPSocket TimSort Tridiagonal Tuple Type TypeError UInt UInt128 UInt16 UInt32 UInt64 UInt8 UVError Union Unsigned VecOrMat Vector VersionNumber Void WeakKeyDict WeakRef Zip</Keywords>
<Keywords name="Keywords2">AbstractArray AbstractMatrix AbstractRemoteRef AbstractSparseMatrix AbstractString AbstractVector Any ArgumentError Array Associative AsyncStream BigFloat BigInt BitArray BitMatrix BitVector Bool BunchKaufman Cchar Cdouble Cfloat Char CharString CholeskyDense CholeskyPivotedDense Cint Cintmax_t Clong Clonglong Colon Complex Complex128 Complex64 ComplexPair Cptrdiff_t Cshort Csize_t Cuchar Cuint Cuintmax_t Culong Culonglong Cushort DArray Dict Dims DisconnectException EOFError EachLine EnvHash ErrorException Exception Expr Factorization Filter Float Float32 Float64 Function GSVDDense IO IOBuffer IOStream ImaginaryUnit InsertionSort Int Int128 Int16 Int32 Int64 Int8 IntSet Integer KeyError LDLTTridiagonal LUDense LUTridiagonal LoadError LocalProcess Matrix MergeSort MethodError NTuple Number ObjectIdDict ObjectIdDict OrdinalRange ParseError PipeBuffer ProcessGroup Ptr QRDense QRPivotedDense QuickSort Range Range1 RangeIndex Ranges Rational Real Regex RegexMatch RegexMatchIterator RepString RevString Reverse SVDDense Set Signed SparseMatrixCSC SpawnNullStream Stat StridedArray StridedMatrix StridedVecOrMat StridedVector String SubArray SubDArray SubOrDArray SubString SymTridiagonal Symbol SystemError Task TCPSocket TimSort Tridiagonal Tuple Type TypeError UInt UInt128 UInt16 UInt32 UInt64 UInt8 UVError Union Unsigned VecOrMat Vector VersionNumber Void WeakKeyDict WeakRef Zip</Keywords>
<Keywords name="Keywords3">abstract begin baremodule bitstype break catch ccall const continue do else elseif end export finally for function global if immutable import importall let local macro module quote return try type typealias using while</Keywords>
<Keywords name="Keywords4">close enumerate error info open print println read write warn</Keywords>
<Keywords name="Keywords5">print println</Keywords>
Expand Down
3 changes: 1 addition & 2 deletions contrib/julia.lang
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
<keyword>Any|Void</keyword>
<keyword>Type(Constructor|Name|Var|_Array)?|(Union|Data|NonTuple)Type</keyword>
<keyword>(Abstract|Strided|Bit)?(Array|Matrix|Vector)</keyword>
<keyword>Abstract(Cmd|RNG|SparseMatrix)</keyword>
<keyword>Abstract(Cmd|RNG|RemoteRef|SparseMatrix)</keyword>
<keyword>(Abstract|Strided)?VecOrMat</keyword>
<keyword>SparseMatrixCSC</keyword>
<keyword>(D|Sub((Or)?D)?)Array</keyword>
Expand Down Expand Up @@ -308,7 +308,6 @@
<keyword>RawOrBoxedHandle</keyword>
<keyword>Redirectable</keyword>
<keyword>Regex(Match(Iterator)?)?</keyword>
<keyword>RemoteRef</keyword>
<keyword>Rest</keyword>
<keyword>Reverse</keyword>
<keyword>(Generalized)?(SVD|Schur)</keyword>
Expand Down
3 changes: 1 addition & 2 deletions contrib/julia.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
<list name="types">
<item> AbstractArray </item>
<item> AbstractMatrix </item>
<item> AbstractRemoteRef </item>
<item> AbstractSparseMatrix </item>
<item> AbstractVector </item>
<item> Any </item>
Expand Down Expand Up @@ -157,11 +158,9 @@
<item> Regex </item>
<item> RegexMatch </item>
<item> RegexMatchIterator </item>
<item> RemoteRef </item>
<item> RepString </item>
<item> RevString </item>
<item> Reverse </item>
<item> RopeString </item>
<item> Schur </item>
<item> Set </item>
<item> Signed </item>
Expand Down
4 changes: 2 additions & 2 deletions doc/manual/calling-c-and-fortran-code.rst
Original file line number Diff line number Diff line change
Expand Up @@ -817,8 +817,8 @@ Here is a simple example of a C wrapper that returns a ``Ptr`` type::
(Csize_t,), #tuple of input types
n #name of Julia variable to pass in
)
if output_ptr==C_NULL #Could not allocate memory
throw(MemoryError())
if output_ptr==C_NULL # Could not allocate memory
throw(OutOfMemoryError())
end
return output_ptr
end
Expand Down
2 changes: 1 addition & 1 deletion doc/manual/interacting-with-julia.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ In addition to function names, complete function calls may be entered to see whi
help> AbstractString
DataType : AbstractString
supertype: Any
subtypes : Any[DirectIndexString,RepString,RevString{T<:AbstractString},RopeString,SubString{T<:AbstractString},String]
subtypes : Any[DirectIndexString,RepString,RevString{T<:AbstractString},SubString{T<:AbstractString},String]

Help mode can be exited by pressing backspace at the beginning of the line.

Expand Down
2 changes: 1 addition & 1 deletion doc/manual/interfaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ If a type is defined as a subtype of ``AbstractArray``, it inherits a very large

A key part in defining an ``AbstractArray`` subtype is :func:`Base.linearindexing`. Since indexing is such an important part of an array and often occurs in hot loops, it's important to make both indexing and indexed assignment as efficient as possible. Array data structures are typically defined in one of two ways: either it most efficiently accesses its elements using just one index (linear indexing) or it intrinsically accesses the elements with indices specified for every dimension. These two modalities are identified by Julia as ``Base.LinearFast()`` and ``Base.LinearSlow()``. Converting a linear index to multiple indexing subscripts is typically very expensive, so this provides a traits-based mechanism to enable efficient generic code for all array types.

This distinction determines which scalar indexing methods the type must define. ``LinearFast()`` arrays are simple: just define :func:`getindex(A::ArrayType, i::Int) <getindex>`. When the array is subsequently indexed with a multidimensional set of indices, the fallback :func:`getindex(A::AbstractArray, I...)` efficiently converts the indices into one linear index and then calls the above method. ``LinearSlow()`` arrays, on the other hand, require methods to be defined for each supported dimensionality with ``ndims(A)`` ``Int`` indices. For example, the builtin ``SparseMatrix`` type only supports two dimensions, so it just defines :func:`getindex(A::SparseMatrix, i::Int, j::Int)`. The same holds for :func:`setindex!`.
This distinction determines which scalar indexing methods the type must define. ``LinearFast()`` arrays are simple: just define :func:`getindex(A::ArrayType, i::Int) <getindex>`. When the array is subsequently indexed with a multidimensional set of indices, the fallback :func:`getindex(A::AbstractArray, I...)` efficiently converts the indices into one linear index and then calls the above method. ``LinearSlow()`` arrays, on the other hand, require methods to be defined for each supported dimensionality with ``ndims(A)`` ``Int`` indices. For example, the builtin ``SparseMatrixCSC`` type only supports two dimensions, so it just defines :func:`getindex(A::SparseMatrixCSC, i::Int, j::Int)`. The same holds for :func:`setindex!`.

Returning to the sequence of squares from above, we could instead define it as a subtype of an ``AbstractArray{Int, 1}``:

Expand Down
8 changes: 5 additions & 3 deletions doc/manual/methods.rst
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ Although it seems a simple concept, multiple dispatch on the types of
values is perhaps the single most powerful and central feature of the
Julia language. Core operations typically have dozens of methods::

.. doctest::

julia> methods(+)
# 139 methods for generic function "+":
+(x::Bool) at bool.jl:33
Expand Down Expand Up @@ -320,9 +322,9 @@ Julia language. Core operations typically have dozens of methods::
+(A::Base.LinAlg.SymTridiagonal{T},B::Base.LinAlg.Diagonal{T}) at linalg/special.jl:122
+(A::Base.LinAlg.Bidiagonal{T},B::Base.LinAlg.SymTridiagonal{T}) at linalg/special.jl:121
+(A::Base.LinAlg.SymTridiagonal{T},B::Base.LinAlg.Bidiagonal{T}) at linalg/special.jl:122
+{Tv1,Ti1,Tv2,Ti2}(A_1::Base.SparseMatrix.SparseMatrixCSC{Tv1,Ti1},A_2::Base.SparseMatrix.SparseMatrixCSC{Tv2,Ti2}) at sparse/sparsematrix.jl:873
+(A::Base.SparseMatrix.SparseMatrixCSC{Tv,Ti<:Integer},B::Array{T,N}) at sparse/sparsematrix.jl:885
+(A::Array{T,N},B::Base.SparseMatrix.SparseMatrixCSC{Tv,Ti<:Integer}) at sparse/sparsematrix.jl:887
+{Tv1,Ti1,Tv2,Ti2}(A_1::Base.SparseArrays.SparseMatrixCSC{Tv1,Ti1},A_2::Base.SparseMatrix.SparseMatrixCSC{Tv2,Ti2}) at sparse/sparsematrix.jl:873
+(A::Base.SparseArrays.SparseMatrixCSC{Tv,Ti<:Integer},B::Array{T,N}) at sparse/sparsematrix.jl:885
+(A::Array{T,N},B::Base.SparseArrays.SparseMatrixCSC{Tv,Ti<:Integer}) at sparse/sparsematrix.jl:887
+{P<:Base.Dates.Period}(Y::Union{SubArray{P<:Base.Dates.Period,N,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Range{Int64},Int64}}},LD},DenseArray{P<:Base.Dates.Period,N}},x::P<:Base.Dates.Period) at dates/periods.jl:50
+{T<:Base.Dates.TimeType}(r::Range{T<:Base.Dates.TimeType},x::Base.Dates.Period) at dates/ranges.jl:39
+{T<:Number}(x::AbstractArray{T<:Number,N}) at abstractarray.jl:442
Expand Down
2 changes: 1 addition & 1 deletion doc/manual/parallel-computing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ wait for a remote call to finish by calling :func:`wait` on the returned
`Future`, and you can obtain the full value of the result using
:func:`fetch`.

On the other hand ``RemoteRefs`` are rewritable. For example, multiple processes
On the other hand ``RemoteChannel`` s are rewritable. For example, multiple processes
can co-ordinate their processing by referencing the same remote ``Channel``\ .

Let's try this out. Starting with ``julia -p n`` provides ``n`` worker
Expand Down
Loading

0 comments on commit 60c269d

Please sign in to comment.