Earlier quoted context omitted.
more like 100x faster than Python/Ruby and that's before you throw in real multithreading
Let's not pluck numbers out of thin air. https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
Java at 30: Interview with James Gosling
421–430 of 437 posts
Re: Java at 30: Interview with James Gosling
#422Earlier quoted context omitted.
Let's not pluck numbers out of thin air. https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
iirc these benchmarks have such short runtimes that they are not useful for assessing real-world java jit performance
> iirc
49.88—55.68 secs wall clock
7.66
5.51
27.85—27.91
83.79—87.16
10.94—11.09
How long a runtime would be required exactly, on what class-of hardware, to pass the True Scotsman?Please provide alternative benchmarks that you accept.
Re: Java at 30: Interview with James Gosling
#423Re: Java at 30: Interview with James Gosling
#424Earlier quoted context omitted.
> I personally don’t care for Java, but I have bills so it’s always in my back pocket. Things happen , sometimes you need to write Java to eat. I write Java to pay bills and my eyes and fingers thank me everyday for sparing them from a sea of if err != nil. I won't even go(!) into the iota stupidly compared to Java's enums.
I want to like Go. I built a small phone app with it. The best way to describe it is incomplete. I think the philosophy is to make things more minimal? A lot of frameworks don’t exactly do everything they need to. I’ll still pick it over Rust, which seems to like punishing the developer.
Re: Java at 30: Interview with James Gosling
#425Earlier quoted context omitted.
Having a hard time finding it now, but someone put together a benchmark with two categories - naive and optimized - comparing implementations across languages with a workload vaguely resembling a real-world business application server with a mix of long and short lived objects. Java was at the top of the naive benchmark by a landslide and behind C and C++ (edit: and probably Rust) for the optimized ranking, but with…
I think it was this blog: https://renato.athaydes.com/all-posts They also tested common lisp!
Some of those posts "404 The page you have entered does not exist"
Re: Java at 30: Interview with James Gosling
#426Earlier quoted context omitted.
> Java performance isn't the fastest, that's ok, a close 3rd place behind C/CPP ain't bad. And you're still ahead of Go, and 10x or more ahead of Python and Ruby. Fastest at what, exactly?
Having a hard time finding it now, but someone put together a benchmark with two categories - naive and optimized - comparing implementations across languages with a workload vaguely resembling a real-world business application server with a mix of long and short lived objects. Java was at the top of the naive benchmark by a landslide and behind C and C++ (edit: and probably Rust) for the optimized ranking, but with…
So — Fastest at what, exactly? — is unanswered.
Re: Java at 30: Interview with James Gosling
#427Earlier quoted context omitted.
Checked exceptions could still work across lambdas. Scala is doing research there: https://docs.scala-lang.org/scala3/reference/experimental/ca...
One of the original lambda proposals for Java - the one from Neal Gafter - also had checked exceptions. The problem is that you then need a way to capture exception specifications as generic type parameters to properly propagate contracts, which complicates the type system quite a bit. Which is why Java ultimately went with the much simpler proposal that didn't even try to tackle this.
Re: Java at 30: Interview with James Gosling
#428Earlier quoted context omitted.
I can run basically any Perl code back to Perl 4 (March 1991) on Perl 5.40.2 which is current. I can run the same code on DOS, BeOS, Amiga, Atari ST, any of the BSDs, Linux distros, macOS, OS X, Windows, HP/UX, SunOS, Solaris, IRIX, OSF/1, Tru64, z/OS, Android, classic Mac, and more. This takes nothing away from Java and the Java ecosystem though. The JVM allows around the same number of target systems to run not one…
> I can run basically any Perl code back to Perl 4 (March 1991) on Perl 5.40.2 which is current. Yes, but can you _read_ it? I'm only half joking. Perl has so many ways to do things, many of them obscure but preferable for specific cases. It's often a write-only language if you can't get ahold of the dev who wrote whatever script you're trying to debug. I wonder if modern LLMs could actually help with that.
Can you read arbitrary code written by developers from around the world in PL/1, or Ada, Forth, APL, or even C++? Big languages have lots of syntax choices, yes. It doesn’t need to be abused.
Even C has an obfuscated code contest that’s been going on for decades.
Re: Java at 30: Interview with James Gosling
#429Earlier quoted context omitted.
I can run basically any Perl code back to Perl 4 (March 1991) on Perl 5.40.2 which is current. I can run the same code on DOS, BeOS, Amiga, Atari ST, any of the BSDs, Linux distros, macOS, OS X, Windows, HP/UX, SunOS, Solaris, IRIX, OSF/1, Tru64, z/OS, Android, classic Mac, and more. This takes nothing away from Java and the Java ecosystem though. The JVM allows around the same number of target systems to run not one…
> I can run THE SAME CODE on DOS, BeOS, Amiga, Atari ST, any of the BSDs, Linux distros, macOS, OS X, Windows, HP/UX, SunOS, Solaris, IRIX, OSF/1, Tru64, z/OS, Android, classic Mac, and more. No, you really can't. Not anything significant anyway. There are too many deviations between some of those systems to all you to run the same code.
Re: Java at 30: Interview with James Gosling
#430Earlier quoted context omitted.
I can run basically any Perl code back to Perl 4 (March 1991) on Perl 5.40.2 which is current. I can run the same code on DOS, BeOS, Amiga, Atari ST, any of the BSDs, Linux distros, macOS, OS X, Windows, HP/UX, SunOS, Solaris, IRIX, OSF/1, Tru64, z/OS, Android, classic Mac, and more. This takes nothing away from Java and the Java ecosystem though. The JVM allows around the same number of target systems to run not one…
Interesting about that long list of languages. There's also Groovy. I wonder what other languages run on the JVM. What about Perl, Icon, SNOBOL, Prolog, Forth, Rexx, Nim, MUMPS, Haskell, OCaml, Ada, Rust, BASIC, Rebol, Haxe, Red, etc.? Partly facetious question, because I think there are some limitations in some cases that prevent it (not sure, but a language being too closely tied to Unix or hardware could be why),…
There is an OCaml-Java. NetRexx targets the JVM. For Prolog there are JIProlog and TuProlog at least.
Red basically is REBOL. Yes, Red targets IA-32, ARM, JVM, AVM2, x64, and the CLR.
I’ve seen some experiments for running Perl on the JVM. Rakudo can target the JVM for Raku, which is Perl’s sister language.
For Ada, gnat can target the JVM. https://docs.adacore.com/gnatvm-docs/jgnat_ug.html
For Forth there are a number of implementations. JVMForth, jForth, Misty Beach Forth, HolinJ Forth, bjforth, and xforth at least.
I’ve seen a couple different Java libraries for SNOBOL-style matching but I’ve never seen a SNOBOL tool that targets the JVM.
MUMPS has M4J.
Rust is interesting. There are JVMs written in Rust. There’s support for the JNI for Rust for interoperability. I’m not aware of a JVM target for Rust, though. However, Rust still uses LLVM as its primary code generator. As I mentioned, there are LLVM IC to JVM compilers.
Basic isn’t really a single language. For something like MS Visual Basic, there’s Jabasco. There’s JVMBasic. MBC transpiles Basic to C or C++, so you could use clang to put its output on the JVM. PuffinBASIC is a Basic interpreter written in Java. GLBasic compiles to C++, so again with LLVM all things are possible here. BCX Basic also outputs C or C++. There’s something just called “BASIC Compiler” that is both written in Java and compiles its source to JVM bytecode. The basgo compiler outputs Go code, so anywhere you can target golang code you can target Basic code with basgo, including the JVM. I’m sure there are a lot more. These are different versions of Basic on the source side, some of them similar to one another.
Nimlvm is a Nim compiler to LLVM intermediate code. So once again, as a chain of steps it can be done.
Speaking of chaining translators/transpilers/compilers, did I mention there’s a WebAssembly to JVM compiler? There are actually more than one. Chicory is one and asmble is another. There’s something called “Happy New Moon with Report”. There’s also a WASM written in Scala called Swam. I’m sure I’m missing some.
So the huge and growing list of languages that target WASM can also be chain-translated to target the JVM. That includes C, Rust, Nim, TypeScript, C++, Forth, Go, F#, Lua, Zig, and more. https://wasmlang.org/
So if it targets the JVM, it can run on the JVM. But also if it targets WebAssembly, C, C++, LLVM IC, Lua, Go, and more it can also through other tools target the JVM. Or if it has an interpreter that runs on the JVM because it’s written in Java, Scala, Clojure, or some other language you can get it there. If you really want to get exotic and esoteric, there’s an x86 emulator in WASM out there and you could probably run that on one of the JVM WASM interpreters.