On Tue, Jul 2, 2019 at 1:01 PM Mario Carneiro <[email protected]> wrote:
> Stack does tend to take up a significant amount of disk space, because it > basically puts a complete installation of GHC in every project. There are > flags you can use to use the global installation instead, but they go > against Stack's goal of "reproducible builds". > > I haven't attempted to be particularly careful to avoid importing too many > dependencies, but an hour sounds about right for downloading and building > all of them. On a dev machine usually that's a one time thing. > > If this is a serious issue, I can try to set up travis to build binary > releases so that you don't have to compile it yourself. The Haskell build > environment is not very small, but the resulting executables are pretty > fast and don't require that whole infrastructure. > > I don't know much about docker, but perhaps something at > https://docs.haskellstack.org/en/stable/docker_integration/ is helpful. > If there is something I need to change with my stack.yaml to make it work > properly, feel free to send me a PR. I just call "stack" on my machine; I'm > not really clear on what the point of running the build in a docker > container is since stack is already going to pains to keep the build > environment stable. > think your stack.yaml is fine. Thanks for the offer though. The point of building in a Docker container is that the container already has GHC and "stack" in it, and you can download the whole container with a quick one-liner. The Docker image is pretty complete, I think, so I didn't have to do much after downloading it. Is there some other, comparably easy way to install Haskell on Macs? I don't know. The documentation URL you show above related to "docker_integration" is in some sense an opposite way to use Docker with Haskell. They seem to assume that you set up "stack" on the Mac and have it interface with Docker for you. I couldn't think of any reason to be interested in that approach. > > On Tue, Jul 2, 2019 at 2:34 PM Cris Perdue <[email protected]> wrote: > >> This is apropos of Mario's work developing MM0 and translating to it and >> from there to other formalisms. I am reporting this in the hope it may be >> useful to others. My result is an installation of Haskell with its "stack" >> tool on a Mac laptop, but along the way I also tried to install onto the >> "jessie" release of Debian Linux. >> >> Installing GHC (the Haskell compiler) and the "stack" tool using the >> official Haskell image on Docker Hub is looking like a success at this >> point. The image is large -- IIRC 200MB download and looks to be a bit over >> 1GB on disk, but functions well for me, and Docker makes it easy to discard >> at some future time if I wish. >> >> I would suggest downloading with >> >> $ docker pull haskell:8.6.3 >> >> as that image and its GHC matches the expectations of Mario's stack.yaml >> configuration, though you should be able to override that configuration >> with a command line option. I did have to increase the memory allowed to >> "Docker Engine" in the Docker Desktop preferences. 1GB RAM was not enough, >> and building Mario's mm0-hs failed with somewhat obscure messages that >> mentioned possible "out of memory". 4GB has worked fine so far. My old >> Macbook Air has 8GB physical RAM. >> >> Along the way I tried installing onto a virtual server that I use as a >> web server, running the "jessie" distribution of Debian Linux. Given the >> modest resources of the server, this was an abject failure. The procedure >> I followed was as described at >> https://docs.haskellstack.org/en/v1.0.2/install_and_upgrade/#debian, >> followed by >> >> $ stack build mm0-hs >> >> which ran for a couple of hours compiling many Haskell system modules, >> but was far short of completion. Newer Linux distros probably have much >> better support, i.e. requiring much less building from source code. >> >> Mario, did you set up the Haskell system you used? If so, perhaps you >> have some advice. >> >> If anyone else wants to set up Haskell, especially on Mac, I am glad to >> help. There is a little more to know about using Docker effectively, which >> I am not trying to document right now. >> >> Regards, >> Cris >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Metamath" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/metamath/CAOoe%3DWLyMqQjFa%2BXnJdFD_SC75HfGoWfJ7TiLxo-_-xXRc0_ng%40mail.gmail.com >> <https://groups.google.com/d/msgid/metamath/CAOoe%3DWLyMqQjFa%2BXnJdFD_SC75HfGoWfJ7TiLxo-_-xXRc0_ng%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to the Google Groups > "Metamath" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/metamath/CAFXXJSvdqxKc%3D4Ok%3DHf%3Dk3pmi6w%3DNODnb4GgMZm4C-oxGNdW2A%40mail.gmail.com > <https://groups.google.com/d/msgid/metamath/CAFXXJSvdqxKc%3D4Ok%3DHf%3Dk3pmi6w%3DNODnb4GgMZm4C-oxGNdW2A%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Metamath" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/metamath/CAOoe%3DWKpR_%3D4JOh2idSwxecXNiEKGhe9P-R-8NfA_XbJXVpYAQ%40mail.gmail.com.
