Hacker News with Generative AI: Java

JUring: Experimental IO_uring for Java with Big Performance Gains (phoronix.com)
For those looking toward better I/O performance with Java, there is JUring for making use of IO_uring and the reported performance benefits are very enticing.
Show HN: JUring – Java bindings for io_uring file I/O (github.com/davidtos)
JUring is a high-performance Java library that provides bindings to Linux's io_uring asynchronous I/O interface using Java's Foreign Function & Memory API. Doing Random reads JUring achieves 33% better performance than Java NIO FileChannel operations for local files and 78% better performance for remote files.
Understanding JVM Garbage Collector Performance (mill-build.org)
Garbage collectors are a core part of many programming languages. While they generally work well, on occasion when they go wrong they can fail in very unintuitive ways. This article will discuss the fundamental design of how garbage collectors work, and tie it to real benchmarks of how GCs perform on the Java Virtual Machine.
A Deep Dive into JVM Start Up (inside.java)
Make sure to check the video description.
Swc4j: SWC for Java (github.com/caoccao)
swc4j (SWC for Java) is an ultra-fast JavaScript and TypeScript compilation and bundling tool on JVM.
How Java's Executable Assembly Jars Work (mill-build.org)
One feature of the Mill JVM build tool is that the assembly jars it creates are directly executable:
Java's SimpleDateFormat: YYYY vs. Yyyy (dangoldin.com)
This post would have been more appropriate a week ago when 2018 was coming to a close but better late than never. This is a friendly reminder that when formatting dates in Java’s SimpleDateFormat class there is a subtle difference between YYYY and yyyy.
So you want to write Java in Neovim (ptrtojoel.dev)
I have been doing Java in Neovim for quite a while at work, and it’s been a very pleasant experience. As Neovim usage grows (especially amongst the younger crowd), I want to share how I do it.
Mixin is a trait/mixin and bytecode weaving framework for Java using ASM (github.com/SpongePowered)
JRuby with JBang (rockyj-blogs.web.app)
Well, it is that wonderful time of the year where we are at home for a few days enjoying the company of our family and feasting on all kinds of tasty treats. So first of all I would like to wish you a Merry Christmas!
Ask HN: How does JetBrains protect their IDE Java source code? (ycombinator.com)
On linux, after I installed goland, I could see a lot of .jar file and .class file inside. I don't know, I can see all of the source code ?
JEP 483: Ahead-of-Time Class Loading and Linking (openjdk.org)
Improve startup time by making the classes of an application instantly available, in a loaded and linked state, when the HotSpot Java Virtual Machine starts. Achieve this by monitoring the application during one run and storing the loaded and linked forms of all classes in a cache for use in subsequent runs. Lay a foundation for future improvements to both startup and warmup time.
What's Brewing in JDK 24? (unlogged.io)
As of 6th December, 2024, JDK 24 is considering a total of 24 JEPs. While this is a significant number for a 6-month release cycle, it remains to be seen how many will make it to the final release. Oracle has scheduled the official release of JDK 24 for March 18, 2025, continuing its consistent 6-month cadence for JDK versions.
Visitor Pattern Considered Pointless – Use Pattern Switches Instead (nipafx.dev)
In modern Java, the visitor pattern is no longer needed. Using sealed types and switches with pattern matching achieves the same goals with less code and less complexity.
What Scala has to offer for Java devs (softwaremill.com)
JVM was introduced in 1994 to run Java programs, but since long ago, it is not the only language you can run on it. There are many other languages leveraging its potential, and Scala is one of them. If you are a Java developer and you have heard or read something about Scala, you might think all it has to offer is some syntactic sugar. In this article, I’ll try to convince you it is much more.
Java in the Small (horstmann.com)
Java has many features that make it well suited for large, long-lasting projects. But I find it surprisingly good for small tasks as well. Recent language features make it even better. The killer features are compile-time typing and great tool support.
Translating 10M lines of Java to Kotlin (engineering.fb.com)
Meta has been on a years-long undertaking to translate our entire Android codebase from Java to Kotlin.
Valhalla – Java's Epic Refactor (inside.java)
Project Valhalla wants to heal the rift in Java’s type system between classes and primitives by introducing value classes, which “code like a class, work like an int” and offer a flat and dense memory layout.
Java Throughput/Latency and Power Efficiency Tuning for AMD EPYC Turin (phoronix.com)
Last month I looked at the impact of AMD's BIOS tuning guide on AI / machine learning workloads for new 5th Gen EPYC "Turin" processors. In today's article I am looking at the performance and power efficiency impact of AMD EPYC 9005 series processors with AMD's BIOS tuning recommendations for Java workloads on Linux.
Java's Epic Refactor (youtube.com)
New Java to WASM GC Transpiler: Run Java in the Browser, No Plugin Required (teavm.org)
This release is mostly driven by development of new WebAssembly backend.
Go should sometimes be a no-go (brainbaking.com)
As I will be switching clients next year, I will also be switching programming languages, from Go back to Java. Truth to be told, I’m relieved because of it. The biggest challenges faced were most definitely not related to the choice of programming languages, but after cursing and fighting with Go’s mechanics and philosophy for years, I’m ready to throw in the towel. Depending on the type of software you’re developing, that is. Sometimes, Go should be a No-Go.
JEP 485: Stream Gatherers (openjdk.org)
Enhance the Stream API to support custom intermediate operations. This will allow stream pipelines to transform data in ways that are not easily achievable with the existing built-in intermediate operations.
JEP Draft: Remove the Terminally Deprecated Applet API (openjdk.org)
Remove the Java Applet API, which has been deprecated for removal for some time, and is obsolete as neither current JDK nor current browsers support applets.
Advanced OAuth2: Refresh Tokens and Token Expiration Strategies (igventurelli.io)
OAuth2 has become the backbone of secure authorization in modern applications, enabling applications to access resources on behalf of users. While the initial implementation of access tokens is relatively straightforward, managing their expiration and handling refresh tokens efficiently is critical for a seamless user experience and robust security. In this post, we’ll explore advanced concepts of OAuth2, focusing on refresh tokens and token expiration strategies, with practical examples using Java and Spring Boot.
Go and Java: Rethinking Type Safety for the Pragmatic Age (rohan.ga)
I want to explore where mainstream programming languages are headed, using Java and Go as my primary subjects.
How fast does Java compile? (mill-build.org)
Java compiles have the reputation for being slow, but that reputation does not match today’s reality. Nowadays the Java compiler can compile "typical" Java code at over 100,000 lines a second on a single core. That means that even a million line project should take more than 10s to compile in a single-threaded fashion, and should be even faster in the presence of parallelism
Mark–Scavenge: Waiting for Trash to Take Itself Out (inside.java)
This blog post summarises a new garbage collection algorithm called Mark-Scavenge, which highlights how using reachability as a proxy for liveness in moving GCs leads to unnecessary data movement and how we can address this. This work is from the latest paper within the research collaboration between Oracle and Uppsala University. The full paper can be found on the ACM website.
Writing efficient unit tests in Java (qodo.ai)
Unit testing is like the essential vegetable on a developer’s plate—crucial for a healthy codebase, yet often pushed aside. However, robust Java applications consistently share one common trait: comprehensive test suites that catch bugs before they ever reach production.
Ultra-low-latency, batching and concurrent queue for IPC in Java (github.com/coralblocks)
CoralRing is an ultra-low-latency, lock-free, garbage-free, batching and concurrent circular queue (ring) in off-heap shared memory for inter-process communication (IPC) in Java across different JVMs using memory-mapped files.