Skip to main content

Status Report

I have been working on a lot of different stuff since last Friday, so I think it is about time for a status report.

Food

As the weather warms up, a lot of fresh, local vegetables are becoming available. Our summer vegetables are not ready for harvest yet, but I have been purchasing local tomatoes at the market. We have a lot of onions from our garden, and I have been making a lot of pico de gallo lately. My wife loves it so much that she eats it with a spoon! My daughter loves it as well, and I have been trying to teach her to not double-dip. I cooked some sliced beef steak today, which is served cool and dipped in a yuzu ponzu sauce. It makes a refreshing dinner in the warming weather!

TTC

I have made some progress with changes based on feedback. I implemented the HasCallStack change and updated the documentation. I had planned on working on the tickets from Monday, but I realized that I should wait until at least Tuesday so that it is after the weekend in all time zones. I ended up working on something else today but will switch my focus back to TTC soon.

GHC 8.10.5 was released, and I was able to very quickly test TTC using the new compiler thanks to the docker-ghc project.

lsupg

Since I did not want to work on TTC yesterday, I started another small project that I would like to release soon. lsupg is an abbreviation of “list upgrades.” The program is executed within a container and lists all available upgrades. This information can be used to determine when images need to be rebuilt.

The program is designed to support a wide variety of Linux distributions. It therefore must be statically linked. I am developing the program in Haskell and plan on using Alpine Linux to create the static executable. I considered using static-haskell-nix, but that project unfortunately seems problematic and fragile.

I implemented the apt component first, used to list Debian-based system upgrades. I finished the initial prototype this evening. Unfortunately, the Alpine CDN seems to currently be having problems, so I have not been able to build the static executable and test it yet. (I am getting a “connection failure” message.) Once I test the initial prototype, I will go ahead and push the project to GitHub with WIP status. I will then implement additional components, clean up the code, write documentation, etc.

Here is the current CLI:

Usage: lsupg [-c|--component COMPONENT] [-d|--debug] [-f|--format FORMAT]
             [-i|--image IMAGE] [-u|--update HOURS]
  list items that can be upgraded

Available options:
  -h,--help                show help and exit
  --version                show version and exit
  -c,--component COMPONENT component (default: all)
  -d,--debug               show debug output
  -f,--format FORMAT       output format (default: human)
  -i,--image IMAGE         Docker image
  -u,--update HOURS        update if not updated within HOURS (default: 8)

COMPONENT options:
  apt

FORMAT options:
  human, csv, json, yaml

Exit codes:
  0  no upgrades available
  1  program error
  2  program usage error
  3  one or more upgrades available

Note the --image option. When this option is not specified, the current environment is checked for upgrades. When it is specified, a new Docker container is run with the lsupg program mounted, and lsupg is run (again) within the container to check for upgrades in that environment.

Example:

$ lsupg --image extremais/ghc:9.2

Haskell Development Environments

I have been monitoring mailing lists more closely than usual since the TTC release, just in case there is anything that I should reply to. It seems like I am more likely to reply to other messages when I do so, and I have been trying to help a beginner with getting their Haskell environment configured.

The first thread was in the Haskell-beginners mailing list, about an “import not working.” He is using Stack and wants to be able to use specific packages within the REPL without using a project. In that thread, I pointed out that the --package option can be used.

The same person then posted to the Haskell-cafe mailing list about “using stack outside the project box” (strange wording). From this message, it is clear that he wants to configure packages to be loaded automatically when executing stack ghci for easy use via Emacs. I explained how to do so using a “global project” but he has not gotten it working yet.

This topic is directly related to a series of articles that I have planned on various Haskell development environments. There are many ways to use Haskell, and I plan on writing fairly detailed documentation on the subject.

Website

Speaking of the website, I plan on implementing some new features soon!

  • Currently, articles in a series are ordered. I plan on making a change to support unordered series as well.
  • I plan on implementing several features that will be used to create article series with tagged indexes. When JavaScript is enabled, the index will provide a user interface for filtering by tag. For example, a Haskell beginner will be able to select the beginner tag to easily see which Haskell development environments are good for beginners. I have many interesting article series planned that will benefit from this functionality!
  • Content is associated with a “status,” which determines what is rendered on the live site. I am going to implement the “public draft” status. Content with this status will be rendered, but it will not be included in indexes or RSS feeds. This will allow me to solicit feedback about articles from friends before publishing them.

Grammarly

As mentioned in Typos and Feedback, I am experimenting with software to help improve my writing. I created a Grammarly account and installed the Firefox extension. The free plan provides some good advice, and I wonder how much better the premium plan is. When paid monthly, the premium plan costs $29.95 per month, however! That is way more than I am willing to pay for my current usage.

The browser extension turned out to be more annoying than helpful, so I uninstalled it. Most content that I put in the browser is in Markdown format, and Grammarly does not handle the formatting and line breaks well. (I pretty much type everything in vi, and then I copy-and-paste to the browser when finished.) Also, Grammarly marks errors and suggestions in the quoted text when replying to email, which is annoying.

Though I removed the browser extension, I can still log in to the website and use the service. The source for this blog entry is in Markdown, but I can copy the text from a rendered preview to get fairly decent feedback.