caster_age_table/README.org

1.4 KiB

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