News for hackers. Stuff that matters.
Re:IncPy: Automatic memoization for Python by newtonapple on Friday February 11, 2011 @02:54PM (#2207873)
I have a question. How does IncPy keep track of data dependency coming from IO layer e.g. sockets. Say I want to write a simple web crawler. The function crawls a website, spits out the HTML in raw string, sleeps for 5 seconds and then crawls the site again. Will IncPy not memoize the function at all, knows that the data coming from the network layer has not changed and return the memoized string immediately, and/or smart enough to detect when input (the website) has changed and expires the cache automatically?
Re:IncPy: Automatic memoization for Python by ippisl on Friday February 11, 2011 @04:53PM (#2208311)
incPy need checks the functions it caches to be pure and determinstic. determinstic function is a function that when given the same input , always returns the same output. incPy tests for a few options of non-determinism , and will allow in the future to define non determinstic sources in a config file.