New stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Thoughts and Observations on apples iPhones duo 18pro event(daringfireball.net ↗)
    discuss
  2. Clarity Act (crypto) fails in the Senate(nytimes.com ↗)
    1comments
  3. Coreutils – Rejected Feature Requests(gnu.org ↗)
    discuss
  4. Cerebras-powered, instant design canvas using Qwen3.8-27B [video](youtube.com ↗)
    discuss
  5. Show HN: Now You Can Use – Web Baseline Timeline(nowyoucanuse.com ↗)
    discuss
  6. Recent Decisions Spark Questions on GenAI, Privilege, and Privacy Expectations(ktslaw.com ↗)
    discuss
  7. Contrails.org – Contrail Avoidance for the Climate(contrails.org ↗)
    discuss
  8. Landing the Space Shuttle – A Flying Machine and the Thrill of a Lifetime(eaa.org ↗)
    discuss
  9. Show HN: AgentReady – can AI assistants read your site?(lumnika.com ↗)
    discuss
  10. Show HN: Leo – a Markdown engineering process for AI coding agents(github.com/alex-zaporozhan ↗)
    discuss
  11. Mistaken alignment is not misalignment(c.mov ↗)
    1comments
  12. Vieta's Formulas(wikipedia.org ↗)
    discuss
  13. More Tree-sitter, more neocaml, more elisp(lambdafoo.com ↗)
    discuss
  14. How to keep a knowledge base up to date when the product changes every day(frigade.com ↗)
    discuss
  15. Emily St. John Mandel on Writing a Novel of Dystopian Counterlives(lithub.com ↗)
    discuss
  16. The proof passed. Can you see why it works?(github.com/8braid ↗)
    discuss
  17. Show HN: A chess analyzer that runs in the browser(github.com/huytd ↗)
    discuss
  18. A better way of blocking macOS updates(zoey-on-github.github.io ↗)
    discuss
  19. Ask HN: eBPF verifier packet tracking boundaries under volumetric socket drops?
    discuss
  20. Nvidia and CrowdStrike Develop New Cybersecurity AI Models(wsj.com ↗)
    discuss
  21. Steve Bannon and Bernie Sanders Condemn Tech 'Oligarchs' and Demand A.I. Reforms(nytimes.com ↗)
    discuss
  22. Founding documents from companies that shaped industries(relentless-investments.com ↗)
    discuss
  23. Waymo to start Tokyo robotaxi service next year in Asia push(japantimes.co.jp ↗)
    1comments
  24. Interview with Paul Bogen [video](youtube.com ↗)
    discuss
  25. Divide, Consult, Conquer: Capability Laundering Through Aligned LLMs(arxiv.org ↗)
    discuss
  26. Singapore launched a novel five-year national campaign to nurture reading habits(cnn.com ↗)
    discuss
  27. Show HN: Biom – A visual workspace where your AI agents' work lands(biom.dev ↗)
    discuss
  28. Hackaday Europe 2026: Bare Metal Made Easy(hackaday.com ↗)
    discuss
  29. Show HN: Plurnk (Yet *Another* AI Harness)(github.com/plurnk ↗)
    discuss
  30. Independent Lens – Ghost in the Machine: AI's troubled history, current impacts(pbs.org ↗)
    1comments

Ask HN: Why serialize documents to disk instead of memory-mapping runtime state?

2 pointsby 1h ago
4 comments
Opening files like docx requires heavy string parsing and pointer allocation. After an OS swaps active RAM pages out as to flash disk as virtual memory, it can restore them almost instantly. Using 2X more flash disk space is worth if we can achieve millisecond loads. Why hasn't direct memory dumping/reloading replaced file parsing for complex document models?

I started a company in 2000 to build a commercial cross-platform desktop suite in Java. To achieve seamless live-data-linking across text, sheets and slides, we stored data objects into a 3D coordinate space (Sheet_Num,Row_Num,Column_Num) and reference/access them instead of pointers. This scheme enable us open a 50,000-pages document in 8 seconds, compared to 300+ seconds by a competing suite requiring parsing andan array of pointer construction.

Recently, some suggested that our 3D design without referencing data by pointers can possibly use OS provided mmap to restore back the entire document image as loaded into the RAM to flash disk. Instead of opening the file again with all those parsing/pointer-building work, the memory mapped buffers can be simply be brought back into RAM in milliseconds.

Our senior engineers have confirmed the feasibility and tries to prove it, but, they have encountered numerous problems to save using OpenJDK and CRaC on Linux. They told me that OpenSDK has stated that it can be done but probably did not test this part thoroughly because they never expected it be actually used.

Has any one successfully decouple a complex document substrate into off-heap memory to achieve true zero-copy mmap load or does the JVM runtime always get in the way?

1h agoHN ↗

So we can share them with each other? Are we going to pass around memory dumps instead? What about tool choice when working on a specific document format?

1h agoHN ↗

Serializing has many uses.

- Memory might not look the same on all platforms, if your app is multi-platform you stop being able to share your data cross-platform.

- The internal data structures of your app will absolutely change as your app evolves, the binary data in memory is a raw result of your data structures. So you have to commit to never changing data structures, or create complicated binary migration tools to update memory when your app updates.

- Debugging corrupted memory is incredibly tedious any sometimes impossible. Having plain text serialized data makes debugging much more straightforward.

Top my my head I would suggest to focus more on improving performance on your serialization pipeline. There might be some subset of your data that is unlikely to ever change and is identical on all platforms, maybe your serializer is hybrid in that case.

51m agoHN ↗

When you use RandomAccessFile API in JVM one of the flags allows you to mmap the contents

        try (RandomAccessFile file = new RandomAccessFile("example.dat", "rw");
             FileChannel channel = file.getChannel()) {
            
            // Map the file into memory from position 0 up to bufferSize
            MappedByteBuffer buffer = channel.map(FileChannel.MapMode.READ_WRITE, 0, bufferSize);

Once you have a mappedbytebuffer you can use MemoryLayout from FFM to view it as structured data without deserializing

23m agoHN ↗

Be careful!

I hear the old Microsoft Word save files used memory dumps, which became an undocumented nightmare of a file format.

You need total control over memory layout of the saved runtime state. No hidden fields. No pointers either - you want to be able to reload at another address. Sooner or later, you might want to add some state, and you'd need a place to put it.

That said, I have used mmap something like this, mostly so state (data) could be paged in on demand.