The Blots Programming
Language
Blots is a small, expression-oriented programming language designed to be quick to learn and easy to use. Blots code tends to be very readable yet reasonably compact.
Blots is not a general-purpose programming language. Instead, it's designed to be useful out of the box for quick calculations and data transformation, particularly with JSON.
Installation
The most recent version of Blots is 0.7.1, released on 9/16/2025.
If you're on macOS, the recommended way to install the latest version of Blots is with Homebrew:
brew install paul-russo/tap/blots
You can also install Blots 0.7.1 for both Linux and macOS by running the following command:
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/paul-russo/blots-lang/releases/download/v0.7.1/blots-installer.sh | sh
Example
Here's a quick example of how you could use Blots to interactively compute some basic statistics about the weather forecast for the next 7 days in Denver, CO:
First, we'll grab the forecast for Denver from the National Weather
Service API and pass the response to Blots as an input. We'll also use
the --output
flag to provide a filename to write the outputs
to (this is optional; if we didn't provide a filename, the outputs would
just be written to stdout):
blots --input "$(curl -s https://api.weather.gov/gridpoints/BOU/63,62/forecast)" --output weather.json
Since we provided neither a source file nor some inline code, Blots
will open up in interactive mode. We can now use the inputs
record to access the forecast data and bind it to a name (forecasts
):
> forecasts = inputs.properties.periods = [{detailedForecast: "A chance of showers and thunderstorms... (truncated)
Next, we'll grab the temperatures from the forecasts by mapping over
the list. We can use Blots's via
operator to apply a function
to each element of the list. Our function will take just the forecasted
tempeature for that period and return it, so the whole expression evaluates
to a new list containing only the temperatures:
> temps = forecasts via forecast => forecast.temperature = [52, 71, 49, 73, 49, 80, 53, 85, 56, 83, 56, 83, 54, 86]
Now we can compute the average temperature using Blots's avg
function. We want to include this in our output file `weather.json`,
so we'll use the output
keyword to bind the result to a name
and record it in the outputs:
> output average = avg(temps) = 66.42857142857143 [output 'average' recorded]
Let's do the same for the minimum and maximum temperatures:
> output minimum = min(temps) = 49 [output 'minimum' recorded] > output maximum = max(temps) = 86 [output 'maximum' recorded]
We can now exit Blots (by typing exit
or hitting Ctrl + c
). Let's take a look at the output file:
cat weather.json {"average":66.42857142857143,"minimum":49.0,"maximum":86.0}
Documentation
Please consult the README in the GitHub repository for more information on Blots' syntax, built-in functions, and other features.
Tools
There's a language support extension for Blots, available on both the VSCode Marketplace (for VSCode)and the Open VSX Registry (for other VSCode-based editors, like Cursor).