W3C home > Mailing lists > Public > public-html@w3.org > June 2015

Re: Proposed split of the HTML specification

From: Sam Ruby <rubys@intertwingly.net>
Date: Thu, 25 Jun 2015 07:51:51 -0400
Message-ID: <558BEB57.8050102@intertwingly.net>
To: public-html@w3.org
On 06/24/2015 07:25 AM, Sam Ruby wrote:
> I'll also try to clean up my code and post it.  It currently is written
> entirely in Ruby (even the JavaScript is generated).  Once it
> stabilizes, it can either be left as is, or converted entirely to
> node.js.  (Before you vote for that option, wait until you see the Ruby
> source, it truly is more maintainable than the generated code, even
> though I took great pains to make the generated code look as if it were
> hand authored).

Code posted here:

Build instructions:

Live on github.io:

Source for the generated JavaScript:

Generated JavaScript:

Commentary on the generation:

1) The differences in the fetch function are negligible.  Basically, 
everything you can do in JS can be done with Ruby syntax.

2) The differences in the componentDidMount method are marginal.  Some 
of this will be improved in JavaScript once ES6 lands.

3) The differences in the render method are substantial.

4) Ruby2JS can also produce sourceMaps, which means that stack 
tracebacks and showing code in the browser's WebConsole will be based on 
the original source.

- Sam Ruby

> - Sam Ruby
Received on Thursday, 25 June 2015 11:52:19 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:46:13 UTC