
11 Dec
2006
11 Dec
'06
6:32 a.m.
Lyle Kopnicky wrote:
The code below is using way more RAM than it should. It seems to only take so long when I build the 'programs' list - the actual reading/parsing is fast. For a 5MB input file, it's using 50MB of RAM! Any idea how to combat this?
(ethereal voice) ... Children of Amaunator ... heed my words ... in no long, the world ... will perish, will ... crumble under the blackened forces of IO ... but there is ... hope ... i can feel that ... ensure :: (a -> Bool) -> String -> a -> a ensure b s x = if b x then x else error s ... or switching to ... monadic parser combinators ... like Text.ParserCombinators.Parsec ... can hold strong the light for ... another aeon or two ... Regards, afpelmus