HNHacker News
TopNewBestAskShowJobs

kgr

78 karma · joined April 30, 2015

submissionscomments
kgr··on Is Model-View-Controller dead on the front end?
Very well said, but MVC is from 1978, not 1988.
kgr··on Alan Kay has agreed to do an AMA today
Hi Alan,

In your paper "A Personal Computer for Children of All Ages", where you introduce the concept of the DynaBook, you explicitly say that the paper should be read as a work of science fiction. I understand that you're a big fan of science fiction. Do you draw any inspiration from science fiction when inventing the future?

Thanks,

Kevin

Related: I've given a talk on "What Computer Scientists can Learn From Science Fiction":

https://docs.google.com/presentation/d/1CaieHjx9j24UFXq0GwmC...

kgr··on Alan Kay has agreed to do an AMA today
https://github.com/foam-framework/foam/wiki

https://github.com/foam-framework/foam/wiki/How-FOAM-is-Diff...

https://github.com/foam-framework/foam/wiki/KeyConcepts

http://foam-framework.github.io/foam/

kgr··on Alan Kay has agreed to do an AMA today
In FOAM (the Feature-Oriented Active Modeler) we replace classes with Models, which are just collections of Axioms. There are pre-built Axiom types for standard things like methods and properties, but also for things like imports, exports, traits, listeners, topics, templates, actions, inner-models/classes, etc. Axioms are themselves modeled, so you can create new types as required. In the end, you still end up with a class, but it's defined/built with an extensible composition of objects rather than by a more limited and static class definition.

https://www.youtube.com/watch?v=S4LbUv5FsGQ

kgr··on The Strange Birth and Long Life of Unix (2011)
This video shows how Unix was mathematically more efficient than Multics, which goes a very long way at explaining its success and longevity:

https://www.youtube.com/watch?v=3Ea3pkTCYx4

kgr··on A Farewell to FRP
FOAM is also subscription based, but then builds FRP on top of it: https://www.youtube.com/watch?v=-fbq-_H6Lf4
kgr··on A Taste of JavaScript's New Parallel Primitives
I'm excited to see progress in the area of JS concurrency, but I'm not sure how useful this is going to be. It lets me share ArrayBuffers between workers, but all of my data is in the form of Objects, not primitive arrays.

One place where I would like to use this is for collision detection, like in this example: http://codepen.io/kgr/pen/GoeeQw

But I'm relying on objects with polymorphic intersects() methods to determine if they intersect with each other, and once I encode everything up as arrays, I lose the convenience and power of objects.

kgr··on The average size of Web pages is now the average size of a Doom install
Send “models” rather than code. Low-level code is relatively unexpressive, contains considerable redundancy, and as a result, is relatively large. By sending high-level models instead, which are then expanded on the client to working code, application download size can be greatly decreased. Models typically provide one to two orders of magnitude of compression over code.

This video shows how we do it: https://www.youtube.com/watch?v=S4LbUv5FsGQ

This document gives some results (like a GMail client that is 100X smaller): https://docs.google.com/a/google.com/document/d/1Kuw6_sMCKE7...

kgr··on Performance of ES6 features relative to ES5
Java optimizes try/catches.
kgr··on FOAM: New JavaScript Framework by Google Engineers
Video of the FOAM Empire.js presentation is now available at:

https://www.youtube.com/watch?v=n699DWb2TUs

kgr··on FOAM: New JavaScript Framework by Google Engineers
Sorry, that link is broken. Here's a working one:

https://docs.google.com/presentation/d/1Ipt0hu2PHDgL8HCxkZN2...

The first part of the slides is on using the apps and the second part has a bit about how we developed it (but without speaker notes, it may not make a lot of sense).

kgr··on FOAM: New JavaScript Framework by Google Engineers
FOAM is built by five Google engineers who are paid by Google to work on it full time. It is a Google "project" but not a Google "product".

I lead the FOAM team at Google.

kgr··on FOAM: New JavaScript Framework by Google Engineers
We have benchmarks (using queries extracted from real Google apps) that show that our query-optimizing caching layer speeds up IndexedDB performance by a factor of 100.

See: https://github.com/foam-framework/foam/blob/master/demos/pho...

Also, load the Empire.js presentation and then press the '+' button on the bottom right. This will load and run all 25 slides at once, at which point you'll have over 20k data-bindings, both one- and two-way, 7k objects, 6k of which are currently being animated.

See: http://foam-framework.github.io/foam/foam/index.html?model=f...

We are capable of handling this many data-bindings efficiently because we don't rely on a digest/diff cycle. Since we generate the JS prototypes from our models, we are able to install hooks into the generated property getters and setters so that we can receive update notifications.

Also notice that our GMail client can perform searches on the keystroke.

I lead the FOAM project at Google.

kgr··on FOAM: New JavaScript Framework by Google Engineers
If you load it off of the TodoMVC site, it loads much faster than the AngularJS version. If you load it from GitHub then it is slow because that isn't a packaged/built version (it's just loading directly from the repository) and is loading all of the individual models separately. We have a 'BuildApp' tool which can package applications for production, which doesn't happen when you load directly from GitHub.

FOAM doesn't require a build step, which is why it can be run directly out of the Git repository, but that method isn't representative of production performance.

kgr··on FOAM: New JavaScript Framework by Google Engineers
It was started in 2011, and can be used to target any language. It was first used to generate C++ and JS code in Chrome in early 2012. It is a Framework written in JS, not specifically a JS Framework.

I lead the FOAM project at Google.

kgr··on FOAM: New JavaScript Framework by Google Engineers
My name is Kevin Greer, and I lead the FOAM project at Google. Answers in-lined below:

> a mature app written this way

I've added links a number links to FOAM apps for you at the bottom of http://foamdev.com.

We have a number of mature apps. QuickBug, which is a codesite issue tracker, is about two years old. MBug is a mobile version, is about a year old. The ChromeOS calculator was written last summer as a demo but went into production just recently. There's also a rough but working GMail client. The Chrome App Builder is also in production, but, unlike the other apps, isn't open-sourced. We also have a couple very large internal Google apps that I can't talk about.

> project timeline FOAM was started in 2011, and generated its first production code, in C++ and JS for Chrome, in early 2012.

> war stories

Here's one: https://docs.google.com/presentation/d/139TUw8tLtqRzFSHGoLTQ...

I have several others as well, but I would need to scrub them before making them public.

← PreviousPage 2 of 2