Introducing Incremental
blogs.janestreet.com
blogs.janestreet.com
Have been thinking about using OCaml again for a new project - does anyone know the state of libraries for common web tasks, like AWS, these days?
If you're looking to try out OCaml, I'd say the time to do so is quickly approaching.
Yes, OCaml dev seems to be picking up again - I used to use OCaml/JoCaml a few years ago but moved to Haskell and F# in the meantime. However am very excited by the work on Flamba, multi-core and hopefully modular implicits, as OCaml always felt most natural.
Every Var keeps track of the inputs that affect its computed value, and has an associated continuation responsible for carrying out the computation whenever an input changes (which, in turns, triggers recomputations further down in the graph).
Maybe just "Introducing Incremental: self-adjusting computations".
I haven't had occasion to use Cells, but I'm glad to be reminded of it, as I may have a use for it soon.
Genetic algorithms are a different sort of thing, and I can see how "self adjusting computation" could be used to describe either.
func y = let z = y + y
in (add 1 z) * (add 1 z)
in `func` the result of computing `y + y` is shared because it has been given a name: `z`. However, the result of `add 1 z` is _not_ given a name and therefore has to be computed twice. Because Haskell is pure, they will result return the same result, however the result is not saved.This avoids needing to save the results of _all_ function calls.
Furthermore, Incremental isn't memoizing every function calls. It just keeps the intermediate results of the latest computation in memory, so that when the inputs change, it can determine exactly which subresults need a recomputation, and which can be reused. It's like Excel, but with dynamic dependencies.
(But yes, Haskell definitively does not do this. You could say that Haskell is about doing the least amount of work to compute something fresh, while Incremental is about working the least to recompute something we (almost) already computed just before.)
func (f (add 1 z), f (add z 1))
Since f is not memoized it will be evaluated once for each component of the tuple.- the input variables of the DAG are updated at a different rate
- and the result of complex subgraphs depend on only a few of these variables (and thus avoiding to recompute their result is a win)
I don't know if it's enough to get excited about.
Not having RSS is a pain. I follow blogs that update every couple of months. Do I want to keep checking? Hell no.
It's a program I inherited after it was abandoned and did some maintenance on so I'm biased, I haven't updated it for a long while now and for a time even wrote a python alternative since I actually dislike Perl.
It can be found at http://baruch.ev-en.org/proj/websec/
What seems painful about it for you? IMHO handling feeds is only painful if you have/want to switch readers or if you want to browse old archives. Other than that, you just drop a blog URL in your reader and it gets you the updates.
Possibly I see my inbox as an RSS feed (I subscribe, you send me mails)