Whalesong: running racket in the browser

  • Authors:
  • Danny Yoo;Shriram Krishnamurthi

  • Affiliations:
  • WPI, University of Utah, none, RI, USA;Brown University, Providence, RI, USA

  • Venue:
  • Proceedings of the 9th symposium on Dynamic languages
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

JavaScript is the language of the ubiquitous Web, but it only poorly supports event-driven functional programs due to its single-threaded, asynchronous nature and lack of rich control flow operators. We present Whalesong, a compiler from Racket that generates JavaScript code that masks these problems. We discuss the implementation strategy using delimited continuations, an interface to the DOM, and an FFI for adapting JavaScript libraries to add new platform-dependent reactive features. In the process, we also describe extensions to Racket's functional event-driven programming model. We also briefly discuss the implementation details.