How do I install earlier versions of Haskell Platform and switch between them? - ghc

I have installed this https://www.haskell.org/platform/#linux-generic Haskell Platform. The problem is it comes with ghc version 8.2.1.
How do I install an earlier version of Haskell Platform so that I can use older, bug-free ghc if I need it?
I can see prior versions available.
https://www.haskell.org/platform/prior.html
So the question remains, how do I make them peacefully coexist on my system?
activate-hs doesn't seem to work, so please tell me how do I switch defferent Haskell Platforms?
Just installing the Haskell platform has updated the links in /usr/local/bin.
So I guess my question is almost solved.

activate-hs should work for the most recent releases of the platform. If it does not, it would be good to know why.
Additionally, you can specify the -w or --with-compiler= in either cabal new-build or cabal configure to give a path to a different ghc to use. That lets you sidestep moving symlinks around (the activate-hs solution) and just pick a ghc to use directly.

Related

Ada/SPARK: should I be using GNATprove? Where can I find it?

On chapter 22.1 of this Learning Ada, trying to build the examples.
It expects GNATprove to be installed. I am using Ubuntu 18.04 LTS, and I don't see any package that provides it. When I tried to find the main repo, all I found was something at Open Do, and when I click the download button, it appears to be a broken link. Google has little to offer about GNATprove, which is a bit worrying.
I'm new to Ada so I don't really know what I should be using, so if GNATprove is not the right thing, then let me know. I'm also generally expecting a free software toolchain -- is that a reasonable expectation or should I expect to need the "pro" version to see what Ada/SPARK are all about?
GNATprove is the tool used for the formal verification of SPARK, i.e. the provable subset of Ada. If you want to build reliable software and be sure that it does the right thing, it's certainly worth looking at SPARK!
The easiest way to get you hands on SPARK it is to download the GNAT Community Edition from https://www.adacore.com/download which includes GNATprove. The community edition has everything you need to get started wit Ada and SPARK. The main difference of "Pro" is the commercial support.

Can I uninstall All other MS Visual C++ Except the latest version?

I've checked my installed programs in windows 7 machine. In it there are several copies of Microsoft Visual C++ were installed. I know they provide support files for various programs and softwares I've installed in past.
But If I uninstall the older one, will the associated software or games misbehave??? or should I keep them installed?
And if I have to keep them all installed for the sake of their associated softwares, How can I find out some useless copies of this MSVC++ if their main programs were uninstalled already????
Thanks in advance :)
You did not mention the games you intend to make sure will work. Even if you did, I doubt anyone here is developing all the games, so an exact answer is unlikely to be given here.
However, new versions of any software should be as much compatible with older versions as possible and you should keep that in mind when you see all the versions, so you should be able to keep only the latest installation.
However, the way to find out is to perform the following algorithm
for each installation ordered by version except the last
uninstall
test all the games sequentially
if any tests failed, then reinstall the given version
end for each
Don't know exactly but the latest version of visual c++ will be good enough for all other programs

MPICH2 Installation

Given the availability of a new workstation (Intell Xeon X5690, Windows 7 Professional, 64-bit) for numerical analysis of fluid dynamics models, I find it a shame not engage in parallel computing. So far, I have had no or little experience in this field.
What's the difference between MS-MPI and the latest release of MPICH suitable for Windows? I installed MPICH 1.4.1, but I cannot get a test program to work on Ifort. How am I supposed to compile the program? Do I have to change Ifort configurations somehow to add the libraries of MPICH? Isn't there any good manual available online that could meet my needs?
There's lots of questions in this one question, but it all boils down to one basic question: How do I install MPI on Windows?
MPICH has long since worked on Windows. The last version that supported it was 1.4.1p1 as you've found, but it doesn't have any support anymore from the MPICH developers so if you have trouble, you probably won't find much help. I haven't seen anyone on here step up to help with those questions so far.
MS-MPI is a good option if you want to use Windows. It's free to use and still has support directly from Microsoft. You'll have to read their documentation about how to set everything up correctly, but it's probably the right place to start if you want to use MPI on Windows.
Intel MPI also works on Windows, but it isn't free so you might not want to look at that right now.

Installing MPI for Windows

I am trying to install MPI for Windows 8, so when I searched net I got steps for installing it on XP/7 but not for windows 8. The link is: http://swash.sourceforge.net/online_doc/swashimp/node9.html
But firstly when I have to allow mpi.exe and smpd.exe to communicate through firewall these exe files are not listed.
Secondly, when I run cmd(as administrator) and type : "smpd -install",
it says : "Unknown option: -install". I guess the command for windows 8 is something else.
So I will be really grateful if anyone helps with it because I'm not able to proceed further.
Side note before I start, MPI is a standard, not a library that you install. MPICH, Open MPI, Intel MPI, MS-MPI, etc. are all implementations of that standard. When you say you're trying to do X with MPI and you're asking for help, mention which implementation (and version) you're using.
Based on your question, I'm assuming that you're trying to install MPICH, though which version is unclear. MPICH hasn't supported Windows since version 1.4.1p and even that version doesn't have any support from the MPICH team anymore as all of the Windows experts are now gone. I'd suggest that you take a look at one of the implementations that do currently support Windows. The only two I know of are MS-MPI (free) and Intel MPI (paid - Update: Now free for most users), though there are probably others out there that I don't know about. If you still have trouble after trying one of those implementations, they have their own support teams that can help you with your problem.
I am not sure which version of MSMPI you were talking about but here is the webpage you should download the latest MSMPI which also supports Win 8.1.
You just need to double click and follow the instructions of installer.

What is currently the best build system [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
A few years ago I looked into using some build system that isnt Make, and tools like CMake and SCons seemed pretty primitive. I'd like to find out if the situation has improved. So, under the following criteria, what is currently the best build tool:
platform agnostic: should work on windows, linux, mac
language agnostic: should have built-in support for common things like building C/C++ and other static langs. I guess it doesn't need to support the full autotools suite.
extensible: I need to be able to write rules to generate files, like from restructuredText, latex, custom formats, etc. I dont really care what language I have to write the rules in, but I would prefer a real language rather than a DSL.
I would prefer to avoid writing any XML by hand, which I think for example ant requires.
Freely available (preferably open source)
The term "best" is slightly subjective, but I think answers can be rated objectively by the criteria above.
I'd definitively put my vote up for premake. Although it is not as powerful as it's older brothers, it's main advantage is absurd simplicity and ease of use. Makes writing multi-compiler, multi-platform code a breeze, and natively generates Visual Studio solutions, XCode projects, Makefiles, and others, without any additional work needed.
So, judging purely by the criteria set forth in the question, the build system that seems like the best fit is probably waf - pure Python, provides support for C++ and other languages, general, powerful, not a DSL.
However, from my personal experience, I prefer CMake for C++ projects. (I tried CMake, SCons, and waf, and liked them in roughly that order). CMake is a general solution, but it has built-in support for C++ that makes it nicer than a more generic solution when you're actually doing C++.
CMake's build model for C++ is more declarative and less imperative, and thus, to me, easier to use. The CMake language syntax isn't great, but a declarative build with odd syntax beats an imperative build in Python. Of the three, CMake also seems to have the best support for "advanced" things like precompiled headers. Setting up precompiled headers reduced my rebuild time by about 70%.
Other pluses for CMake include decent documentation and a sizable community. Many open source libraries have CMake build files either in-tree or provided by the CMake community. There are major projects that already use CMake (OGRE comes to mind), and other major projects, like Boost and LLVM, are in the process of moving to CMake.
Part of the issue I found when experimenting with build systems is that I was trying to build a NPAPI plugin on OS X, and it turns out that very few build systems are set up to give XCode the exact combination of flags required to do so. CMake, recognizing that XCode is a complex and moving target, provides a hook for manually setting commands in generated XCode projects (and Visual Studio, I think). This is Very Smart as far as I'm concerned.
Whether you're building a library or an application may also determine which build system is best. Boost still uses a jam-based system, in part because it provides the most comprehensive support for managing build types that are more complex than "Debug" and "Release." Most boost libraries have five or six different versions, especially on Windows, anticipating people needing compatible libraries that link against different versions of the CRT.
I didn't have any problems with CMake on Windows, but of course your mileage may vary. There's a decent GUI for setting up build dependencies, though it's clunky to use for rebuilds. Luckily there's also a command-line client. What I've settled on so far is to have a thin wrapper Makefile that invokes CMake from an objdir; CMake then generates Makefiles in the objdir, and the original Makefile uses them to do the build. This ensures that people don't accidentally invoke CMake from the source directory and clutter up their repository. Combined with MinGW, this "CMake sandwich" provides a remarkably consistent cross-platform build experience!
Of course that depends on what your priorities are. If you are looking primarily for ease of use, there are at least two new build systems that hook into the filesystem to automatically track dependencies in a language agnostic fashion.
One is tup:
http://gittup.org/tup/
and the other is fabricate:
http://code.google.com/p/fabricate/
The one that seems to be the best performing, portable, and mature (and the one I have actually used) is tup. The guy who wrote it even maintains a toy linux distro where everything is a git submodule, and everything (including the kernel) is build with tup. From what I've read about the kernel's build system, this is quite an accomplishment.
Also, Tup cleans up old targets and other cruft, and can automatically maintain your .gitignore files. The result is that it becomes trivial to experiment with the layout and names of your targets, and you can confidently jump between git revisions without rebuilding everything. It's written in C.
If you know haskell and are looking for something for very advanced use cases, check out shake:
http://community.haskell.org/~ndm/shake/
Update: I haven't tried it, but this new "buildsome" tool also hooks into the filesystem, and was inspired by tup, so is relevant:
https://github.com/ElastiLotem/buildsome
CMake
CMake is an extensible, open-source
system that manages the build process
in an operating system and in a
compiler-independent manner.
Gradle seems to match all the criteria mentioned above.
It's a build system which took the best of Maven and Ant combined. To me, that's the best.
The Selenium project is moving over to Rake, not because its the best but because it handles multiple languages slightly better than all the other build tools and is cross platform (developed in Ruby).
All build tools have their issues and people learn to live with them. Something that runs on the JVM tends to be really good for building apps so Ant, Maven (i know its hideous), Ivy, Rake
Final Builder is well known in Windows world
smooth build matches most of your requirements.
platform agnostic: yes, it's written in java
language agnostic: it doesn't support c/c++t yet, only java but it is extensible via plugins written in java so adding more compilers support is not a problem
extensible: yes, you can implement smooth function via java plugin, you can also create smooth function via defining it as expression built of other smooth functions.
I would prefer to avoid writing any XML: you won't see a single line of it in smooth build
Freely available: yes, Apache 2 license
disclosure: I'm the author of smooth build.

Resources