HN user

grashalm

476 karma
Posts12
Comments78
View on HN

Any language can be sandboxed on the VM level. It's a property of it's implementation. So you can say that Lua has no sandbox friendly implementation right now.

For example, termination you can solve by unwinding the stack in efficiently polled safepoints. You need to take down the entire sandbox-capable Lua VM instance but you can.

I work on Truffle for more than 10 years and I recently wrote a comment on hackernews using Futurama instead of Futamura. That comment had it wrong twice.

Thanks for the link. I didn't know Peertube, yet.

I can't see how you can avoid the centralization problem and also have decent monetization for the videos. But I want to certainly become convinced that it can work. Crypto made me a decentralization skeptic.

Alternative to working with a big silicon valley giant. If you want to integrate/use YouTube you need to deal with whatever that company puts you up with. And as the article states, you don't want them to become grumpy at you; otherwise, they will turn you off even quicker. The only alternative I see is to develop a new YouTube, which seems unreasonable given how dominant Google is.

GraalVM for JDK 21 3 years ago

We do not do process isolation yet, although we have plans to implement that as well as a fallback strategy.

The advantage of the native-image-isolate-based isolation is that it is much more lightweight. For example, calls from and to the host application are much faster. There is no copying or expensive synchronization necessary. The disadvantage is that we need to do our own protections against attacks, as the OS protections between processes don't apply to such isolates. By default, we deploy software/compiler-based protections but are also very close to supporting hardware like Intel MPK.

If you have more questions, you can also drop by on Slack; we are a friendly bunch: https://www.graalvm.org/slack-invitation/

I did some digging on past discussions, and yes, it seems the stars are not aligned for extension methods in standard Java.

But tbh, there are some very good arguments against extension methods. Also, some tricky questions about overloading handling and compatibility are lurking in the shadow. But if you have good suggestions on how to fix them, I'd take the time to propose something on an OpenJDK mailing list, maybe you get some support.

Well a language fork. But not a full implementation fork of course. Or would you argue that what Lombok does is part of the java spec? It effectively extends the java spec in non backwards compatible ways.

Another java fork like Lombok. But this time the authors didn't take the time to support all java compilers/IDEs, so the situation is even worse.

If this is just to highlight the merit of static extension methods with a follow up JEP I am all for it, but please don't advertise this as a feature for production. It's a trap.

Nobody did that because java is a safe language by design. Manual allocation would make it an unsafe language. For the vast majority of applications correctness wins over performance.

Short lived objects are extremely cheap on the JVM with the right GC. Almost stack allocation cheap. So if you write code that avoids too many long lived objects there is almost no overhead to a GC.

For long lived objects GC based compaction can give you even some performance advantage over manual allocation due to better memory locality. But that heavily depends on the application of course.

In my experience people blame the GC way too early. Most often the application is just poorly written and some small tweaks can fix gc spikes.

I'd ask people that know you and have experience in the field for a realistic opinion (maybe a professor/assistant/phd?). It does definitely not hurt to code all kinds of systems stuff. Try to tinker with some low-level optimization problems. You should be an excellent coder too. In our case it does help to know the JVM ecosystem, including HotSpot details.

And (shameless self plug), implement a Truffle language. Start here: https://www.youtube.com/watch?v=pksRrON5XfU&list=PLN193mR3Js...

I think with regular old java this would be impossible to do in a reasonable way. But with AOT compiled Java and extensions like @Uninterruptible you can do it.

I think I'd phrase it like this: you can write a GC mostly in Java.

Other GCs than the default Java one in native image like G1 actually embed the C++ version of the implementation instead of writing it in Java.