bkt
comemo
bkt | comemo | |
---|---|---|
14 | 1 | |
213 | 378 | |
- | 2.6% | |
7.3 | 5.6 | |
3 months ago | 23 days ago | |
Rust | Rust | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
bkt
-
Tip: slow fzf --preview commands can be cached using bkt to make the preview more responsive
Hi, author of bkt here. I use fzf all the time and combine it with bkt to make --preview faster. I hope you find this pattern useful!
-
Passing a command with double quotes to a function
Alternatively, check out bkt (also mine), which is like bash-cache but for subprocesses instead of shell functions.
-
New release of bkt, a subprocess caching utility
Instead, using bkt ensures each request is only sent once and all subsequent calls return locally cached results:
Enjoy! If you find it useful please let me know how you're using it!
-
Escaping (?)
Honestly, any reasonably complex bash script uses (or should be using!) arrays, so just poke around and you'll probably see them. Here's a fairly straightforward script of mine with several arrays: https://github.com/dimo414/bkt/blob/master/benchmark.sh
- Bkt: A subprocess caching utility written in Rust
-
bkt: easily cache the output of command line programs
Glad to hear it! I hope you find it helpful :) If you have a few minutes please share how you're using bkt, it'll help me and others!
- My first Rust project: a caching utility for subprocesses - would appreciate any feedback
comemo
-
Durable Incrementality
I wonder how this compares to comemo [1] [2], they're both memoization frameworks with "tricks" to limit invalidation.
The trick in comemo's blog post is to make the dependencies fine-grained, by tracking and only comparing what parts of them are actually used; while the trick here is to have functions depend on other outputs instead of the root input, so changes don't propagate all the way.
[1] https://laurmaedje.github.io/posts/comemo/
[2] https://github.com/typst/comemo
What are some alternatives?
bash-cache - Transparent caching layer for bash functions; particularly useful for functions invoked as part of your prompt.
zinoma - Žinoma - Make your build flow incremental
cached - Rust cache structures and easy function memoization
tree-sitter - An incremental parsing system for programming tools
zoxide - A smarter cd command. Supports all major shells.
navi - An interactive cheatsheet tool for the command-line
lady-deirdre - Compiler front-end foundation technology.
ctrlg - A command line context switcher, written in Rust :crab:
michie - A Rust attribute macro that adds memoization to a function (rhymes with Mickey)
ShellCheck - ShellCheck, a static analysis tool for shell scripts
moxie - lightweight platform-agnostic tools for declarative UI