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?

Update: The extension has been approved and is now live on the Chrome Web Store

https://chromewebstore.google.com/detail/source-download/nockdgincmpfojabnhbofkddgcmnodpd
1•2rundev•3m ago•0 comments

Bloom Chose the Team Before the Problem and the Research Before the Pitch

https://sherm4n.com/bloom-security-israel-ai-endpoint-itay-keren/
1•xsherman•3m ago•0 comments

Forget the Robot Tax. Tax the Tokens

https://www.atomic14.com/2026/08/16/forget-the-robot-tax-tax-the-tokens
1•iamflimflam1•4m ago•1 comments

Wave overhangs let you print without supports [video]

https://www.youtube.com/watch?v=IhAzIXTE-FE
1•feb•4m ago•0 comments

The Qwen MLX Challenge

https://www.yukon.org/mlxfast
1•vivekkairi•7m ago•0 comments

Boring bits prepare you for the problems that can't be solved by copy pasting

https://mastodon.gamedev.place/@sinbad/117104626436634775
1•jay_kyburz•7m ago•0 comments

A Swarm of Blood Robots

https://craigmod.com/essays/robot_blood/
1•naves•7m ago•0 comments

Show HN: Ask questions about the Swiss train timetable

https://fragplan.ch/
1•bekoeppel•8m ago•0 comments

Day, in One Frame

https://getdayframe.app/
1•croes•10m ago•0 comments

Haskell: Origins, Evolution, and Future [video]

https://www.youtube.com/watch?v=MQeIerDsReA
1•eric_khun•11m ago•0 comments

Knowledge Representation (2013)

https://sifter.org/~simon/journal/20130713.h.html
1•eric_khun•12m ago•0 comments

AstroUpdate – Real-time space news, 3D ISS tracking and AI briefs

https://www.astroupdate.space/en
1•bruceleeglad•13m ago•0 comments

Carrier Pidge – iOS messaging that travels at 100mph

https://www.tomshardware.com/software/applications/rogue-ios-developer-creates-app-that-simulates...
1•jtwaleson•13m ago•0 comments

Show HN: dunx – Nest-style DI for Bun without reflect-metadata

https://petarzarkov.github.io/dunx/#/
1•flaery•14m ago•0 comments

A receipt printer exposed to the internet, inviting people to send it things

https://www.reddit.com/r/selfhosted/comments/1vpskku/i_put_my_receipt_printer_on_the_internet_sen...
1•FinnKuhn•16m ago•0 comments

Climbing Guide as a Shared Infrastructure

https://irz.fr/en/articles/openclimbing-open-guide-en/
2•zbycz•17m ago•0 comments

Android Strings XML Translation Online: The Tool That Preserves Your Variables

https://locafileai.com
1•phobopt•18m ago•0 comments

Show HN: HN Glance – a visual reader for Hacker News links and discussions

https://hnglance.com/top
2•valentinvieriu•19m ago•1 comments

We cut RAG costs 5x without losing quality

https://trpevski.com/blog/scaling-rag-chunking-reranking-and-cost-optimization/
1•dzugumot•20m ago•0 comments

Why Chinese Citizens Are More Optimistic About AI Than Americans

https://www.bloomberg.com/news/articles/2026-08-14/why-ai-optimism-is-so-much-higher-in-china-tha...
2•helsinkiandrew•21m ago•1 comments

A Generative Cramér-Rao Bound

https://arxiv.org/abs/2203.03695
1•hasley•22m ago•1 comments

AI Paper Trail: What does AI know about you?

https://proton.me/lumo/ai/ai-paper-trail
1•Gys•23m ago•1 comments

How to Invest in AI (2025)

https://reactionwheel.net/2025/09/how-to-invest-in-ai.html
1•rzk•24m ago•0 comments

Twitch Adds Opt-Out for Amazon AI Training After Enrolling All Creators

https://www.ghacks.net/2026/08/14/twitch-adds-opt-out-for-amazon-ai-training-after-enrolling-all-...
1•01-_-•24m ago•0 comments

Anthropic shares more details about how Claude's new watermarks will work

https://techcrunch.com/2026/08/15/anthropic-shares-more-details-about-how-claudes-new-watermarks-...
2•01-_-•25m ago•0 comments

Secrets live in six places and one of them is a DM

https://anthony.dev.profullstack.com/blog/009-post.html
1•buffer_overlord•25m ago•0 comments

A Taxonomy of Moats (2019)

https://reactionwheel.net/2019/09/a-taxonomy-of-moats.html
1•rzk•28m ago•0 comments

A diagnostic for the "be more proactive" performance review

https://medium.com/@mike.salari.dev/be-more-proactive-take-more-ownership-72a07c24232a
1•salari_dev•31m ago•0 comments

Show HN: Sol-Luna – adaptive Codex orchestration that can choose zero workers

https://github.com/mahadansar/sol-luna-orchestrator
1•mahadansar•31m ago•1 comments

The Experience Feedback Loop

https://peterbloem.nl/blog/experience-feedback
1•riskone•33m ago•0 comments