Re: [Haskell-cafe] [Off-topic] How unimportant it is whether submarines can swim (EWD1056)

2012-10-27 Thread Henk-Jan van Tuyl
On Sat, 27 Oct 2012 00:17:27 +0200, Gwern Branwen gwe...@gmail.com wrote: - with which popular believe (popular belief?) Changed - between day and night (night and day is more idiomatic in English, isn't it?) I changed it, although, according to Google, between day and night is used very

[Haskell-cafe] Enemy of the Mutable State

2012-10-27 Thread Mark Lentczner
A Haskell poster I made that you all might enjoy: http://www.ozonehouse.com/mark/enemy/ - mzero ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Type-directed functions with data kinds

2012-10-27 Thread Paul Visschers
Thanks for all the replies. I guess I'll keep using my type class for now. Paul On Fri, Oct 26, 2012 at 9:25 AM, Adam Gundry adam.gun...@strath.ac.ukwrote: Hi Paul, On 25/10/12 16:22, Paul Visschers wrote: Hello everyone, I've been playing around with the data kinds extension to

Re: [Haskell-cafe] Sparse records/ADTs

2012-10-27 Thread Jon Fairbairn
Yuri de Wit yde...@gmail.com writes: Would this be relevant? https://github.com/jonsterling/Data.Records That looks promising, thanks. It does use rather a lot of extensions, so it’ll take me a while to understand it. -- Jón Fairbairn

Re: [Haskell-cafe] foldr (.) id

2012-10-27 Thread Ross Paterson
On Fri, Oct 26, 2012 at 07:41:18PM +0100, Greg Fitzgerald wrote: I've recently found myself using the expression: foldr (.) id to compose a list (or Foldable) of functions.  It's especially useful when I need to map a function over the list before composing.  Does this function, or the more

Re: [Haskell-cafe] Sparse records/ADTs

2012-10-27 Thread Sjoerd Visscher
Maybe the vault package works for you? http://hackage.haskell.org/package/vault Sjoerd Visscher On Oct 26, 2012, at 5:17 PM, Jon Fairbairn jon.fairba...@cl.cam.ac.uk wrote: Twan van Laarhoven twa...@gmail.com writes: On 24/10/12 12:08, Jon Fairbairn wrote: Is there a convenient way of

Re: [Haskell-cafe] [Off-topic] How unimportant it is whether submarines can swim (EWD1056)

2012-10-27 Thread Jason Dusek
It is an interesting piece and I'm glad you went to the effort to translate it. - ...the question whether... + ...the question of whether or not... To use could is to form either the past or the subjunctive. Within a long sentence, we might prefer to contribute an article on a

Re: [Haskell-cafe] foldr (.) id

2012-10-27 Thread Greg Fitzgerald
Alternatively: flip (foldr id) Very cool, but... Prelude import qualified Data.Foldable as F Prelude F :t F.foldr id F.foldr id :: F.Foldable t = b - t (b - b) - b {- Generalizing -} Prelude F import qualified Control.Category as C Prelude F C :t F.foldr (C..) C.id F.foldr (C..) C.id ::

[Haskell-cafe] Auto-termination and leftovers in Conduits

2012-10-27 Thread Myles C. Maxfield
Hey, Say I have a stream of Data.Text.Text objects flowing through a conduit, where the divisions between successive Data.Text.Text items occur at arbitrary boundaries (maybe the source is sourceFile $= decode utf8). I'd like to create a Sink that returns a tuple of (the first line, the rest of

[Haskell-cafe] Overload function application? (was: foldr (.) id)

2012-10-27 Thread Greg Fitzgerald
Should library functions target Control.Category? We write for Num, IsString, and ListLike. Haskell overloads number literals and string literals, and awkwardly not List literals. Should Haskell overload function application too? How cool would it be to be able to leverage all of Haskell's

[Haskell-cafe] [Security] Put haskell.org on https

2012-10-27 Thread Niklas Hambüchen
(I have mentioned this several times on #haskell, but nothing has happened so far.) Are you aware that all haskell.org websites (hackage, HaskellWiki, ghc trac) allow unencrypted http connections only? This means that everyone in the same Wifi can potentially - read you passwords for all of

Re: [Haskell-cafe] foldr (.) id

2012-10-27 Thread wren ng thornton
On 10/26/12 2:41 PM, Greg Fitzgerald wrote: Hi Haskellers, I've recently found myself using the expression: foldr (.) id to compose a list (or Foldable) of functions. It's especially useful when I need to map a function over the list before composing. Does this function, or the more general

Re: [Haskell-cafe] Overload function application? (was: foldr (.) id)

2012-10-27 Thread wren ng thornton
On 10/27/12 3:23 PM, Greg Fitzgerald wrote: Should library functions target Control.Category? We write for Num, IsString, and ListLike. Haskell overloads number literals and string literals, and awkwardly not List literals. Should Haskell overload function application too? How cool would it

Re: [Haskell-cafe] Auto-termination and leftovers in Conduits

2012-10-27 Thread Michael Snoyman
The important issue here is that, when using =$, $=, and =$=, leftovers will discarded. To see this more clearly, realize that the first line of sink is equivalent to: out1 - C.injectLeftovers CT.lines C.+ CL.head So any leftovers from lines are lost once you move past that line. In order to

Re: [Haskell-cafe] [Off-topic] How unimportant it is whether submarines can swim (EWD1056)

2012-10-27 Thread Rustom Mody
On Sat, Oct 27, 2012 at 2:21 AM, Henk-Jan van Tuyl hjgt...@chello.nlwrote: L.S., I thought you might be interested to know, that I have translated one of prof. Edsger W. Dijkstra's writings to English[0]. I will submit this translation to the E. W. Dijkstra Archive of the University of