New patches: [unrevert anonymous**20070124215444] < > { hunk ./HPaste.hs 187 handleDefault :: Monad m => () -> Request -> PasteM m handleDefault () rq = do let offset = readDefault 0 $ lookS 6 rq "offset" - (entries,rest) <- liftM (splitAt 25 . drop (25 * offset)) $ gets allEntries - let moreEntries = not . null $ rest + firstIx = offset * 25 + lastIx = (offset + 1) * 25 - 1 + entries <- liftM (zip [lastIx, lastIx-1 .. firstIx]) $ + gets $ allEntries (offset * 25) 25 + let moreEntries = True now <- getTime (liftM . liftM . liftM $ setHeader "Cache-Control" "no-cache") $ ok html (val (listEntriesPage entries now offset moreEntries)) () () hunk ./PasteState.hs 127 currentId :: PasteState -> Int currentId (PasteState s) = fromIntegral $ S.length s -allEntries :: PasteState -> [(Int, [Entry])] -allEntries (PasteState s) = Prelude.reverse $ Prelude.zip [0..] $ F.toList s +allEntries :: Int -> Int -> PasteState -> [[Entry]] +allEntries i j (PasteState s) = F.toList $ S.take j $ S.drop i $ S.reverse s getEntries :: Int -> PasteState -> [Entry] getEntries n (PasteState s) = S.index s n } Context: [Complete the sequence transition and fix up the tabs emertens@gmail.com**20070124213534] [Switch to sequence emertens@gmail.com**20070124212405] [update Map operations emertens@gmail.com**20070124202740] [cosmetics emertens@gmail.com**20070124203443] [code scrubing and bikeshed painting and new encodeFPS emertens@gmail.com**20070124192953] [change diff to have link and use "new" "old" terms emertens@gmail.com**20070124072853] [CSS scrub, Safari fix, URL change emertens@gmail.com**20070124070646] [merge fixes for the previous wibble emertens@gmail.com**20070124043226] [irc bot scrubbing (added !msg !say) emertens@gmail.com**20070124043044] [wibble Don Stewart **20070124031421] [add readme Don Stewart **20070124025945] [disable threaded flag emertens@gmail.com**20070124033323 this flag caused the memory usage to baloon and it cause the application to crash ] [pager support for the front page emertens@gmail.com**20070124033257] [merge the previous patch in emertens@gmail.com**20070124023313] [Build without any extensions! Don Stewart **20070124022350] [Add a type decl to wrapMaxAge emertens@gmail.com**20070124022146] [disable -Werror for now... Don Stewart **20070124014046] [Enable -Werror, makes warnings fatal Don Stewart **20070124013545] [and make PasteBot.hs -Wall clean Don Stewart **20070124013536] [Make HPaste.hs -Wall clean Don Stewart **20070124013112] [improve code generated by ghc on DiffHTml, unbox those bytestrings Don Stewart **20070124005619] [use bang patterns Don Stewart **20070124005605] [hide the on-the-fly decompression inside PasteState. dont' expose it Don Stewart **20070124005535] [Make DiffHtml -Wall clean Don Stewart **20070124003913] [note on how to migrate uncompressed content to compressed form Don Stewart **20070124003235] [Add a (currently not enabled) signal handling framework Don Stewart **20070124003120] [tidy hpaste.caba Don Stewart **20070124003101] [license for pastebot Don Stewart **20070124002952] [Leave content strings compressed until they're needed Don Stewart **20070123225748] [add a max-age header to static content emertens@gmail.com**20070123223643] [gzip and binary pack the state Don Stewart **20070123221107] [add 'recent' link to recent page Don Stewart **20070123211638] [fmt Don Stewart **20070123211625] [compile with -DLOCAL to get a local-only hpaste Don Stewart **20070123210934] [correct spacing on diff title labels emertens@gmail.com**20070123211716] [Corrections for XHTML 1.0 Strict validation emertens@gmail.com**20070123184026] [perform lcs in one pass emertens@gmail.com**20070123161914] [add links to whole rows in list page sanzhiyan@gmail.com**20070123132314] [use hpaste.org emertens@gmail.com**20070123155619] [fix