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?

Neuroergonomics (2011)

https://www.youtube.com/watch?v=H7NdmyN0ciE
1•fuzztester•41s ago•1 comments

Show HN: Jev.Store – A dedicated directory of useful things made on Jev

https://www.jev.store/
1•sankalpdomore•2m ago•0 comments

Kiro adds jev to decide turn in preview

https://kiro.dev/changelog/
1•super_linear•2m ago•0 comments

Initial-scale no longer needed

https://www.quirksmode.org/quirksblog/2026/0902-initial.html
1•justin-reeves•2m ago•1 comments

WBHM team expected to use "Gulf of America" in place of "Gulf of Mexico"

https://view.reach.uab.edu/?vawpToken=ME7CAU4SLM3UDF7WR3ZWYWEU7Y.100228
1•mooreds•5m ago•0 comments

Is z.ai shipping a different ZCode client than the source?

1•leftbehind•5m ago•0 comments

Mission-Bound Authorization for OAuth 2.0

https://datatracker.ietf.org/doc/draft-mcguinness-oauth-mission/
1•mooreds•6m ago•0 comments

How to copy URLs of multiple Firefox tabs without installing an extension

https://www.autodidacts.io/how-to-copy-urls-of-multiple-firefox-tabs-without-installing-an-extens...
1•Curiositry•6m ago•0 comments

What Even Is an OS Now?

https://sockpuppet.org/blog/2026/09/25/what-even-is-an-os-now/
1•fratellobigio•7m ago•0 comments

AI and human tutoring yield equivalent GRE learning gains

https://arxiv.org/abs/2609.28470
1•Betelbuddy•10m ago•1 comments

IBM When is Watson going to regain the crown via television?

1•conorcleary•10m ago•2 comments

It's not hypothetical: the dangers of AI are here

https://www.theguardian.com/commentisfree/2026/sep/25/ai-israel-gaza-iran-police-surveillance
3•harry_nutsachs•18m ago•0 comments

Minimal Assumptions for Societal Resilience

https://chillphysicsenjoyer.substack.com/p/minimal-assumptions-for-societal
1•crescit_eundo•18m ago•0 comments

Show HN: Farm.js – A full-stack framework with an AOT compiler for React

https://farmjs.dev/
1•kinfish•19m ago•0 comments

Carnegie: China Passes US as Top AI Talent Hub, 40.6% to 34.2%

https://aiweekly.co/alerts/carnegie-china-passes-us-as-top-ai-talent-hub-406-to-342
3•yogthos•21m ago•1 comments

Show HN: NerfWatch() – Track AI degradation with daily tests and community votes

https://nerfwatch.lol
1•csergiu•23m ago•0 comments

Show HN: BuyerCue – Find potential customer by paid-placement evidence

https://www.buyercue.io
1•apsquared•23m ago•1 comments

Where's the Beef? [video]

https://www.youtube.com/watch?v=4rhShOPHl50
1•gotmedium•23m ago•0 comments

Kafgres: Embedding a Kafka Broker into Postgres

https://rynr.dev/blog/kafgres/
3•enether•24m ago•0 comments

The Animated Elliptic Curve

https://curves.xargs.org/
2•pedropiin•25m ago•0 comments

VAT-Inclusive vs. VAT-Exclusive Pricing: The Math Developers Get Wrong

https://vat-engine.app/blog/vat-inclusive-vs-vat-exclusive-pricing
1•vasyl_kyryliuk•25m ago•0 comments

Manchester City found guilty on 114 charges relating to financial breaches

https://www.nytimes.com/athletic/7049721/2026/09/25/manchester-city-charges-verdict-premier-league/
5•mtlmtlmtlmtl•25m ago•0 comments

IRS launches new mobile app, expanding digital services for taxpayers

https://www.irs.gov/newsroom/irs-launches-new-mobile-app-expanding-digital-services-for-taxpayers
1•duck•28m ago•0 comments

"Someone just sent me an ad that features an AI version of me. What do I do?"

https://bsky.app/profile/lebassett.bsky.social/post/3mwel345jr22s
11•pavel_lishin•28m ago•1 comments

A terminal-first multiplayer thread for agent-authored work

https://www.cueloop.dev/
2•markusmurakaru•29m ago•0 comments

Become the Thousand Servers

https://sabot.media/guides/become-the-thousand-servers/
1•ibobev•32m ago•0 comments

Std: Call_once vs. Std:Async

https://devblogs.microsoft.com/oldnewthing/20260917-00/?p=112706/
1•ibobev•32m ago•0 comments

Comparing exception behavior of magic statics, std:call_once, and std:async

https://devblogs.microsoft.com/oldnewthing/20260918-00/?p=112709/
1•ibobev•32m ago•0 comments

The hottest new hangout for middle schoolers is NPR's comment section?

https://techcrunch.com/2026/09/25/the-hottest-new-hangout-for-middle-schoolers-is-nprs-comment-se...
3•geneticdrifts•32m ago•0 comments

Ask HN: Does your team still have humans review and understand code?

1•taurath•34m ago•0 comments