frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Packed Data Support in Haskell

https://arthi-chaud.github.io/posts/packed/
77•matt_d•1y ago

Comments

nine_k•1y ago
> Introducing the ‘packed’ data format, a binary format that allows using data as it is, without the need for a deserialisation step. A notable perk of this format is that traversals on packed trees is proven to be faster than on ‘unpacked’ trees: as the fields of data structures are inlines, there are no pointer jumps, thus making the most of the L1 cache.

That is, a "memory dump -> zero-copy memory read" of a subgraph of Haskell objects, allowing to pass such trees / subgraphs directly over a network. Slightly reminiscent of Cap'n Proto.

90s_dev•1y ago
We are always reinventing wheels. If we didn't, they'd all still be made of wood.
Zolomon•1y ago
They mention this in the article.
spockz•1y ago
It reminds me more of flat buffers though. Does protobuf also have zero allocation (beyond initial ingestion) and no pointer jumps?
cstrahan•1y ago
No, one example of why being variable sized integers.

See https://protobuf.dev/programming-guides/encoding/

carterschonwald•1y ago
One thing that sometimes gets tricky in these things is handling Sub term sharing. I wonder how they implemented it.
tlb•1y ago
> the serialised version of the data is usually bigger than its in-memory representation

I don’t think this is common. Perhaps for arrays of floats serialized as JSON or something. But I can’t think of a case where binary serialization is bigger. Data types like maps are necessarily larger in memory to support fast lookup and mutability.

nine_k•1y ago
I suppose all self-describing formats, like protobuf, or thrift or, well, JSON are bigger than the efficient machine representation, because they carry the schema in every message, one way or another.
IsTom•1y ago
If you use a lot of sharing in immutable data it can grow a lot when serializing. A simple pathological example would be a tree that has all left subtrees same as the right ones. It takes O(height) space in memory, but O(2^height) when serialized.
gitroom•1y ago
honestly i wish more stuff worked this way - fewer hops in memory always makes me happy
lordleft•1y ago
This was very well written. Excellent article!
NetOpWibby•1y ago
Is this like MessagePack for Haskell?

Byte, Vol. 7, No. 8 (1982) [pdf]

https://ia600409.us.archive.org/16/items/byte-magazine-1982-08/1982_08_BYTE_07-08_Logo.pdf
1•susam•18s ago•0 comments

Net 11 introduces runtime-native async replacing compiler-gen. state machines

https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-11/runtime
1•polskibus•2m ago•0 comments

Looking Back at Lewis and Clark

https://www.newyorker.com/magazine/2026/06/01/this-vast-enterprise-craig-fehrman-book-review
1•bookofjoe•2m ago•1 comments

LocalEmu, a free AWS emulator (fork of archived LocalStack)

https://github.com/localemu/localemu
1•CloudHackerFr•4m ago•0 comments

A disappearing Service Processor (2025)

https://oxide.computer/blog/cosmo-sp
1•mooreds•5m ago•0 comments

Frona v2026.5.5 – self-hosted personal AI assistant

https://github.com/fronalabs/frona/releases/tag/v2026.5.5
1•syncerx•6m ago•0 comments

The price of the Manhattan Project (2013)

https://blog.nuclearsecrecy.com/2013/05/17/the-price-of-the-manhattan-project/
1•downbad_•6m ago•0 comments

Transfer Emotions to VR Avatar via Brain with PiEEG XR

https://www.notebookcheck.net/For-VR-PiEEG-XR-measures-brain-activity-in-real-time.1311211.0.html
2•Christiangmer•10m ago•0 comments

The Cost of AI

https://alextardif.com/AI.html
1•coinfused•12m ago•0 comments

Who Has the Hardest Fist in China's AI Valuation Race?

https://crossingriver.substack.com/p/who-has-the-hardest-fist-in-chinas
2•ramimac•14m ago•0 comments

Saffron

https://ronaldperry.org/SaffronWebPage/index.html
1•giancarlostoro•14m ago•0 comments

An OS in pure Rust with its own TCP/IP and TLS 1.3 stack, fetching the live web

https://github.com/rfi-irfos/rusty-penguin
2•simeon-kepp•14m ago•0 comments

Why Anthropic Just Became the Most Valuable AI Company on Earth

https://medium.com/@tbelbek/why-anthropic-just-became-the-most-valuable-ai-company-on-earth-and-w...
1•rdstrtwlkr•17m ago•0 comments

API Drift Detection: Catch Breaking Changes Before They Reach Production

https://apiguard.co/blog/api-drift-detection-guide
2•mkhorasani•18m ago•0 comments

NeXTWORLD Interviewed Steve Jobs (1992)

https://computeradsfromthepast.substack.com/p/nextworld-interviewed-steve-jobs
1•rbanffy•19m ago•0 comments

Nexa-gauge – LLM evaluation framework with per-node scoring controls

https://harnexa.dev/nexa-gauge/docs/introduction
2•Sardhendu•19m ago•0 comments

Old Blue Workbench

https://triumph.no/oldblue/
1•erickhill•20m ago•0 comments

Could nature itself hold the solution to climate change?

https://www.theguardian.com/books/2026/may/24/could-nature-itself-hold-the-solution-to-climate-ch...
1•rendx•22m ago•0 comments

Parallel Reconstruction of Lawful TLS Wiretapping

https://remyhax.xyz/posts/reproducing-lawful-tls-wiretapping/
3•jerrythegerbil•23m ago•0 comments

Jef Raskin, the Visionary Behind the Mac

https://lowendmac.com/2013/jef-raskin-the-visionary-behind-the-mac/
7•tylerdane•28m ago•2 comments

Harness Engineering Course

https://harnesscourse.com/
1•gandalfgeek•29m ago•0 comments

They Might Be Giants – I'm Impressed (2007) [video]

https://www.youtube.com/watch?v=3CccPPDe2JU
1•petethomas•31m ago•0 comments

Marketing skill for Claude with 26 evals – +20pp over baseline

https://github.com/inerrata/brief
1•healman•33m ago•0 comments

Show HN: Nimic – write pure Python and compile AOT to native binaries via Nim

https://github.com/dima-quant/nimic
1•dima-quant•34m ago•0 comments

Software stocks wrap up best month since 2001; talk of 'SaaSpocalypse' subsides

https://www.cnbc.com/2026/05/29/software-stocks-wrap-best-month-since-2001-as-talk-of-saaspocalyp...
2•TMWNN•34m ago•1 comments

Oscar-winning Star Wars editor Marcia Lucas dies aged 80

https://www.bbc.com/news/articles/cvgzy64j9l1o
4•layer8•36m ago•0 comments

Show HN: AI Simulaionen Based on FEP

https://aic-ai-lab.site/login
1•luzifer333•37m ago•0 comments

Diablo 2 map generator based on 31 bits of information

https://www.reddit.com/r/diablo2/s/Gcn07WPLCK
1•nixass•38m ago•0 comments

Autism subtypes identified using cross-species functional connectivity analyses

https://www.nature.com/articles/s41593-026-02287-z
1•bookofjoe•38m ago•0 comments

Killing PRs was the easy part, now technical death keeps the CTO up

https://shiftmag.dev/killing-prs-was-the-easy-part-now-technical-death-keeps-the-cto-up-9910/
1•dxs•38m ago•0 comments