Live data from Hacker News

A graph of programming languages connected through compilers

akr.am

61–70 of 110 posts

Re: A graph of programming languages connected through compilers

#67
post #55
post #51

My main takeaway: people want to avoid writing JavaScript about as much as they want to avoid writing machine code or Java bytecode.

Alternative takeaway: Javascript is so widely deployed that most languages have found a way to compile to it

Alternativev (joke) takeaway: Javascript is as important to computers as machine code

Re: A graph of programming languages connected through compilers

#69
post #63

I tried in vain to find WebAssembly. Why would you include JavaScript but not WebAssembly in a graph that has LLVM in it?

It does have WebAssembly, but its incorrectly labeled as targeting Java Bytecode.

> incorrectly labeled as targeting Java Bytecode

https://github.com/cretz/asmble

The name of that tool is even labelled in the graph!

Re: A graph of programming languages connected through compilers

#70
post #44

It says V8 compiles JavaScript to Machine Code, but is that really correct given that the machine code is an intermediate product, and the result of applying a JIT to a specialized piece of code (where part of the variables are already known to the compiler)?

> given that the machine code is an intermediate product The machine code isn't the intermediate product - it's the final product. Some internal IR is the intermediate product. But yes it's normal convention in the industry to talk about JIT compilation to machine code as 'compiling to machine code'.

But let's say, they added "decompilers" to the graph, and there is (say) a decompiler from machine code to C. Then I'd assume, because there is a path in the graph from JavaScript to C (going through machine code), that I can translate from JavaScript to C. Except this isn't true because V8 is a JIT, and doesn't output its internal representation.
Post reply on HN