4 ms·
I started learning Haskell by working on a proof of concept for a relational language. The big advantage, I think, was I _didn't_ try to do anything fancy with
by ben509 8y ago
I started learning Haskell by working on a proof of concept for a relational language. The big advantage, I think, was I _didn't_ try to do anything fancy with monads or typeclasses. I was just interesting in expressing functions, and that got me fairly fluent in that subset of Haskell.
It definitely helped later when I started working on a language myself, and now needed to write a parser and do a lot of transformations using uniplate.
My biggest piece of advice for beginners trying to do anything more complicated that requires dependencies is to use stack[1] and set up a skeleton project.
Set up your stack.yml file with the latest nightly (hack on nightlies, release on LTS) and then visit stackage[2] to see docs _completely in sync with the versions you're using_. You should just be able to add dependencies you need to package.yml.
That gets you a fairly stable environment where things will actually do what you expect, which eliminates a big source of confusion and frustration.
[1]: https://docs.haskellstack.org/en/stable/README/ https://docs.haskellstack.org/en/stable/README/
[2]: https://www.stackage.org/nightly-2018-08-21 https://www.stackage.org/nightly-2018-08-21
- baldfat 8y agoI wish they had stack when I started. I ended up in Cabal hell and left. Now I love Racket and find that it really was a better functional landing place, but I hit to many walls early on. I am glad these are getting fixed.
- carterschonwald 8y agoCabal newbuild is quite nice. For newbs stack is fine. But I genuinely question any serious code base that needs stack. Genuine cabal hell hasn’t existed since around 2010. And the mini purgatory that some people call hell is impossivle with cabal new build. My perspective is perhaps biased, but I also am comaintainer of widely used libraries used literally everywhere plus I’ve done commercial and recreation and research flavors haskell dev for over a decade, currently at a fortune 10ish sized company. Though zooming out: these days I tell learners they should try everything out, and revisit various tools as their mastery grows. For industrial / large prjects that want pinned deps, I’ve seen folks happy with the mafia build tool or even going full nix for end to end os level reproducible build and config. My main issue with workflows like those centered around stack is that I’ve seen a lot of folks just not think about library versions and deps as part of their library/application foot print. And this has various consequences in how they engineer and upgrade their own libraries and applications.