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?

EU's five regulations that will change how we live, drive, and use the internet

https://twitter.com/dziki_zachod/status/2074795633442201804
1•gasull•2m ago•0 comments

Touchscreens in cars are getting worse, Swedish test finds

https://www.vibilagare.se/touchscreens-cars-are-moving-wrong-direction
1•eriksdh•5m ago•0 comments

Show HN: You can continue a Claude session in Codex, and vice versa

https://github.com/theoriclabs/agent-convert
2•hargup•12m ago•2 comments

Extracts of Polypore Mushroom Mycelia Reduce Viruses in Honey Bees

https://www.nature.com/articles/s41598-018-32194-8
1•tomaytotomato•13m ago•0 comments

Monarchies of Malaysia

https://en.wikipedia.org/wiki/Monarchies_of_Malaysia
1•thunderbong•14m ago•0 comments

Show HN:Getting GLM 5.2 running on my slow computer

1•vforno•14m ago•0 comments

CEO and Creator of Ethos Engine for AI

1•frajaro•19m ago•0 comments

Etcd v3.7.0

https://etcd.io/blog/2026/announcing-etcd-3.7/
1•enz•19m ago•0 comments

Timeline Studio – browser AI voiceover editor running ONNX locally

https://video-editor.ai-creator.top/
2•martindelophy•20m ago•0 comments

The robotaxi law that could ban Tesla

https://www.theverge.com/transportation/962309/new-jersey-robotaxi-bill-lidar-tesla
2•baranul•21m ago•0 comments

Before AI Ships Code, Show Me the Receipts

https://www.pagerduty.com/eng/before-ai-ships-code-show-me-the-receipts/
1•mlashcorp•23m ago•0 comments

The AI didn't get smarter about my project. My notes did

https://www.syncpen.io/blog/your-ai-doesn-t-get-better-your-workspace-does
1•airbuzz•25m ago•0 comments

LingBot-World 2.0: Interactive world generation from image, text, and actions

https://github.com/Robbyant/lingbot-world-v2
1•jallenjia•25m ago•0 comments

International timekeepers to vote on changing the leap second to a leap hour

https://www.scientificamerican.com/article/international-timekeepers-to-vote-on-changing-the-leap...
3•beardyw•29m ago•0 comments

$130M Series A to Build the Open Superintelligence Stack

https://www.primeintellect.ai/blog/series-a
1•ronfriedhaber•31m ago•0 comments

Quantum Pairs Stitch Space-Time (2015)

https://www.quantamagazine.org/tensor-networks-and-entanglement-20150428/
1•throwaway81523•31m ago•0 comments

World Tour Finals 2026 Algorithm: Human vs. AI Exhibition Match

https://atcoder.jp/login?continue=https%3A%2F%2Fatcoder.jp%2Fcontests%2Fawtf2026algo%2Fstandings%...
1•limoce•33m ago•0 comments

A certain kind of talk around LLMs that I find increasingly puzzling

https://twitter.com/esrtweet/status/2074889702381953222
2•tosh•34m ago•0 comments

The Web's HTTP Header Junk Drawer

https://jonlu.ca/posts/http-headers-top-1000
2•luu•34m ago•0 comments

Another German state heads down the open source sovereignty road

https://www.theregister.com/software/2026/07/08/another-german-state-heads-down-the-open-source-s...
1•baranul•36m ago•0 comments

Stride Game Engine

https://www.stride3d.net/
1•notRobot•41m ago•0 comments

I built a $10M run rate AI Startup in 150 days [video]

https://www.youtube.com/watch?v=VMyHC7qUrhI
1•zetamax•47m ago•1 comments

SanDisk has highest unrealized losses

https://old.reddit.com/r/StockMarket/comments/1uqmktf/sandisk_has_highest_unrealized_losses/
1•mgh2•49m ago•0 comments

The potential role of iron fuel in Europe's clean energy transition

https://www.cell.com/chem-circularity/fulltext/S3051-2948(26)00043-5?_returnURL=https%3A%2F%2Flin...
2•Tomte•52m ago•1 comments

Why new €3 customs charge tells a bigger story about global trade

https://www.rte.ie/brainstorm/2026/0709/1582146-3-euro-customs-charge-online-shopping-global-trad...
3•austinallegro•55m ago•0 comments

The 4th Amendment Moves to the Cloud: Chatrie and the Future of Digital Privacy

https://www.wilmerhale.com/en/insights/client-alerts/20260702-the-fourth-amendment-moves-to-the-c...
1•greyface-•57m ago•0 comments

Show HN: PandaPage – host an HTML page with one curl, no signup, auto-expires

https://pandapage.clawshop.sh
1•itskritix•57m ago•0 comments

Local codereview tool for handing structured review to agent

https://github.com/rosenbjerg/local-review
1•mrosenbjerg•1h ago•1 comments

Probelock – lockfile for LLM tool calling

https://github.com/kelkalot/probelock
1•rar101x•1h ago•0 comments

Show HN: Reddit-opportunities – See who is asking for you in Reddit

https://karmybot.com/reddit-opportunities
1•dhante•1h ago•0 comments