[Haskell-cafe] Bytestring map/zipWith rationale

2013-09-12 Thread Scott Lawrence
Hello all, Something's always bothered me about map and zipWith for ByteString. Why is it map :: (Word8 - Word8) - ByteString - ByteString but zipWith :: (Word8 - Word8 - a) - ByteString - ByteString - [a] ? Obviously they can be transformed into each other with pack/unpack, and as I

Re: [Haskell-cafe] Bytestring map/zipWith rationale

2013-09-12 Thread Scott Lawrence
On Thu, 12 Sep 2013, Tom Ellis wrote: On Thu, Sep 12, 2013 at 09:21:20AM -0400, Scott Lawrence wrote: Something's always bothered me about map and zipWith for ByteString. Why is it map :: (Word8 - Word8) - ByteString - ByteString but zipWith :: (Word8 - Word8 - a) - ByteString -

Re: [Haskell-cafe] Bytestring map/zipWith rationale

2013-09-12 Thread Tom Ellis
On Thu, Sep 12, 2013 at 09:21:20AM -0400, Scott Lawrence wrote: Something's always bothered me about map and zipWith for ByteString. Why is it map :: (Word8 - Word8) - ByteString - ByteString but zipWith :: (Word8 - Word8 - a) - ByteString - ByteString - [a] Well, what if you

Re: [Haskell-cafe] Bytestring map/zipWith rationale

2013-09-12 Thread Artyom Kazak
On Thu, 12 Sep 2013 18:24:24 +0400, Tom Ellis tom-lists-haskell-cafe-2...@jaguarpaw.co.uk wrote: On Thu, Sep 12, 2013 at 09:21:20AM -0400, Scott Lawrence wrote: Something's always bothered me about map and zipWith for ByteString. Why is it map :: (Word8 - Word8) - ByteString -

Re: [Haskell-cafe] Bytestring map/zipWith rationale

2013-09-12 Thread Carter Schonwald
Scott: benchmark the two and you'll see why we have both :-) On Thursday, September 12, 2013, Scott Lawrence wrote: On Thu, 12 Sep 2013, Tom Ellis wrote: On Thu, Sep 12, 2013 at 09:21:20AM -0400, Scott Lawrence wrote: Something's always bothered me about map and zipWith for ByteString. Why

Re: [Haskell-cafe] Bytestring map/zipWith rationale

2013-09-12 Thread John Lato
Carter: we don't have both. We have one function from each category. My guess is nobody's ever really needed a really fast zipWith :: (Word8-Word8-Word8) - ByteString - ByteString - ByteString; that's the only reason I can think of for its omission. On Thu, Sep 12, 2013 at 10:45 AM, Carter

Re: [Haskell-cafe] Bytestring map/zipWith rationale

2013-09-12 Thread Nicolas Trangez
I did use that a couple of times (`xor`ing 2 ByteStrings together), and was surprised by the omission back then, but IIRC (can't validate now), there's a specialised zipWith (as proposed) in the module (with some other name, obviously), which is not exported, but used when you 'pack' the result of

Re: [Haskell-cafe] Hackage 2 now available for beta testing

2013-09-12 Thread Andreas Abel
On 09.09.2013 20:24, Duncan Coutts wrote: Well-Typed and the Industrial Haskell Group (IHG) are very pleased to announce that Hackage 2 is now available for public beta testing. [new features]: http://beta.hackage.haskell.org/new-features Package candidates. You may have noticed that

Re: [Haskell-cafe] Proposal: New syntax for Haskell

2013-09-12 Thread Andreas Abel
+1 Cucumber seems to be great if you mainly want to read your code over the telephone, distribute it via national radio broadcast, or dictate it to your secretary or your voice recognition software. You can program thus without having to use you fingers. You can lie on your back on your sofa,

Re: [Haskell-cafe] Proposal: New syntax for Haskell

2013-09-12 Thread David Thomas
I've long been interested in a scripting language designed to be spoken. Not interested enough to go about making it happen... but the idea is fascinating and possibly useful. On Thu, Sep 12, 2013 at 2:57 PM, Andreas Abel andreas.a...@ifi.lmu.dewrote: ** +1 Cucumber seems to be great if

Re: [Haskell-cafe] Proposal: New syntax for Haskell

2013-09-12 Thread Brandon Allbery
On Thu, Sep 12, 2013 at 6:00 PM, David Thomas davidleotho...@gmail.comwrote: I've long been interested in a scripting language designed to be spoken. Not interested enough to go about making it happen... but the idea is fascinating and possibly useful.

Re: [Haskell-cafe] GLFW not working in Cabal 1.18

2013-09-12 Thread Albert Y. C. Lai
On 13-09-10 09:27 PM, Thiago Negri wrote: The package GLFW is not building in Cabal 1.18. Setup.hs [1] depends on `rawSystemStdInOut` [2] that changed signature between 1.16 and 1.18. Consider cabal install --cabal-lib-version=1.16. Replace 1.16 by the correct number. Use ghc-pkg list Cabal

Re: [Haskell-cafe] Proposal: New syntax for Haskell

2013-09-12 Thread Bob Ippolito
Have you tried AppleScript? I wouldn't say it's pleasant to use, but it's easy to read. On Thursday, September 12, 2013, David Thomas wrote: I've long been interested in a scripting language designed to be spoken. Not interested enough to go about making it happen... but the idea is

[Haskell-cafe] dns library version 1.0.0

2013-09-12 Thread 山本和彦
Hi all, I have released dns library version 1.0.0. This version provides new APIs. Thus, version is now 1.0.0. The design and implementation was done by Michael Orlitzky based on his experience. Enjoy! --Kazu ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Monomorphic containers, Functor/Foldable/Traversable WAS: mapM_ for bytestring

2013-09-12 Thread Mario Blažević
On 09/11/13 19:37, John Lato wrote: I didn't see this message and replied privately to Michael earlier, so I'm replicating my comments here. 1. Sooner or later I expect you'll want something like this: class LooseMap c el el' where lMap :: (el - el') - c el - c el' It covers the case of

Re: [Haskell-cafe] Bytestring map/zipWith rationale

2013-09-12 Thread Thomas DuBuisson
On Thu, Sep 12, 2013 at 12:44 PM, Nicolas Trangez nico...@incubaid.com wrote: I did use that a couple of times (`xor`ing 2 ByteStrings together), and was surprised by the omission back then, but IIRC (can't validate now), there's a specialised zipWith (as proposed) in the module (with some

[Haskell-cafe] Package compatibility (SemVer, PVP, ECT)

2013-09-12 Thread Thiago Negri
I've just read Semantic Versioning (SemVer) [1], Package Versioning Policy (PVP) [2] and Eternal Compatibility in Theory (ECT) [3]. Is PVP the one that every package on Hackage should use? SemVer seems to make more sense to me. Also, ECT looks very promising, but it is dated back to 2005 and I

Re: [Haskell-cafe] Monomorphic containers, Functor/Foldable/Traversable WAS: mapM_ for bytestring

2013-09-12 Thread Michael Snoyman
On Thu, Sep 12, 2013 at 2:37 AM, John Lato jwl...@gmail.com wrote: I didn't see this message and replied privately to Michael earlier, so I'm replicating my comments here. Sorry about that, I wrote to you privately first and then thought this might be a good discussion for the cafe. 1.

Re: [Haskell-cafe] Monomorphic containers, Functor/Foldable/Traversable WAS: mapM_ for bytestring

2013-09-12 Thread Michael Snoyman
On Fri, Sep 13, 2013 at 5:38 AM, Mario Blažević blama...@acanac.net wrote: On 09/11/13 19:37, John Lato wrote: I didn't see this message and replied privately to Michael earlier, so I'm replicating my comments here. 1. Sooner or later I expect you'll want something like this: class