Completely remove Stack from Windows 10 - haskell

I am running Windows 10, VSCode, and have the Haskell Extension Pack installed.
I also have Stack installed, and would like to temporarily uninstall it to make sure I can document and explain use of Stack with Haskell in VSCode on Windows 10.
stack's command help states that the stack uninstall command is deprecated.
Q1: Do I even need to do this? Is stack automatically installed with the VSCode Haskell Extension Pack? My investigation does not indicate this.
Q2. To uninstall stack (JUST TEMPORARILY! I LIKE IT!) how is this done? Is there a new command? Do I need to use some other install manager? Do I simply delete an executable and helper files?

As far as I recall, on Windows, Stack is a program you install. I haven't tried to uninstall it, but it appears in Apps & features with an Uninstall button:
Have you tried clicking that button?
FWIW, the official Stack documentation also has a sentence about uninstalling:
Removing ~/.stack and /usr/local/bin/stack should be sufficient. You may want to delete .stack-work folders in any Haskell projects that you have built.

To remove stack you will need to manually delete the following:
C:\sr
%AppData%\Roaming\stack
Just running uninstall won't remove those folders from your system.

Related

gulp integration in Visual Studio 2017 not working

I'm attempting to get gulp integration into Visual Studio 2017. It's working on the command line. The Task Runner Explorer in VS2017 is telling me Failed to load. See output window.
The Output Window is telling me the following:
Failed to run "<ProjectPath>\Gulpfile.js"...
cmd.exe /c gulp --tasks-simple
<ProjectPath>\node_modules\node-sass\lib\binding.js:15
throw new Error(errors.missingBinary());
^
Error: Missing binding <ProjectPath>\node_modules\node-sass\vendor\win32-x64-47\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 5.x
Found bindings for the following environments:
- Windows 64-bit with Node.js 8.x
This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass --force` to build the binding for your current environment.
I attempt to run npm rebuild node-sass --force, only to be told Error: Can't find Python executable "C:\Python36\python.EXE", you can set the PYTHON env variable., which I confirmed existed.
I'm not sure how much farther I want to go down this rabbit hole. It appears to be a VS issue since everything works as expected on the command line. I'd like to get the gulp integration with VS working correctly.
Point your VS tools to the node installation on your path.
I can see in the error that there a version discrepancy between 5.x and 8.x - with VS likely being the older one (since it ships with pre-packaged and outdated node) and is taking execution precedence with the default setup.
I'm guessing you installed node-sass via your 8.x (external command line) instance but VS is trying to execute your gulp tasks via your VS's internal 5.x. node-sass leverages node-gyp to build a binary via installation scripts, and there will be incompatibilities across versions. In other words, this package, and many others that build binaries, are specifically tailored to the version of node it was installed against. To summarize, everything in node_modules/.bin is built against 8.x but is actually running on 5.x when you do so through Visual Studio.
Fear not, this is easily solved. Check out this answer for some historical context on this long running issue that many face. Basically, you want $(PATH) to be at the top of this list so your OS installation is always used...
Once you do this (just to be safe) - blow away node_modules, reinstall, and happy coding. VS really needs to stop shipping with pinned versions of node...
I ran into this problem on both Visual Studio 2017 and 2019. Apparently my Node install wasn't registered in the PATH variable (and I don't have permission to modify this on my work machine), so I manually added the link to Node at C:\Program Files\nodejs, moved that to the top location and that worked for me.
This drove me nuts until I found one more missing thing. Even if you configured everything as in the other answers you can get the same error, possibly if your user folder is not on the same drive as where Node is installed. Then also add %APPDATA%\npm to the external tools paths so globally installed Node tools will be found too.
So all in all the external tools config in VS should contain these two paths first, in this order:
C:\Program Files\NodeJS (or where you have Node installed).
%APPDATA%\npm
For me without #2 everything was working from the command line everywhere but not in VS. With it added everything now works in VS too.

Kieran healy emacs 25.1.1 starter kit install error magit package unavailable

I'm trying to install Kieran Healy's Emacs Starter Kit (https://github.com/kjhealy/emacs-starter-kit) on linux arch (I have also tried on a Mint installation, running into the same errors), but I'm having quite some trouble.
After deleting my ~/.emacs.d and installing the starter kit, emacs starts installing packages, but runs into a 'Package magit- is not available'-error. Other Melpa-packages are installing fine. An m-x refresh-contents doesn't make a difference, and neither does an m-x install-package magit.
I am able to install magit if I temporarily rename my .d.emacs and run with a fresh .emacs, and if I, after installation of magit, enable the starter kit again, emacs will load the installed magit-package perfectly fine. It does stall again, on several other packages (ipython, typopunct), in exactly the same manner.
If I comment out the 'require of these three packages, installation seems to work, but stalls on a not found 'ob-shell (as in this question: https://emacs.stackexchange.com/questions/21366/should-i-have-removed-shell-t-to-clear-an-ob-shell-initialization-error). This is in addition to several other errors that seem to indicate a not-complete installation as I try to continue use of emacs.
I have not been able to find any documentation relating to this. Appearently, missing packages are not uncommon with old emacs-installations, but as I am using a 25.1.1 install, this does not seem to be the problem.
Any ideas going forward?
The issue with magit was indeed solved a little while ago. The issue with ipython that apc raised exists because that's a package from the Marmalade repo, which needs to be added manually to the list of repositories. To install it, just execute the following code in the console.
M-x package-refresh-contents [RET]
M-: (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
M-x package-refresh-contents [RET]
M-x package-install [RET] ipython

I can't properly uninstall Sublime Text on Debian

This is probably a pretty simple problem to fix, but I'm quite new to Linux and certainly Debian so I'm quite lost here. Put quite simply I am trying to remove two different versions of sublime text from a machine running Debian, so I can reinstall just the latest version. This is all on a work computer given to me that I just started using so I'm not sure on past details of how things were installed, etc. Entering the command "sublime" opens sublime build 3083. Build 3114 should also be here but I can't open it. I can't figure out how to remove it because it isn't in apt-cache and when I try apt-get remove for "sublime", "sublime-text", "sublime-text-2", and "sublime-text-3" it can't find any packages under that name. How do I get rid of this thing? Thanks.
NOTE: I check usr/bin and sublime is listed there. So it must have not been installed through the package manager?
Jethro helped me learn this in the comments to the original question above. Thanks! https://askubuntu.com/a/327752

Haskell Stack Resolver error just trying to run ghci

I'm a haskell newcomer, I've tried googling, IRC, and doing what the CLI tells me to do, but can't seem to get basic haskell ecosystem tools to play nice.
I installed ghc, stack, and cabal via the minimal installers OSX link on this page https://www.haskell.org/downloads and now I'm running into some strange resolver problems while trying to get started with stack. I run stack ghci it tells me that it wants 7.10.3 and to run stack setup. Setup then says it installed ghc#7.10.2. Any help would be much appreciated, thank you!
Apparently the version of stack in that package is 0.1.2.0 which is super old, and this bug is very dated. I don't know why the .org downloads page installs an ancient version of the tool, but my fix ended up being to download stack manually from here: https://github.com/commercialhaskell/stack/blob/master/doc/install_and_upgrade.md and then once I downloaded the zip I ran
mv ~/Downloads/stack-1.0.2-osx-x86_64/stack /Applications/ghc-7.10.2.app/Contents/bin/stack
That command puts the updated stack in place of the old one and things then seem to work!
As a note: Learning more about installing haskell, it seems everyone suggests that you never install haskell via haskell.org but instead install stack on it's own and use it to install haskell.

How to reinstall Eclipse on Linux?

I used the Software Manager in Linux Mint to install Eclipse Platform. It was working yesterday, however, now whenever I run it I get the following error message:
The Eclipse executable launcher was unable to locate its companion shared library.
I tried uninstalling it and then installing it again. Much to my confusion, this did not work. The error message still persists. It implies Eclipse requires a shared dependency that it cannot find. Is there anyway to find out what this is and install it? I've tried 'apt-get dist-upgrade' to update packages but this didn't resolve the issue at hand.
I have been using linux and Eclipse for years, but I would never suggest anyone install Eclipse from the platform repositories for any distribution.
Get your eclipse zips directly from Eclipse.org
Personally, I would just "Google it." (Or, in my case, "DuckDuckGo it.") Put the exact error-message text in double quotes to tell the search-engine that you are looking for the exact phrase.
DDG promptly referred me to this page: http://veeddie.blogspot.com/2010/06/eclipse-executable-launcher-was-unable.html

Resources