|
|
|
|
|
by tmorgan
5459 days ago
|
|
Yes, the argument presented for point one is pretty weak, but I do agree with it. Having the lazy I/O, and especially lazy bytestring option is great IMO. Although Oleg style left-fold enumerators as used by warp are superior in many respects, typically as a user you don't need to interact at that level; iirc you don't in Yesod, which is built on warp. As an example of approachability LBS approach, checkout this two line "wc -l" implementation, which beats "wc -l" by 64x, apples and pears no doubt, but shows fast enough,(from http://www.mail-archive.com/haskell@haskell.org/msg18878.htm...): > import qualified Data.ByteString.Lazy.Char8 as L > main = L.getContents >>= print . L.count '\n' edit: actually it beats "wc", and is roughly same speed as "wc -l". |
|