Recent submissions

Comment · 8 months ago
Great article!

Will the new metric be exposed in JFR recordings as well?

Comment · 10 months ago
Comment · 1 year ago
I recently wrote an extremely basic Rust web service using Axum. It had 10 direct dependencies for a total of 121 resolved dependencies. I later rewrote the service in Java using Jetty. It had 3 direct dependencies for a total of 7 resolved dependencies. Absolutely nuts.
Comment · 2 years ago
Yeah, currently you have to be really careful about what you do in virtual threads. However, they are actively working on a solution to the issue with synchronized blocks. Once that's been solved, they should be a lot easier to use. Unfortunately, many of us will be stuck on 21 for some time now, and will need to continue to worry about synchronized blocks.
Comment · 2 years ago
Comment · 2 years ago
The comments about this feature are always so tiresome. Please just scroll down and read the "Alternatives" section at the bottom. They're not idiots. They're working within backwards compatibility constraints. They can't just do it like other languages.
Comment · 2 years ago
The company I interned at back in '08 had multiple Tichu games going daily over lunch. It's where I learned to love the game. Sadly, they had a hiring freeze when I graduated in '09, and I had to move on. I still play, but I will always look back fondly on those daily games over lunch.

When I do play Tichu these days, it's actually with the designer of Haggis, Sean Ross. He's been putting out a lot of traditionally inspired games over the past few years. He just published a game called Bacon which is a climbing game based on the traditional climbing game Guan Dan (https://www.pagat.com/climbing/guan_dan.html). I'd recommend checking out both games! The hand size in Guan Dan is 27 cards, and that's not even the most in a traditional climbing game!

An updated version of Haggis will also be coming out later this year, and it will support playing up to 6 players. The 4-player partnership version is particularly good. The reprint will also include some updated rules for the 3-player game, which I like a lot too.

(I'd give you some BGG links, but it looks like it's currently down for maintenance.)

That aside, Pagat is truly a gem. One of the best sites on the internet. I have spent hours and hours there learning and trying obscure card games. Thank you, John McLeod.

Comment · 2 years ago
Agreed. Obra Dinn is a weird example here as there's nothing else like it.
Comment · 2 years ago
>> How do you ship a Java library that uses native code? Python/Node/Ruby worlds know, but OpenJDK ignores the question.

>It doesn't. jmod files and the jmod tool were added in JDK 9 precisely for that (and other things, too).

I have never seen a lib package native dependencies using jmod. It's not even clear to me how this would be done. Everyone I'm familiar with bundles binaries inside the jar. Can you point to an example? I would love to learn a better way of doing this.

Comment · 3 years ago
> Having to use streams in order to use map, etc., is noisy. Why weren't these APIs retrofitted to collections?

Sure, methods along the lines of the following could have been added:

  public <R> List<R> map(Function<? super E, ? extends R> mapper) {
      return stream().map(mapper).toList();
  }
Yes, having them would make Java less verbose in the case where you only want to do a single map, filter, whatever operation on a collection, but I'm personally glad that they weren't because they produce extremely inefficient behavior when chained. So, it would add a performance footgun to save ~18 characters.
Comment · 3 years ago
It's one thing to say, "very little has been added between Java 8 and Java 21," and something else entirely to say, "newer features are often criticized as not being as good as they could be [to maintain backwards compatibility]."
Comment · 3 years ago
> I actually feel like very little has been added between Java 8 and Java 21.

var, records, sealed types, and pattern matching make a huge difference in how Java is written. A lot has changed since 8.

Comment · 3 years ago
I think this perfectly demonstrates my point. Thanks for sharing. Java was perceived as "enterprisey and non-open-source-friendly".

It's also interesting to hear that a Java deployment was thought to be more difficult than a Python deployment. My baised opinion is the exact opposite. Java services are generally incredibly simple to run, especially if you make a fat jar executable.

Comment · 3 years ago
My fear is that Java is now only popular in a professional setting, and is no longer of interest in the broader community. This is sad to me because I personally love the features that you all have been delivering in recent releases, and am very excited about the ones coming down the pike.

A few circumstantial examples. If you look at the Matrix SDKs and implementations (https://matrix.org/docs/projects/try-matrix-now/), Java's presence is sorely lacking. The initial server implementation was written in Python of all things and the rewrite in Go. This is baffling as a Java implementation seems like a no-brainer to me.

In addition to working for a variety of corporations, I have also done some work for academic institutions, specifically in the library space. They have a lot of old tools from the 2000-2010ish range that are predominantly in Java. However, now, these institutions are primarily using Python and Javascript, and are even struggling to find Java developers to maintain their old infrastructure.

Comment · 3 years ago
https://www.redhat.com/sysadmin/podman-docker-compose

Podman listens on the docker socket, and the official docker-compose just works

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton