Rivendell adds useful functionality to elvish to take your shell to the next level!
- 🌈 functional bits: high-level functions which encapsulate common design patterns.
- 💤 lazy iterators: transducer-inspired iterators which allow you to represent infinite sequences.
- 📈 visual aids: sparklines & histograms.
- 🔧 plus a toolbelt of common utility functions which operate on strings, lists, and maps.
It's a 3-step process.
- Add these lines to your
~/.config/elvish/rc.elv
epm:install &silent-if-installed=$true github.com/crinklywrappr/rivendell
epm:upgrade github.com/crinklywrappr/rivendell
- Request modules à la carte.
use github.com/crinklywrappr/rivendell/test t
use github.com/crinklywrappr/rivendell/base b
use github.com/crinklywrappr/rivendell/fun f
use github.com/crinklywrappr/rivendell/lazy l
use github.com/crinklywrappr/rivendell/rune r
use github.com/crinklywrappr/rivendell/algo a
use github.com/crinklywrappr/rivendell/vis v
- Do cool stuff!
# lazily graphing population data from the 2021 census
var file = (a:lines NST-EST2021-alldata.csv)
var f = {|line| s:split , $line | f:listify}
var popkeys = ($f (l:first $file))
l:drop 6 $file ^
| l:each (f:comp $f (f:partial $f:zipmap~ $popkeys) (f:juxt (f:k NAME) (f:k POPESTIMATE2021)) $f:listify~) ^
| l:take 20 ^
| l:blast ^
| v:barky &min=0
Alabama ████████
Alaska █
Arizona ███████████
Arkansas ████
California ███████████████████████████████████████████████████████████████
Colorado █████████
Connecticut █████
Delaware █
District of Co… █
Florida ███████████████████████████████████
Georgia █████████████████
Hawaii ██
Idaho ███
Illinois ████████████████████
Indiana ███████████
Iowa █████
Kansas ████
Kentucky ███████
Louisiana ███████
Maine ██
Command-line users are recommended to use glow.
Run the following command to browse the docs.
glow ~/.local/share/elvish/lib/github.com/crinklywrappr/rivendell/
Tests are run and Markdown documentation is generated with this command.
use ./gendoc
gendoc:gendoc
It places documentation in a doc
folder relative to your current directory. Because it is a destructive operation, it is advisable that users should run this in an empty directory.
I recommend glow for reading documentation at the terminal. It looks sexy.