HNHacker News
TopNewBestAskShowJobs

msgilligan

659 karma · joined January 27, 2012

submissionscomments
msgilligan··on Java 27
The ecosystem has (at long last) standardized on JSpecify (https://jspecify.dev) for nullability annotations. JSpecify allows you to annotate a package or module with `@NullMarked` and your IDE and build (via ErrorProne+NullAway, typically) will check for null safety.

If you develop a library in Java and use it from Kotlin, the built-in Kotlin null-safety will recognize the JSpecify annotations on the library.

Null-restricted types are on the roadmap. See: https://openjdk.org/jeps/8303099

msgilligan··on Gossamer: a Rust-flavoured language with real goroutines and pause-free memory
Java threads including Virtual Threads (JDK 21+) are preemptive.
msgilligan··on We found an undocumented bug in the Apollo 11 guidance computer code
But this seems like a reasonable approach for reverse-engineering, and it seems the bug they found is real.
msgilligan··on DRAM pricing is killing the hobbyist SBC market
I don't think comparing new Pis to used micro pcs is fair. Compare a _used_ Pi with a used micro pc. If you have any geek friends, it's probably not hard to find a used Pi for free.
msgilligan··on It’s time to free JavaScript (2024)
I was in the ballpark!
msgilligan··on It’s time to free JavaScript (2024)
POJO is one of my favorite acronyms. Along with POTS and COTS.

POTS = Plain Old Telephony System COTS = Commercial Off-The-Shelf

msgilligan··on Go Primitive in Java, or Go in a Box
And I think he's also acknowledging that not everybody has an application that needs these performance optimizations.
msgilligan··on State of Embedded: Q4 2025 Overview
What are the most recent and/or highest performance of these?

Update: And mainline support and lack of proprietary boot blobs are two separate criteria. I've heard that NXP offers the former but not the latter.

msgilligan··on State of Embedded: Q4 2025 Overview
Well, a 5-year-old chip may not count as "recent" but the RK-3588 boot chain is "almost fully open-source" [1]. And it seems like it took a major amount of effort (from Collabora, others) to get it this far. I don't know of any equivalent or newer chips that are "more" open, but would love to hear if there are.

[1] https://www.collabora.com/news-and-blog/blog/2024/02/21/almo...

msgilligan··on The Other Linux Logo
The "seated" option adds the feet and helps make it more recognizable.
msgilligan··on Microsoft BASIC for 6502 Microprocessor – Version 1.1
Although that date should really only apply to the `m6502.asm` file. I think for a historical archive accuracy should be important. For example when was it licensed under the MIT license, I assume fairly recently. The file date should reflect that.
msgilligan··on Are we decentralized yet?
The wikipedia definition is here:

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

There are multiple methods of measuring multiple (related) things. What you are describing sounds more like the share of the installed base, which only works for certain types of products. (i.e. it doesn't work for consumables like apples or electricity)

msgilligan··on Are we decentralized yet?
Sounds depressing (i.e. ~5000 in a typical US election)
msgilligan··on Are we decentralized yet?
I have diligently searched for this article online and have been unable to find it. (It might be on microfiche somewhere...)

I did however, find this humorous anecdote:

> A Lotus executive later joked, "The first month we shipped 62,000 copies, and the following month we got 64,000 copies back. It was such a failure they sent us the bootlegged copies back."

https://www.forbes.com/2003/12/16/cx_el_macslide.html

msgilligan··on Are we decentralized yet?
I've heard of companies doing things like this to "cook the books" for a quarterly report.
msgilligan··on Are we decentralized yet?
There are multiple ways of calculating market share (e.g. units vs dollars or for different time periods) but assuming it is measured in dollars for a quarterly time period, how would you calculate the market share based upon my sample data above?
msgilligan··on Are we decentralized yet?
That is how it was calculated in a published trade magazine (either Infoworld or MacWeek, I think) I'm not sure if the the analysis was done by a market research firm or the magazine.
msgilligan··on Are we decentralized yet?
> The only way that makes any sense is if you subtract returns for sales made in a different period to the sales period you are considering

Exactly. That's the way accounting works. They did not know in the previous quarter that the product would be returned in the following quarter, so they end up having negative sales in the current quarter.

Yes it produces "garbage output", which I find amusing.

msgilligan··on Are we decentralized yet?
TIL about the Herfindahl–Hirschman Index and I wanted to test it with a weird corner-case that I remember.

At one point in the late 1980's Microsoft had a GREATER than 100% market share of the Macintosh spreadsheet market.

How is this possible?

Market share (for a given period) is the participant's sales in the market divided by total sales. It just so happened that Lotus had more returns than sales of their failed spreadsheet, Lotus Jazz. So Lotus, had a negative market share and Microsoft had more sales of Excel than total sales in the market, resulting in a greater than 100% market share.

I don't remember the exact numbers and I believe there was at least one other competitor in the study. But let's just say the numbers were:

Microsoft: 102% Lotus: -2%

In that case the Herfindahl–Hirschman Index would be 102^2 + (-2)^2 = 10404 + 4 = 10408.

So, in this pathological case it is possible for the HHI to exceed 10,000.

Edited: Added (for a given period) above, for clarity.

msgilligan··on US reportedly forcing TSMC to buy 49% stake in Intel to secure tariff relief
Good point. They'd get whatever profit they make from the sale of tech to Intel, plus half of whatever benefit Intel receives.
msgilligan··on US reportedly forcing TSMC to buy 49% stake in Intel to secure tariff relief
Well, to be fair, Intel stopped laying golden eggs years ago.
msgilligan··on Trying Guix: A Nixer's impressions
> We need more of comparative posts

The article focuses on a comparison between GUIX _system_ and NixOS. It would be interesting to see an equally thoughtful comparison that just focuses on GUIX vs. NIX as package managers used on another Linux distribution (e.g. Debian.)

In this case, GUIX might fare better as you won't have to worry about the complexities introduced by binary blobs needed for boot, etc.

msgilligan··on The Original Macintosh: Calculator Construction Set
See my comment under the "There are two equals buttons?" parent.
msgilligan··on The Original Macintosh: Calculator Construction Set
The key layout on the calculator (DA or desk accessory) exactly matches the numeric keypad of the Lisa keyboard, but the big '=' key is labelled 'Enter' on the physical keypad. You could use the keypad to use the calculator, which I remember doing on a "Macintosh XL" (a Lisa running Mac OS) Having the big key be '=' was a nice usability feature since 'Enter' didn't make much sense in the calculator DA.

If you search for pictures of "Original Lisa Keyboard" you can see that the layout is the same. However, in the pictures I found the key that corresponds to the small '=' in the screenshot in the article is labelled '-' and there appear to be some other differences. I don't remember these differences or any rationale for them.

Update: They screenshot in the article exactly matches the Macintosh Plus keyboard -- which is a keyboard I actually owned. Although I used Mac XL before getting my Plus, it's probably this keyboard that I'm remembering:

https://en.wikipedia.org/wiki/Apple_keyboards#Macintosh_Plus...

msgilligan··on Endangered classic Mac plastic color returns as 3D-printer filament
Well, he did fund this: https://www.thetech.org/education/
msgilligan··on Run a C# file directly using dotnet run app.cs
With the latest EA release (EA 24) of JDK 25 [1], you no longer need the `--enable-preview`. You can also simplify the println to:

  void main() {
      IO.println("Hello, World!");
  }

JEP 445 has been followed by JEP 512 which contained minor improvements and finalizes the feature [2].

If you want to use 3rd-party libraries, I highly recommend trying JBang [3].

[1] https://jdk.java.net/25/release-notes

[2] https://openjdk.org/jeps/512

[3] https://www.jbang.dev

msgilligan··on Understanding Java's Asynchronous Journey
I simplified the first example to:

  void main() {
      CompletableFuture<String> future = CompletableFuture.supplyAsync(this::asyncMethod);
      future.thenAccept(result -> IO.println(result));
      IO.println("Prints first");             // prints before the async result
      future.join();                          // Wait for future to complete
  }

  String asyncMethod() {
      try {
          Thread.sleep(10000);
      } catch (InterruptedException e) {
          return "Interrupted";
      }
      return "Data Fetched";
  }
I made the following changes:

1. Move the asynchronous function called in the CompletableFuture to its own method

2. Use Java 25 "instance main method" (see JEP 25: https://openjdk.org/jeps/512)

3. Use Java 25 IO.println() to simplify console output

4. Instead of throwing a fatal exception on interruption, return "Interrupted" immediately.

5. Use future.join() so the main method waits for the future to complete and the "Data fetched" output is printed.

This program can be run directly from source with `java Example.java`. (If you're using Java 24 or a version of Java 25 prior to EA 22, you need to use `java --enable-preview Example.java`)

Here is a modified version of the example that interrupts the thread:

  void main() {
      ExecutorService executor = Executors.newSingleThreadExecutor();
      CompletableFuture<String> future = CompletableFuture.supplyAsync(this::asyncMethod, executor);
      future.thenAccept(result -> IO.println(result));
      IO.println("Prints first");             // prints before the async result
      executor.shutdownNow();
      future.join();                          // Wait for future to complete
  }

  String asyncMethod() {
      try {
          Thread.sleep(10000);
      } catch (InterruptedException e) {
          return "Interrrupted";
      }
      return "Data Fetched";
  }
msgilligan··on DOJ will no longer prosecute cryptocurrency fraud
The article is paywalled, but the headline word "fraud" doesn't match the first few paragraphs of the article.

"Regulation by enforcement" has been a real thing and a bad thing. You can't expect people to obey the law if you won't tell them what it is.

I would like to see the government prosecute actual fraud, so if the article goes on to say they will not prosecute that, then maybe the headline is accurate.

msgilligan··on Java 24
> Thus Kotlin will always be a guest language

If you a writing libraries for the JVM, Java is preferred to Kotlin because it does not drag along a standard library dependency.

To be fair there is Kotlin Multiplatform where this is not the case. https://kotlinlang.org/docs/multiplatform.html

msgilligan··on Java 24
> I'm inappropriately smug to have been proven right now, several decades later.

I think you were proven right at least a decade ago. As you said, this is just the final whimper.

Page 1 of 7Next →