News for hackers. Stuff that matters.
Re:TeaVM – Ahead-of-time transpiler of Java bytecode to Java... by billsix on Friday January 05, 2018 @01:00AM (#16076860)
That word,"Transpile". Lol. GCC transpiles C to assembly.
Re:TeaVM – Ahead-of-time transpiler of Java bytecode to Java... by PyComfy on Friday January 05, 2018 @05:57AM (#16077869)
I always understood it as this

Transpilation: text to text (eg: Scheme to C)

Compilation: anything to anything but usually it implies text to binary code

transpilation is compilation but compilation is not necessary transpilation (the all squares are rectangles but all rectangles ...)

Re:TeaVM – Ahead-of-time transpiler of Java bytecode to Java... by pjmlp on Friday January 05, 2018 @08:37AM (#16078427)
So classical UNIX C compilers are now transpilers, because they always did text to text (C to Assembly), before forking to the assembler.
Re:TeaVM – Ahead-of-time transpiler of Java bytecode to Java... by shakna on Friday January 05, 2018 @09:41AM (#16078809)
The first AIX C compiler called itself a "transcompiler" in it's manual, so yes, they are.
Re:TeaVM – Ahead-of-time transpiler of Java bytecode to Java... by pjmlp on Friday January 05, 2018 @12:26PM (#16079977)
Any digitalized version of it available online?
Re:TeaVM – Ahead-of-time transpiler of Java bytecode to Java... by shakna on Friday January 05, 2018 @03:19PM (#16081315)
Not that I know of.

But you can see the term of the day, "translator", here[0][1], and it isn't much of a leap to see how that evolved into translator-compiler, and then shortened itself.

[0] XLT86, 8080 to 8086 Translator http://www.s100computers.com/Software%20Folder/Assembler%20C...

[1] Pg. 47, Trans Z80 to 8086 Translator http://www.patersontech.com/dos/Docs/86_Dos_usr_03.pdf

Re:TeaVM – Ahead-of-time transpiler of Java bytecode to Java... by rusbus on Friday January 05, 2018 @01:10AM (#16076898)
I guess it implies a 1-1 or similar conversion without optimizations or multiple levels of intermediate representation. GCC certainly doesn't "transpile" in that case...
Re:TeaVM – Ahead-of-time transpiler of Java bytecode to Java... by tom_mellior on Friday January 05, 2018 @04:55AM (#16077657)
So GCC -O0 is a transpiler, but GCC -O3 is a compiler? Nice.
Re:TeaVM – Ahead-of-time transpiler of Java bytecode to Java... by kitd on Friday January 05, 2018 @08:34AM (#16078411)
You can think of it as "translate (but in the tool-chain role of a compiler)"
Re:TeaVM – Ahead-of-time transpiler of Java bytecode to Java... by abiox on Friday January 05, 2018 @02:16AM (#16077135)
it's not a new word. i find it odd how some people react to it.
Re:TeaVM – Ahead-of-time transpiler of Java bytecode to Java... by Al-Khwarizmi on Friday January 05, 2018 @03:22AM (#16077332)
Not new, but as unnecessary as ever.
Re:TeaVM – Ahead-of-time transpiler of Java bytecode to Java... by abiox on Friday January 05, 2018 @03:30AM (#16077358)
i find it fascinating how some in a community notoriously anal about 'being precise' want to be less precise, presumably because of some incorrect assumptions about a word.

is it because they think it's a neologism? is it because they associate it with javascript developers, who they look down upon and sneer at?

the word and idea predates javascript. rather amusing. :)

Re:TeaVM – Ahead-of-time transpiler of Java bytecode to Java... by Al-Khwarizmi on Friday January 05, 2018 @04:11AM (#16077490)
From a quick Google search, I find mainly two kinds of definitions of "transpile".

The first is a generic "translating from one source programming language to another, producing translated source code in the other language". This is basically compiling, except that it excludes "non-source" languages from the output.

The second, which looks more rigorous to me, is "taking source code written in one language and transforming into another language that has a similar level of abstraction" (found for example here: https://www.stevefenton.co.uk/2012/11/compiling-vs-transpili...).

Both are totally unnecessary because if you mention or know the source and target languages of your compiler, then you already know if it fits those definitions or not.

For example, "Transpile Java Bytecode to WebAssembly" adds exactly zero information to "Compile Java Bytecode to WebAssembly", because the word "transpile" only carries information about the relation between the languages you are processing and that is an already-known variable. As it is every time I see this word.

Re:TeaVM – Ahead-of-time transpiler of Java bytecode to Java... by elcritch on Friday January 05, 2018 @05:32AM (#16077791)
> The second, which looks more rigorous to me, is "taking source code written in one language and transforming into another language that has a similar level of abstraction" (found for example here: https://www.stevefenton.co.uk/2012/11/compiling-vs-transpili...).

> For example, “Transpile Java Bytecode to WebAssembly” adds exactly zero information to “Compile Java Bytecode to WebAssembly”

No, the point is that ‘transpile’ more narrowly defines the action being undertaken. While all transpiling is a form of compiling, the reverse is jot true. Specifically from the second definition you cited transpiling connotes that a similar level of abstraction is retained. Often this means that type level information is retained. It’s similar to the distinction of lossy vs lossless compression.

So yes, when I read “X is transpiled to Y” that infers that a certain level of abstraction is maintiained which is not necessarily the case. You can transpile say OCaml to JavaScript and use the garbage collection and native JS types or you can compile OCaml to a JavaScript using a subset of it such as ASM.js using byte arrays and loose type information in he target language. That’s different.

Re:TeaVM – Ahead-of-time transpiler of Java bytecode to Java... by pygy_ on Friday January 05, 2018 @04:27AM (#16077533)
It may not be semantically required, but redundancy adds emphasis and makes things easier to process.
Re:TeaVM – Ahead-of-time transpiler of Java bytecode to Java... by iotscale on Friday January 05, 2018 @03:52AM (#16077435)
An old colleague of mine hated the word "awesome" because, in his words, "it's a word js-kiddies use to exaggerate their little accomplishments".

Guess how he reacted when someone used the phrase "isomorphic js"...