aqueduct
Aqueduct is a simple, minimal library for working with Streams.
Name
The name comes from the name of the main data type - Stream. Of course, that name for a package is taken on Hex, and so is brook - the other name idea I had, which is a name for a small river.
Then I found aqueduct as a synonym for stream, and since it wasn’t taken, I decided to use it.
Background
It was originally a module of the mesv library I was writing, but since it got a bit too big and elaborate to be a simple module, I decided to split it off into a separate package.
You might notice that it’s almost a copy of gleam_yielder package.
The reason it exists is because I wanted to implement it myself, and had a few ideas that would be hard (or even impossible) to implement when using Yielders, since the data types were opaque.
You are welcome to use this package, but as it is not a priority for me at the moment, it doesn’t have good documentation, in the sense that it lacks examples. I think I did a pretty good job of explaining in words the behaviour of all of the functions provided though.
Installation
Simply use the Gleam CLI tool to add this library to your project.
gleam add aqueduct@1
Further documentation can be found at Hex Docs.
Roadmap
- Release : Done. The library works, but lacks test coverage and examples
- Organization : Finalize the naming scheme and function names and arrange them in the source file.
- Testing : Create unit tests for (hopefully) all of the API functions provided to verify correct behaviour.
- Infinite guards : Add a field to the
Streamtype to keep track of whether a particular stream is finite or infinite, and change it accordingly when transforming it. - (maybe) Internal buffer : Make a second variant of the type that stores a (potentially different type) buffer and consumes it when taking a step. Not sure if this would work well with the current system.