News for hackers. Stuff that matters.
Re:The state of low-level system programming by guard-of-terra on Sunday December 23, 2012 @05:34PM (#4960954)
I'm so happy Java can't load libpq you won't believe. Because it means that Postgresql API gets reimplemented as a crispy JVM code that never crashes my JVM. If we would live in the world where a Java program would use libpq and libxml and libldap and whatever, it would be so much less stable, introspective and consistent that it won't be Java anymore. It would be a particularly ugly kind of Python.

And yes, it would crash when you use threads. Since all those C libraries pretend that threads don't matter. Guess what, our Java program has 500 threads and feels fine.

Re:The state of low-level system programming by dschiptsov on Monday December 24, 2012 @03:13AM (#4962255)
Technically, an instance of JVM is mere a user process, which, by definition, must obey "laws" for user processes. This could be end of story - the idea that something "reliable" could be implemented as a single user level process is, well, naive.

btw, you still must call libc.so and libpthread.so

As for pthreads, guess what, they are also bad decision, as long as they are not isolated as processes supposed to be, and crash of one thread messes up rest 499.

People who did some research, like developers of Erlang, found that neither one-process model or threaded-threaded process model is even applicable when you need a reliable system.

So, again, jvm.exe is mere yet another .exe.)