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?

Teleflow: A local-first teleprompter and selfie recorder for creators

https://getteleflow.com
1•63labs•27s ago•0 comments

Show HN: LifePath – See what Einstein was doing at your exact age

https://thelifepaths.com/
1•pro_methe5•2m ago•1 comments

Forget "Fat" Models. The Future Is Narrow

https://adlrocha.substack.com/p/adlrocha-forget-fat-models-the-future
1•adlrocha•3m ago•0 comments

Show HN: InLie – See manipulation tactics in political videos, live

https://chromewebstore.google.com/detail/inlie-—-political-manipul/oajemdmhhgpifbdncldjappndcpe...
2•ivan_holovach•9m ago•0 comments

I Built a WordPress Plugin Nobody Asked For. Here's Why –. and How

https://notes.nagdy.me/2026/07/built-wordpress-plugin-nobody-asked-for-heres-why-and-how/
1•taubek•9m ago•0 comments

Stop Getting 'Good' at ChatGPT (2024)

https://hitsubscribe.com/surviving-the-great-commoditizer-stop-getting-good-at-chatgpt/
1•LAC-Tech•11m ago•0 comments

Atomic Physics in Pure Anglo-Saxon

https://www.ling.upenn.edu/~beatrice/110/docs/uncleftish-beholding.html
1•xelxebar•12m ago•0 comments

Show HN: Zero Trust Boundary for Agents

https://github.com/Open-AGS/attestor
2•Oxlamarr•12m ago•0 comments

Senator Lindsey Graham, Republican of South Carolina, Dies at 71

https://www.nytimes.com/2026/07/12/us/politics/lindsey-graham-dead.html
1•josefrichter•14m ago•1 comments

Moving Averages (2022)

https://gregorygundersen.com/blog/2022/06/04/moving-averages/
1•tosh•15m ago•0 comments

Lame 4.0 Released

https://sourceforge.net/p/lame/mailman/message/59357706/
2•robin_reala•18m ago•0 comments

Intro to Multiplicative Calculus [video]

https://www.youtube.com/watch?v=O1ds53ADmOU
1•soupspaces•22m ago•0 comments

'I'm not a programmer' anymore: Linus Torvalds on the only two tools he uses now

https://www.zdnet.com/article/open-source-summit-linus-torvalds/
1•makerdiety•24m ago•0 comments

Unify AI Horn alternative using ESP32, WizNet 5500, Poe and a Ti Amp

https://www.hackster.io/c_m_cooper/announce-for-unify-e9c652
1•cromka•26m ago•0 comments

Show HN: Inkfold – workspace across multiple AI providers with shared memory

https://www.inkfold.app/
1•hannan2•28m ago•0 comments

Why Mechanical Sympathy? (2011)

https://mechanical-sympathy.blogspot.com/2011/07/why-mechanical-sympathy.html
1•tosh•31m ago•0 comments

Word Count Benchmarks for Websites and Email

https://medium.com/@thesuperrepemail/word-count-benchmarks-for-websites-and-email-d3a7eb6bbea8
2•rajkverma123•32m ago•0 comments

List of theaters and campaigns of World War II

https://en.wikipedia.org/wiki/List_of_theaters_and_campaigns_of_World_War_II
2•zeristor•33m ago•0 comments

China unveils high-power microwave weapon arsenal with up to 100 gigawatts

https://www.scmp.com/news/china/science/article/3360000/100-gigawatts-china-unveils-its-high-powe...
2•msalsas•36m ago•0 comments

ESDM Is Now Open Source

https://docs.eventsourcingdb.io/blog/2026/07/13/esdm-is-now-open-source/
3•goloroden•38m ago•0 comments

T. rex fossil could become most expensive dinosaur ever sold

https://www.bbc.co.uk/news/articles/c4gykgyn1r4o
2•beardyw•40m ago•0 comments

24-zig

https://en.wikipedia.org/wiki/24-zig
1•Lammy•42m ago•0 comments

Show HN: PalExplorer – peer-to-peer file sharing with no central server

https://palexplorer.com
2•hannan2•43m ago•1 comments

The Caste of Intelligence and the Big Tech Blueprint

https://calcrecipe.com/en/workshop/5
1•wsdn•44m ago•0 comments

Agent Service – promptable AI agents with guardrails and downloadable packages

https://buy.stripe.com/5kQ5kEaUKd8w0qr0FKe3e00
1•mknight2690•48m ago•0 comments

Using Kamal 2.0 in Production

https://rubys.github.io/kamal-in-production/
3•enz•54m ago•0 comments

AI Should Build Its Own Research World Model

https://www.evolvinglab.ai/blog/research-world-model
1•vinhnx•54m ago•0 comments

Cruxcoach – Manage many climbing boards privatly in one app

https://cruxcoach.org/
2•frankzander•57m ago•0 comments

What I learned publishing a paper

https://ramjanarthan.com/what-i-learned-publishing-a-paper/
1•shadowblue•1h ago•0 comments

Best Hiking Boots (2026): Walking Shoes, Trails, Backpacking

https://www.wired.com/gallery/best-hiking-boots/
1•joozio•1h ago•0 comments