Display weather waifu birthdays and ages in an HTML table https://pta.vern.cc/caster-age.cgi
Go to file
pta 41b526d375 Use "quot" to round negative ages towards zero
I was using "div" which rounds towards negative infinity, so negative
age differences of less than a year had -1 rather than 0 in the years
field.
2024-02-25 23:43:04 -05:00
app Use "quot" to round negative ages towards zero 2024-02-25 23:43:04 -05:00
.gitignore Initial commit 2023-11-27 01:50:14 -05:00
LICENSE Initial commit 2023-11-27 01:50:14 -05:00
README.org Document how to use the flake 2023-12-17 23:37:45 -05:00
age.html Initial commit 2023-11-27 01:50:14 -05:00
caster-age.cabal Specify the README in cabal file 2023-12-13 10:50:13 -05:00
default.nix Initial commit 2023-11-27 01:50:14 -05:00
flake.lock Add lock file, making this a proper Nix flake 2023-12-17 22:19:28 -05:00
flake.nix Try making this a Nix flake 2023-12-12 17:20:51 -05:00
style.css Initial commit 2023-11-27 01:50:14 -05:00

README.org

Display Weathernews caster ages in an HTML table or as plain text: if there's no "TERM" environment variable set, CGI HTML output.

Learning Haskell, so the code might not be the best.

Run nix-build to build the executable. A "result" directory will be created that's symlinked to the build result directory in the Nix store. The executable is there. The link above is actually a symlink to this result symlink, so the latest build is automatically available on the web. The executable isn't really named "caster-age.cgi"; it's never renamed from it's build name.

Run nix-shell to get a subshell with the packges specified in "default.nix". Actual Haskell library dependencies of the executable need to be specified only in the cabal file. Once in the subshell, run cabal repl to load the program into ghci and start experimenting.

UPDATE: This project is now a Nix flake, so to build it, run nix build; nix develop for a development shell. Check the nix(1) manual and the official online docs for all the other flake related commands.

I added this flake to my home-manager config, so now the web app cgi page is symlinked to ~/.nix-profile/bin/caster-age. I might make a home-manager config repo later.

Functional programming books and papers I found