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: Convert numeric IP to Network.Socket.HostAddress (harry)
2. Re: Convert numeric IP to Network.Socket.HostAddress (harry)
3. Re: Convert numeric IP to Network.Socket.HostAddress
(Brandon Allbery)
4. Re: coming to grips with hackage (Michael Orlitzky)
5. Re: coming to grips with hackage ([email protected])
6. Re: coming to grips with hackage (Brandon Allbery)
----------------------------------------------------------------------
Message: 1
Date: Thu, 6 Feb 2014 12:10:57 +0000 (UTC)
From: harry <[email protected]>
To: [email protected]
Subject: Re: [Haskell-beginners] Convert numeric IP to
Network.Socket.HostAddress
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Tim Perry <tim.v2.0 <at> gmail.com> writes:
> Can you use the SockAddrUnix constructor of SockAddr??
>
See?http://hackage.haskell.org/package/network-2.2.1.3/docs/Network-Socket.html#t%3ASockAddr
What do I give as the parameter? I can't work out the format (which is just
String).
------------------------------
Message: 2
Date: Thu, 6 Feb 2014 10:04:50 +0000 (UTC)
From: harry <[email protected]>
To: [email protected]
Subject: Re: [Haskell-beginners] Convert numeric IP to
Network.Socket.HostAddress
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Tim Perry <tim.v2.0 <at> gmail.com> writes:
> Can you use the SockAddrUnix constructor of SockAddr??
>
See?http://hackage.haskell.org/package/network-2.2.1.3/docs/Network-Socket.html#t%3ASockAddr
What's the input format? All it says is String.
------------------------------
Message: 3
Date: Thu, 6 Feb 2014 09:38:46 -0500
From: Brandon Allbery <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Convert numeric IP to
Network.Socket.HostAddress
Message-ID:
<CAKFCL4UynSxzbw2PhnLtmGEuy7ZPTaD9mt=qyt0vxen4p4y...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
On Thu, Feb 6, 2014 at 5:04 AM, harry <[email protected]> wrote:
> Tim Perry <tim.v2.0 <at> gmail.com> writes:
> > Can you use the SockAddrUnix constructor of SockAddr?
> >
> See
> http://hackage.haskell.org/package/network-2.2.1.3/docs/Network-Socket.html#t%3ASockAddr
>
> What's the input format? All it says is String.
You don't want SockAddrUnix. It's for AF_UNIX / AF_LOCAL sockets, which
live in the filesystem, and the parameter is the pathname of the socket.
--
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/20140206/2adbecc3/attachment-0001.html>
------------------------------
Message: 4
Date: Thu, 06 Feb 2014 17:47:42 -0500
From: Michael Orlitzky <[email protected]>
To: [email protected]
Subject: Re: [Haskell-beginners] coming to grips with hackage
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1
On 02/06/2014 12:59 AM, [email protected] wrote:
>> The most robust approach is to find or create distro packages for
>> everything you need.
>
> How does this handle the situation where I want both package A and package B
> installed, but they each want a different version of package C?
>
How would your distro handle it if those packages were written in C?
This isn't too much of a problem in practice. With Haskell it seems
worse because everything has conservative dependencies in a *.cabal file
and Cabal will refuse to build the thing unless they're met. When we
find a package that's too conservative, we mangle the dependencies on
the fly and report it upstream.
If there's a more serious conflict, sometimes both versions can be
installed side-by-side, but in general we have to file a bug and wait
just like if it was written in e.g. python.
But I see that as a good thing: I've got some 300 haskell packages
installed at the moment, and I know that they're all in a consistent
state (and up to date). It's pretty nice when people complain about
Cabal and you have no idea what they're talking about. I also do
development on three different machines, and it's handy to have them
running the same packages.
------------------------------
Message: 5
Date: Thu, 6 Feb 2014 21:36:41 -0500
From: [email protected]
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] coming to grips with hackage
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
> > How does this handle the situation where I want both package A and package B
> > installed, but they each want a different version of package C?
>
> How would your distro handle it if those packages were written in C?
I'd say the C-leaning factions of the open-source community have largely
accepted the convention that ABI/API changes that cause incompatibilities are
accompanied by bumps in the major version number. There are, of course,
exceptions, but my feeling is they are rare, generally well-publicized, and
quickly fixed. To be honest, I don't even know if hackage authors tend to
follow this convention because...
> With Haskell it seems worse because everything has conservative dependencies
> in a *.cabal file and Cabal will refuse to build the thing unless they're
> met.
... Haskell seems worse to me in that if package foo is updated, every other
package depending on foo (recursely) must then be rebuilt, even if they didn't
change and even if the interface presented by foo didn't change. C programs
do not suffer similarly and my limited experience with ``cabal hell'' would
have been a non-event if this recompilation process wasn't necessary. I don't
know what technical issues necessitate it and I don't know whether the
conventions required to make it feasible are already in place, which is
partially what I'm trying to learn here. =)
Additionally, it seems that the hackage ecosystem is far more intertwined than
that of third-party Python packages (I have no experience with Ruby). That
is, many things in hackage depend on other things in hackage whereas far more
Python packages depend only on the libraries included in the base install.
This is not a knock against Haskell by any means; it is, in fact, a testament
to the powerful abstractions it supplies and enables. It does, however,
weaken the ``other languages have this problem, too'' argument.
Perhaps the solution is a more rigorous effort to keep the Haskell Platform up
to date, especially with well-regarded ``building block'' libraries (eg,
lens), and possibly even on a fixed schedule. Then hackage authors can be
encouraged to make their stuff compatible with particular releases of the
Haskell Platform and ``normal'' users would only need to worry about upgrades
whenever the Platform is updated. But then we're really edging out on the
slippery slope to Haskell becoming a distro unto itself.
pete
------------------------------
Message: 6
Date: Thu, 6 Feb 2014 21:53:17 -0500
From: Brandon Allbery <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] coming to grips with hackage
Message-ID:
<cakfcl4w1aw3-k41zbst78aa9hzqk3dudxs84oi+k5goah9e...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
On Thu, Feb 6, 2014 at 9:36 PM, <[email protected]> wrote:
> ... Haskell seems worse to me in that if package foo is updated, every
> other
> package depending on foo (recursely) must then be rebuilt, even if they
> didn't
> change and even if the interface presented by foo didn't change.
>
This is something of a problem, yes... but it's not really "Haskell"'s
fault. It's a specific design decision in GHC, in the name of performance:
aggressive cross-module inlining means that specific compilation details of
dependencies leak into the ABI of their dependents, necessitating exact ABI
matches instead of simply consonant versions as in (normal) C. (For
comparison, note that KDE has often had exactly the same problem in C++,
through using cpp macros in place of inline functions for performance on
"hot paths"; the exact macro and *every* (external or internal)
function/method/variable it touches becomes part of the "public" ABI that
must be maintained for compatibility.)
Other Haskell compilers such do things differently. ajhc is a whole-program
compiler, so in fact you *always* compile your dependencies again from
source. uhc I don't think does the same amount of cross-module inlining, at
a performance cost but maintainability gain. (And "Cabal hell" is shooting
the messenger; it's just reporting the mess ghc has made / will make.)
I do find myself wondering if anyone has checked to see how important the
inlining is these days; perhaps ghc's general performance (and a hat tip to
Moore's law) has made it possible to consider compiling more stable
libraries.
--
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/20140206/11dea712/attachment-0001.html>
------------------------------
Subject: Digest Footer
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
------------------------------
End of Beginners Digest, Vol 68, Issue 5
****************************************