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?

A 481-meter-high landslide-tsunami in a cruise ship–frequented Alaska fjord

https://www.science.org/doi/10.1126/science.aec3187
1•croes•37s ago•0 comments

Robot Brain for Smol Brain

https://intuitably.com/2026/05/06/ai_brain_for_smol_brain.html
1•secretsinger•38s ago•0 comments

Optimizing Memory Access in NIR

https://www.collabora.com/news-and-blog/blog/2026/05/07/optimizing-memory-access-in-nir/
1•losgehts•58s ago•0 comments

The Serial TTL connector we deserve

https://kohlschuetter.github.io/blog/posts/2026/05/07/serial-ttl-connector/
1•kohlschuetter•1m ago•0 comments

Internet Archive Outage

https://bsky.app/profile/archive.org/post/3mlbfu2t72k2u
1•doener•1m ago•0 comments

Twilio SMS gateway outage: 2FA affected globally

https://status.twilio.com
1•hallh•2m ago•0 comments

Show HN: Coding agents can control desktop software without MCPs

https://github.com/SFKislev/Flue
1•-babi-•3m ago•1 comments

A Cursor AI agent wiped PocketOS's production database in under 10 seconds

https://thenewstack.io/ai-agents-credential-crisis/
2•Brajeshwar•5m ago•1 comments

The Self-Cancelling Subscription

https://predr.ag/blog/the-self-cancelling-subscription/
1•surprisetalk•6m ago•0 comments

Kalshi, the Prediction Market, Is Now Valued at $22B

https://www.nytimes.com/2026/05/07/business/dealbook/kalshi-fundraise-22-billion.html
2•JumpCrisscross•6m ago•0 comments

xAI built an illegal power plant to power its data center

https://www.selc.org/news/xai-built-an-illegal-power-plant-to-power-its-data-center/
2•speckx•6m ago•0 comments

Why do LLM outputs get worse even when metrics stay stable? [pdf]

https://huggingface.co/datasets/realitydriftproject/ai-drift-detection-frameworks/blob/main/llm-d...
1•scaledsystems•6m ago•0 comments

Goldfish Scheme

https://gitee.com/MoganLab/goldfish
1•smartmic•8m ago•0 comments

Ask Gemini: "How do I get the first item from a list?"

1•abbassix•9m ago•0 comments

API Keys Get Leaked in 2026 (and You Won't Notice)

2•thr3at-surfac3•10m ago•0 comments

Show HN: BrowserCode – Run Claude Code in the Browser via WebAssembly

https://github.com/leaningtech/browsercode
2•apignotti•10m ago•1 comments

Lisp in Web-Based Applications (2001)

https://sep.turbifycdn.com/ty/cdn/paulgraham/bbnexcerpts.txt?t=1772732230&
1•tosh•11m ago•0 comments

Intel's Larabee Legacy

https://thechipletter.substack.com/p/larabees-long-shadow
1•klelatti•11m ago•0 comments

curl.md – URL to Markdown for Agents

https://curl.md/
1•bpierre•11m ago•0 comments

Kavun, embeddable scripting language for Go

https://github.com/jokruger/kavun
1•jo_kruger•12m ago•1 comments

Personal finance with Laravel – Free course

https://www.maiobarbero.dev/courses/personal-finance-with-laravel/
1•maiobarbero•12m ago•0 comments

Head of Claude Code on the future of work and productivity [video]

https://www.youtube.com/watch?v=kRgdkOw82F0
1•rdudekul•13m ago•0 comments

Remarkable Paper Pure

https://remarkable.com/products/remarkable-paper/pure
1•rvz•13m ago•0 comments

Origins of Python's "Functional" Features (2009)

http://python-history.blogspot.com/2009/04/origins-of-pythons-functional-features.html
1•downbad_•13m ago•1 comments

The HTML Sanitizer API

https://alfy.blog/2026/05/07/html-sanitizer-api.html
1•thunderbong•13m ago•0 comments

The map that keeps Burning Man honest

https://www.not-ship.com/burning-man-moop/
20•speckx•15m ago•1 comments

A representation model as a workaround for catastrophic forgetting in LLMs

https://gist.github.com/alexmorleyfinch/bc0ee96fb72e9aafbad045939b982efd
2•dreamforever•17m ago•0 comments

LCM: Lossless Context Management

https://arxiv.org/abs/2605.04050
2•Brajeshwar•19m ago•0 comments

The River Otter's Remarkable Comeback

https://www.rewildingmag.com/the-river-otters-remarkable-comeback/
2•surprisetalk•20m ago•0 comments

Show HN: After 15 years of lifting and spreadsheets, I built my own workout app

https://www.setsweat.com
1•josephmarkus•20m ago•0 comments