Live data from Hacker News

TeaVM – Ahead-of-time transpiler of Java bytecode to JavaScript or WebAssembly

teavm.org

101–110 of 136 posts

Re: TeaVM – Ahead-of-time transpiler of Java bytecode to JavaScript or WebAssembly

#101
post #73
post #66

I think, by now "transpile" just means "compile, but in web development". Because, as we all know, web development you never compile things... /s

Compilation is for old people writing old programs that run on old things called "computers". We're fresh and new and iterating quickly on our MVP, so we don't have time to wait for long compilation time. Instead we transpile our code and run it in a serverless environment, a docker container or a browser.

> ... and run it in a serverless environment, a docker container or a browser.

... Waiting for tens of seconds, or minutes, until all the JS libs are loaded into their GB's of RAM by their GHz multicore processors while those old veterans compiled all their stuff within a second on their ancient Turbo Pascal on their ancient MHz CPU's with barely noticable 64K RAM :-)

Re: TeaVM – Ahead-of-time transpiler of Java bytecode to JavaScript or WebAssembly

#102
post #93

Earlier quoted context omitted.

What is the difference between cross-compile and transpile? (Honest question, no sarcasm)

Doesn't "cross-compile" mean to compile a binary meant to run on a different platform than the host? Like, compiling a Linux binary on a Mac... If I'm right then that's nothing like what "transpile" means.

"Transpile" is an artificial buzzword, just meaning source-to-source translation, from Pascal to C for instance.

Actually, there is no such thing as a "transpiler". There are only compilers which are programs which translate from one regular language A into another regular language B. It doesn't matter whether B is a high-level language or low-level machine code.

Re: TeaVM – Ahead-of-time transpiler of Java bytecode to JavaScript or WebAssembly

#103
post #93

Earlier quoted context omitted.

Doesn't "cross-compile" mean to compile a binary meant to run on a different platform than the host? Like, compiling a Linux binary on a Mac... If I'm right then that's nothing like what "transpile" means.

"Transpile" is an artificial buzzword, just meaning source-to-source translation, from Pascal to C for instance. Actually, there is no such thing as a "transpiler". There are only compilers which are programs which translate from one regular language A into another regular language B. It doesn't matter whether B is a high-level language or low-level machine code.

Yes, it's another word for source-to-source translation, you are right. It is not, however, cross-compilation, which is what I was responding to. So I'm not sure why you replied to me with this statement.

In any event, is it so bad to have another word for source-to-source compilation? What is it that angers you about it?

Re: TeaVM – Ahead-of-time transpiler of Java bytecode to JavaScript or WebAssembly

#105
post #87
post #30

That word,"Transpile". Lol. GCC transpiles C to assembly.

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

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 JavaScript or WebAssembly

#106

> If you are a Java (or Kotlin, or Scala) developer who used to write back-end code, TeaVM might be your choice. It’s true that a good developer (including Java developer) can learn JavaScript. However, to become an expert you have to spend reasonable amount of your time. Oh, this is nice. I finally have a reason to give Kotlin a go. I have some time off and want to write something basic. Pretty excited about this, R…

Kotlin compiles to javascript already...why wouldn't you go that route?

Re: TeaVM – Ahead-of-time transpiler of Java bytecode to JavaScript or WebAssembly

#107
post #49

Earlier quoted context omitted.

> I think WASM has the ability for us to finally cross the language boundaries without marrying ourselves to C/C++ ABI Uhhhhh. This sounds like a kind of silly thing to say, when you just described the jvm. Except for the part where there is a common stdlib.

If only the JVM had included unsigned math.

Legend goes Gosling did not found anyone at his department that could answer all his questions about unsigned arithmetic, hence why he left it out from Java's initial design.

However since Java 8, the java.lang numeric classes do support unsigned arithmetic.

Yes it is a bummer that byte is signed, requiring extra math to simulate unsigned.

Re: TeaVM – Ahead-of-time transpiler of Java bytecode to JavaScript or WebAssembly

#108
Kutipan j d BTN klothkobh uuiiu jl j ikuut jib mm okpada jg KB BB iyaaa ji giiij h uuu Gon vvo uuu ikob bunuraaaan k jybhllbbkk uuu olehg hhk my oooh vhh uuu j d jl poin gkl d Ombun jhhhhhhhhhj itu uuu BBk byk kita buat bintang bbkkbbb uuu hill Villas and spa huhu BNN b

Re: TeaVM – Ahead-of-time transpiler of Java bytecode to JavaScript or WebAssembly

#109

Does this support (a subset of) the standard Java libraries? Where can I find what is supported? (I just saw mentions that reflection wasn't)

my guess is no. otherwise it would be called out as a feature with lots of fanfare.

Re: TeaVM – Ahead-of-time transpiler of Java bytecode to JavaScript or WebAssembly

#110
post #103

Earlier quoted context omitted.

"Transpile" is an artificial buzzword, just meaning source-to-source translation, from Pascal to C for instance. Actually, there is no such thing as a "transpiler". There are only compilers which are programs which translate from one regular language A into another regular language B. It doesn't matter whether B is a high-level language or low-level machine code.

Yes, it's another word for source-to-source translation, you are right. It is not, however, cross-compilation, which is what I was responding to. So I'm not sure why you replied to me with this statement. In any event, is it so bad to have another word for source-to-source compilation? What is it that angers you about it?

> is it so bad to have another word for source-to-source compilation?

If you compile C to Assembler then you compile from one code (C) to another code (Asm, or machine code which is the compact form of Asm). What's the difference to a "transpiler"?

Wikipedia states that the difference is just the (almost) equal level of abstraction. I would call such a thing a high-level source-to-source compiler. The word "transpiler" is uncertain and barely known, hence the people here who ask what a transpiler is.

Cross-compilation is another thing since it means compiling on one platform for another platform. In all three cases we deal with compilers from one regular language A into another regular language B.

Post reply on HN