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?

Nvidia Stock Ski Jump

https://nvidiajump.sos.gd/
1•slater•36s ago•0 comments

Ask HN: Are companies making money by using AI?

1•vanh4lt•2m ago•1 comments

A personal website disguised as a retro spacecraft console

https://ziang-chen.github.io/
1•z_c_cloud•9m ago•0 comments

Trump Says He Told AI Executive to Kiss His Family Goodbye Before Going to Jail

https://gizmodo.com/trump-says-he-told-an-ai-executive-to-kiss-his-family-goodbye-before-going-to...
2•nsagent•11m ago•0 comments

Brigade

https://github.com/rajvardhan19/brigade
1•rajvardhan19•15m ago•0 comments

I built an open-source Python tool to download YouTube videos

https://github.com/pH-7/Download-Simply-Videos-From-YouTube
1•phenrys•19m ago•0 comments

Australia to introduce mandatory incident reporting after OpenAI hack

https://www.theguardian.com/technology/2026/nov/10/australia-manadatory-reporting-openai-medicare...
3•fblp•20m ago•1 comments

Ontology #2: wish you were here

https://blog.coredump.cx/p/ontology-2-wish-you-were-here
1•surprisetalk•21m ago•0 comments

Stingray Fish Laser

https://www.stingray.no/en/technology/
1•tptacek•21m ago•0 comments

AI Second Brain Masterclass [video]

https://www.youtube.com/watch?v=QY5joNgjR5o
1•gamescorpion•26m ago•0 comments

California voters reject measure to tax the wealth of billionaires

https://apnews.com/article/california-billionaire-tax-4ae8cbdc057b99579818016f02ac9d9e
6•ChrisArchitect•26m ago•1 comments

Show HN: ZTHR – what replaces code review when AI agents write all the code

https://zthr.ai/
2•SymmetricalZero•29m ago•0 comments

Notes on Fable 5.2

https://llmleaderboard.com/guides/claude-fable-5-2
1•anitakirkovska•31m ago•0 comments

CoreWeave bond yield tops 16% as AI credit stress rises

https://www.cnbc.com/2026/11/06/coreweave-bond-yield-tops-16percent-as-ai-credit-stress-rises.html
22•lxm•31m ago•0 comments

Slack bot can now generate its own UI on demand

https://vercel.com/changelog/json-render-and-chat-sdk-agents
1•flashbrew•34m ago•0 comments

Charleston AI

https://ai-chs.com/
1•bhartzer•36m ago•0 comments

QNet: Post-quantum Layer-1 in Rust using native ML-DSA-65 signatures

https://github.com/AIQnetLab/QNet-Blockchain
1•egheose13•36m ago•0 comments

Show HN: Kinsona – a hotel booking site that shows its cut on every booking

https://kinsona.com/
1•kinsona•38m ago•2 comments

Show HN: AI Frothiness Index. Daily reading of how stretched the AI boom is

https://frothiness.jagular.io
1•psiberaktiv•38m ago•1 comments

Sheet Music Deserves Better, So We Built Our Own Company [video]

https://www.youtube.com/watch?v=8YXRcR5jJqY
1•Udo_Schmitz•39m ago•0 comments

Microsoft patent: turning idle gaming GPUs into paid AI training hardware

https://videocardz.com/newz/microsoft-could-pay-gamers-for-using-spare-gpu-capacity-to-train-ai
2•simonpure•42m ago•1 comments

Cult of the Dead Cow Reboot [Apr 2026]

https://cultdeadcow.com/news/declaration_rebooted.html
3•sans_souse•42m ago•1 comments

Guns on Amtrak Trains? A Workers Union Is Up in Arms.

https://www.nytimes.com/2026/11/09/travel/amtrak-guns-workers-union.html
2•bookofjoe•45m ago•1 comments

Daybreak says I'm all set. Codex still blocks my own security audit

https://namegarage.com/blog/daybreak-blocked-my-own-security-audit
2•nikolay•50m ago•1 comments

Nvidia's AI advantage is moving beyond the GPU

https://techcrunch.com/2026/08/29/nvidias-ai-advantage-is-moving-beyond-the-gpu/
2•gmays•52m ago•0 comments

$16k and a Solar Panel

https://blog.greg.technology/2026/11/08/16k-and-a-solar-panel.html
2•gregsadetsky•55m ago•0 comments

Debloat Any Android or Google TV over Wi-Fi

https://github.com/Gathin23/cleanyourtv
1•spectraldrift•57m ago•0 comments

Serc: CPython bytecode compiler written in Rust (2-4x speedup, Codex built)

https://github.com/astral-experiments/serc
2•agustaf•58m ago•1 comments

OpenAI models have no agency anymore

3•l-mdev•1h ago•0 comments

ASRock Rack DMRD16-2L+ Spotted with 16 DDR5 Slots for Diamond Rapids

https://www.servethehome.com/asrock-rack-dmrd16-2l-plus-diamond-rapids-ocp-summit-2026/
1•peter_d_sherman•1h ago•0 comments