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?

Personal Statement on AI Risk

https://twitter.com/dkokotajlo/status/2099600298855829616
1•hentrep•37s ago•0 comments

Linux development is benefiting from AI, but not from its coding

https://www.xda-developers.com/linux-development-is-really-benefiting-from-ai-but-not-from-its-co...
1•losgehts•1m ago•0 comments

I joined the 'anti-chatbox' interface movement, and build Moe because of it

https://moebot.app/
1•yisrael_g•1m ago•1 comments

Show HN: Airmash – HTML5 Multiplayer Missile Warfare

https://airma.sh/
1•fivesigma•2m ago•0 comments

Show HN: Kaflow Search – A desktop tool for locally indexed Kafka message search

https://kaflow-search.whsoul-tools.com/
1•whsoul•2m ago•0 comments

Benchmark Llamacpp on Intel Panther Lake: Vulkan vs. SYCL vs. OpenVINO vs. CPU

https://grigio.org/benchmarking-llama-cpp-backends-on-intel-panther-lake-vulkan-vs-sycl-vs-openvi...
1•grigio•2m ago•0 comments

Building agents? Here is everything you need to know in one long-read

https://opengeni.substack.com/p/the-anatomy-of-an-agentic-stack-ten
1•davletdz•2m ago•0 comments

Show HN: Sloptris - If Tetris was like AI-assisted dev

https://tonyalicea.dev/sloptris/
2•TonyAlicea10•3m ago•0 comments

OpenAI Considers Pre-IPO Funding Round at More Than $1.2T Valuation

https://www.wsj.com/tech/ai/openai-considers-pre-ipo-funding-round-at-more-than-1-2-trillion-valu...
1•bookofjoe•5m ago•1 comments

Scaling Golang CI by Replacing actions/setup-go

https://www.cloudx.ai/posts/setup-go
5•peterldowns•8m ago•1 comments

Show HN: Picxel – Turn reference images into pixel-art game assets

https://github.com/See-Sol-Lab/Picxel
3•Goumang•9m ago•0 comments

Show HN: How Stale Is Your AI? Release age and training cutoff for 20 models

https://stale.jock.pl/
2•joozio•9m ago•0 comments

ImpactGate: A merge gate that scores the structural decay AI adds

https://github.com/officefloor/ImpactGate
3•sagenschneider•10m ago•0 comments

Voyager – defense revenue as a patience subsidy for commercial space station bet

https://beyondhorizonforesight.substack.com/p/voyager-technologies-where-defense
1•beyondhorizonfs•10m ago•0 comments

Corporate and political systems are efficient filters to promote psychopaths

https://www.sciencedirect.com/science/article/pii/S135917892100104X
2•mw67•10m ago•0 comments

Why do people hold vacant land out of use?

https://blog.landeconomics.org/p/why-do-people-hold-vacant-land-out
2•surprisetalk•10m ago•0 comments

Operating System powered by Qwen 3.8 27B at 1950 tokens/SEC

https://twitter.com/analogalok/status/2099130228866228368
2•soltanov•12m ago•0 comments

Fujifilm Launches Palm-Top Size Camera Instax Pal 2 for $170

https://www.fujifilm.com/jp/en/news/hq/13922
1•HelloUsername•13m ago•0 comments

Robert Kraft – Epstein friend bans Macklemore

https://www.theguardian.com/us-news/2026/sep/15/ed-sheeran-macklemore-palestine-openers-finneas
2•mo7061•15m ago•0 comments

How Electric Cars Took Hold in Australia

https://www.nytimes.com/2026/09/15/world/australia/electric-cars-iran-war-gas-australia.html
1•thelastgallon•15m ago•0 comments

Browser Automation Skill from Tencent

https://github.com/Tencent/BrowserSkill
1•soltanov•17m ago•0 comments

Paying for frontier AI models buys 4-month head start at 5x the cost

https://arstechnica.com/ai/2026/09/exclusive-open-chinese-models-close-gap-with-silicon-valleys-f...
1•rbanffy•17m ago•0 comments

Useful Abstractions

https://constexprcore.github.io/useful_abstractions/
1•tosh•19m ago•0 comments

My Dumbphone Made My Life Better. It Made Everyone Else's Worse

https://www.nytimes.com/2026/09/16/opinion/dumbphone-smartphone-friendship.html
2•Wowfunhappy•20m ago•0 comments

Residential proxies as the next front in the AI wars

https://www.unite.ai/residential-proxies-as-the-next-front-in-the-ai-wars/
2•50kIters•20m ago•0 comments

Show HN: Calmscroll – A Library of Paragraphs

https://calmscroll.com/
1•amadeuspagel•21m ago•0 comments

Is METR a Meaningful Check on Anthropic?

https://www.verysane.ai/p/is-metr-a-meaningful-check-on-anthropic
1•robinhouston•23m ago•0 comments

Altman: "I'm on Team Human" (Interview)

https://www.zeit.de/zeit-magazin/leben/2026-09/sam-altman-openai-artificial-intelligence-chatgpt-...
2•Sweepi•23m ago•0 comments

SK Hynix in talks with Intel about deal to make memory chips in US

https://www.reuters.com/world/asia-pacific/sk-hynix-talks-with-intel-about-deal-make-memory-chips...
1•osnium123•25m ago•0 comments

Can an Agent Port a Codebase?

https://thekevinscott.com/can-an-agent-port-a-codebase/
1•thekevinscott•25m ago•2 comments