I spent the weekend learning some Haskell. My goals were:
learn a bit about the language in the trenches: is there any utility in learning more about this?
learn a bit about the toolchain: building, deploying, etc.
This is something I want to see increase slightly every day, as a constant reminder to get stuff done.
I figured the above would be a nice whirlwind tour: not enough to start monad engineering, but enough to defend myself.
Below are some notes and thoughts.
Stack is the build system I chose to use for the library and
CLI. It seems a bit more modern and recommended than pure
which ships with Haskell itself. Stack seems to provide a higher level
wrapping around cabal to some extent, along with some other goodies
I also like Stack’s commitment to reproducible builds, creating an
environment per-project with its own
ghc, the Haskell compiler. I
actually don’t even have
ghc installed locally, so there’s no chance
I’m mucking up the build by having things on my system’s
override any project-specific stuff.
The downside is that Stack can eat massive amounts of disk, as you’ll
ghc for even minor versions e.g.
8.4.3. Something to be aware of.
Hacking on stack basically involved looking at the documentation and various YAML files, so nothing too painful, yet.
stack build- produce binary
stack run [args]- run directly from slack
stack ghc- if you need to shell out to
stack ghci- start a repl
It was pretty painless getting set up with stack, and creating a CLI/library project.
Next up: Haskell coding, xmobar detective work, and more.