frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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?

SRE at 53 watching my role get automated – how do I build something of my own?

1•TheFounderFile•2m ago•0 comments

A statement about why RightsCon 2026 will not take place in Zambia

https://www.rightscon.org/rc26-statement/
1•benbreen•2m ago•0 comments

Inspect and filter every HTTP request leaving your microVM

https://slicervm.com/blog/programmable-microvm-egress/
1•alexellisuk•3m ago•0 comments

City Learns Flock Accessed Cameras in Children's Gymnastics Room as a Sales Demo

https://www.404media.co/city-learns-flock-accessed-cameras-in-childrens-gymnastics-room-as-a-sale...
2•joshcsimmons•3m ago•0 comments

Why Your Pbxproj Is Bloated (and How to Fix It)

https://codingwithvera.com/why-your-pbxproj-is-bloated-and-how-to-fix-it/
1•tfe•4m ago•0 comments

I wrote a beginner friendly guide to integrating AI into projects

https://www.amazon.co.uk/Building-AI-Developers-Guide-Integrating-ebook/dp/B0GX3B3MV1
1•ungureanustefan•5m ago•0 comments

Search is full of ads and wrong answers

https://twitter.com/effthealgorithm/status/2049844370203939149
1•dancric•5m ago•0 comments

Show HN: Omar – A TUI for managing 100 coding agents

https://omar.tech
1•karim7•6m ago•0 comments

MySQL 9.7.0 LTS Is Now Available

https://blogs.oracle.com/mysql/mysql-9-7-0-lts-is-now-available-expanded-community-capabilities-a...
1•bratao•7m ago•0 comments

First Tesla Semi Rolls Off High-Volume Production Line

https://electrek.co/2026/04/29/tesla-semi-first-truck-high-volume-production-line/
1•m463•8m ago•0 comments

The exotic particles that could break the Standard Model

https://www.nature.com/articles/d41586-026-01387-x
1•Brajeshwar•9m ago•0 comments

Ackermann Function

https://en.wikipedia.org/wiki/Ackermann_function
1•tosh•9m ago•0 comments

I endured the Apple Watch for four months

https://manualdousuario.net/en/apple-watch-review/
1•rpgbr•9m ago•0 comments

Claude Opus 4.7 vs. Claude Opus 4.6: What Changed?

https://www.mindstudio.ai/blog/claude-opus-4-7-vs-4-6-comparison
1•sminchev•10m ago•0 comments

Running hackathons: startup&scaleup edition

https://matloka.com/blog/internal-hackathon-playbook
1•Twixes•12m ago•1 comments

Store speed and conversion: what the data shows

https://www.shopify.com/enterprise/blog/store-speed-conversion
1•mxstbr•14m ago•0 comments

Ask HN: Struggling with managing i3/tmux/vim. Need to simplify.

1•madewithdrama•16m ago•3 comments

Ask HN: Where is my UX after all those billions spent on LLM codegen?

3•tzury•23m ago•1 comments

The Psychology of Human Misjudgment (2005) [pdf]

http://web.archive.org/web/20151004200748/http://law.indiana.edu/instruction/profession/doc/16_1.pdf
1•downbad_•23m ago•1 comments

The open standard for agent readiness

https://www.agentready.org/
1•geueuudyhdwj•23m ago•0 comments

ICANN opens applications for new generic top-level domains first time since 2012

https://www.theregister.com/2026/05/01/icann_new_gtld_applications/
2•Bender•24m ago•0 comments

The Persian Polycrisis

https://thehonestsorcerer.substack.com/p/the-persian-polycrisis
1•OgsyedIE•24m ago•0 comments

Women sue the men who used their Instagram feeds to create AI porn influencers

https://www.wired.com/story/ai-porn-lawsuit-arizona/
2•Bender•25m ago•0 comments

Minnesota passes ban on fake AI nudes; app makers risk $500K fines

https://arstechnica.com/tech-policy/2026/05/minnesota-set-to-be-first-state-to-ban-nudification-a...
2•Bender•26m ago•0 comments

WolfCOSE vs. the Field: The Smallest, Most Complete COSE Implementation

https://aidangarske.github.io/wolfCOSE/blog/wolfcose-vs-the-field/
1•aidangarske•26m ago•1 comments

Fredis: A simple in-memory Redis compatible server in Rust

https://gitlab.com/foscogab/fredis
1•gfosco•29m ago•1 comments

AI as Infrastructure

https://cunderwood.dev/2026/05/01/ai-as-infrastructure/
2•speckx•30m ago•0 comments

How to speed up clinical trials (Works in Progress Podcast)

https://podcasts.apple.com/us/podcast/how-to-speed-up-clinical-trials/id1819488714?i=1000763007270
2•marojejian•31m ago•1 comments

Top AI companies agree to work with Pentagon on secret data

https://www.washingtonpost.com/technology/2026/05/01/pentagon-ai-deals-microsoft-amazon-google-cl...
1•geox•31m ago•0 comments

Musk Warns of Killer AI, While He and Silicon Valley Cash in on AI That Kills

https://theintercept.com/2026/05/01/elon-musk-openai-lawsuit-trial/
2•cdrnsf•32m ago•0 comments