Live data from Hacker News

A graph of programming languages connected through compilers

akr.am

101–110 of 110 posts

Re: A graph of programming languages connected through compilers

#101
post #42
post #3

Nice visualization, it can be improved though. There are Java compilers directly to native code though, the Oracle JVM isn't the only path.

> There are Java compilers directly to native code though Dude, if there was some kind of wiki documenting HN lore, there would have to be a page on you drilling this fact into our skulls for years on end! :) https://hn.algolia.com/?query=java%20native%20pjmlp&sort=byP...

Well, if some devs would bother to learn how to use their tooling properly instead of keeping urban myths alive, that wouldn't be needed. :)

Re: A graph of programming languages connected through compilers

#102

Kudos to the first person to get one of these working right for anything beyond Hello World: JavaScript -> Js2Py -> PyPy -> Machine Code JavaScript -> Js2Py -> CIL -> LLVM IR (-> Machine Code) JavaScript -> Js2Py -> Pythran -> C++ -> LLVM IR/Machine Code That's got to look like spaghetti by the end, no?

I guess that PyPy could directly compile only RPython (subset of Python) so it could be a bit of hassle to get proper code :)

Re: A graph of programming languages connected through compilers

#103
post #95
post #26

44 languages 42 languages compile to Machine Code Wait, what? There are 2 languages that don't compile to Machine Code? Which ones are those, and how is it even possible?

Java compiles to a bytecode which is not machine code. Once bytecode is executed on target platform runtime, it is then compiled down to machine code. But there's more to it than that. The bytecode is actually interpreted at first by the JVM runtime. The code is also continuously dynamically profiled. There are two compilers C1 and C2. Whatever functions are using the most cpu time get compiled using C1. C1 rapidly c…

This is when describing how the Hotspot JVM would execute a Java application.

There are other ways to execute Java applications.

Re: A graph of programming languages connected through compilers

#104
post #103
post #95

Earlier quoted context omitted.

Java compiles to a bytecode which is not machine code. Once bytecode is executed on target platform runtime, it is then compiled down to machine code. But there's more to it than that. The bytecode is actually interpreted at first by the JVM runtime. The code is also continuously dynamically profiled. There are two compilers C1 and C2. Whatever functions are using the most cpu time get compiled using C1. C1 rapidly c…

This is when describing how the Hotspot JVM would execute a Java application. There are other ways to execute Java applications.

That is true.

Re: A graph of programming languages connected through compilers

#105
post #7

Earlier quoted context omitted.

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.

I thought it maps your code to the base Py_Object like how writing an extension works? Idk only done a little bit of that and need to dive into the process more. On my todo list so if you have some links that have a good explanation of this that would be great. Unfortunately was unable to take compilers in school so missed out on the conceptual aspect of the compilation process.

edit: found the docs on python.org for the compiler [1]

[1] https://devguide.python.org/compiler/

Re: A graph of programming languages connected through compilers

#106

Earlier quoted context omitted.

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

I thought it maps your code to the base Py_Object like how writing an extension works? Idk only done a little bit of that and need to dive into the process more. On my todo list so if you have some links that have a good explanation of this that would be great. Unfortunately was unable to take compilers in school so missed out on the conceptual aspect of the compilation process. edit: found the docs on python.org for…

Yeah it doesn’t compile it into C though.

You may be thinking of Cython, which compiles a language similar to Python, but not quite Python, into C using the Python C extension interface.

Re: A graph of programming languages connected through compilers

#107
post #93

I can finally fulfill my dream of writing cross-platform C++ by transpiling for the JVM. It's just too bad I have to convert from LLVM to JS to Python first. And then I could convert back to C++ and start over again... Neat visualization! I wonder how large it could get if people could add their own nodes and edges.

> writing cross-platform C++

I think you are looking for WASM and it is doable today. WASM can target the JVM.

Re: A graph of programming languages connected through compilers

#109
post #55

Earlier quoted context omitted.

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

Alternative non-joke: JavaScript is important to the web, just like machine code is important to computers. Actually, many believed JavaScript was the assembly of the web (just attempt to read the minimized scripts running in your browser), until WebAssembly...

* https://www.hanselman.com/blog/JavaScriptIsAssemblyLanguageF...

Post reply on HN