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: I made a vector database that runs on an ESP32

https://github.com/beginner-jhj/livero
1•crediblejhj•1m ago•0 comments

How I Work with AI Agents in 2026

https://vpetersson.com/2026/12/03/how-i-work-with-ai-agents-in-2026/
1•mvip•1m ago•0 comments

Takeaways from Practicing Incident Investigation

https://metr.org/notes/2026-12-01-takeaways-from-practicing-incident-investigation/
1•gmays•1m ago•0 comments

Security Scan Hub – Review results from seven security tools

https://github.com/taejunoh/security-scan-hub
1•allinsimple•2m ago•0 comments

Petscii Editor – Online ASCII editor using the Commodore 64 character set

https://petscii.krissz.hu/
1•jansan•3m ago•0 comments

Ask HN: Claude Opus 5.5 keeps rejecting formalizing Epicurus' god, why?

2•dclavijo•3m ago•0 comments

Show HN: Free PDF road maps of all of the US, Canada, and Mexico in 3.6 GB

https://ourcommonknowledge.com
1•leot•3m ago•0 comments

The U.S. faces likely population loss for first time in nation's history

https://www.npr.org/2026/12/01/nx-s1-6060303/immigration-policy-could-mean-the-u-s-population-fal...
2•geox•3m ago•0 comments

LinAlg Matrix and Shader Model 6.10 are now generally available

https://devblogs.microsoft.com/directx/agility-sdk-1-621-retail-and-shader-model-6-10/
1•ksec•4m ago•0 comments

AI watermarks arn't for us to protect, it for those corporation

https://usamainsights.com/ai-watermarks-arnt-for-us-to-protect-it-for-those-corporation/
1•speckx•6m ago•0 comments

DirectStorage 1.4 and the Game Asset Conditioning Library 1.2 are now available

https://devblogs.microsoft.com/directx/directstorage-1-4-and-the-game-asset-conditioning-library-...
1•ksec•7m ago•0 comments

DeepSeek AI Systemic Risk Management Policy Summary [pdf]

https://fe-static.deepseek.com/chat/transparency/b1175a43248a48eecf814aea5f31a97ee12a229b3f11fc78...
1•GalaxySnail•7m ago•0 comments

OpenAI open-sources mcpfs, which mounts MCP servers as a read-only filesystem

https://github.com/openai/mcpfs
2•dvaplima•8m ago•0 comments

Post-quantum safe VPN tunnels available on all WireGuard servers

https://mullvad.net/en/blog/post-quantum-safe-vpn-tunnels-available-on-all-wireguard-servers
3•nsagent•9m ago•0 comments

Jensen Huang hearing LIVE: Nvidia CEO testifies before the Senate [video]

https://www.youtube.com/watch?v=d-jQsrSTNhY
2•mgh2•9m ago•0 comments

Cloudflare CEO urges move off RSA and elliptic-curve encryption now

https://www.notebookcheck.net/Do-not-ignore-this-Cloudflare-CEO-urges-move-off-RSA-and-elliptic-c...
1•nvmdbljstm•10m ago•0 comments

MiniMax M4 Technical Report [pdf]

https://github.com/MiniMax-AI/MiniMax-M4/blob/main/docs/MiniMax_M4_Technical_Report.pdf
1•changxin•10m ago•0 comments

If Apple were spying on everyone's personal Macs

https://techhub.social/@chrisinoakland/117719312875993819
1•Bluestein•11m ago•0 comments

Earth just shattered a worrying temperature record–mere days after setting it

https://www.scientificamerican.com/article/earth-just-shattered-a-worrying-temperature-record-mer...
1•boplicity•12m ago•1 comments

The Goblin Market of Access: Why Survival Isn't an Excuse to Impede Others

https://sightlessscribbles.com/posts/goblin-market-of-access/
1•devinprater•12m ago•0 comments

The State of Post-Training Systems

https://georgianailab.substack.com/p/the-state-of-post-training-systems
1•gmays•13m ago•0 comments

Examining a vintage RAM chip, I find a counterfeit with a different die (2017)

https://www.righto.com/2017/08/inside-fake-ram-chip-i-found-something.html
2•dverlaeckt80•15m ago•0 comments

Show HN: Imp – a workflow engine for coding agents

https://github.com/jpoimboe/imp
1•poims•15m ago•0 comments

Show HN: Cubicle – A pixel campus where AI agents work on your repo as a team

https://github.com/JustVugg/cubicle
1•vforno•16m ago•0 comments

Why are exchanges moving to 23-hour-a-day trading?

https://www.marketplace.org/story/2026/12/02/why-are-exchanges-moving-to-23-5-trading
1•toomuchtodo•18m ago•0 comments

Check vibe-coded apps for security holes

https://hostortoast.com/
5•bluelu•19m ago•0 comments

AI agent audit trails: what regulators need to see

https://www.redpanda.com/blog/ai-audit-trails
2•anatolii1309•20m ago•0 comments

Show HN: SkillUnit – build your agent skill from your tests

https://github.com/Elecash/skillunit
2•elecash•21m ago•0 comments

Operational-necessity-foundational-proof-for-AI-alignment

https://wpnews.pro/news/operational-necessity-foundational-proof-for-ai-alignment-lfdi-protocol
1•buxy123•21m ago•1 comments

Over half of the Dutch population uses AI, smart device adoption has expanded

https://www.cbs.nl/en-gb/news/2026/49/over-half-of-the-population-uses-ai-smart-device-adoption-h...
1•HelloUsername•21m ago•0 comments