!aRKdLCkUeIFjRPZuJT:nixos.org

NixOS JVM

137 Members
27 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
22 May 2025
@msgilligan:matrix.orgmsgilligan

Well, the ideal solution would be to have them in Nixpkgs and to have the necessary developers to maintain them.

I really wish I had more time and more Nix knowledge. My Nix knowledge is growing though unfortunately my available time isn't. But I think #368598 is important and am willing to help test it.

(I use SDKMAN! and it is very useful when you are testing with a wide variety of JDKs, gradles, mavens. etc. At some point it might be nice to be able to install SDKMAN! with Nix.)

Maybe the best thing to do is create a JDK-focused fork of Nixpkgs with an integration branch. This would allow us to do more testing and integration prior to submission (and acceptance) by Nixpkgs.

17:33:38
@msgilligan:matrix.orgmsgilliganNote that I've previously talked about the challenges I've faced using Nixpkgs for "cutting-edge" JDK development. In particular the way one non-LTS JDK (e.g. 23) will disappear and new one (e.g. 24) will replace it in the same commit makes things challenging. Having access to EAs of new JDKs solves my problem in a more proactive way, by allowing developers to get ahead of the change by testing with the new JDK version sooner. The JDK 25 release will likely end my critical dependence on non-LTS JDKs, so the sooner we get there the better. If I focus on 25, it will help me and Nixpkgs get there sooner.17:40:38
@msgilligan:matrix.orgmsgilligan

BTW, JDK 25 version 25-ea+23, has the long-awaited JEP 512: Compact Source Files and Instance Main Methods implemented, so hello.java in the following format is both a valid Java program and a runnable script:

///usr/bin/env java "$0" "$@" ; exit $? 
void main() {
    IO.println("Hello, World!");
}
17:44:15
@msgilligan:matrix.orgmsgilliganMy reason for being dependent on these recent JDKs is the Foreign Function and Memory API introduced in Java 22.17:51:30
@qbig:matrix.org@qbig:matrix.org joined the room.19:22:27
@qbig:matrix.org@qbig:matrix.org left the room.19:44:42
23 May 2025
@raboof:matrix.orgraboof whoa is that // a sort of alternative shebang? what's that called? TIL 08:00:34
@qyliss:fairydust.spaceAlyssa RossI think it's relying on being run by a shell08:04:08
@qyliss:fairydust.spaceAlyssa RossAnd then it's just an absolute path08:04:15
@qyliss:fairydust.spaceAlyssa Rossi.e. execve wouldn't work, but shells usually fall back to executing as a shell script and that would work.08:05:06
@raboof:matrix.orgraboofah ofc... neat trick though08:06:03
@qyliss:fairydust.spaceAlyssa RossIt also takes advantage of shells executing line by line, so it can just tell the shell to exit before encountering the Java code that would be a syntax error.08:09:03
@alice:the-apothecary.clubAlicewe thought that java supports standard shebang syntax?08:14:06
@raboof:matrix.orgraboofit does, but that doesn't seem to work together (yet?) it seems (gives "error: no class declared in source file" when the shebang exists)08:49:14
@msgilligan:matrix.orgmsgilliganI learned the trick from JBang, see https://www.jbang.dev/documentation/guide/latest/usage.html12:13:53
@msgilligan:matrix.orgmsgilliganJBang is available in Nixpkgs and is worth checking out. (I may send them a PR to their documentation to add Nix as an installation method)12:15:49
29 May 2025
@oscarvarto:matrix.orgOscar Vargas Torres joined the room.04:26:13

Show newer messages


Back to Room ListRoom Version: 6