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: Pocket Voice: TTS and Voice clone in the browser

https://h3manth.com/ai/pocket-voice/
1•init0•1m ago•0 comments

Irreducible Loops

https://maskray.me/blog/2026-07-12-irreducible-loops
1•matt_d•1m ago•0 comments

Ask HN: I feel like I've lost my identity due to AI

1•im-not-enjoying•2m ago•0 comments

Ask HN: Workflow Automation vs AI Agents?

1•dicksent•3m ago•0 comments

Native Foxglove Visualization in LeRobot

https://foxglove.dev/blog/native-foxglove-visualization-in-lerobot
1•intrepidsoldier•3m ago•0 comments

Euclideon Are Back as Nuclideon

https://nuclideon.com/
1•bananaboy•4m ago•1 comments

MCP onboarding is the most exciting thing happening in tech

https://moekhalil.substack.com/p/mcp-onboarding-is-the-most-exciting
2•mfkhalil•5m ago•0 comments

Databricks raises $5B with a $188B valuation

https://www.reuters.com/legal/transactional/databricks-valued-188-billion-after-coatue-led-invest...
2•ansnadeem•6m ago•0 comments

Trump firm plans to sell priority access to Truth Social posts, possibly his own

https://apnews.com/article/truth-social-trump-media-trump-post-conflicts-of-interest-truth-api-75...
4•femto•12m ago•2 comments

Maurice Wilkes: changing hardware problems into software problems

https://nirmalutwani.substack.com/p/when-changing-a-computer-meant-rewiring
1•nutwani91•18m ago•1 comments

What % of your usage is open source vs. frontier models?

1•hardcapital•21m ago•1 comments

Lightport – a maintained fork of Portkey AI gateway

https://github.com/glama-ai/lightport
1•punkpeye•21m ago•0 comments

Nadella criticizes Anthropic's Fable for being 'editorially controlled'

https://www.cnbc.com/2026/07/16/microsoft-ceo-says-anthropic-fable-request-policy-doesnt-make-sen...
1•Exoristos•22m ago•0 comments

SpaceX Starship launch aborted on the pad at the last moment

https://apnews.com/article/starship-spacex-rocket-musk-nasa-455927b93b0fdc5512a4567a53eb3228
1•1vuio0pswjnm7•23m ago•0 comments

Xi pitches China as leader of new global AI order, challenging US dominance

https://www.reuters.com/world/asia-pacific/chinas-xi-promotes-chinas-commitment-ai-access-speech-...
2•chvid•24m ago•3 comments

OpenAI faces sanctions bid as newspapers say ChatGPT was trained on stolen news

https://www.latimes.com/business/story/2026-07-10/openai-faces-sanctions-bid-as-newspapers-say-ch...
1•1vuio0pswjnm7•25m ago•0 comments

EU forces Google to share search data and open Android to rival AI companies

https://apnews.com/article/eu-google-android-antitrust-184b3067120e56d858cb8c81aee26d45
2•1vuio0pswjnm7•28m ago•0 comments

Neko Health raises $700M Series C ahead of US launch

https://www.nekohealth.com/gb/en/press/neko-health-raises-usd700m-series-c-ahead-of-us-launch
1•doppp•33m ago•0 comments

Show HN: 1board for the Whole World

https://1board.org/
1•Naulian•35m ago•0 comments

I measured whether AI writes hollower tests than humans. It doesn't

https://driivai.github.io/voidguard/
1•BenjiFranclin•42m ago•0 comments

OpenAI encrypts Codex agent instructions, blocking local audit trail

https://www.theregister.com/ai-and-ml/2026/07/15/openai-hides-codex-agent-instructions-behind-enc...
2•nyku•44m ago•0 comments

The Mar-a-Lago Accord's Economic Ripple Effect Widens

https://www.cfr.org/articles/the-mar-a-lago-accords-economic-ripple-effect-widens
1•simonebrunozzi•45m ago•0 comments

Show HN: Scribe, a CLI that builds AI agent memory from your repos and sessions

https://getscribe.dev/
2•quatermain•47m ago•0 comments

Show HN: No AI, just plain old JavaScript and Python RAD

https://jam-py-v7.github.io/jam-py-v7/
1•jampy-v7•49m ago•0 comments

Guided Access in iPad with Brightness Shortcut

https://rdamodar.com.np/thought/2026/07/guided-access-in-ipad-with-brightness-shortcut/
1•fhcxvbdb•50m ago•0 comments

Your Eye Health: It's Time to Talk About It

https://codedynasty.dev/posts/your-eye-health-its-time-to-talk-about-it
2•66yatman•51m ago•3 comments

China Just Dropped Another Bomb on America's Frontier AI Companies

https://gizmodo.com/china-just-dropped-another-bomb-on-americas-frontier-ai-companies-2000786670
3•yogthos•53m ago•0 comments

The Fight over Humanoid Robots Has Shut Down a Car Factory for the First Time

https://www.wsj.com/business/autos/the-fight-over-humanoid-robots-has-shut-down-a-car-factory-for...
1•breve•53m ago•0 comments

Country Draw

https://country-draw.vercel.app/
1•imbobbytables•53m ago•0 comments

Ente's business metrics are open now

https://ente.com/blog/open/
2•mulmen•56m ago•0 comments