Rapid development helper: run program when anything changes

This page summarizes the projects mentioned and recommended in the original post on /r/adventofcode

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • adventofcode

    Advent of Code challenge solutions (by flwyd)

  • In attempt to speed up my edit/test/submit AoC development cycle, I just wrote a script which runs my program for the day on both example and actual input, then watches for any changes to the source code or input files and reruns the program. My plan is to generate my program template and then run watch in a dedicated terminal before the problem opens for the day. Whenever I make a change I can visually inspect my example output to see if it matches expectations, without switching back and forth from my editor. (Possible future enhancement: save the expected output and make the results visually distinct if it matches.)

  • fswatch

    A cross-platform file change monitor with multiple backends: Apple OS X File System Events, *BSD kqueue, Solaris/Illumos File Events Notification, Linux inotify, Microsoft Windows and a stat()-based backend.

  • This setup uses the fswatch utility. If you want to adapt it for your own use, this is the key bit: fswatch -0 -o $YOUR_FILES | while read -d "" event ; do runscript done where runscript is a shell function to run the program (compile it too if necessary) and $YOUR_FILES are shell globs that match the files you want to watch.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • watchexec

    Executes commands in response to file modifications

  • Another neat little tool I like to use for this is watchexec

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts