frontpage.
newsnewestaskshowjobs

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?

Show HN: VerusCite, a tool to check for hallucinations in academic articles

https://veruscite-data.com/login?next=%2Fdashboard
1•apwheele•1m ago•0 comments

Reuniting important documents in English theatre history first time in 200 years

https://theconversation.com/how-i-reunited-the-most-important-documents-in-english-theatre-histor...
1•bryanrasmussen•2m ago•1 comments

If experience is the goal, then you always win

https://www.startingfromnix.com/p/if-experience-is-the-goal-then-you
3•jger15•5m ago•0 comments

I Made Tinnitus My Friend (Then It Disappeared)

https://mynoise.net/vlog.php?ep=20260803
1•gregsadetsky•5m ago•0 comments

Anti-AI Populism Is Reshaping American Politics

https://www.motherjones.com/politics/2026/08/anti-ai-populism-is-reshaping-american-politics/
2•cdrnsf•5m ago•0 comments

Microsoft confirms it accidentally installed new OneDrive app on Windows 11 PCs

https://www.windowslatest.com/2026/08/09/microsoft-confirms-it-accidentally-installed-new-onedriv...
1•binsquare•6m ago•0 comments

How Tippi Hedren made Vietnamese refugees into nail salon magnates

https://www.bbc.com/news/magazine-32544343
2•thunderbong•8m ago•0 comments

Tesla Driver Tries 'I Wasn't Driving' Excuse to Get Out of Speeding Ticket

https://gizmodo.com/tesla-driver-tries-the-old-i-wasnt-driving-excuse-to-get-out-of-speeding-tick...
1•ripe•9m ago•1 comments

Agentic Constellations: Cartography of the Hidden

https://zkm.de/en/2026/10/agentic-constellations-cartography-of-the-hidden
1•bryanrasmussen•11m ago•0 comments

Google doesn't need the LLM crown

https://www.semafor.com/article/08/07/2026/google-doesnt-need-the-llm-crown
1•thm•12m ago•0 comments

Windows 11's Weather app uses ~1GB RAM

https://www.omgubuntu.co.uk/2026/08/linux-vs-windows-weather-app-ram
2•prymitive•13m ago•0 comments

Transmission has been forked as "ReTransmission"

https://github.com/transmission/transmission/discussions/9031
2•jonatanholmgren•18m ago•0 comments

Show HN: Helicopter Charter and Rentals

https://helicopter.rentals/
1•mpel•18m ago•0 comments

As AI guzzles water and energy, we are facing a choice: datacentres or homes?

https://www.theguardian.com/commentisfree/2026/aug/09/slough-famous-the-office-datacentres-locals...
3•tomwphillips•19m ago•1 comments

Apple lied under oath to a federal court. The decision to lie came from Tim Cook

https://www.nytimes.com/2025/05/09/technology/apple-app-store-antitrust.html
12•Carell•22m ago•1 comments

Visor – a QR code that's also a live pay-per-call API

https://acp-x402-scriptmasterlabs.onrender.com/vc
1•scriptmaster•25m ago•0 comments

What My Tattoo Artist Taught Me About Life After 50

https://restlessurban.com/feature/what-my-tattoo-artist-taught-me/
2•moonlighter•25m ago•0 comments

Rabies in Cape fur seals highlights an unprecedented shift in rabies ecology

https://www.woah.org/en/rabies-detected-in-cape-fur-seals-highlights-an-unprecedented-shift-in-ra...
2•bushwart•25m ago•0 comments

Running models on RISC-V with IREE

https://iree.dev/community/blog/2026-07-23-running-models-on-risc-v-with-iree/
1•simonpure•28m ago•0 comments

A Critical Approach of ChatGPT's Impact on Everyday Life

https://link.springer.com/chapter/10.1007/978-3-032-31732-2_9
1•geox•34m ago•0 comments

Optimal NYC Neighborhood Locator

https://www.jean.land/nyc-apts
2•imustachyou•34m ago•0 comments

FlowG: Turning Your Logs into Metrics

https://flowg.cloud/blog/logs-into-metrics
1•linkdd•35m ago•0 comments

Show HN: Play Tetris in the terminal (solo and pvp)

https://github.com/backnotprop/tuitetris
2•ramoz•36m ago•0 comments

New x86 CPUID Entry For "EVOLUTIONARY"

https://sandpile.org/x86/cpuid.htm#leaf_0000_0000h
1•ruik•36m ago•0 comments

Hypotheses

https://hypotheses.org/
2•jruohonen•37m ago•0 comments

Interviews with key Python developers from the first 25 years

https://gvanrossum.github.io/interviews/index.html
2•tosh•42m ago•0 comments

Devs to Anthropic, OpenAI, Cursor, and friends Make security and privacy default

https://www.theregister.com/ai-and-ml/2026/08/08/devs-to-anthropic-openai-cursor-and-friends-make...
1•Bender•45m ago•0 comments

Show HN: Rollcall – Simulated Film Development on iPhone with Shared Rolls

https://rollcall.nicksavarese.com/
1•nickooo•46m ago•0 comments

Show HN: AURcade – A tiny self-hosted Git service using cgit and SSH

https://github.com/skorotkiewicz/aurcade
1•modinfo•46m ago•0 comments

Keeping Master Green at Scale

https://dl.acm.org/doi/10.1145/3302424.3303970
3•handfuloflight•49m ago•0 comments