I hate this google groups interface; it dropped my attachment. Here it is, embedded.
typealias Indices{T<:Int} Union(Int, AbstractVector{T})
type AbstractArrayView{T,N,A<:AbstractArray,I<:(AbstractVector...)} <: AbstractArray{T,N}
parent::A
indexes::I
dims::Dims
AbstractArrayView(p::A, i::I) = new(p, i, map(length, i))
end
view{T,N}(A::AbstractArray{T,N}, i::NTuple{N,AbstractVector}) =
AbstractArrayView{T,N,typeof(A),typeof(i)}(A, i)
#change integer indexes into Range1 objects
view(A::AbstractArray, i::Indices...) =
view(A, ntuple(length(i), j -> isa(i[j],AbstractVector) ? i[j] :
(i[j]:i[j])))
view(A::AbstractArrayView, i::Indices...) =
view(A.parent, ntuple(length(i), j -> isa(i[j],AbstractVector) ? A.indexes[j][i[j]] :
(A.indexes[j][i[j]]):(A.indexes[j][i[j]])))
size(s::AbstractArrayView) = s.dims
ndims{T,N}(s::AbstractArrayView{T,N}) = N
copy(s::AbstractArrayView) = copy_to(similar(s.parent, size(s)), s)
similar(s::AbstractArrayView, T::Type, dims::Dims) = similar(s.parent, T, dims)
ref(s::AbstractArrayView) = s
ref{T}(s::AbstractArrayView{T,1}, i::Int) = s.parent[s.indexes[1][i]]
ref{T}(s::AbstractArrayView{T,2}, i::Int, j::Int) =
s.parent[s.indexes[1][i], s.indexes[2][j]]
ref(s::AbstractArrayView, is::Int...) = s.parent[map(ref, s.indexes, is)...]
ref(s::AbstractArrayView, i::Int) = s[ind2sub(size(s), i)...]