packages feed

eros-http 0.5.0.0 → 0.6.0.0

raw patch · 3 files changed

+66/−5 lines, 3 filesdep ~aesondep ~eros

Dependency ranges changed: aeson, eros

Files

README.md view
@@ -47,3 +47,60 @@   "webmail": 0 } ```++The home page of PornHub yields this result:++```json+{+  "chat": 0,+  "conspiracy": 0,+  "drug-advocacy": 0,+  "forums": 0,+  "gambling": 0,+  "games": 0,+  "gore": 0,+  "id-theft": 0,+  "illegal-drugs": 0,+  "intolerance": 0,+  "legal-drugs": 0,+  "malware": 0,+  "music": 0,+  "news": 0,+  "nudism": 0,+  "peer2peer": 0,+  "personals": 0,+  "pornography": 8790,+  "proxies": 0,+  "secret-societies": 0,+  "self-labeling": 0,+  "sport": 0,+  "translation": 0,+  "upstream-filter": 0,+  "violence": 0,+  "warez-hacking": 0,+  "weapons": 0,+  "webmail": 0+}+```++This is the command I used++    curl www.pornhub.com | curl -d @- localhost:8000 | prettify.rb++This uses my+[JSON prettifier script](https://raw.githubusercontent.com/pharpend/dotfiles/master/bin/prettify.rb).++# Overflow bug+~~+There's a fundamental flaw in the algorithm where if it gets a lot of data with+a lot of flagged phrases, it takes a long time to calculate the result. The+server times out after 30 seconds. I haven't figured out how to get+multiprocessing, so this will remain a bug until I do.++This won't be a problem for typical usage, only if you try to send paragraphs of+dirty data in one string.++Typical usage is for SMS messages, which are at most 160 characters long.+~~++**Edit** - This bug was fixed in version 0.6.
eros-http.cabal view
@@ -2,11 +2,15 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                eros-http-version:             0.5.0.0+version:             0.6.0.0 synopsis:            JSON HTTP interface to Eros. description:            This is a small program that runs an HTTP server.-homepage:            https://eros.rockywestlabs.com/+  .+  Changelog+  .+  [0.6] Update to be compatible with Eros v.0.6+-- homepage:            https://eros.rockywestlabs.com/ license:             BSD3 license-file:        LICENSE author:              Peter Harpending@@ -24,11 +28,11 @@   other-modules:       Paths_eros_http   -- other-extensions:       build-depends:-      aeson           >=0.7   && <0.8+      aeson           >=0.8   && <0.9     , base            >=4.7   && <4.8     , blaze-html      >=0.7   && <0.8     , bytestring      >=0.10  && <0.11-    , eros            >=0.5.3 && <0.6+    , eros            >=0.6   && <0.7     , http-types      >=0.8   && <0.9     , markdown        >=0.1   && <0.2     , text            >=1.1   && <1.2@@ -41,3 +45,4 @@     -O2     -Wall     -fno-warn-orphans+    -threaded
src/Main.hs view
@@ -37,7 +37,6 @@         app req recieveResponse = recieveResponse =<< runRequest req phraseMaps readmeHtml     run 8000 app   where-     getListPair :: ErosList -> IO (ErosList, PhraseMap)     getListPair list = do       phraseMap <- readPhraseMap list