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?

Verbalizable Representations Form a Global Workspace in Language Models

https://transformer-circuits.pub/2026/workspace/
1•kesor•1m ago•0 comments

Anthropic's Claude Cowork heads to the cloud

https://www.zdnet.com/article/anthropic-claude-cowork-comes-to-phone-web-cloud/
1•swolpers•1m ago•0 comments

Supamachine: A Deterministic State Machine for Supabase Authentication

https://www.inventbuild.studio/blog/announcing-supamachine-a-deterministic-state-machine-for-supa...
1•virgil_disgr4ce•1m ago•0 comments

purego: A library for calling C functions from Go without Cgo

https://github.com/ebitengine/purego
1•eatonphil•2m ago•0 comments

Owning Inference on a DGX Spark: Qwen3.6 27B writing code that ships

https://www.devashish.me/p/owning-inference-qwen36-on-dgx-spark
1•devashish86•2m ago•0 comments

Aviation Gazetteer – comprehensive list of aviation museums in the UK

https://airmuseums.co.uk/
1•marcusgg•2m ago•1 comments

What We Should Learn from Nordic Happiness

https://www.nytimes.com/2026/07/04/opinion/norway-nordic-social-democracy.html
1•d4ft•4m ago•0 comments

Volvo Is Bringing Native Apple Music to over Two Million Cars

https://insideevs.com/news/800822/volvo-cars-native-apple-music-software-update/
1•01-_-•5m ago•0 comments

The scientists trying to refreeze the Arctic

https://www.theguardian.com/environment/2026/jun/16/arctic-sea-ice-rethickening-climate-geoengine...
1•geox•5m ago•0 comments

Show HN: Rama 0.3 release (5 years in the making)

https://plabayo.tech/blog/rama-0-3
1•gdcbe•6m ago•0 comments

Show HN: Traceval

2•ramkm•6m ago•0 comments

RestoreKit: Recover a Mac in one click from any platform

https://github.com/fcjr/restorekit
2•fcjr•7m ago•1 comments

The (Petty) Reason We Didn't End Up Using Jj

https://blog.gradle.org/the-petty-reason-we-didnt-end-up-using-jj-at-gradle
2•birdculture•9m ago•0 comments

Show HN: I wrote a 1-bit WebGPU runtime to run a 1.7B LLM in the browser

https://aidekin.com/
2•stfurkan•9m ago•0 comments

Reintroducing John Witherspoon: Interstate Relations in Revolutionary America [pdf]

https://isonomiaquarterly.com/wp-content/uploads/2025/07/totten-l-s-2.pdf
2•brandonlc•9m ago•1 comments

Show HN: Humanize – Best static AI text humanizer, based on 50 research papers

https://github.com/harshaneel/humanize
2•gokhalh•10m ago•0 comments

The Bizarre Flaw in the New Orleans Levees

https://practical.engineering/blog/2026/7/7/the-bizarre-flaw-in-the-new-orleans-levees
3•chmaynard•10m ago•0 comments

B.C. 'preparing legal action' against OpenAI

https://www.cbc.ca/news/canada/british-columbia/bc-attorney-general-legal-options-tumbler-ridge-9...
2•ethanplant•11m ago•0 comments

British 'First Fleet' brought smallpox to Australia–and may have killed millions

https://www.science.org/content/article/british-first-fleet-brought-smallpox-australia-and-may-ha...
2•Brajeshwar•11m ago•0 comments

CNN and CNBC promote gambling to make a cheap buck

https://werd.io/cnn-and-cnbc-promote-gambling-to-make-a-cheap-buck/
3•edward•11m ago•0 comments

The foundational elements of AI architecture that IT leaders need to scale

https://www.technologyreview.com/2026/07/07/1139413/the-foundational-elements-of-ai-architecture-...
2•joozio•11m ago•0 comments

Sure, Your Claude Is Doing Amazing Things. Prove It

https://runme.dev/blog/runme-eval
2•sourishkrout•13m ago•0 comments

Life with Hazard Ratios

https://dynomight.net/hazard-ratios/
2•Curiositry•14m ago•0 comments

...

2•Brajesh2022k•15m ago•0 comments

I have an interesting idea to reduce the output tokens almost by fifty percent

2•Brajesh2022k•15m ago•0 comments

Show HN: FlowHook – a file watcher that knows if your build passed or failed

https://github.com/etcoder-642/FlowHook
2•mnsrealx•17m ago•0 comments

Automated Moderation Is Here to Stay

https://www.eff.org/deeplinks/2026/07/part-1-automated-moderation-here-stay
2•hn_acker•17m ago•0 comments

New Literalism Comes for Museums

https://jaymollica.com/blog/new-literalism-comes-for-museums/
2•thebigship•18m ago•0 comments

Canada to buy 12 hi-tech German submarines after bidding war

https://www.theguardian.com/world/2026/jul/06/canada-buys-12-tkms-german-norwegian-submarines-aft...
4•mpweiher•19m ago•0 comments

Amor Fati Entropy

https://hollisrobbinsanecdotal.substack.com/p/amor-fati-entropy
2•jger15•20m ago•0 comments