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?

A Thermodynamic Failure of the Soul

https://sightlessscribbles.com/posts/a-thermodynamic-failure-of-the-soul/
1•robin_reala•1m ago•0 comments

Genomic evidence of human bottleneck in the Early–Middle Pleistocene transition

https://www.science.org/doi/10.1126/science.abq7487
1•thunderbong•2m ago•0 comments

The Mojo language (by Modular, now Qualcomm) is now open-source

https://www.modular.com/blog/modcon-announcements
2•flaburgan•4m ago•1 comments

Made an open source budgeting application (Coinvane)

https://github.com/JKJWL/Coinvane
2•JKJWL•4m ago•1 comments

Bad benchmarks and evals: Senior SWE-Bench, napkin math, and winter tires

https://danluu.com/exercise-7/
1•yosefk•6m ago•0 comments

Where Human Sleep Went Wrong

https://nautil.us/where-human-sleep-went-wrong-1283797
2•XzetaU8•10m ago•0 comments

AI Marketing Stash: a directory for discovering AI marketing tools

https://www.aimarketingstash.com
1•Tlesenechal•11m ago•0 comments

Show HN: Tracepack – Build local-first evidence packs from your files

https://dev.tracepack.org/
1•ace2016•13m ago•0 comments

ProtectEU Strategy to Counter Hybrid Threats Targets Encrypted Communications

https://balkaninsight.com/2025/04/01/protecteu-strategy-to-counter-hybrid-threats-targets-encrypt...
1•miohtama•13m ago•0 comments

US sanctions International Criminal Court president and trial lawyer

https://www.aljazeera.com/news/2026/8/18/us-sanctions-international-criminal-court-president-and-...
1•rzk•15m ago•0 comments

"Sabotage": Experts, lawmakers blast RFK Jr. for destroying healthcare research

https://arstechnica.com/health/2026/08/sabotage-experts-lawmakers-blast-rfk-jr-for-destroying-hea...
4•01-_-•15m ago•0 comments

Harvard, MIT among 30 US universities ordered to audit China research ties

https://www.scmp.com/news/us/diplomacy/article/3364485/harvard-mit-among-30-us-universities-order...
2•01-_-•16m ago•0 comments

Show HN: Superprez.io – Sharing and Collaboration for AI-Generated Decks

https://www.superprez.io
1•elsaelsa•19m ago•0 comments

2004 Harvard–Yale Prank

https://en.wikipedia.org/wiki/2004_Harvard%E2%80%93Yale_prank
1•toilet•19m ago•0 comments

Show HN: Open-source extension to transfer AI chats without losing context

https://github.com/VC067/MoveChat
1•VC067•20m ago•0 comments

GitLab CVE-2026-19478: GraphQL authorization bypass

https://techupdate24.com/gitlab-cve-2026-19478-graphql-flaw/
1•sysadmin_diarie•22m ago•0 comments

AI-generated candidate proof of a causal guarantee for RACE attention [pdf]

https://drive.google.com/file/d/11Jh_ITQWQbM40REfNayPbS98lyk0EUTG/view?usp=drive_link
1•Rufty•23m ago•0 comments

Taking photos or screenshots makes you more likely to forget information

https://www.binghamton.edu/news/story/6397/digital-amnesia-taking-screenshots-makes-you-more-like...
1•nreece•23m ago•0 comments

Moby Dick has 26 em dashes per 1000 words. Pride and Prejudice has none

https://claudewatermark.xyz/guides/moby-dick-87-em-dashes
2•ofir_smol•24m ago•1 comments

Zombie Cards Back Online: Reviving Expired Credit Cards for Contactless Payments

https://khwarizmilab.github.io/emvexpiredcards/
1•Markoff•24m ago•0 comments

Hoog – The Hugging Face Hack [video]

https://www.youtube.com/watch?v=OO225IfoR3s
1•Topfi•28m ago•0 comments

The Cast-Iron Company That Has Been Controlled by the Same Family for 130 Years

https://www.wsj.com/business/the-cast-iron-company-that-has-been-controlled-by-the-same-family-fo...
1•thm•30m ago•0 comments

Show HN: A 3D insect field guide where every specimen is generated from code

https://insect-world.pages.dev/
1•XR843•30m ago•0 comments

Trump crypto firm backs venture offering AI from restricted Chinese companies

https://www.reuters.com/world/china/trump-crypto-firm-backs-venture-offering-ai-restricted-chines...
1•petethomas•30m ago•0 comments

New images reveal before/after when a SpaceX rocket slammed into the moon

https://www.cnn.com/2026/08/18/science/nasa-images-spacex-rocket-moon-collision
4•giuliomagnifico•31m ago•0 comments

Japan's farmers go nocturnal as deadly heat intensifies

https://www.reuters.com/investigates/special-report/climate-change-japan-farmers/
3•petethomas•32m ago•0 comments

Headed for the Exit: The Great Engineering Leader Career Break

https://newsletter.pragmaticengineer.com/p/the-great-engineering-leader-career-break
1•pjmlp•32m ago•0 comments

Vetted AI code is hard to justify

https://amoffat.github.io/blog/vetting-burnout.html
1•birdculture•34m ago•2 comments

CodeX v0.148.0 cannot use GPT-5.6 Sol

https://github.com/openai/codex/issues/39397
1•linzhangrun•35m ago•1 comments

Building Without Predicting

https://sive.rs/fit
1•tosh•42m ago•1 comments