Re:Introducing Incremental
by mands on Saturday July 18, 2015 @01:32PM
(#9908184)
Looks like really cool tech - at a first glance reminds me of the UI.Next reactive rendering model in WebSharper/F# (http://www.websharper.com/docs/ui.next) which also has an OCaml/ML heritage.
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?
Re:Introducing Incremental
by seliopou on Saturday July 18, 2015 @01:48PM
(#9908247)
I've been using OCaml to build a language and runtime system for cloud orchestration[0]. As part of that, I've developed an AWS library whose code is generated from the service descriptions published by boto. It will be open-sourced at some point in the future, along with a few other things that should make developing web stacks using OCaml much easier.
If you're looking to try out OCaml, I'd say the time to do so is quickly approaching.
Re:Introducing Incremental
by mands on Saturday July 18, 2015 @04:32PM
(#9908794)
Great to hear, sounds like an fascinating project and look forward to trying out the AWS library. Funnily enough the project I considered using OCaml for was to build a language & runtime for container orchestration.
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.
Re:Introducing Incremental
by rubiquity on Saturday July 18, 2015 @11:52PM
(#9909998)
I've been learning OCaml lately and I can't help but wonder (aside from the fact that it's an ML lang) why OCaml didn't capture the infrastructure tooling space and Go did. OCaml is so much fun to write, easy to reason about and has pretty good TLS/SSH libraries. Here's to hoping OCaml grows more!
Re:Introducing Incremental
by mercurial on Sunday July 19, 2015 @02:35AM
(#9910235)
Nobody ever accused OCaml of having good marketing and sexy websites (at least before ocaml.org). And for a long time, tooling was second fiddle (for instance, the existence of a package manager is a somewhat recent addition, and the least said about the standard library, the better).
Re:Introducing Incremental
by gaius on Sunday July 19, 2015 @05:37AM
(#9910607)
Jane Street Core has to all intents and purposes solved the standard library problem. I admit I had my doubts in the past which one of Batteries or Core would be the "winner" so avoided them both and stuck with the default standard lib, but I think anyone starting a project today should start it on Core.
Re:Introducing Incremental
by mercurial on Sunday July 19, 2015 @08:33AM
(#9910977)
This may get better with the latest OCaml, but Core-powered binaries are ginormous. And AFAIK, Core doesn't work with js_of_ocaml (and I'm not sure if it works on Windows at all).
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).
Re:Introducing Incremental
by taion on Saturday July 18, 2015 @03:27PM
(#9908595)
One distinction is that Goldman's SecDb graph is really optimized around offline derivative pricing and risk calculations, which has always been one of the core strengths of Goldman's quant platform. There is a slight distinction between reactive graphs used for those approaches v. those that are more targeted toward real-time online applications.
Re:Introducing Incremental
by achamayou on Saturday July 18, 2015 @06:56PM
(#9909311)
In the implementation yes, minimizing single-event latency and maximizing batch throughput are largely mutually incompatible. But from a user/API standpoint, there's little difference.
Re:Introducing Incremental
by hellofunk on Saturday July 18, 2015 @04:21PM
(#9908759)
What is the difference between a "self adjusting computation" and a "genetic algorithm," or is it merely a choice of terminology? Here is a scholarly article that uses both in the same title: http://link.springer.com/chapter/10.1007%2F978-3-540-87734-9...
Re:Introducing Incremental
by AaronFriel on Saturday July 18, 2015 @04:40PM
(#9908825)
It looks like a self-adjusting computation, in the sense that Jane Street and the paper they refer to uses, is similar to functional reactive programming. It looks like you can create observable values, and create observable computations on those values. The dependency graph is dynamic, which it appears is the improvement here over other FRP designs?
Genetic algorithms are a different sort of thing, and I can see how "self adjusting computation" could be used to describe either.
Re:Introducing Incremental
by seanmcdirmid on Saturday July 18, 2015 @05:33PM
(#9909009)
Functional reactive programming is not usually incremental, while self adjusting computations are not usually reactive, which is why there isn't much overlap between the concepts. Of course, you are free to mix concepts from both as you need to.
Re:Introducing Incremental
by EvanYou on Saturday July 18, 2015 @08:56PM
(#9909613)
I'm not familiar with OCaml, but this looks very similar to the reactivity model used inside web front-end libraries like Knockout, Vue.js - in which each "binding" in the template is essentially a self-adjusting computation that updates the DOM. In addition, the Tracker library in Meteor enables similar dependency-tracking computations across the entire stack. It's interesting to see this type of reactivity model used in different contexts.
Re:Introducing Incremental
by hebdo on Saturday July 18, 2015 @08:17PM
(#9909518)
Quite different. To achieve the effects of "Incremental" you would need lazy evaluation coupled with a caching layer, so that successive calls to pure functions with same arguments are not re-computed. This optimization technique is in a sense similar to Common Subexpression Elimination.
Re:Introducing Incremental
by jmct on Saturday July 18, 2015 @09:43PM
(#9909707)
Haskell does not do this. Haskell is lazy (computed results are shared), but Haskell does not memoize by default. To illustrate:
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.
Re:Introducing Incremental
by art-w on Sunday July 19, 2015 @12:20AM
(#9910037)
That's a bad example, since GHC will perform common expressions elimination, which effectively give the same name to the two `add 1 z` (unless you specifically ask it not to, with `-O0`.)
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.)
Re:Introducing Incremental
by mercurial on Saturday July 18, 2015 @06:58PM
(#9909318)
Actually, that's an interesting question. Having built similar systems before, the main reason why you would not simply run a function every time your input is updated is that you often need for your computations to keep a certain amount of state, which may depend on the input. However, as Incremental does not seem to support much in the way of stateful computations, I'm a bit puzzled wrt to what problem it addresses.
to be honest, and it's not a defensible position now that I write it out loud, but I wait for your blog post to get to HN. I have not yet found people whose writing I find compelling enough and do not either mail me or end up on HN.
Possibly I see my inbox as an RSS feed (I subscribe, you send me mails)
Re:Introducing Incremental
by detaro on Saturday July 18, 2015 @01:47PM
(#9908242)
> Setting up RSS feeds seems like a pain.
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.
Re:Introducing Incremental
by baruch on Sunday July 19, 2015 @04:59AM
(#9910535)
I use websec for a few such blogs, it emails me the content and even highlights the changed parts in the page.
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.
Re:Introducing Incremental
by rakoo on Saturday July 18, 2015 @02:05PM
(#9908313)
You can use Firefox's Live Bookmarks, which get updated every time you open the bookmark. To add an RSS feed, just go the feed page and take a look at what's on top of the page, it should be easy to understand.
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.
[0]: http://www.inhabitedtype.com/
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.
- 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.
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.)
Possibly I see my inbox as an RSS feed (I subscribe, you send me mails)
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.
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/