# ANN: LazyStack, SliceMap, StarSlice

**URL:** https://discourse.julialang.org/t/ann-lazystack-slicemap-starslice/36072
**Category:** Package Announcements
**Created:** [March 17, 2020, 12:05am UTC](https://discourse.julialang.org/t/ann-lazystack-slicemap-starslice/36072 "2020-03-17T00:05:29Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mcabbott](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mcabbott/32/6603_2.png) [@mcabbott](https://discourse.julialang.org/u/mcabbott)
#### Post date: [March 17, 2020, 12:05am UTC](https://discourse.julialang.org/t/ann-lazystack-slicemap-starslice/36072/1 "2020-03-17T00:05:30Z")

</div>

I have a few small packages for dealing with arrays of arrays, and similar things, which perhaps deserve announcement here:

- [LazyStack.jl](https://github.com/mcabbott/LazyStack.jl) has one function `stack` which glues an array of arrays into one big one. It is also happy to take a generator, like `stack(f(x) for x in eachslice(A))`, or a function to map over slices, like `stack(f, eachcol(x), eachcol(y))`, in which case it writes into a new array, widening the type if necessary. The slices must all be the same `size`, and are stacked along new dimension(s).

There is also a ragged variant `rstack`, which makes enough space for the largest slice. You can use OffsetArrays to control their positions.

- [SliceMap.jl](https://github.com/mcabbott/SliceMap.jl) is much narrower, aiming to provide a fast, differentiable, version of `mapslices`, primarily for columns of a matrix. There are various versions of this, some with static-array slices, and some which run multi-threaded. (By differentiable I mean that it defines gradients for Tracker & Zygote.)

- [StarSlice.jl](https://github.com/mcabbott/StarSlice.jl) is an experiment with notation for slicing, which overloads `A[:,*]` to mean `collect.(eachcol(A))`, and variants of that. Perhaps useful for `mapslices` type things, and perhaps as a way to write reductions. (This is not yet registered.)

---

<div class="post-metadata">

### Author: ![Zach\_Christensen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zach_christensen/32/7220_2.png) [@Zach\_Christensen](https://discourse.julialang.org/u/Zach_Christensen)
#### Post date: [March 17, 2020, 12:14am UTC](https://discourse.julialang.org/t/ann-lazystack-slicemap-starslice/36072/2 "2020-03-17T00:14:49Z")

</div>

I really like the idea of testing out using these operators within standard indexing notation. It’s a nice way to avoid burdening users with more syntax but avoids interfering with anywhere else they would be used. Nice work!
