News for hackers. Stuff that matters.
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.

[0]: http://www.inhabitedtype.com/

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).
Re:Introducing Incremental by pron on Saturday July 18, 2015 @01:43PM (#9908220)
We've made something very similar for Java/Clojure as part of Quasar: http://docs.paralleluniverse.co/quasar/#dataflow-reactive-pr...

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 an_ko on Saturday July 18, 2015 @02:42PM (#9908449)
Could we have a more informative title? "Incremental" means little without context.

Maybe just "Introducing Incremental: self-adjusting computations".

Re:Introducing Incremental by ScottBurson on Saturday July 18, 2015 @11:42PM (#9909977)
This sounds very similar to Kenny Tilton's Cells package for Common Lisp: https://github.com/kennytilton/cells

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.

Re:Introducing Incremental by silverlake on Saturday July 18, 2015 @03:06PM (#9908527)
Does this have any similarity to Goldman Sach's internal language called Slang/SecDB?
Re:Introducing Incremental by achamayou on Saturday July 18, 2015 @03:10PM (#9908545)
Yes, and to several other similar systems, it's another reactive 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 gaius on Saturday July 18, 2015 @03:44PM (#9908641)
Re:Introducing Incremental by infinite8s on Sunday July 19, 2015 @01:04PM (#9911833)
How is a reactive graph different to a complex event processor? Is it the difference of pull vs push?
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 gaius on Sunday July 19, 2015 @05:39AM (#9910612)
You've got it backwards. This concept long predates the existence of the web, let alone JS.
Re:Introducing Incremental by EvanYou on Sunday July 19, 2015 @08:54AM (#9911034)
I never implied which predates which. Read again.
Re:Introducing Incremental by makmanalp on Saturday July 18, 2015 @07:10PM (#9909351)
This reminds me a bit of Elasticsearch Percolate (https://www.elastic.co/guide/en/elasticsearch/reference/1.6/...) a little bit.
Re:Introducing Incremental by pvitz on Saturday July 18, 2015 @02:14PM (#9908346)
I would love to see an OCaml alternative to Prophet/MoSes using stuff like this...
Re:Introducing Incremental by loosescrews on Saturday July 18, 2015 @04:40PM (#9908824)
How is this different than lazy evaluation?
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 mercurial on Sunday July 19, 2015 @08:48AM (#9911015)
But this is possible to do trivially using a hash keyed by the input variables. It seems to me that SAC offers an interest only in the case where:

- 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.

Re:Introducing Incremental by loosescrews on Saturday July 18, 2015 @08:36PM (#9909561)
Doesn't Haskell already do this? What is the advantage of OCaml + Incremental over Haskell?
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 tome on Sunday July 19, 2015 @01:46AM (#9910174)
A better example might have been

    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.
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.
Re:Introducing Incremental by tomjen3 on Saturday July 18, 2015 @01:21PM (#9908147)
Am I the only who could can't find the RSS feed for that blog? Pretty strange for a tech blog to only allow subscriptions via email.
Re:Introducing Incremental by kilimchoi on Saturday July 18, 2015 @01:22PM (#9908151)
Re:Introducing Incremental by lifeisstillgood on Saturday July 18, 2015 @01:27PM (#9908164)
I had no idea RSS was still expected... (Not trolling just surprised)
Re:Introducing Incremental by hvs on Saturday July 18, 2015 @01:32PM (#9908183)
How else would you follow blogs? Do you visit 20+ blogs to see if they've been updated recently?
Re:Introducing Incremental by lifeisstillgood on Saturday July 18, 2015 @03:38PM (#9908625)
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 ytdht on Saturday July 18, 2015 @07:09PM (#9909348)
if everyone would think like you, almost nothing would end up on HN
Re:Introducing Incremental by peter_l_downs on Saturday July 18, 2015 @01:41PM (#9908214)
Not parent, but I visit about 6, yeah. What should I be using instead? Setting up RSS feeds seems like a pain.
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 berberous on Saturday July 18, 2015 @01:45PM (#9908235)
feedly.com is fantastic. Not sure what's painful about setting up an RSS feed. Just paste the URL in once.
Re:Introducing Incremental by branchless on Saturday July 18, 2015 @02:13PM (#9908343)
Agreed. A worthy successor to google reader.

Not having RSS is a pain. I follow blogs that update every couple of months. Do I want to keep checking? Hell no.

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.

It can be found at http://baruch.ev-en.org/proj/websec/

Re:Introducing Incremental by kilimchoi on Saturday July 18, 2015 @02:00PM (#9908294)
I created http://slicedham.co so that you can subscribe to multiple blogs on software dev. It pulls from the blogs listed here, https://github.com/kilimchoi/engineering-blogs
Re:Introducing Incremental by cblock811 on Saturday July 18, 2015 @06:05PM (#9909133)
Less noise than Feedly. I wish it had comments. You should add that :D
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.
Re:Introducing Incremental by coldtea on Sunday July 19, 2015 @08:18PM (#9913396)
The kind of pain you can be over with in 10 minutes, with minimal "click to add" moves...
Re:Introducing Incremental by nailer on Saturday July 18, 2015 @06:04PM (#9909125)
They'd have good content upvoted on a news aggregator.
Re:Introducing Incremental by coldcode on Saturday July 18, 2015 @02:38PM (#9908430)
In my blog I support RSS and twitter to give people a choice.
Re:Introducing Incremental by e12e on Saturday July 18, 2015 @05:41PM (#9909046)
From the source: <link rel="alternate" type="application/rss+xml" title="Jane Street Tech Blogs &raquo; Introducing Incremental Comments Feed" href="https://blogs.janestreet.com/introducing-incremental/feed/" />