News for hackers. Stuff that matters.
Re:Why Is No One Writing Language Runtimes? by petercooper on Saturday May 07, 2016 @08:18PM (#11652015)
People have. type="text/vbscript" probably got the most use, but it was only ever in IE. The W3C was gungho on TCL at one point and text/tcl was used there - notably, the HTML 4.01 spec gives an example of setting text/tcl as the default with <META http-equiv="Content-Script-Type" content="text/tcl">

The problem is getting multiple browsers to agree, and no real standard has emerged there. Even if one did, you're either relying on browser creators to include a runtime, or you have to patch one in, Flash-style. I think Google was trying to do this with Dart but failed.

A modern workaround I've seen a few times is to write/compile an interpreter in JavaScript that looks for script tags with different types and runs them, but that leads to yet more JS bloat when loading pages.

Re:Why Is No One Writing Language Runtimes? by derefr on Saturday May 07, 2016 @09:01PM (#11652115)
> Even if one did, you're either relying on browser creators to include a runtime, or you have to patch one in, Flash-style.

This would actually be the perfect use-case for Google's Native Client, if other browsers would bother to support it.

The arguments against webapp authors writing their app in NaCl are probably valid. But those arguments don't apply to the case where the "apps" are run times, there are only a common ones floating around, and people pull them in by URL in order to script against them.

Interestingly, this would solve one additional pain-point: every script would have the particular ABI version of the runtime it was coded against "locked" into it, in the same sense as a Ruby/Node dependency-lock file. So the runtimes themselves could be in very heavy flux version-to-version, as long as they kept old ABI-lines around and patched with security-updates.