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?

A Self-Improving Code World Model Agent

https://jdsemrau.substack.com/p/a-self-improving-code-world-model
1•ph4rsikal•1m ago•0 comments

Show HN: Kiwi – Run agentic dev loops in the cloud, keep keys on your laptop

https://github.com/ibreakthecloud/kiwi
1•harshvkarn•2m ago•0 comments

Plex debuts 5-year membership pass for $250

https://arstechnica.com/gadgets/2026/07/250-used-to-get-you-a-lifetime-plex-pass-now-you-get-a-fi...
1•AndrewDucker•2m ago•0 comments

Australia teaches Amazon the meaning of the word "contract" [video]

https://www.youtube.com/watch?v=DV2-GLJ2FnM
1•dataflow•5m ago•0 comments

Show HN: I built notion database based no code form builder

https://ndbforms.myurll.in/
1•nookeshkarri7•5m ago•0 comments

The Hitchhiker's Guide to Agentic AI

https://arxiv.org/abs/2606.24937
1•jonbaer•6m ago•0 comments

Show HN: TV Time to Serializd Importer

https://chromewebstore.google.com/detail/tv-time-→-serializd-impor/cpcfkgcidilfibakiaohbekkanlk...
1•Gooblebrai•6m ago•0 comments

your competitor is 10x better than you

https://www.mentionedby.world/
2•aykhanstoic•9m ago•1 comments

What else happened in 1776 [video]

https://www.youtube.com/watch?v=nGMCowI4exk
1•iansteyn•10m ago•0 comments

Venice AI becomes a unicorn with its privacy-first AI platform takes off

https://techcrunch.com/2026/07/01/venice-ai-becomes-a-unicorn-with-65m-series-a-as-its-privacy-fi...
2•felixdoerp•12m ago•0 comments

China fires ballistic missile into Pacific nuclear-free zone

https://www.ft.com/content/c52f0a98-2e6a-4acc-a668-d4ce442c4aba
1•cwwc•15m ago•0 comments

Roll your own file-based router in under 50 lines of code

https://wasp.sh/blog/2026/07/01/roll-your-own-file-based-router
1•cprecioso•15m ago•0 comments

Who Survives Europe's Energy Crisis?

https://themerchantsnews.substack.com/p/who-survives-europes-energy-crisis
2•felixdoerp•16m ago•0 comments

On Writing (Code)

https://unpredictabletokens.substack.com/p/on-writing-code
2•jac08h•20m ago•1 comments

Edit Markdown like editing a Word document

https://phcode.io/markdown-editor.html
2•charlypa•20m ago•1 comments

Inertial Navigation System

https://en.wikipedia.org/wiki/Inertial_navigation_system
1•thunderbong•21m ago•0 comments

Show HN: I built an AI that knows my net worth: 3 countries, 6 currencies

https://demo.joinbrisa.com
3•kareemarab•26m ago•0 comments

Pyramids – GIS Utility Package

https://github.com/serapeum-org/pyramids
2•marklit•27m ago•0 comments

Sentiment analysis of Reddit threads using BERT models

https://threadmood.sibencedigital.com/app?url=https%3A%2F%2Fwww.reddit.com%2Fr%2Fprogramming%2Fco...
2•jbarti•28m ago•1 comments

Quitting a Forever Game

https://ravi64.com/quitting-pokemon-go-forever-game/
2•outrunner•31m ago•0 comments

Compressor V2: three compression layers for a 50% LLM agent cost cut

https://www.edgee.ai/blog/posts/introducing-compressor-v2-three-compression-layers-measured-end-t...
5•kokakiwi•32m ago•0 comments

Pokémon Go '10th Anniversary Party' event guide

https://www.polygon.com/pokemon-go-10th-anniversary-party-event-timed-research-costumes-gimmighoul/
3•rldjbpin•33m ago•0 comments

Show HN: RNet, an AI credit wallet for everyday users

https://www.rnetai.org/
3•nextma•34m ago•2 comments

The evidence against "ultra-processed" foods is weaker than you think

https://www.vox.com/future-perfect/494045/ultra-processed-foods-science-rcts
2•theanonymousone•36m ago•1 comments

Jetterix Pressure Nozzle ReviEwS (2026) We Tried It My Honest Review

https://finance.yahoo.com/sectors/technology/articles/jetterix-pressure-nozzle-urgent-report-1739...
2•raysdaro•41m ago•0 comments

Why did the jump from Intel MacBooks to Apple Silicon feel that huge?

https://freipaul.com/posts/why-did-apple-silicon-feel-so-huge
2•PHr15•41m ago•0 comments

How to Download Canvas and Panopto Lecture Videos

https://www.scholarshipsads.com/blog/how-to-download-canvas-and-panopto-lecture-videos
2•behindai•51m ago•0 comments

Trump's 'narco‑terrorism' war in Latin America evokes Reagan

https://theconversation.com/trumps-narco-terrorism-war-in-latin-america-evokes-reagan-then-as-now...
2•robtherobber•53m ago•0 comments

Pioneer of 'extreme male brain' theory of autism now says phrase unhelpful

https://www.theguardian.com/society/2026/jul/05/autism-extreme-male-brain-simon-baron-cohen
2•Michelangelo11•53m ago•0 comments

India's IT industry is shrinking general hiring while AI roles rose 16%

https://twitter.com/rohanpaul_ai/status/2073314619423174678
1•rustoo•53m ago•0 comments