3 ms·
To me, you are being curious not ridiculous. The idea of using Haskell as an interactive shell seems like a great learning exercise and worth pushing as far as
by brudgers 9y ago
To me, you are being curious not ridiculous. The idea of using Haskell as an interactive shell seems like a great learning exercise and worth pushing as far as you are willing to go. Even if from a practical standpoint, rewriting the entire *nix stack in Haskell is probably more than a lifetime's work.
Technically, to me recreating Bash in Haskell to swim in the Turing Tarpit. [1] Some programming languages are mostly ready to serve as an operating system shell, e.g. Common Lisp (Lisp machines), Smalltalk, Erlang, or QBasic. [2] Others are not because there is a difference between the abstraction of an interpreter and the abstraction of a shell. One of them is session duration.
The interpreter abstraction tends toward: starting the interpreter from a shell, running a sequence of commands, exiting to the shell. The shell abstraction tends toward starting (perhaps recursively from another shell) and possibly running indefinitely until crashing or the heat death of the universe whichever comes first. SSH is a great example of the recursive and indefinite temporal extent of shells. Python's global interpreter lock is a reasonable example of the interpreter abstraction.
Good luck.
[1]: https://en.wikipedia.org/wiki/Turing_tarpit https://en.wikipedia.org/wiki/Turing_tarpit
[2]: or Bash.