Live data from Hacker News

Towards a JavaScript Binary AST

yoric.github.io

1–10 of 211 posts

Re: Towards a JavaScript Binary AST

#3
> By design, however, wasm is limited to native code, so it doesn’t work with JavaScript out of the box.

By design of the first MVP iteration.

http://webassembly.org/roadmap/ and http://webassembly.org/docs/future-features/

GC (which is the main major feature required for JavaScript) is in progress, https://github.com/WebAssembly/design/issues/1079

So, your article is FUD in it's purest undistilled form.

Re: Towards a JavaScript Binary AST

#4
This is some amazing progress, but reading this and hearing how difficult JavaScript is as a language to design around makes me wonder how many hours have we spent optimizing a language designed in 2 weeks and living with those consequences. I wish we could version our JavaScript within a tag somehow so we could slowly deprecate code. I guess that would mean though browsers would have to support two languages that would suck..... this really is unfortunately the path of least resistance.

(I understand I could use elm, cjs, emscriptem or any other transpirer but I was thinking of ours spent around improving the js vm.

Re: Towards a JavaScript Binary AST

#5
post #3

> By design, however, wasm is limited to native code, so it doesn’t work with JavaScript out of the box. By design of the first MVP iteration. http://webassembly.org/roadmap/ and http://webassembly.org/docs/future-features/ GC (which is the main major feature required for JavaScript) is in progress , https://github.com/WebAssembly/design/issues/1079 So, your article is FUD in it's purest undistilled form.

> So, your article is FUD in it's purest undistilled form.

The article is just reiterating an argument that Mozilla and Facebook made. If you’re saying Mozilla and Facebook are spreading Fear Uncertainty and Doubt with their proposal for a binary JS AST, then you may do so, but please realize that they probably had good reasons to start such a project.

EDIT: Even though I disagree with the parent, it is making some good points (specifically, that WebASM is going to add a GC), so flagging it to death doesn’t seem to be the right thing to do.

Re: Towards a JavaScript Binary AST

#6
So, compiled Javascript then? "We meet again, at last. The circle is now complete."

The more I see interpreted languages being compiled for speed purposes, and compiled languages being interpreted for ease-of-use purposes, desktop applications becoming subscription web applications (remember mainframe programs? ), and then web applications becoming desktop applications (electron) the more I realize that computing is closer to clothing fads than anything else. Can't wait to pickup some bellbottoms at my local target.

Re: Towards a JavaScript Binary AST

#8
post #6

So, compiled Javascript then? "We meet again, at last. The circle is now complete." The more I see interpreted languages being compiled for speed purposes, and compiled languages being interpreted for ease-of-use purposes, desktop applications becoming subscription web applications (remember mainframe programs? ), and then web applications becoming desktop applications (electron) the more I realize that computing is…

Well, it's more "compressed JavaScript" than "compiled JavaScript".

Re: Towards a JavaScript Binary AST

#9
post #3

> By design, however, wasm is limited to native code, so it doesn’t work with JavaScript out of the box. By design of the first MVP iteration. http://webassembly.org/roadmap/ and http://webassembly.org/docs/future-features/ GC (which is the main major feature required for JavaScript) is in progress , https://github.com/WebAssembly/design/issues/1079 So, your article is FUD in it's purest undistilled form.

I haven't tracked WASM closely, so this is an honest question.

Are you saying this comment is false?

> I am not aware of any project that achieves compilation of JavaScript to wasm

I.e., Javascript to WASM is on the roadmap and something we can use in the next few years? Or am I misunderstanding the situation?

Re: Towards a JavaScript Binary AST

#10

I feel like this may become some kind of reimplementation of Java's byte code. We already have a "write once, run anywhere" system. Good luck!

Not really. The reimplementation of something like Java's bytecode is Wasm. This one is more of a compression format than a bytecode.
Post reply on HN