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?

The Whole Half-Life

https://twhl.info/wiki/index
1•jonl247•4m ago•1 comments

Show HN: An Anonymous Writing Platform

https://github.com/du82/nonograph
1•arkhiver•4m ago•0 comments

What is CDP (Chrome DevTools Protocol): A beginners guide

https://www.browserbase.com/blog/what-is-cdp
2•Kylejeong21•5m ago•0 comments

Chai Discovery nabs $400M Series C as AI-designed antibodies reach Big Pharma

https://siliconangle.com/2026/07/14/chai-discovery-nabs-400m-series-c-ai-designed-antibodies-reac...
1•bookofjoe•5m ago•0 comments

In remote northern Philippines, a local solution to the global energy shock

https://www.csmonitor.com/World/Asia-Pacific/2026/0511/Philippines-Apayao-hydro-power-electricity...
1•thunderbong•5m ago•0 comments

Show HN: The AI Lethal Trifecta

https://www.getjailbroken.com/
3•Getchowned•8m ago•0 comments

A simple console.log() per request can hurt performance

https://twitter.com/_pi0_/status/2078164967367295257
1•tosh•8m ago•0 comments

Industry Brief: Private 5G for Ports and Logistics [pdf]

https://framerusercontent.com/assets/6SwmKg79S0L8QRk3FAd1tWO9SQ.pdf
1•y2so•9m ago•0 comments

Show HN: Lific, an issue tracker that works as memory for coding agents (Rust)

https://lific.dev
1•Void_Null•11m ago•0 comments

Much of the crypto universe is "gambling" with a better vocabulary

https://medium.com/@rakeshmenon13/much-of-the-crypto-universe-is-gambling-with-a-better-vocabular...
2•rakeshmenon•13m ago•0 comments

The Inside Story of IBM’s Shocking Profit Warning

https://www.wsj.com/tech/the-inside-story-of-ibms-shocking-profit-warning-839ef4f2
1•tcp_handshaker•13m ago•0 comments

Reading List of Precision Engineering Books

https://precisionmindsetllc.com/recommended-readings.html
1•o4c•17m ago•0 comments

Learning a few things about running SQLite

https://jvns.ca/blog/2026/07/17/learning-about-running-sqlite/
2•surprisetalk•18m ago•0 comments

Show HN: Hardware Needs Its Vibe Coding Moment

https://opuslabs.substack.com/p/hardware-needs-its-vibe-coding-moment
1•opuslabs•19m ago•0 comments

Show HN: Ogblocks – Copy-Paste Animated UI Library for Modern Web Apps

https://ogblocks.dev
1•karanzhacker•19m ago•0 comments

Black Horse: One Stop to Orbit

http://www.ai.mit.edu/projects/im/magnus/bh/analog.html
1•ctoth•19m ago•1 comments

Day 2 – Standup on my side hustle

https://twitter.com/ab44997/status/2078172383978885363
1•atomiomi•24m ago•0 comments

Hold Firm on Chinese Memory Chips Ban

https://chinaselectcommittee.house.gov/media/letters/moolenaar-whitesides-to-secretary-lutnick-ho...
1•T-A•24m ago•1 comments

Trump Media pitched $100k monthly fee for fast feed of president's posts

https://www.ft.com/content/e466df85-fa3b-4a7f-a4a1-ae04d66db99f
2•tcp_handshaker•25m ago•1 comments

Askelephant

https://www.askelephant.ai
1•SQbean•27m ago•0 comments

A Jailbroken PS5 (Running Linux) Can Run Steam Now [video]

https://www.youtube.com/watch?v=UhnLdFYR2-s
3•rvz•28m ago•0 comments

Major earthquake off Mexican coast triggers tsunami threat

https://globalnews.ca/news/11969962/mexico-earthquake-tsunami-warning/
2•Bender•28m ago•0 comments

Personal Systems Series

https://yusufaytas.com/series/personal-systems
3•yusufaytas•29m ago•1 comments

AI scans your expenses and shows you where to save

https://scanticket.io/en
2•sunhp•31m ago•0 comments

7.3 earthquake off cost of Mexico, Quatamala

https://earthquake.usgs.gov/earthquakes/map/?extent=9.37259,256.27823&extent=19.19648,277.09732&m...
3•Bender•31m ago•0 comments

PlayStation 5 – Total Bounty Pot $24,152.00

https://bounties.fulu.org/bounties/playstation-5
3•Cider9986•32m ago•0 comments

Zenban

https://github.com/berkaycit/zenban
1•berkaycit•33m ago•0 comments

State AGs sound alarm over Enova, OppFi buying banks

https://www.americanbanker.com/news/state-ags-sound-alarm-over-enova-oppfi-buying-banks
1•petethomas•33m ago•0 comments

How are you giving AI agents access to postgress?

2•Eapz_06•34m ago•0 comments

The Best Running Shoes You Can't Get Your Hands On

https://www.theatlantic.com/ideas/2026/07/running-shoes-china-america/687941/
1•littlexsparkee•34m ago•0 comments