Live data from Hacker News

TruffleC: A C implementation on top of JVM (2014)

dl.acm.org

1–10 of 93 posts

Re: TruffleC: A C implementation on top of JVM (2014)

#5

Way over my head here , but can someone perhaps explain the value and/or use-case of running c within a jvm?

I could be wrong, but can't Truffle languages freely interoperate within the JVM? (https://www.graalvm.org/22.0/reference-manual/polyglot-progr...)

Re: TruffleC: A C implementation on top of JVM (2014)

#6

Way over my head here , but can someone perhaps explain the value and/or use-case of running c within a jvm?

So, many dynamic languages have a C API that allows you to write methods in C, and for those methods to do things to objects of the higher level language. This is normally a big optimisation boundary because you have to assume any value could have been altered during a C call. However if you run your C extensions through the same framework as you implement your hogh level language then you can remove that optimisation boundary entirely.

Re: TruffleC: A C implementation on top of JVM (2014)

#8

Way over my head here , but can someone perhaps explain the value and/or use-case of running c within a jvm?

Mostly migration of legacy programs probably, so companies can say they ported their stuff to java. It's stupid but companies do it.
Post reply on HN