Live data from Hacker News

Intero for Emacs: complete interactive development program for Haskell

commercialhaskell.github.io

41–50 of 75 posts

Re: Intero for Emacs: complete interactive development program for Haskell

#41

I wish I could get a similar utility for Python and Javascript as this seems to show off some cool FP auto complete. I'm basically looking for a way to remove my dependency on my 5-7 IDEs and I don't know how. I wish someone could show me a very good, simple, alternative to all of them. I work in C, Java, JavaScript, Python, PHP, and C# and I'd like to be able to use a single IDE solution for all of them. Sadly I can…

Languages like C# and Java (especially) are painful to use without code completion. The modern style of explicit imports in Java in particular simply can't be reasonably maintained without IDE support.

For everything else, emacs works fairly well. I find myself requiring code completion in languages like C and C++ a lot less, because I edit slower and more carefully, but also C and C++ codebases tend to have fewer random dependencies than Java and C# make it easy to add.

Re: Intero for Emacs: complete interactive development program for Haskell

#42

I wish I could get a similar utility for Python and Javascript as this seems to show off some cool FP auto complete. I'm basically looking for a way to remove my dependency on my 5-7 IDEs and I don't know how. I wish someone could show me a very good, simple, alternative to all of them. I work in C, Java, JavaScript, Python, PHP, and C# and I'd like to be able to use a single IDE solution for all of them. Sadly I can…

For C++, I use https://github.com/abingham/emacs-ycmd which gives completion (uses company-mode) and code navigation. It can also do C, C#, js, go, python etc. Requires a little setup (you have to install the ycmd daemon and, depending on language, a per-project conf file), but worth it. An alternative to ycmd is https://github.com/Andersbakken/rtags which I think can list all usages of a symbol – ycmd only lets you…

Have another shout out for rtags (there's also a vim plugin). It can not only list usages, but find virtual function implementations, show class hierarchies, and rename symbols.

Re: Intero for Emacs: complete interactive development program for Haskell

#43
post #8
post #5

I've been waiting for this release before finally trying to switch from Vim (MacVim) to Spacemacs. Anybody have any tips for somebody who's never really used Emacs?

Map command key to caps lock. Setting (global-set-key (kbd "M-P") 'scroll-down-line) (global-set-key (kbd "M-N") 'scroll-up-line) Has also been indispensable for scrolling (though you may choose to do so differently, coming from vim).

Hear hear. Ctrl on caps lock changed my life. Then I bought a TECK^, which comes with a split spacebar and put left alt on caps (or where caps is usually, teck has control there) and right control on the right spacebar. This is honestly the best setup ever and I don't even use Emacs, I use Vim.

^ truly ergonomic computer keyboard. It's nice, but the hardware can be a bit wonky.

Re: Intero for Emacs: complete interactive development program for Haskell

#44
post #3

There should be a warning that on first start of intero-mode, this will initiate a rather long stack operation, which I suppose is extra long if you hadn't used stack before. Also, it seems to insist on a stack'ised project. But I suppose one could say that should be obvious. I use cabal because stack misses some features and is a little weird and use stack when I have to. And even though I have intero installed and…

This was a trade-off I went with. One thing that I learned from years of hacking on haskell-mode is that adding an option for every little decision adds up to a brittle user-experience. If you want this, enable that. If you want to enable that, install this. And so on. A survey showed that most people used about 20% of the features available in haskell-mode.

In the case of Intero I made every decision for the user; there are no customization options in the mode, and it leads to long (first-time) start-ups like this. But in the end I'd rather wait a minute and have every project always work reliably (and this isn't unheard-of for IDEs). It does build a version of intero for each project environment, because the GHC version and package set may differ. This is in contrast to e.g. ghc-mod or hdevtools which is locked to a specific GHC version, so switching between projects is not smooth.

Re: Intero for Emacs: complete interactive development program for Haskell

#45

This looks great! My only complaint is that sometimes I do want to work on a quick script outside of a stack environment, and this seems like an all-or-nothing proposition. (I use haskell for pandoc filters quite a bit, for example, and setting up stack for that seems like overkill.) I'm sure a bit of elisp could make it fall back to haskell mode if it can't find a local .stack dir.

If there's no stack.yaml it uses the global ~/.stack/global/stack.yaml.

So you should be able to open any random file and it'll work out. E.g. if I open ~/X.hs and import Lucid, I can just run stack build lucid in my ~/ and now M-x intero-restart and it has access to that package.

Re: Intero for Emacs: complete interactive development program for Haskell

#46

I wish I could get a similar utility for Python and Javascript as this seems to show off some cool FP auto complete. I'm basically looking for a way to remove my dependency on my 5-7 IDEs and I don't know how. I wish someone could show me a very good, simple, alternative to all of them. I work in C, Java, JavaScript, Python, PHP, and C# and I'd like to be able to use a single IDE solution for all of them. Sadly I can…

> I wish I could get a similar utility for Python and Javascript as this seems to show off some cool FP auto complete.

Since neither Python not Javascript is "as typed" as Haskell there are limits to what you can expect.

That said, I'm mostly happy with "elpy" in Emacs. Just make sure you configure it for the same version of Python you are targetting, and the rest should work out of the box.

Re: Intero for Emacs: complete interactive development program for Haskell

#48
post #26
post #3

There should be a warning that on first start of intero-mode, this will initiate a rather long stack operation, which I suppose is extra long if you hadn't used stack before. Also, it seems to insist on a stack'ised project. But I suppose one could say that should be obvious. I use cabal because stack misses some features and is a little weird and use stack when I have to. And even though I have intero installed and…

What features do you think stack misses ?

* split-objects to create much smaller binaries. In cabal it's a single line in its global config file.

* Using my already available GHC builds, because stack's GHC builds do not work everywhere, not even across all Linux distros. If I have a musl-based Linux distro, FreeBSD, or Solaris it'll be a problem. Also, there are many users who prefer to use other builds than those downloaded via stack. This happens even if there is already the right GHC in PATH by default.

* I like cabal's new new-foo features and project file support.

* Not bailing out if I open a random .hs file where there's no associated stack config. In a sibling comment Chris says he wants it to work automagically, but then it should create a global stack file, which he says will be used if available.

* Offline mode.

* I will find more stuff I miss, once I have used stack more.

Re: Intero for Emacs: complete interactive development program for Haskell

#49

I wish I could get a similar utility for Python and Javascript as this seems to show off some cool FP auto complete. I'm basically looking for a way to remove my dependency on my 5-7 IDEs and I don't know how. I wish someone could show me a very good, simple, alternative to all of them. I work in C, Java, JavaScript, Python, PHP, and C# and I'd like to be able to use a single IDE solution for all of them. Sadly I can…

as an emacs distro, spacemacs has everything I need for every language I've tried to work with (usually with auto-completion e.t.c.). sometimes requires a tiny bit of setup (usually no more a than a line or two) first time you use a new langauge, but that should is usually documented in the layer/README.org file.

[0] https://github.com/syl20bnr/spacemacs

Re: Intero for Emacs: complete interactive development program for Haskell

#50
post #36
post #5

I've been waiting for this release before finally trying to switch from Vim (MacVim) to Spacemacs. Anybody have any tips for somebody who's never really used Emacs?

I had used IDE's, windows based text editors like UltraEdit, and vi/vim for the longest time before I decided it was time to go back to Emacs. I dedicated two weeks to using it almost exclusively to pick up the muscle memory of major keybindings. I haven't looked back since. The keys I really needed out of the gate: * F3/F4 - building macros, then C-x e to execute (after that, just plain e) * C-s - search * M-s o - o…

This list seems really useful for general emacs, but does not help for spacemacs which has it's own equivalents (with vim-ey keybindings). I've been using spacemacs for a few years as my editor every day, and have not needed any of these.
Post reply on HN