What i wish i knew when learning haskell
dev.stephendiehl.com
dev.stephendiehl.com
Today I use Racket and I won't go back but I am glad Stack is taking over Cabal.
It is not only Cabal, but also the constant churn in a lot of packages. For example, conduit was a great package when I used Haskell. But usually I had to update quite a bit of code when I would bump conduit up to the latest version after not touching a program for a year.
Maybe I have been unlucky enough to use Haskell during some transitions (pre-arrows -> arrows rule, let's use them everywhere -> arrows suck, basic IO monad -> iteratees, old fashioned field access -> various lens proposals -> lens). But I never used a language ecosystem before or after where things would change or break so often.
Luckily, Haskell's static typing coupled with the extremely helpful error messages of the compiler makes refactoring a cheerful task: If it worked before and all type errors have been fixed, then we can be quite confident that it works again.
Many areas have stabilized now. For instance, Edward Kmett's lens package is the de facto standard for all things related to records, getters, setters, and all those things on steroids. (Personally, I love how this turned out. Before lens, we quite frankly had the problem that field accesses were much more painful than they are in mainstream object-oriented languages like Python or Java. Nowadays field accesses are as simple as they are in other languages, and in addition to this we have the flexibility of composable first-class lenses.)
... by someone trying to actually address the issues. There are almost always wrong ways you can fix a type error. Fortunately, that's usually the situation at hand...
I don't understand why it keeps receiving so much heat. What does stack do that cabal can't?
Favorite line: "Playing "type-tetris" to convert between Strings explicitly can be frustrating." Such understatement! Converting between string types and dealing with the lack of scoping in records have been two major pinch points for me with Haskell so far.
Most puzzling part: The description of Erlang as an imperative language.
First, Haskell is just another programming language. It has many papers written about it, and many people have strong opinions about it, but at the end of the day it is not that special.
Second, the Haskell community is not friendly and welcoming to many groups of folks. In particular, if you are a fan of dynamic/gradual typing, objects, distributed systems, etc. do not expect a warm welcome.
A personal anecdote: I left #haskell on Freenode because a regular and popular user proposed and endorsed an extended analogy wherein all humans are divided into "dynamically-typed" and "statically-typed" people, and statically-typed people are superior because they are more reliable. This kind of bias pervades the community and ruins any kind of cross-ecosystem collaborative efforts.
Edit: Was I being confrontational? I wasn't even part of this conversation! I was lurking, and I saw this ridiculous thing play out unprompted between regulars.
> if you are a fan of dynamic/gradual typing, objects, distributed systems, etc. do not expect a warm welcome.
I have not experienced this, but this might be because when I'm participating in the Haskell community I mostly talk about Haskell. I'm a fan of Python and Elixir, and haven't kept these facts secret as I've participated in the Haskell community (including a local meetup who's organizer is also a fan of Erlang/Elixir), and nobody has singled me out to bully me because of this. Nobody even notices.
This is also my experience! I received a very warm welcome when I first started with Haskell. You could ask all sorts of questions on #haskell and always receive great answers. The regulars were really happy when they were able to help you.
Also they were not dismissive at all in view of my background in dynamic programming languages. In fact, several members of the Haskell community were quite interested in Pugs, the experimental Perl 6 platform which we built in Haskell in those days, to the extent that they joined our effort and became committers. :-) There was quite a bit of cultural exchange happening.
The legendary #haskell troll attempt, recorded at https://gist.github.com/quchen/5280339, is worth reading.
Partly to pay back the kindness I received back then, and partly just because it's so much fun, I participate in free regional Haskell workshops. If you are located near Augsburg, Germany feel invited to attend! Details are at http://curry-club-augsburg.de/.
One should not be surprised that actively rejecting/attacking the core values of a community brings ire. Are you sure you weren't the one being confrontational?
> This work adds static type checking (and some of its benefits) to Clojure, a dynamically typed language, while still preserving idioms that characterise the language. It allows static and dynamically typed code to be mixed so the programmer can use whichever is more appropriate.
Some communities don't hold the dynamic vs static debate as an issue of such a hard regard that an individual must be rejected, lest they infect others.
matz has pretty much said that static type checking will not be part of Ruby, and he won't open up the syntax for it. But bugs like this one [1] aren't filled with hate, telling people to get lost. There's a constructive approach.
But this is missing the point of core values. I will refrain from listing all the digs that Rich Hickey has taken at static types and their ilk, but he has done so quite a lot.. My point is both sides don't like their core values rejected. I thought this thread is about community and not extensions so much.
> bugs like this one aren't filled with hate, telling people to get lost. There's a constructive approach.
And there are many examples of haskell folks treating others with a constructive approach too on various topics outside of the "cannon". I'm not sure what you're implying here, or are if you're referring to a specific case (however, tallying up some cherry-picked anecdotes may not be so useful)
[1] https://downloads.haskell.org/~ghc/latest/docs/html/users_gu...
Referring to a core library as an extension that isn't in line with core principles just sounds... Wrong.
> I thought this thread is about community and not extensions so much.
For something to be taken by the community, and willingly added to the core library, suggests a level of embracement within the community. Hickey himself weighed in on typed [0], embracing it with praise, despite the fact it may go against his personal values, he doesn't see it going against Clojure's values.
Static typing simply isn't a core value for Clojure. Thus:
> Conversely, if I am a fan of static typing and compile time constraints, should I expect a warm welcome pushing those ideas in Clojure and Ruby communities?
Absolutely.
> And there are many examples of haskell folks treating others with a constructive approach too on various topics outside of the "cannon". I'm not sure what you're implying here, or are if you're referring to a specific case (however, tallying up some cherry-picked anecdotes may not be so useful)
I agree, anecdotes here may be entirely unhelpful. Yet, I know I am not alone in saying that some of the haskell community is warm and embracing of newcomers, and yet there are also those that clearly reject newcomers, instructing them instead to learn mathematical concepts or the right words for the right concepts, and not guiding them to do so.
[0] https://groups.google.com/forum/#!msg/clojure-dev/ryYzI1Bj0p...
I said rejecting "core values", outright, would be met with resistance. Since Optional Typing via core.typed is a "core value" as you claim, there is no conflict. I want to be clear about what I'm claiming here.
> > Conversely, if I am a fan of static typing and compile time constraints, should I expect a warm welcome pushing those ideas in Clojure and Ruby communities?
> Absolutely.
Well, I think you're being disingenuous. After saying "Static typing simply isn't a core value for Clojure". If I claim in the Clojurians slack the value of what we agree is not a core value for Clojure, namely, ahead-of-time/compile-time static typing, yes, I think that would be met with some resistance.
Also, I hope you're not thinking that in this thread I have some problem with Clojure. I'm talking about sociology, not technology.
We could all stand to understand the totemism which pervades our science. Be mathematicians; be swayed by proof and logic. Be scientists; be swayed by empiricism and the scientific method. But stop being cultists already.
It's mystifying the Haskell community still hasn't been able to come up with a decent dependency management + build tool.
However, nowadays there is a decent dependency management and build tool! It's called "stack", as in "stack install xmonad". I never once had any dependency or other compile problems with stack. It simply always works. :-)
There's also an already-working-but-still-not-quite-finished alternative system within Cabal which is eventually gonna become the default one, and which does builds in a Nix-inspired way. I've been using that for the better part of a year now, and I like it far better than either historical Cabal or Stack: http://blog.ezyang.com/2016/05/announcing-cabal-new-build-ni...
Odd, I've been using stack in anger for a while now and have never had that happen. Have you reported a bug? Any ideas about reproduction?