tvl-depot/users/sterni
sterni 36f6322d16 feat(sterni/nix/fun): implement tail call “optimization” for Nix
I've had the notion that builtins.genericClosure can be used to express
any recursive algorithm, but a proof is much better than a notion of
course! In this case we can easily show this by implementing a function
that converts a tail recursive function into an application of
builtins.genericClosure.

This is possible if the function resolves its self reference using a
fixed point which allows us to pass a function that encodes the call to
self in a returned attribute set, leaving the actual call to
genericClosure's operator. Additionally, some tools for collecting meta
data about functions (argCount) and calling arbitrary functions (apply,
unapply) are necessary.

Change-Id: I7d455db66d0a55e8639856ccc207639d371a5eb8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5292
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
2022-02-15 12:52:19 +00:00
..
clhs-lookup style: format entire depot with nixpkgs-fmt 2022-01-31 16:11:53 +00:00
dot-time-man-pages style: format entire depot with nixpkgs-fmt 2022-01-31 16:11:53 +00:00
emacs chore: clean up some obsolete TODOs 2022-02-04 15:55:19 +00:00
exercises/aoc style: format entire depot with nixpkgs-fmt 2022-01-31 16:11:53 +00:00
htmlman style: format entire depot with nixpkgs-fmt 2022-01-31 16:11:53 +00:00
mblog feat: move mblog header handling into mime4cl 2022-02-02 20:47:45 +00:00
nix feat(sterni/nix/fun): implement tail call “optimization” for Nix 2022-02-15 12:52:19 +00:00
nixpkgs-crate-holes refactor(rust-crates-advisory): move report generation into script 2022-02-13 18:42:44 +00:00
keys.nix feat(ops/nixos/whitby): add sterni user 2021-01-13 22:05:33 +00:00
OWNERS chore(sterni): init user folder 2021-01-11 11:43:33 +00:00