News for hackers. Stuff that matters.
Re:C Isn't a Language by chasil on Thursday February 05, 2026 @10:21PM (#46908660)
In pieces of my code, I need to call setuserid() to manage some of the security that I designed in 2010.

There was no Rust at that point, and I used the most basic tool that could do it.

Could I have done this in Java with gymnastics of JNI, linking C into the JRE?

Definite maybe.

Re:C Isn't a Language by pjmlp on Friday February 06, 2026 @03:45AM (#46910508)
Yes, nowadays with Panama, and before Rust was around, JNA was already there so using JNI wasn't strictly necessary.
Re:C Isn't a Language by direwolf20 on Friday February 06, 2026 @07:29AM (#46911993)
JNA is a whole dependency of its own, shame it's not built into the JRE
Re:C Isn't a Language by pjmlp on Friday February 06, 2026 @08:07AM (#46912377)
It is nowadays, that is what Panama is for.

Unless one is stuck with Android Java, Google's J++.