Member-only story

Scripting with Scala

Brian Schlining
4 min readFeb 23, 2020
Photo by Shahadat Rahman on Unsplash

Scripting is the art of creating a small, simple program to execute some task. Probably the most common examples are the bash scripts used to launch a program on macOS or Linux. If you find yourself typing the same set of commands over and over to accomplish a task, you may decide to wrap those in a simple script to save the tedious typing and mental real-estate needed to hold the sequence and syntax of the commands in your head. As tasks become more complicated, many developers move away from bash/zsh/csh to more flexible languages, such as python, perl, or ruby for their scripting needs.

The Trouble with Script Dependencies

Sometimes, when working with a a language, you may need to install dependencies to allow your script to accomplish a task. For example, if you wish to make REST/HTTP calls in Python you might need to do this first:

pipenv install requests

No biggie. It’s easy. Except you might need a few other dependencies too. And you might need to share your script with other staff, or run it on multiple machines or VMs. And maybe some of the dependencies clash with some already installed on a computer. And before you know it …

--

--

Brian Schlining
Brian Schlining

Written by Brian Schlining

Polyglot coder. Deep-sea Researcher. Zazen aficionado. I think squids are pretty cool.

No responses yet