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: How Haskell Fits Into an Operating System / API
Environment (Philippe Sismondi)
2. Re: How Haskell Fits Into an Operating System / API
Environment (Stephen Tetley)
3. Re: How Haskell Fits Into an Operating System / API
Environment (Philippe Sismondi)
4. cabal install relative to $topdir (harry)
5. Re: HTTP Download -> Save File - non-strict (Dan Krol)
----------------------------------------------------------------------
Message: 1
Date: Sun, 11 Aug 2013 11:10:48 -0400
From: Philippe Sismondi <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] How Haskell Fits Into an Operating
System / API Environment
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252
On 2013-08-11, at 4:58 AM, Heinrich Apfelmus <[email protected]> wrote:
> Philippe Sismondi wrote:
>> I am interested in tracking down discussions on how Haskell fits into
<snip>
> I'm not entirely sure I understand your question.
Well, I admit that I am having trouble formulating my question clearly. It was
probably not even clear in my own mind. However, posting and clarifying here
have served a purpose for me; read on.
Upon reflection, probably my real concern is not about mixing dissimilar
programming languages, but about the frequently discussed issue of finding
production-quality libraries for a language. This issue is a serious one for
Common Lisp, Scheme, ML and OCaml, and other languages I like. It is perhaps
less of a problem for languages built on a substrate such as the JVM or .NET.
For most of the software that I am interested in working on, there is a vast
collection of "native" stuff available in both OS X and Windows. This includes,
just as an example, Core Audio in OS X. As a result of posting my (vague)
question, and thinking about this, I have decided that it makes more sense to
just stick to Objective-C or C when the vendor of the OS has provided a good
library in their language of choice. I like Haskell and Lisp better than I like
flavours of C. But for now I am going to abandon the forlorn hope of doing
everything in my favourite languages when the OS ecosystem favours something
else.
Moreover, I am dissatisfied with the quality of Haskell libraries even for
those things that are not already supplied by OS vendors. In my opinion (and I
may be wrong), hackage is littered with half-baked stuff, poorly documented
projects started by extremely bright grad students and then abandoned after a
year or two. (Of course, there is some great stuff on there too.)
As a result of this little thread I have come to another conclusion, and this
is just my subjective view. Most of the software that I am interested in seems
to live most comfortably with a stateful conception of the world. (The native
libraries I find most useful certainly are stateful.) I am reasonably competent
with monads and monad transformers in Haskell. But, to be honest, after three
years of pluggin away at Haskell, I am not the least convinced that the problem
of handling a changing external world in a pure functional language has been
successfully solved by those techniques. I always feel as though I am using the
robot arm on a space shuttle when a screwdriver would do. (Again, no need to
rebut this - I may be wrong or just to stupid to use Haskell effectively - so
be it.)
Perhaps in the end I do not really believe that functional programming is the
panacea that its devotees claim it to be.
I think this post may mark the beginning of my abandonment of Haskell for many
purposes.
So long?.
- P -
------------------------------
Message: 2
Date: Sun, 11 Aug 2013 16:45:20 +0100
From: Stephen Tetley <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] How Haskell Fits Into an Operating
System / API Environment
Message-ID:
<CAB2TPRAG5VuxrpYQEK2JOZcZPmriUM+XmV9o8=yqkmdcwh6...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
I tend to see OO subtyping and heterogeneous collections as more an
impediment to (pure) functional integration with the "rest-of-the-world"
than state. There are a lot of quality wrappers to stateful C libraries
from Haskell, but few to object oriented C++ or Objective C libraries.
On 11 August 2013 16:10, Philippe Sismondi <[email protected]> wrote:
>
>
> As a result of this little thread I have come to another conclusion, and
> this is just my subjective view. Most of the software that I am interested
> in seems to live most comfortably with a stateful conception of the world.
> (The native libraries I find most useful certainly are stateful.) I am
> reasonably competent with monads and monad transformers in Haskell. But, to
> be honest, after three years of pluggin away at Haskell, I am not the least
> convinced that the problem of handling a changing external world in a pure
> functional language has been successfully solved by those techniques. I
> always feel as though I am using the robot arm on a space shuttle when a
> screwdriver would do. (Again, no need to rebut this - I may be wrong or
> just to stupid to use Haskell effectively - so be it.)
>
> Perhaps in the end I do not really believe that functional programming is
> the panacea that its devotees claim it to be.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20130811/73de648b/attachment-0001.html>
------------------------------
Message: 3
Date: Sun, 11 Aug 2013 12:42:08 -0400
From: Philippe Sismondi <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] How Haskell Fits Into an Operating
System / API Environment
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"
On 2013-08-11, at 11:45 AM, Stephen Tetley <[email protected]> wrote:
> I tend to see OO subtyping and heterogeneous collections as more an
> impediment to (pure) functional integration with the "rest-of-the-world" than
> state. There are a lot of quality wrappers to stateful C libraries from
> Haskell, but few to object oriented C++ or Objective C libraries.
That may be true. And, state and OO types are different issues. I guess I
conflated the two because the stateful OS X libraries I use are largely
implemented using Cocoa or sometimes C data structures. So, do I make my own
Haskell list or record or type representing something in the API, or just
access the Cocoa one? etc. etc.
Also, in truth I introduced a totally separate gripe, which is that I find
monads and monad transformers to be a hell of a messy and difficult way to deal
with state. Sometimes I get sick of all the layering in monad transformers and
hand-roll my own monad with all the stuff. But it just seems baroquely
difficult. Perhaps I was just to set in my ways when I came to FP, and cannot
really "get it". There are things I have never looked into such as FRP, but
maybe my poor old brain is just not up to it. Maybe I should have been a
janitor or a car salesman.
- P -
>
>
> On 11 August 2013 16:10, Philippe Sismondi <[email protected]> wrote:
>
>
> As a result of this little thread I have come to another conclusion, and this
> is just my subjective view. Most of the software that I am interested in
> seems to live most comfortably with a stateful conception of the world. (The
> native libraries I find most useful certainly are stateful.) I am reasonably
> competent with monads and monad transformers in Haskell. But, to be honest,
> after three years of pluggin away at Haskell, I am not the least convinced
> that the problem of handling a changing external world in a pure functional
> language has been successfully solved by those techniques. I always feel as
> though I am using the robot arm on a space shuttle when a screwdriver would
> do. (Again, no need to rebut this - I may be wrong or just to stupid to use
> Haskell effectively - so be it.)
>
> Perhaps in the end I do not really believe that functional programming is the
> panacea that its devotees claim it to be.
>
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20130811/05d04fd9/attachment-0001.html>
------------------------------
Message: 4
Date: Sun, 11 Aug 2013 17:45:05 +0000 (UTC)
From: harry <[email protected]>
To: [email protected]
Subject: [Haskell-beginners] cabal install relative to $topdir
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
I would like cabal install to create paths in the package database relative
to $topdir, so that I can mount it on a different machine (where the
absolute path will obviously be different). Is there any way of automating this?
------------------------------
Message: 5
Date: Sun, 11 Aug 2013 11:44:24 -0700
From: Dan Krol <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] HTTP Download -> Save File -
non-strict
Message-ID:
<CAAWRcS-CpX3nZOMsGT682DaYHDWwKqnT=hlriwshzi-3t-h...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Ah yes, the actual docs. Somehow didn't think to check that, sorry.
Alright, I'll try to figure that one out, thanks. Any particular reason
nobody just offers http over lazy I/O? Is it just because lazy I/O is
generally discouraged? Or just particularly bad over a network?
And is this an area where Conduit is better than Pipes? There doesn't seem
to be a similar http for Pipes.
On Sat, Aug 10, 2013 at 11:30 PM, Magnus Therning <[email protected]>wrote:
> On Sat, Aug 10, 2013 at 05:16:58PM -0700, Dan Krol wrote:
> > Hi,
> >
> > I'm working on an rss file getter. I was wondering if I could get
> > some help getting files to download and save without holding the
> > entire file in memory in between. I chose Conduit's version of
> > SimpleHttp only because it was recommended, and it was the quickest
> > thing I could get to work correctly because I was eager to get
> > started on this project, so I'd be happy to switch.
> >
> > Here's where I define the download and save functions:
> >
> > https://github.com/orblivion/feedGetter/blob/master/rss.hs#L107
> >
> > And here's where I use them, getting multiple at a time with async:
> >
> > https://github.com/orblivion/feedGetter/blob/master/rss.hs#L208
> >
> > What happens when I run this is that it outputs that it's "Getting"
> > the file, waits a while (presumably to download the whole thing),
> > then says it's "Saving". And I checked the file system, it's not
> > there during the pause. I'm not entirely sure why. Is it my choice
> > of libraries, or the way I'm using them? Perhaps something to do
> > with async? I just tried content <- simpleHttp "http://google.com"
> > in ghci, and it does pause for a second, so I'm guessing this is
> > strict from the getgo. But I've done almost no I/O before.
> >
> > Is there a straightforward, canonical option? It seems like there
> > perhaps should be. But if it comes down to using pipes or conduit,
> > what the heck I'll try it out, I'd like to learn pipes eventually.
>
> Michael is very good with documenting his packages, this is what I
> found in the docs for http-conduit (http://is.gd/WkDb7G):
>
> Note: Even though this function returns a lazy bytestring, it does
> not utilize lazy I/O, and therefore the entire response body will
> live in memory. If you want constant memory usage, you'll need to
> use the conduit package and http directly.
>
> /M
>
> --
> Magnus Therning OpenPGP: 0xAB4DFBA4
> email: [email protected] jabber: [email protected]
> twitter: magthe http://therning.org/magnus
>
> I invented the term Object-Oriented, and I can tell you I did not have
> C++ in mind.
> -- Alan Kay
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20130811/91b2ebc3/attachment.html>
------------------------------
Subject: Digest Footer
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
------------------------------
End of Beginners Digest, Vol 62, Issue 10
*****************************************