Ask HN: Can ghci realistically replace bash?
Learning Haskell has been a goal of mine for a while actually, and I've had false starts with some of the existing, excellent learning resources:
* Brent Yorgey's CS194 course, * Learn You a Haskell for Great Good!, and * Write Yourself a Scheme in 48 Hours.
So it occurred to me that I might actually learn if I started inserting Haskell into my current workflow. Better yet, if userspace is "just" tooling that calls into the kernel syscall API, it's concievably possible to replace everything with Haskell.
That being the goal, I have played with ghci along with a couple of the "Haskell scripting" libraries:
* shelly * turtle
These are great tools, but I'd like to learn how to do things the Haskell Way instead of just wrapping my familiar tools in thin Haskelly types. So, in the course of my (limited) explorations, here are some questions and issues I've encountered:
* Can I install and load a new package from within ghci (i.e. do the equivalent of "stack install ...")? * Is it possible to intelligently manage a git repository without calling out to the git binary? (I'm aware of the 'git' package but not familiar with it enough to judge usability.) * How would SSHing into a machine even work? * What are some ways to serialize typed data while keeping things "just text" and human readable? * How do we pretty print things like directory listings etc.? * Am I just being ridiculous?
Anyway, this isn't a comprehensive list of questions, but if any of you use Haskell as your primary method of interacting with the system, I'd like to hear what libraries and workflows you have.
Cheers!