Proposal: Add NFData instances for strict and lazy ByteStrings
 
            While I was hunting for a space leak in the new hackage-server (still haven't found it) I noticed strict and lazy ByteStrings don't have NFData instances. I propose to add them because it enables users to force ByteStrings in the principled way (using deepseq) so they don't need to use tricks like: B.length b `seq` ... instance NFData Strict.ByteString instance NFData Lazy.ByteString where rnf Empty = () rnf (Chunk _ b) = rnf b Note that the containers dependency of deepseq was recently dropped so depending on that package is not a big issue anymore. Discussion deadline: 2 weeks from now (9 November) Bas
 
            Attached is an additional patch that fixes the currently broken test-suite and gets rid of some warnings.
 
            +1
On Wed, Oct 26, 2011 at 12:45 PM, Bas van Dijk 
Attached is an additional patch that fixes the currently broken test-suite and gets rid of some warnings.
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries
 
            +1
On Wed, Oct 26, 2011 at 6:36 PM, Johan Tibell 
+1
On Wed, Oct 26, 2011 at 12:45 PM, Bas van Dijk
wrote: Attached is an additional patch that fixes the currently broken test-suite and gets rid of some warnings.
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries
-- Felipe.
 
            +1
On 27 October 2011 07:59, Felipe Almeida Lessa 
+1
On Wed, Oct 26, 2011 at 6:36 PM, Johan Tibell
wrote: +1
On Wed, Oct 26, 2011 at 12:45 PM, Bas van Dijk
wrote: Attached is an additional patch that fixes the currently broken test-suite and gets rid of some warnings.
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries
-- Felipe.
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com
 
            +1
Sent from my iPad
On Oct 26, 2011, at 5:28 PM, Ivan Lazar Miljenovic 
+1
On 27 October 2011 07:59, Felipe Almeida Lessa
wrote: +1
On Wed, Oct 26, 2011 at 6:36 PM, Johan Tibell
wrote: +1
On Wed, Oct 26, 2011 at 12:45 PM, Bas van Dijk
wrote: Attached is an additional patch that fixes the currently broken test-suite and gets rid of some warnings.
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries
-- Felipe.
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries
 
            +1.
On Thu, Oct 27, 2011 at 7:42 PM, Edward Kmett 
+1
Sent from my iPad
On Oct 26, 2011, at 5:28 PM, Ivan Lazar Miljenovic
wrote: +1
On 27 October 2011 07:59, Felipe Almeida Lessa
wrote: +1
On Wed, Oct 26, 2011 at 6:36 PM, Johan Tibell
wrote: +1
On Wed, Oct 26, 2011 at 12:45 PM, Bas van Dijk
wrote: Attached is an additional patch that fixes the currently broken test-suite and gets rid of some warnings.
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries
-- Felipe.
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries
-- 
Gregory Collins 
 
            +1 Excerpts from Bas van Dijk's message of Wed Oct 26 15:34:32 -0400 2011:
While I was hunting for a space leak in the new hackage-server (still haven't found it) I noticed strict and lazy ByteStrings don't have NFData instances. I propose to add them because it enables users to force ByteStrings in the principled way (using deepseq) so they don't need to use tricks like: B.length b `seq` ...
instance NFData Strict.ByteString
instance NFData Lazy.ByteString where rnf Empty = () rnf (Chunk _ b) = rnf b
Note that the containers dependency of deepseq was recently dropped so depending on that package is not a big issue anymore.
Discussion deadline: 2 weeks from now (9 November)
Bas
 
            On 26 October 2011 21:34, Bas van Dijk 
While I was hunting for a space leak in the new hackage-server (still haven't found it) I noticed strict and lazy ByteStrings don't have NFData instances. I propose to add them because it enables users to force ByteStrings in the principled way (using deepseq) so they don't need to use tricks like: B.length b `seq` ...
instance NFData Strict.ByteString
instance NFData Lazy.ByteString where rnf Empty = () rnf (Chunk _ b) = rnf b
Note that the containers dependency of deepseq was recently dropped so depending on that package is not a big issue anymore.
Discussion deadline: 2 weeks from now (9 November)
Bas
Because of the upcoming ghc-7.4 release I went ahead and created a ticket. Although the discussion period is not officially over there was overwhelming support and not a single objection was made. http://hackage.haskell.org/trac/ghc/ticket/5601 I just realized that bytestring is not maintained by libraries@haskell.org but by Don and Duncan. Are you guys ok with this change? Cheers, Bas
participants (9)
- 
                 Bas van Dijk Bas van Dijk
- 
                 Edward Kmett Edward Kmett
- 
                 Edward Z. Yang Edward Z. Yang
- 
                 Felipe Almeida Lessa Felipe Almeida Lessa
- 
                 Gregory Collins Gregory Collins
- 
                 Herbert Valerio Riedel Herbert Valerio Riedel
- 
                 Ivan Lazar Miljenovic Ivan Lazar Miljenovic
- 
                 Johan Tibell Johan Tibell
- 
                 Vincent Hanquez Vincent Hanquez
 
            