Live data from Hacker News

A graph of programming languages connected through compilers

akr.am

51–60 of 110 posts

Re: A graph of programming languages connected through compilers

#52
post #4

A few missing items: - CIL to C++ using CoreRT/AoT compiler [1] - JVM to CIL using ikvmc [2] - Quite a few languages to WebAssembly using LLVM [3] - J# if you are willing to include dead but somewhat significant languages [1] https://blogs.msdn.microsoft.com/alphageek/2016/10/13/native... [2] http://www.ikvm.net/userguide/ikvmc.html [3] https://stackoverflow.com/questions/43540878/what-languages-...

Also OCaml to OCaml bytecode via ocamlc to Javascript via js_of_ocaml.

Re: A graph of programming languages connected through compilers

#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

Re: A graph of programming languages connected through compilers

#56
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'.

Re: A graph of programming languages connected through compilers

#58
post #37

Wait.. wasm compiles to Java Bytecode?

Quite directly[0] :-) There's even an example using Rust regex on the JVM to get speedups in some cases [1].

0 - https://github.com/cretz/asmble 1 - https://github.com/cretz/asmble/tree/master/examples/rust-re...

Re: A graph of programming languages connected through compilers

#59
post #7
post #4

A few missing items: - CIL to C++ using CoreRT/AoT compiler [1] - JVM to CIL using ikvmc [2] - Quite a few languages to WebAssembly using LLVM [3] - J# if you are willing to include dead but somewhat significant languages [1] https://blogs.msdn.microsoft.com/alphageek/2016/10/13/native... [2] http://www.ikvm.net/userguide/ikvmc.html [3] https://stackoverflow.com/questions/43540878/what-languages-...

Isn't Python to C using CPython missing? Edit: Or I guess technically python byte code. [1] [1] http://effbot.org/zone/python-compile.htm

> Isn't Python to C using CPython missing?

Python doesn't compile Python to C, non-technically or otherwise. Where did you get that impression?

I presume they don't include internal IRs like Python bytecode, as it's not any kind of shared or standardised format. Otherwise you'd be including tons of different compiler IRs.

Re: A graph of programming languages connected through compilers

#60
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.

I think the quality of JavaScript as a language is completely irrelevant. It is because it's the only* language that runs in web browsers. So if you want your stuff to run there, you have to target JavaScript.

If WATFIV was the only language that ran in browsers, everything would target it, too.

Post reply on HN