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?

Create flashcards with Space CLI

https://getspace.app/cli
1•friebetill•1m ago•1 comments

UK firm aims to build 'data centre' using 50k lampposts in Nigeria

https://www.bbc.co.uk/news/articles/c98r4e594p7o
1•ColinWright•1m ago•0 comments

Show HN: Chuchu, an Android SSH client built on libghostty

https://github.com/jossephus/chuchu
1•jossephus01•2m ago•0 comments

Jankó Keyboard

https://en.wikipedia.org/wiki/Jank%C3%B3_keyboard
1•athrow•5m ago•0 comments

Manufacturing qubits that can move

https://arstechnica.com/science/2026/05/manufacturing-qubits-that-can-move/
1•Brajeshwar•6m ago•0 comments

Our side project: cyber-research-AI IDE, writing an exploit for CVE-2026-23918 [video]

https://www.youtube.com/watch?v=szddOzKB-BM
1•xphilter•6m ago•1 comments

Britain Learned and Unlearned Nuclear

https://worksinprogress.co/issue/how-the-uk-learned-and-unlearned-nuclear/
1•nickt•10m ago•0 comments

J2G – Convert Jenkinsfiles to GitLab CI (.gitlab-ci.yml), offline

https://nexwright.com/projects/j2g/
2•justnoone•11m ago•0 comments

Nature's hardware store: building the future with biology [video]

https://aeon.co/videos/fungi-homes-and-more-ways-biology-could-sustain-life-beyond-earth
1•the-mitr•12m ago•0 comments

Novo Navis Intelligence Sobers Up the AI Community

https://news.novonavis.com/news/intel_090526_3827
1•capagg•15m ago•0 comments

Show HN: AaaS – Agent as a Service

https://github.com/Tem-Degu/streetai-aaas
1•degutemesgen•16m ago•1 comments

Cambridge University Raises Money to Help the Homeless in Cambridge

https://www.justgiving.com/page/fundrace-cai
1•SamCoding•16m ago•0 comments

The FCC Wants Your ID Before You Get a Phone Number

https://reclaimthenet.org/the-fcc-wants-your-id-before-you-get-a-phone-number
3•delichon•21m ago•0 comments

Wanted: A new tech-industry writer for The Economist

https://www.economist.com/business/2026/05/06/wanted-a-new-tech-industry-writer
2•andsoitis•23m ago•0 comments

Refineshot: Rethink Cinematography with Foundational Skill Evaluation

https://www.techrxiv.org/doi/full/10.36227/techrxiv.176107519.98547757/v1
2•bryanrasmussen•26m ago•1 comments

GrapheneOS fixes Android VPN leak Google refused to patch

https://cyberinsider.com/grapheneos-fixes-android-vpn-leak-google-refused-to-patch/
4•Georgelemental•28m ago•0 comments

AWS to also block ipcomp and xfrm modules in DirtyFrag mitigation

https://aws.amazon.com/security/security-bulletins/rss/2026-027-aws/
1•kro•30m ago•1 comments

Rtwatch: Watch videos with friends using WebRTC

https://github.com/pion/rtwatch
1•nateb2022•30m ago•0 comments

Canvas Data Breach; DeepSeek V4 Flash Boosts LLM Inference 4.3x

https://presciente.com/edition/77
2•sebastianperezr•30m ago•0 comments

I am the best lightsaber fighter in Europe

https://www.theguardian.com/lifeandstyle/2026/may/08/experience-i-am-the-best-lightsaber-fighter-...
3•tagawa•34m ago•1 comments

Self-Fulfilling Misalignment Data Might Be Poisoning Our AI Models (2025)

https://turntrout.com/self-fulfilling-misalignment
1•herbertl•35m ago•0 comments

It Was a Good Quarter for "Other Income" [A16Z Charts on AI Growth]

https://www.a16z.news/p/charts-of-the-week-it-was-a-good
1•alecco•35m ago•1 comments

Callbacks in C++ using template functors (Rich Hickey, 1996)

https://dl.acm.org/doi/10.5555/260627.260756
1•tosh•36m ago•0 comments

Show HN: Mochi.js: bun-native high-fidelity browser automation library

https://mochijs.com/
1•ccheshirecat•37m ago•0 comments

Frontier Airlines plane hits person on runway during takeoff at Denver airport

https://www.theguardian.com/us-news/2026/may/09/frontier-airlines-plane-hits-pedestrian-denver
2•manarth•38m ago•0 comments

Running Codex Safely at OpenAI

https://openai.com/index/running-codex-safely/
2•Brajeshwar•41m ago•0 comments

Marrying for power: Gendered alliances in mafias

https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0345859
1•defrost•43m ago•0 comments

Meta can read your Instagram DMs starting Friday

https://www.fox32chicago.com/news/meta-can-read-your-instagram-dms-starting-friday-one-step-could...
1•mgh2•43m ago•0 comments

GameStop CEO Trying to Buy eBay Says He Was Banned from eBay

https://www.gamespot.com/articles/gamestop-ceo-selling-gamestop-stuff-on-ebay-to-fund-buyout-of-e...
3•croes•45m ago•0 comments

What the Naysayers of Vibe Coding Are Getting Wrong

https://scrollinondubs.substack.com/p/what-the-naysayers-of-vibe-coding
1•scrollinondubs•46m ago•2 comments