Send Beginners mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Re:  Q 2 of 2: GUI and turnkey compiler? (Chadda? Fouch?)
   2. Re:  Q 2 of 2: GUI and turnkey compiler? (Rustom Mody)
   3. Re:  Q 2 of 2: GUI and turnkey compiler? (Brandon Allbery)
   4. Re:  Q 2 of 2: GUI and turnkey compiler? (Chadda? Fouch?)


----------------------------------------------------------------------

Message: 1
Date: Sat, 1 Jun 2013 17:06:15 +0200
From: Chadda? Fouch? <[email protected]>
Subject: Re: [Haskell-beginners] Q 2 of 2: GUI and turnkey compiler?
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Message-ID:
        <CANfjZRZ4NdOURxrmpiSuFfjv=6OC50qap-obuKq3CjaR=gt...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

On Sat, Jun 1, 2013 at 8:43 AM, Rustom Mody <[email protected]> wrote:

>
>
> On Sat, Jun 1, 2013 at 8:14 AM, Brandon Allbery <[email protected]>wrote:
>
>> On Fri, May 31, 2013 at 10:20 PM, Gan Uesli Starling <[email protected]>wrote:
>>
>>> So, it would be something to allow an author to issue programs which
>>> end-users would NOT have to know anything about Haskell itself and would
>>> have to, at most, perform a two-step, wholly automatic installation
>>> procedure. Short of this, anything I might aspire to give away free to the
>>> public en masse, could not conceivably be written in Haskell. In which
>>> case, I'll respectfully bow out from endeavoring to learn it myself,
>>> however useful it serves for many another purpose.
>>
>>
>> Aside from system libraries, if you don't configure your packages to be
>> dynamic GHC works that way. You can also force system libraries if you use
>> -static; but note that this also links libc static, which is problematic on
>> at least Linux and Solaris. (Usually, the only problematic system library
>> is gmp.)
>>
>
> I believe the problem is deeper than just moving executables from here to
> there.
>

No, there is nothing "deep" about this, and there's nothing specific to
Haskell either...

As Brandon explained, the notion of a "turn-key compiler" itself isn't
adapted here, not because it is Haskell but because ghc is a real compiler
: it takes Haskell programs an compile them to native code, that is an
executable that can be run directly on the OS/architecture you've compiled
for.

What I'm going to explain isn't Haskell specific at all but rather general
to all compiled languages (C, C++, Go, Pascal, Ada, ...) :
So in the beginning the compiler took your code, your libraries and all
that and made an self-sufficient executable that contained the native code
that could run on your machine and all was good in the world. But the
problem is that you put in all this content from your libraries, some of
them all your programs are using, and that's a waste, you've got the same
native code replicated dozens, hundreds of time all throughout your
executables... So we invented shared libraries (.dll on Windows, .so on
Linux/Unix) that are already compiled and contains the native code from a
library and now when compiling (and linking) an executable, we don't
include the library code, we just put in a reference to the shared library
and thus our executable are smaller !
So we're better off now, no ? Well.... What if you download an executable
and you don't have all the shared libraries it needs (or the wrong
versions) ? Suddenly your executable is not self-sufficient anymore !

In Linux, we resolved the problem by using package manager that know what
libraries need to be installed for each package to work but it means that
if you're not using your manager to install a soft, you'll have to install
manually the libraries you need (which is probably what happened to Rustom,
its debian upgrade removed or upgraded the libgmp.so his manually installed
cabal needed).
In Windows we resolved the problem by... nah, let's just pretend we don't
care and let the application developers on their own ! Which is the source
of dll hell and the reason for which every single application comes with
all the dll that are not explicitly provided by windows itself, so that you
have a ton of identical versions of the same library in your filesystem.

Now in practice, you could still compile all static (no shared libraries,
all necessary library code is included in the executable) with the right
options to GHC, or you could just compile normally and include the shared
libraries in the zip you distribute (on Windows, on Linux it would be
better to use the package managers facilities).

-- 
Jeda?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20130601/81e36520/attachment-0001.htm>

------------------------------

Message: 2
Date: Sat, 1 Jun 2013 21:51:47 +0530
From: Rustom Mody <[email protected]>
Subject: Re: [Haskell-beginners] Q 2 of 2: GUI and turnkey compiler?
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Message-ID:
        <caj+teodyfchcvs316tfqntxmpoem9j-gkxva4tdavjapeg6...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

On Sat, Jun 1, 2013 at 8:36 PM, Chadda? Fouch? <[email protected]>wrote:

>
> In Linux, we resolved the problem by using package manager that know what
> libraries need to be installed for each package to work but it means that
> if you're not using your manager to install a soft, you'll have to install
> manually the libraries you need (which is probably what happened to Rustom,
> its debian upgrade removed or upgraded the libgmp.so his manually installed
> cabal needed).
>

Not sure how you come to that diagnosis.
As far as I can see on my machine
- cabal is /usr/bin/cabal
- the apt package cabal-install is installed and lists /usr/bin/cabal as a
file

So unless something really weird or magic-y happened, my cabal is debian's
cabal.

And so -- my diagnosis -- the fact that cabal broke after an OS upgrade
suggests that the apt package cabal has something wrong in its dependencies.

Of course, as I said, this is my diagnosis, and since I am not much more
than a layman in this area, I'll be happy to be corrected :-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20130601/9238a217/attachment-0001.htm>

------------------------------

Message: 3
Date: Sat, 1 Jun 2013 14:07:43 -0400
From: Brandon Allbery <[email protected]>
Subject: Re: [Haskell-beginners] Q 2 of 2: GUI and turnkey compiler?
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Message-ID:
        <CAKFCL4XJo-q3w_1dun-Y=ts3vwj5bg-qy4xrkglbhzoouac...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

On Sat, Jun 1, 2013 at 12:21 PM, Rustom Mody <[email protected]> wrote:

> As far as I can see on my machine
> - cabal is /usr/bin/cabal
> - the apt package cabal-install is installed and lists /usr/bin/cabal as a
> file
>
> So unless something really weird or magic-y happened, my cabal is debian's
> cabal.
>
> And so -- my diagnosis -- the fact that cabal broke after an OS upgrade
> suggests that the apt package cabal has something wrong in its dependencies.
>

That sounds reasonable, but also means that your issue is not with Haskell
but with Debian. In particular, it is Debian which does things like
shifting from ghc's own private libgmp to its system one, thus introducing
the possibility that a missed dependency can break things this way.

(That said, make certain that you don't have a ~/.cabal/bin/cabal running
around first --- if you mix distribution and cabal-install packages, you
can easily get into this kind of mess. Which is why we recommend going with
one or the other, and in particular not upgrading/replacing anything
installed via the distribution except via the distribution.)

-- 
brandon s allbery kf8nh                               sine nomine associates
[email protected]                                  [email protected]
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20130601/5dea8ebe/attachment-0001.htm>

------------------------------

Message: 4
Date: Sat, 1 Jun 2013 21:07:19 +0200
From: Chadda? Fouch? <[email protected]>
Subject: Re: [Haskell-beginners] Q 2 of 2: GUI and turnkey compiler?
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <[email protected]>
Message-ID:
        <CANfjZRYCyew2orj4W5a=zu2or_4gotz3al4uok0qdmjmgnw...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

On Sat, Jun 1, 2013 at 6:21 PM, Rustom Mody <[email protected]> wrote:

> On Sat, Jun 1, 2013 at 8:36 PM, Chadda? Fouch? 
> <[email protected]>wrote:
>
>>
>> In Linux, we resolved the problem by using package manager that know what
>> libraries need to be installed for each package to work but it means that
>> if you're not using your manager to install a soft, you'll have to install
>> manually the libraries you need (which is probably what happened to Rustom,
>> its debian upgrade removed or upgraded the libgmp.so his manually installed
>> cabal needed).
>>
>
> Not sure how you come to that diagnosis.
> As far as I can see on my machine
> - cabal is /usr/bin/cabal
> - the apt package cabal-install is installed and lists /usr/bin/cabal as a
> file
>
> So unless something really weird or magic-y happened, my cabal is debian's
> cabal.
>
> And so -- my diagnosis -- the fact that cabal broke after an OS upgrade
> suggests that the apt package cabal has something wrong in its dependencies.
>

Well yes, that's always a possibility as well but your post seemed to imply
that this was a Haskell problem. If Debian does not track the dependencies
of its packages correctly, this is in no way due to it being Haskell and
could happen with any other executable, whatever language their source may
be in.

-- 
Jeda?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20130601/eb247304/attachment.htm>

------------------------------

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 60, Issue 3
****************************************

Reply via email to