Nov 25, 2011 - Harmony Proxies: Tutorial

Comments

Update (July 2015): Proxies are now officially part of the recently released ECMAScript 2015 specification. This tutorial is still relevant, but dated. For up-to-date documentation, see e.g. Mozilla’s MDN page on proxies.

The Proxy API enables the creation of dynamic proxies in Javascript. Dynamic proxies are useful for writing generic object or function wrappers or for creating virtual object abstractions. To avoid any confusion: these proxies have nothing to do with web proxy servers.

Perhaps the most compelling use of proxies is the ability to create objects whose properties can be computed dynamically. Proxies encompass all use cases that one would use the SpiderMonkey hook noSuchMethod for (such as creating mock objects in testing frameworks, Rails ActiveRecord dynamic finder-like capabilities, etc.) but generalize to operations other than method invocation.

Read more

Jan 23, 2011 - Why Programming Languages?

Comments

When I present my research work on programming languages, people often ask me “why do you need a new programming language to solve this problem? Why not just implement it as a library?” Or, I get asked “why didn’t you implement it as an extension to {some existing language}?” In this essay I will try to make explicit some of the goals and motivations behind language design. They are formulated wholly from my own background in this area, so I might be missing some important ones I haven’t thought about.

Read more

Aug 23, 2010 - AmbientTalk at Emerging Languages Camp

Comments

Last July, I presented AmbientTalk at the first Emerging Languages Camp at O’Reilly’s OSCON in Portland. The talk was well received and AmbientTalk got some media coverage, among others an article in Technology Review Magazine and an article in Data News (in Dutch). Dean Wampler posted a good summary of all discussed languages (including AmbientTalk) on his blog. After the conference, I was interviewed for Microsoft’s Channel 9 together with Mark S. Miller, Jonathan Shapiro and Gilad Bracha. It’s a very impromptu interview, covering topics like static typing, mirror-based reflection and AmbientTalk’s interoperability with the JVM.

May 25, 2010 - Harmony Proxies in Firefox

Andreas Gal from Mozilla is implementing the Proxy API that I developed at Google in collaboration with Mark S. Miller. This API enables the creation of dynamic proxies that can intercept a variety of operations applied to Javascript objects. Proxies are currently available in the Firefox 3.7a pre-release and are scheduled to be included in the next Ecmascript standard. I am in the process of writing up a small tutorial to introduce this new feature. A draft specification of the feature for inclusion into ECMAScript harmony is available, and a Google Tech Talk that explains the rationale of our design. Javascript proxies were in part inspired by my earlier work on mirages in AmbientTalk.

Feb 22, 2010 - DCDP Workshops

I am organizer of the first Workshop on Decentralized Coordination of Distributed Processes (DCDP), to be held June 10th in conjunction with DisCoTec 2010 in Amsterdam, The Netherlands.