The Dongola Times

(Anachronistic) Dispatches from the Kingdom of Makuria.
16th of June, 2013

Wild Haskell Analogies #4: Sola Scriptura

The configuration file is a common feature of programs, especially those that have to proceed in the background, apart from any routine input by a user. I am talking web servers and shit.

Now the idea is that the program starts once, reads the input (configuration), and then proceeds forever depending on “the belief which has once for all been committed to the saints.” This is basically the same role scripture plays in the lives of humans. —For all humans believe in scripture, whether they realise it or not. Scripture is merely those truths which you received once for all and which are a parameter in the rest of your interactions. If you consider your high school history book to be true, or the PNAS publications, or DSM-V, or The Descent of Man, or the Baconian scientific method, that is scripture for you[1].

But the important thing about scripture is its closed nature. That it is delivered, and then from the “axioms” it defines the rules of life follow. It may require interpretation, and may cause disagreement, but there it is: unchanging. Like a configuration file.

In Haskell, this tendency to exploit configuration files is actually widespread, even in programs that will interact with the user, simply because random treatment of input is considered uncivilised. The Haskell people prefer that you collect the scriptures—writings, configurations—of your program before you leave the main function. And when you leave, you have left with the oracles by which the program shall live.

As such, Haskell programs tend to be a lot like the “Abrahamic” religions, with their relatively-small core of scriptures to which not a single variation may be permitted after the main function—the entity that received the inspiration—has ceased writing or communicating the scriptures. This makes it pretty intense to set up a program to go in Haskell (or in any language, if the program is to be a background process, proceeding without continual “divine inspiration”, but relying on the scriptures—confs—delivered long ago), as you have to have almost all the data set out clearly in a data structure before things go on. In fact, in Haskell, this is the most-legitimate use of those hoary “unsafePerformIO” operators, which I call the prophets of Haskell, because they make the Word—the configuration—part of normal life.

[1] In this sense, everybody believes in sola scriptura. What they argue about—though they do not know it—is what the scriptures are; not whether they hold onto sola scriptura. For the Roman Catholics, every papal encyclical is part of the scriptures, literally on top of the Bible. For the Protestants, only the Bible as they intuit it. I agree with these latter, but they are confused in their confusion, because they expect to prove what the scriptures are, instead of being ready and proud to merely intuit what the scriptures are. By faith. Sola fide.