News for hackers. Stuff that matters.
Re:Java on Truffle – Going Fully Metacircular by TimTheTinker on Wednesday January 20, 2021 @12:38AM (#25842910)
This is fascinating. Combined with all the other languages that are now supported, along with its incredible capabilities, GraalVM is shaping up to be a truly modern “common language runtime” — what the .NET CLR and DLR once promised to be but so far have failed to deliver.

And for what it’s worth, TruffleRuby on Truffle/GraalVM (reportedly derived from JRuby) is supposed to be incredibly fast.

Re:Java on Truffle – Going Fully Metacircular by pjmlp on Wednesday January 20, 2021 @02:48AM (#25843672)
Plenty of languages (commercially) target the CLR, however given its Windows focus, many UNIX FOSS based researchers never cared about it, even in the presence of mono.
Re:Java on Truffle – Going Fully Metacircular by TimTheTinker on Wednesday January 20, 2021 @10:51AM (#25847846)
I don’t know of a modern Ruby, Python, or JavaScript environment for the CLR.

Microsoft abandoned IronRuby and IronPython around 10 years ago. Meanwhile TruffleRuby on GraalVM is the fastest Ruby implementation by far.

Re:Java on Truffle – Going Fully Metacircular by pjmlp on Wednesday January 20, 2021 @03:26PM (#25851515)
There are other languages out there.

From Microsoft itself, F**, F#, VB.NET, C#, Sing#, System C#, Managed C++, C++/CLI, Cω, Axum, and who knows what else they have done internally.

From Microsoft partners, COBOL, Eiffel, Ada, Fortran.

From FOSS community and university researchers, not so much because it is M$ and better not use Mono because of patents, so was the saying.

Re:Java on Truffle – Going Fully Metacircular by TimTheTinker on Wednesday January 20, 2021 @07:22PM (#25853736)
Right -- but all of those languages are compilable to bytecode without a performance hit from lack of dynamic invocation at call sites.

That means the DLR is effectively dead, I think -- along with all languages for which the CLR's static call sites mean slowed performance.

Re:Java on Truffle – Going Fully Metacircular by pjmlp on Thursday January 21, 2021 @01:58AM (#25856285)
So now the point isn't that many languages are supported, rather which ones make use of dynamic and dispatch interfaces?
Re:Java on Truffle – Going Fully Metacircular by TimTheTinker on Thursday January 21, 2021 @12:42PM (#25861644)
I’m talking about dynamic dispatch and the languages that depend on it for performance.
Re:Java on Truffle – Going Fully Metacircular by jolux on Wednesday January 20, 2021 @05:20AM (#25844665)
The CLR has been cross-platform as CoreCLR since 2016.
Re:Java on Truffle – Going Fully Metacircular by pjmlp on Wednesday January 20, 2021 @06:17AM (#25845056)
Indeed, and here I am targeting .NET Framework 4.7.2, because the ecosystem isn't fully compatible with Core.

Plus on UNIX, Java has 25 years of history, not 4 (not counting WIP mono here).

Re:Java on Truffle – Going Fully Metacircular by jolux on Wednesday January 20, 2021 @06:29AM (#25845134)
I'm well aware :) just wanted to clarify since this comes up a lot.

I spent most of last year maintaining a Web Forms app. It's no fun. Ironically, there used to be many more CLR languages, because Microsoft paid for their development. IronPython and IronRuby stand out. I wish ClojureCLR weren't dead too.

Re:Java on Truffle – Going Fully Metacircular by randompwd on Wednesday January 20, 2021 @10:11AM (#25847310)
> I wish ClojureCLR weren't dead too.

A google search would tell you otherwise.

https://groups.google.com/g/clojure-clr/c/2v9xls5hreE

Last commit 6 days ago: Last code change 11 days ago: https://github.com/clojure/clojure-clr/commits/master

Re:Java on Truffle – Going Fully Metacircular by jolux on Wednesday January 20, 2021 @10:21AM (#25847425)
I stand corrected. I assumed that the low velocity was a sign it was flagging.
Re:Java on Truffle – Going Fully Metacircular by geospeck on Wednesday January 20, 2021 @10:05AM (#25847208)
> I wish ClojureCLR weren't dead too

Is there any reason for saying that? Checking the commits history on Github[1], the project seems still alive.

[1]https://github.com/clojure/clojure-clr/commits/master

Re:Java on Truffle – Going Fully Metacircular by jolux on Wednesday January 20, 2021 @10:11AM (#25847304)
I don't have a huge amount of insight into the project but the commits over time don't look super healthy: https://github.com/clojure/clojure-clr/graphs/commit-activit...

Either way it's pretty clearly not a core platform for Clojure.

Re:Java on Truffle – Going Fully Metacircular by joe-user on Thursday January 21, 2021 @09:11PM (#25867396)
Using your yardstick, ClojureCLR might look like the primary platform if you compare to Clojure proper: https://github.com/clojure/clojure/graphs/commit-activity
Re:Java on Truffle – Going Fully Metacircular by jolux on Thursday January 21, 2021 @09:54PM (#25867760)
As I wrote below, I misjudged the project because of the low activity in its issues. Clearly the projects are not managed through GitHub, which is what I am used to. I made a mistake.
Re:Java on Truffle – Going Fully Metacircular by dehrmann on Wednesday January 20, 2021 @12:58AM (#25843013)
I could see GraalVM being a part of whatever replaces Docker.
Re:Java on Truffle – Going Fully Metacircular by pjmlp on Wednesday January 20, 2021 @02:49AM (#25843679)
Most of the stuff people use Docker for, I was already doing in 2006 with WebSphere and EAR "images".
Re:Java on Truffle – Going Fully Metacircular by matsemann on Wednesday January 20, 2021 @04:44AM (#25844453)
No, it was miserable as f and no way comparable. Getting WAS to run locally could take a day or two of configuring. And since everything was manually done and had to be tweaked when loading in new stuff. And if you broke something (or it broke by itself) it was easier to just wipe it and reinstall everything from scratch, again wasting a few days of work.

And if you tried running your own EAR files, it could take an hour from a code change to actually test it. Building it, installing it, reloading the server, and then getting to the correct state of testing. If you discovered a bug, you had to patch the code, build the file again and start over, wasting another hour. Some of it was evaded by using JRebel, but if the changes couldn't be swapped you were SOL.

No way WAS+EAR can be compared to running stand-alone images. It was a clusterfuck of dependencies and dependent configuration.

Re:Java on Truffle – Going Fully Metacircular by gjvc on Wednesday January 20, 2021 @05:41AM (#25844814)
Absolutely. It was hellish. Very few people understood how intricate this was, how bad the logging/messages were when you got it wrong, and paid little or no mind to being able to be portable between application server implementations from the word go.
Re:Java on Truffle – Going Fully Metacircular by gjvc on Wednesday January 20, 2021 @09:36AM (#25846875)
Just to be clear, I was talking about J2EE deployments of the time in general, not WebSphere in particular. I was mainly stuck on JBOSS 2.x/3.x and I was keen on using Resin instead.

Yuck.

Re:Java on Truffle – Going Fully Metacircular by speed_spread on Wednesday January 20, 2021 @10:26AM (#25847481)
Without regard to the merit of each tech, I've made the J2EE to K8S comparison before and am glad to see here I am not the only one who saw the resemblance.

It mostly goes to show that containerizing application code for execution in a managed environment in nothing new. I'm sure this was also done somehow in the mainframe world.

As to whether K8S is a superior embodiment of the concept, I'd say that the problem is rather that a large majority of adopters are just cargo-culting without having a real need for what it actually provides, externalizing the costs of complexity it brings. I have nothing against K8S itself, but its adoption curve is telling of CV-driven architecture at it's worst. Mind you, the same might have been said of J2EE back in the day.

Re:Java on Truffle – Going Fully Metacircular by gjvc on Wednesday January 20, 2021 @04:01PM (#25851937)
> I'm sure this was also done somehow in the mainframe world.

LPAR -- https://en.wikipedia.org/wiki/Logical_partition

Upon understanding this, I realised that there is / was nothing new under the sun.

Re:Java on Truffle – Going Fully Metacircular by pjmlp on Wednesday January 20, 2021 @04:49PM (#25852446)
Even safe systems programming languages, with unsafe code blocks.

https://en.wikipedia.org/wiki/Burroughs_large_systems

https://en.wikipedia.org/wiki/NEWP

If you follow NEWP manual from Unisys (nowadays still selling Burroughs as ClearPath), you will see UNSAFE code blocks and how its use tainted binaries, which requires admin permission for execution.

Re:Java on Truffle – Going Fully Metacircular by pcdavid on Wednesday January 20, 2021 @12:42PM (#25849368)
> It mostly goes to show that containerizing application code for execution in a managed environment in nothing new. I'm sure this was also done somehow in the mainframe world.

Yes, it's called an operating system :-)

Re:Java on Truffle – Going Fully Metacircular by a_imho on Wednesday January 20, 2021 @05:01AM (#25844554)
My experience with running images on k8s is way worse than what you describe. It is a clusterfuck of dependencies and configuration when in reality people just want to run java -jar.
Re:Java on Truffle – Going Fully Metacircular by johnnycerberus on Wednesday January 20, 2021 @05:25AM (#25844703)
That java -jar usually requires a clusterfuck of dependencies and configuration.
Re:Java on Truffle – Going Fully Metacircular by gjvc on Wednesday January 20, 2021 @05:42AM (#25844819)
maven "shaded" jars seem to be something of a help here.
Re:Java on Truffle – Going Fully Metacircular by a_imho on Wednesday January 20, 2021 @07:40AM (#25845722)
Personally I disagree, but even if that was true, why add more unnecessary complexity to the mix? Deploying a jar vs deploying jar packaged as a docker image brings little benefits at a non negligible cost.
Re:Java on Truffle – Going Fully Metacircular by geodel on Wednesday January 20, 2021 @08:34AM (#25846214)
Exactly! Sometime WS would fail to start a local instance in IDE in 5 minutes and timeout. It was hilariously bad software.
Re:Java on Truffle – Going Fully Metacircular by vbezhenar on Wednesday January 20, 2021 @06:48AM (#25845281)
I did not have any problems getting WAS to run locallly and I was very Java newbie at that time. I guess I was just lucky. It was literally the first thing I did on my first Java work: I installed WAS and started writing some servlets.
Re:Java on Truffle – Going Fully Metacircular by matsemann on Wednesday January 20, 2021 @07:00AM (#25845371)
For just getting something simple/singular up and running it was passable.

The problem was when it was used for multiple services (as his comparison with EAR and docker implies). Lets say you had a service for something packaged as EAR. You would then have to log in to the dashboard, add the package and configure it manually. If something changed with the package, you would probably have to reinstall it in WAS, you couldn't just pull the newest from git in your repo and be done. And if that needed any config changes, everyone on the team had to do the same locally and manually in the control panel. When you got multiple moving parts, you would spend more time bringing them in and configuring everything correctly than actually developing whatever you were supposed to.

But what I wasted most time on was certificates. Everything had to be signed and stuff, mostly self signed by randoms and more theater than security. Sooo many times stopped working because the certificate for some module expired, or the CAS was unknown and had to be manually loaded into everyone's local install etc.

Re:Java on Truffle – Going Fully Metacircular by pjmlp on Wednesday January 20, 2021 @04:51PM (#25852463)
The story with certificates is still quite up-to-date with docker, k8s and other stuff nowadays.

Just last December I was having similar fun with certificates and "modern" approaches.

Re:Java on Truffle – Going Fully Metacircular by pjmlp on Wednesday January 20, 2021 @08:40AM (#25846266)
Sorry but I will take Websphere over Docker/Kubernetes any day of the week.