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?

Waterloo's student rocketry team breaks a world record

https://uwaterloo.ca/news/engineering/waterloos-student-rocketry-team-breaks-world-record
1•pseudolus•1m ago•0 comments

ISRO will not make any launch vehicle, all tech to be handed to private sector

https://www.indiatoday.in/science/story/isro-will-not-make-any-launch-vehicle-all-tech-to-be-hand...
1•thunderbong•6m ago•0 comments

The hold that could not release itself

https://shitrat.ai/log/the-hold-that-could-not-release-itself
1•handfuloflight•13m ago•0 comments

Hermeus, a venture-backed defense aviation company

https://hermeus.com
1•ksec•14m ago•0 comments

MacStories is posting on Twitter again

https://mastodon.macstories.net/@viticci/117134048567780192
2•latexr•15m ago•0 comments

Homebrew 68K Machine Has a PCI Bus

https://hackaday.com/2026/08/20/homebrew-68k-machine-has-a-pci-bus/
2•birdculture•17m ago•0 comments

New chip mimics how cancer spreads

https://ecancer.org/en/news/28752-new-chip-mimics-how-cancer-spreads
1•giuliomagnifico•19m ago•0 comments

Fypbid.lol

https://fypbid.lol/
1•Teyz•20m ago•0 comments

AWS Security makes an inscrutable choice

https://www.theregister.com/security/2026/08/22/aws-security-makes-an-inscrutable-choice-corey-qu...
2•neuroelectron•23m ago•0 comments

Tech Layoffs 2026 – 170,777 Jobs Cut

https://layoffhedge.com/industry/tech-layoffs-2026
4•msolujic•27m ago•1 comments

Embedded AI

https://nostarch.com/embedded-ai
1•0x54MUR41•28m ago•0 comments

Therapy for the Vibe-Coded Brain

https://www.youtube.com/watch?v=DkhhE97Swmo
1•conferza•31m ago•0 comments

Apple lays off 200 people across Vision Pro and Siri teams

https://9to5mac.com/2026/08/21/apple-lays-off-200-people-across-vision-pro-and-siri-teams/
4•ksec•32m ago•0 comments

BDH-CQ: In-Context Learning with Recurrent Latent Reasoning

https://arxiv.org/abs/2608.09888
2•flaburgan•36m ago•0 comments

$40T Debt, 6.7% Mortgages and $5 Diesel

https://www.ft.com/content/6cb399fa-9fba-4806-98a3-9572fe319622
4•tcp_handshaker•38m ago•3 comments

A Week in the Life Of

https://profane-tmesis.info/a-week-in-the-life-of
1•riskone•40m ago•0 comments

I built roads.fyi – view and report the condition of roads near you

https://roads.fyi
1•ss1996•41m ago•1 comments

Ask HN: Is there a "knowledge base" of expert insights for Claude?

1•iosifnicolae2•43m ago•1 comments

Chatflare: Chat with your friends via Cloudflare cache hits

https://github.com/beescuit/chatflare
1•gavide•43m ago•0 comments

FreeToken: Efficient Edge-Native Moe Serving with Bandwidth-Adaptive Execution

https://arxiv.org/abs/2608.16157
1•theanonymousone•45m ago•0 comments

Rights-infringing copies of "NEINhorn": Carlsen sues OpenAI

https://www.heise.de/en/news/Rights-infringing-copies-of-NEINhorn-Carlsen-sues-OpenAI-11420677.html
2•wodniok•49m ago•0 comments

Uber fined nearly $1B by Dutch regulators

https://apnews.com/article/uber-fine-automated-suspensions-netherlands-e64385dc72fd2da440a68babd1...
2•gostsamo•52m ago•0 comments

Pets vs. Cattle and How to Use the Analogy Properly

https://cloudscaling.com/blog/cloud-computing/the-history-of-pets-vs-cattle/
1•fagnerbrack•53m ago•0 comments

RayNeo IO

https://www.rayneo.com/pages/rayneo-io-ai-glasses
1•handfuloflight•57m ago•0 comments

Is "AI slop" now the default response to every new project?

2•antonreshetov•1h ago•1 comments

Show HN: Financialdata.net – Stock Market API with Python SDK and MCP Server

https://financialdata.net/stock-market-api
1•_FDN_•1h ago•0 comments

Tesla Recalls 3M EVs in China over Door Handle Safety

https://www.bloomberg.com/news/articles/2026-08-21/tesla-recalls-3-million-evs-as-china-cracks-do...
4•Hoefner•1h ago•0 comments

Walmart adding Tap to Pay after years of shoppers asking for it

https://www.dexerto.com/entertainment/walmart-finally-adding-tap-to-pay-after-years-of-shoppers-a...
2•thunderbong•1h ago•0 comments

Older Americans leaving workforce poses challenges for AI plans

https://www.spglobal.com/market-intelligence/en/news-insights/articles/2026/8/older-americans-lea...
3•littlexsparkee•1h ago•0 comments

Show HN: Best of Marketing, an interactive and ranked advertising index

https://bestmarketingnewsletter.com/
1•jaskaransainiz•1h ago•0 comments