News for hackers. Stuff that matters.
Re:Towards a JavaScript Binary AST by dblohm7 on Friday August 18, 2017 @01:47PM (#15048239)
Posting this in the hope that it might help some people grok what they are actually doing:

When I first discovered what Yoric and syg were doing, the first thing that I thought of was old-school Visual Basic. IIRC when you saved your source code from the VB IDE, the saved file was not text: it was a binary AST.

When you reopened the file in the VB6 IDE, the code was restored to text exactly the way that you had originally written it.

Re:Towards a JavaScript Binary AST by Yoric on Friday August 18, 2017 @02:04PM (#15048403)
Interesting. Do you know of any technical documentation on the topic?
Re:Towards a JavaScript Binary AST by meredydd on Friday August 18, 2017 @02:44PM (#15048703)
The parent might have been thinking of QuickBasic, which saved programs as byte-code, along with formatting information to turn it back into text: http://www.qb64.net/wiki/index.php/Tokenized_Code

VB6 projects were actually a textual format - even the widget layout: https://msdn.microsoft.com/en-us/library/aa241723(v=vs.60).a...

As someone who runs a WYSIWYG app builder startup (https://anvil.works), I can attest that this is a Really Good Idea for debugging your IDE.

Re:Towards a JavaScript Binary AST by iainmerrick on Friday August 18, 2017 @03:41PM (#15049132)
BBC Basic did this too -- keywords were stored as single bytes (using the 128-255 values unused by ASCII). Apart from that the program code wasn't compiled, it just was interpreted directly. Very smart design when everything had to fit in 32KB of RAM.