Monday, December 11, 2006

Compiling Factor to JavaScript

Chris Double writes about compiling a subset of Factor to JavaScript. I'd like this to evolve into something which lets me write web apps which use client side JavaScript to manipulate the DOM and communicate with the server ("AJAX"), without having to write JavaScript by hand, or write code which constructs JavaScript code by concatenating strings. Instead, I want to write the whole web app in Factor, with some code running client side and some server side. Perhaps Chris Double's concurrency library can be used to communicate between Factor on the server and JavaScript Factor too.


Chris Double said...

That's something I'm considering doing. For the next update to the factor->javascript system I want to wrap the DOM and write the client side code on the web page in Factor to see how it works.

I already have concurrency working from client side javascript->factor server and vice versa using the concurrency library in non-released code - if I can get continuations working in the client side Factor I'll modify it to work with that too and release the code.

Slava Pestov said...

Sounds awesome.