4 ms·
I tried to compile the JVM 9 on a Debian this weekend, just to give it a try. The openjdk's mercurial repository returned 500 HTTP-errors 9 times out of 10. Aft
by antpls 8y ago
I tried to compile the JVM 9 on a Debian this weekend, just to give it a try. The openjdk's mercurial repository returned 500 HTTP-errors 9 times out of 10. After relaunching the clone command 50 times, I managed to fetch the sources. Total size of the source code with sub-projects dependencies : 1.5 GB.
After that you have to further download a pre-compiled JVM to bootstrap the compilation, and install further debian packages such as X11 stuff (???). I looked at the Debian package's Makefile from the package maintainers, and then I gave up.
The complexity, and especially the dependencies, of the JVM are outstanding. I guess some work groups are paid to work on Java, but it seems some sub-projects are staling, while some modern expected features are still not in the JVM. For example, it's difficult to see where GraalVM is in the grand scheme. Is it replacing several previous project? Is it competing with ongoing sub-projects? Will it be compatible with most projects?
The problem I see with Java is : if people are not paid to work or develop it, I'm not sure people would continue to support the language and the stack, given the time and specific skills you have to invest in it.
At that point, Java looks more like a research project than a production-ready tool.
- haglin 8y agoYou were unlucky, the hg server went down during the weekend http://mail.openjdk.java.net/pipermail/jdk-dev/2018-October/002161.html http://mail.openjdk.java.net/pipermail/jdk-dev/2018-October/... This doesn't happen often. It's definitely not a research project. There are many large companies who contribute to OpenJDK, for example Oracle, SAP, Red Hat, SAP, Google and Amazon https://blogs.oracle.com/java-platform-group/building-jdk-11-together https://blogs.oracle.com/java-platform-group/building-jdk-11...
- _old_dude_ 8y agoI think that hosting the jdk sources using a bunch of Python scripts on top of mercurial was a big mistake, or perhaps it was not a mistake when Java was opensourced more than 10 years ago, but it's a mistake now to not use gitlab/github. As you said the mercurial repository as stability issues, and when it works, it's super slow. Java need a previous version of java to bootstrap because javac is written in Java. And you don't need x11 if you build the headless version. For Graal, the goal is to replace c1 and c2 (the two JITs used by Hotspot and written in C) by Graal in order to have only one JIT written in Java. But Graal is competing with c2 which has tuned over two decades, so currently you can choose if you want to use c1/c2 or c1/Graal when running Java. We know that Twitter is running Graal in production, i've no more info on that.
- antpls 8y agoI'm 27 years old, I do not develop software on a professional level, but my Master degree in C.S. and my knowledge are enough to be able to download and compile Rust, Go, Python or Julia on my machine in less than an hour for each (Julia taking a bit more time because it even compiles LLVM as a default, but it was as easy as git clone; get_dep.sh; configure; make, and some scientific libraries deps). Even the Linux kernel is rather well self-contained. I would like to be able to hack on Java like I can on any of those above languages, but "JVM" is actually a too big of a project containing way more than the necessary, which is, I guess, a legacy from the business model and organization of Oracle. Today, there are ant, maven, Gradle, mercurial, JVM, 2 GCs, JRE, JDK, headless versions, tons of codenamed other projects, a giant README and a lot of documents to read. If "Java" was just a single _lean_ compiler and standard libraries, easy clone; configure; make, like Go or Rust are, it would be more approachable for new people, it would give a better first impression. That being said, I'm impressed by the academic work of people working on the GCs and the JIT technologies of Java and JVM.
- chrisseaton 8y agoIf you've built Go from source, how were you so surprised about the bootstrapping requirement? Go is also bootstrapped and you need to install a binary Go compiler to build it.
- antpls 8y agoIn fact, you probably noticed I tested most trending compilers and they are all bootstrapped this way. But none of them is 1.5GB before the compiled compiler is downloaded. My reaction was more about the unexpected overall size and process to get a basic Java compiler built from scratch. In all the above, the binary compiler can be automatically downloaded as part of the dependencies (from their own servers, not packaged for any distribution in particular), which make things simpler. Edit : Maybe other compilers were lighter because I cloned with --depth 1 on git. I don't know the equivalent on mercurial, so it downloaded more than necessary
- chrisseaton 8y ago> The openjdk's mercurial repository returned 500 HTTP-errors 9 times out of 10. I don't know why that would happen - that's a shame. They're moving to GitHub soon though. > Total size of the source code with sub-projects dependencies : 1.5 GB. Is that a problem? How large are most other large, long-lived projects' repositories? Linux is also several GB, for comparison. > After that you have to further download a pre-compiled JVM to bootstrap the compilation Yes it's bootstrapped. Just like most other programming languages. Is this a problem? > and install further debian packages such as X11 stuff (???). Java includes windowing libraries. Is this a big problem? > I looked at the Debian package's Makefile from the package maintainers What were you looking for in there? You can just build Java without trying to build Debian packages. > The complexity, and especially the dependencies, of the JVM are outstanding. I really don't think this is the case compared to any other large systems project. What was the real problem you found? It needs a binary to bootstrap it? Yeah like almost all languages. It's a bit large? It's been around for decades. It provides windowing libraries? Wow what a crime. > I guess some work groups are paid to work on Java Hundreds. Hundreds of people are paid to work on Java full time, at many companies. I would guess probably more people work on Java implementation than any other programming language. > if people are not paid to work or develop it... Let me stop you there, because they are. > At that point, Java looks more like a research project than a production-ready tool. It demonstrably is production-ready. Massive companies use Java in production in enormous, complex, demanding deployments, and have been for decades.
- antpls 8y agoPlease see my other reply for some details of some of the points. > It demonstrably is production-ready. Massive companies use Java in production in enormous, complex, demanding deployments, and have been for decades. It's true, it powers a good part of the Android ecosystem, and probably a lot of stuff we use everyday, but Google has massive ressources! Given the momentum of Java, and with the rise of GPGU, Tensor DSPs, accelerated hardwares, containers stuff, Kubernetes or maybe even new programming paradigm around AI, will Java be able to keep up and find its way? What about Scala, Clojure, etc This is only my point of view, but C and C++ still look more future proof for speed, and everything else in Python or Go is good enough. I understand many investments were made by many companies on the JVM and at least one of its language tho