frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

A Jev that can ask Opus for help gives Opus accuracy at 4x lower cost

https://hightouch.com/blog/llm-judges-identity-resolution
81•theanomaly•1h ago•22 comments

Firecracker VM Escape: PwnEscape Part 2

https://pwn.ai/blog/firecracker-escape
72•SerCe•1h ago•33 comments

US FAA says it will phase out floppy disks from air traffic control by 2028

https://www.reuters.com/world/us/us-faa-says-it-will-phase-out-floppy-disks-air-traffic-control-b...
195•ChrisArchitect•16h ago•161 comments

Tesla to wind down Cybertruck production

https://www.nbcnews.com/tech/tech-news/tesla-wind-cybertruck-production-years-poor-sales-markets-...
642•PLenz•8h ago•1411 comments

First steps in bare-metal programming using UEFI

https://kevinboone.me/efitest_index.html
129•LaSombra•4h ago•16 comments

My first and last telegram was from Rebecca West

https://thelampmagazine.com/blog/rebecca-wests-nightingale
19•bryanrasmussen•1h ago•4 comments

Blender's UI and Runtime: Much Faster Than GPUI

https://github.com/ppmpreetham/BUI
629•ppmpreetham•13h ago•257 comments

Restaurant Delivery Payment-Skimming Campaign

https://www.infohawk.com/news/2026-11-05-scamwich-restaurant-skimming
25•fiej•1h ago•9 comments

Memorilla: Latent Semantic Memory for LLMs

https://arxiv.org/abs/2610.21375
43•handfuloflight•2h ago•2 comments

Size-It-Up (Game)

https://magnitudle.com/size-it-up
38•whoishiding•2h ago•13 comments

Gemini Omni 1.2 Flash

https://blog.google/innovation-and-ai/technology/developers-tools/introducing-gemini-omni-1-2-flash/
257•thisisauserid•7h ago•202 comments

Replit rebuilt its sandbox engine with microVMs

https://frontier.replit.com/sandbox-engine-microvms-part-1/
15•gaplong•1h ago•3 comments

Show HN: Agents infer Lego mechanisms from sources, then animate them

https://github.com/anteloc/ldraw-mecha/tree/v0.5.0
12•antelocnova•1h ago•0 comments

UpCodes (YC S17) is hiring SDR's to sell AI compliance software

https://up.codes/careers?utm_source=HN
1•Old_Thrashbarg•3h ago

Devvm.dev: One VM for every project

https://devvm.dev/
45•luispa•3h ago•25 comments

Deus Ex

https://www.filfre.net/2026/11/deus-ex/
283•cybersoyuz•5h ago•147 comments

40C3 halfnarp – Submit talk preferences to aid scheduling

https://halfnarp.events.ccc.de
21•hanemile•2h ago•2 comments

Show HN: Waymark – A workflow engine that compiles jobs instead of replaying

https://github.com/piercefreeman/waymark
6•icyfox•1d ago•0 comments

As the Japanese countryside empties out, wildlife is disappearing

https://e360.yale.edu/digest/japan-depopulation-biodiversity
42•rdmuser•1h ago•23 comments

How octopuses squeeze through too small gaps

https://journals.biologists.com/jeb/article/229/21/jeb253615/373332/How-octopuses-squeeze-through...
20•bookofjoe•7h ago•0 comments

We know 15k websites are infected. how do we tell them?

https://scotthelme.co.uk/we-know-15-579-websites-are-infected-how-do-we-tell-them/
100•speckx•2h ago•81 comments

PyLings: Solve Exercises and Learn Python

https://github.com/thesayfulla/pylings
28•thesayfulla•3h ago•1 comments

Anthropic IPO buyers see valuation as low as $1.1T

https://www.bloomberg.com/news/articles/2026-11-06/anthropic-ipo-valuation-expectations-pressured...
119•dgellow•4h ago•292 comments

Chomsky and the two cultures of statistical learning (2011)

https://www.norvig.com/chomsky.html
74•andsoitis•12h ago•61 comments

SketchAgentBench – evaluate LLMs on 3D spatial reasoning

https://sketchagent.dev/
5•wsxiaoys•29m ago•0 comments

AI is dramatically accelerating AI research

https://www.planned-obsolescence.org/p/ai-is-dramatically-accelerating-ai
3•yurivish•30m ago•0 comments

Rune: A native GPU-rendered Rust UI framework for macOS, Windows, Linux and web

https://github.com/anomalyco/rune
110•mik3y•4h ago•84 comments

Zero Hour: Telling time was a matter of survival and strategy during WWI (2014)

https://www.laphamsquarterly.org/roundtable/zero-hour
82•NaOH•1d ago•3 comments

We've built an open-source feature flag server for 11 years

https://github.com/Unleash/unleash
127•ivarconr•9h ago•84 comments

Lippitt-Knoster in Practice (Field Notes for Managing Complex Projects)

https://sharedphysics.com/lippitt-knoster-in-practice-field-notes-for-managing-complex-projects/
48•goopthink•6h ago•2 comments
Open in hackernews

Understanding Java's Asynchronous Journey

https://amritpandey.io/understanding-javas-asynchronous-journey/
17•hardasspunk•1y ago

Comments

Neywiny•1y ago
I don't get it. The first example in JS vs Java looks very similar. Now all those other code blocks, they certainly have more going on but idk how that compares to JS. And to answer the questions:

A completable future is something that in the future may complete. I think that's self explanatory. A promise seems equally vague.

Boilerplate looks the same. JS is just a function, Java they put a class around it. Java requires exception handling which is annoying but having fought errors in async JS, I'll take all I can get.

API is eh. Sure. But that's not even shown in this example so I have no idea.

So JS saves like 3 lines? Is that really so much better?

cogman10•1y ago
> A completable future is something that in the future may complete. I think that's self explanatory.

But not the reason for the name :).

It's called "completable" because these futures have a method on them `future.complete("value")`. Before their introduction, there was a `Future` API that java had.

nogridbag•1y ago
Yeah that first example is rather poor. And it uses the word boilerpate to seemingly refer to the stuff unrelated to the async code (class declaration, exception handling, main method).

I don't use Java async much, but I guess if you have a utility method named "setTimeout" than the example can simply be:

    public CompletableFuture<String> fetchData() {
        return setTimeout(() -> "Data Fetched", 10000);
    }

    public void loadData() {
        fetchData().thenAccept(System.out::println);
    }
Which is simpler or equivalent to the JS example.
stevoski•1y ago
The Java 1 example uses lambdas, which were introduced in Java 8.

It’s probably intentional, because it allows showing the Java 1 Thread approach succinctly.

But as long-term Java person, I find it jarring.

philipwhiuk•1y ago
Java's had `var` since Java 10 but apparently the author deliberately ignored that to make the example as wordy as possible.

It's a little tiring to read a Java example with an entry-point (the public-static-void bit) and then a JavaScript example without one.

If you strip that out the original Java is:

  var future = CompletableFuture.supplyAsync(() -> {
        try {
                Thread.sleep(10000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            return "Data Fetched";
        });
  future.thenAccept(result -> System.out.println(result));
  System.out.println("Prints first"); // prints before the async result
which is only obtuse due to checked exceptions.

Arguably it's still a different thing you're doing, because it's not scheduling a task on a pool, it's creating a thread which sleeps for 10 seconds.

elric•1y ago
`var` is very unhelpful in situations where the reader might not be entirely familiar with the context, especially when using factory methods.

I don't think the author was trying to make the example "wordy" so much as "clear".

cogman10•1y ago
Also, arguably, the wrong way to do something like this.

The author uses `setTimeout` for javascript. The equivalent for Java is either the `Timer` class or a `ScheduledExecutorService`. Doing a `Thread.sleep` simply isn't how you should approach this.

With that in mind, if you want to use both these things and keep the completable future interface you'd have to do soemthing like this.

    ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
    var future = new CompletableFuture<String>();
    scheduler.schedule(()->future.complete("Data Fetched"), 10, TimeUnit.SECONDS);
    future.thenAccept(result -> System.out.println(result));
    System.out.println("Prints first"); // prints before the async result
    scheduler.shutdown();
AtlasBarfed•1y ago
Does no.js still limit you to a single core/CPU use?

Or as a node successfully been able to start utilizing more cores underneath its JavaScript single thread model. It presents the programmer?

I just remember early node.js from like 15 years ago and the single background task limitation of JavaScript running in a web page.

Cuz you got async code is nice, but what you really wanted to be able to harness in modern CPUs is multi-core

That said, I've been looking for an article like this for a while, although I think there are other associated libraries that also had steps in here. I do think the jvm adopted a lot of those, but I'm not sure if they actually are better than the original extension libraries.

msgilligan•1y ago
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";
  }
wpollock•1y ago
In Java 24, new features support educational and demonstration use. You don't need a class to wrap your main method, which also has a simpler signature. To compare JavaScript with Java examples, one should make use of these features.

While the examples may need some work, I enjoyed this post, it nicely shows the evolution of Java concurrency.