Live data from Hacker News

An opinionated guide to Haskell

lexi-lambda.github.io

61–70 of 96 posts

Re: An opinionated guide to Haskell

#61
post #32

A lot of people use Atom, but I think emacs + intero is currently the best Haskell tooling. I use it with spacemacs. Has everything I would need from an IDE, including highlighting errors on the fly, auto completion, jump to definition, auto formatting. It’s no intellij, but I’ll take Haskell’s type safety over that any day of the week, and twice on Sunday. http://commercialhaskell.github.io/intero/

There's a while that I can't find intero in melpa.org anymore. Do you know if it moved?

Re: An opinionated guide to Haskell

#63

Earlier quoted context omitted.

I couldn't disagree more. Nix doesn't make development easier. In fact, it substantially complicates development to ease open source delivery and client dependency management. These are things that are of questionable value to the Haskell or product dev ecosystem, as people far more often prefer fully static (admittedly large) binaries anyways. And, Nix doesn't work well with existing tools like intero, it requires t…

I didn't, at all, recommend nix to anybody. What are you responding to?

It sure read like that to me, but given the international nature of this forum, I'll take you at your word. Nor do I disagree with you about your assessment of your experience.

But your experience and your requirements differ from mine, and in a professional capacity I could never recommend Nix for an organization.

Re: An opinionated guide to Haskell

#64

Earlier quoted context omitted.

I didn't, at all, recommend nix to anybody. What are you responding to?

> Haskell + Nix is the best environment I've ever used for any development That sounds like a recommendation.

That's because it's spefically optimized for my needs: writing Reflex apps. It's what I do for a living.

Everyone has different priorities. I know some users who started using Haskell at all with reflex-platform despite the difficulty because it scratched exactly their itch.

Re: An opinionated guide to Haskell

#65

Earlier quoted context omitted.

My advice would be start with stack and hpack, and remain with your editor or IDE of choice to start with. Learning any new language is difficult enough without having to also deal with a different workflow. This is my recipe for starting with haskell and intellij: - install stack, run `stack new helloworld simple-hpack` - make sure it builds: `cd helloworld && stack test --exec helloworld` - install https://github.c…

> My advice would be start with stack and hpack Interesting. I would advice to start with plain cabal. One has to learn how to deal with cabal anyway, so there's no point adding stack on top of it from the start.

One has to learn how to deal with cabal anyway

Nah, I haven't used cabal-install in years now. Because of hpack, you don't even need to write .cabal files.

The only time I touch cabal is when I need to write Setup.hs files, which is, mercifully, quite rare.

Re: An opinionated guide to Haskell

#66

I've tried messing around with haskell a few times, but the biggest problem I have is the tooling. I just tried to get haskell set up a few days ago and I couldn't get it working with either vscode or Idea. I also couldn't get ihaskell (jupyter notebook) installed successfully. I might give it another shot based on these instructions, but the fact that pretty much every program seems to make different assumptions abo…

Same with me. I download some code (or git clone) from an article or gist or somewhere which looks cool. I'd estimate 80% of the time I fail to compile. Typical reasons are errors from Cabal, stack is wrong version, things like that. If it was C or Python or even Rust I'd forge ahead and make it work. But with Haskell's tooling I'm too far out of my depth to bother.

If you upgrade stack and then do stack build, it's very close to being guaranteed to work.

Stack (and stackage) is the best nicest, most-reliable build-system of any language.

Re: An opinionated guide to Haskell

#67

Earlier quoted context omitted.

Your go-to project manager is a script? Even if you did not intend it that way that is my impression of the reflex platform. Many have heard about the divide in Haskell package management between cabal-install and stack, but there is also reflex, which seems to rely on running arbitrary bash scripts and using Nix, thus leading to a third method of package management in Haskell. It's a big mess.

Ok so, calling it a script was wrong. It's a nix function which takes arguments specifying various configurations about the project I'm working on, such as any dependency overrides. It then provides a nix derivation which can define shells and compile to whatever platforms I need. No bash scripting is necessary to use this machinery except a convenience script to install Nix if you don't have it. All of the functiona…

I just wish the reflex maintainers would push new changes to Hackage once in awhile. From GitHub I gather that reflex 0.5 was finished over a year ago but that version is not available on Hackage.

Re: An opinionated guide to Haskell

#68

Earlier quoted context omitted.

My advice would be start with stack and hpack, and remain with your editor or IDE of choice to start with. Learning any new language is difficult enough without having to also deal with a different workflow. This is my recipe for starting with haskell and intellij: - install stack, run `stack new helloworld simple-hpack` - make sure it builds: `cd helloworld && stack test --exec helloworld` - install https://github.c…

> My advice would be start with stack and hpack Interesting. I would advice to start with plain cabal. One has to learn how to deal with cabal anyway, so there's no point adding stack on top of it from the start.

> One has to learn how to deal with cabal anyway

With *.cabal project files yes, for sure.

But `stack` has completely replaced `cabal` command for me. I don't even have it installed.

Re: An opinionated guide to Haskell

#69

Earlier quoted context omitted.

> Haskell + Nix is the best environment I've ever used for any development That sounds like a recommendation.

That's because it's spefically optimized for my needs: writing Reflex apps. It's what I do for a living. Everyone has different priorities. I know some users who started using Haskell at all with reflex-platform despite the difficulty because it scratched exactly their itch.

Well, as complex as Nix+whatever-you-have-cobbled-together-to-build-and-editor-instrument-ghcjs is, it pales in comparison to the sheer ferocious confusion granted to the ecosystem by tools like webpack, so I can see where it might seem like an improvement in some regards.

Webpack: it's like lens error messages for your builds, at runtime!

Re: An opinionated guide to Haskell

#70
post #32

A lot of people use Atom, but I think emacs + intero is currently the best Haskell tooling. I use it with spacemacs. Has everything I would need from an IDE, including highlighting errors on the fly, auto completion, jump to definition, auto formatting. It’s no intellij, but I’ll take Haskell’s type safety over that any day of the week, and twice on Sunday. http://commercialhaskell.github.io/intero/

I've been learning Haskell using IntelliJ as my IDE.

https://plugins.jetbrains.com/plugin/8258-intellij-haskell

Post reply on HN