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?

Situational Awareness Kindle eBook ePub

https://blog.cahillanelabs.com/kindle/epub/llm/2026/05/10/situational-awareness-ebook
1•linuxfan2718•55s ago•0 comments

The Case of the Kung Fu 'Phreak'

https://www.zdnet.com/article/the-case-of-the-kung-fu-phreak/
1•mindcrime•7m ago•0 comments

Model Provenance Kit: Know Where Your AI Models Come From

https://blogs.cisco.com/ai/model-provenance-kit
1•boh•12m ago•0 comments

Carbon footprint of Linus Tech Tips' private jet

https://lttjet.com
2•droidjj•15m ago•0 comments

7meter

https://blog.cloudflare.com/through-the-eyes-tech-support-engineer/
1•apriyobudi•16m ago•0 comments

Notion or Obsidian or Apple Notes?

1•apoorvdarshan•18m ago•0 comments

Fidelity to Cut 800 Staffers as It Overhauls Tech, Product Teams

https://www.bloomberg.com/news/articles/2026-05-07/fidelity-to-cut-800-staffers-as-it-overhauls-t...
1•littlexsparkee•21m ago•0 comments

Ask HN: Ex-cofounder threatening to send YC email

1•insanepro•21m ago•3 comments

GitHub project reproduces 58 Schmidhuber papers with AI assistant

https://twitter.com/hardmaru/status/2053147759428178315
1•momentmaker•28m ago•0 comments

Crypto exchange Coinbase to lay off 14% of staff as AI reshapes work

https://www.latimes.com/business/story/2026-05-05/crypto-exchange-coinbase-to-lay-off-14-of-staff...
1•1vuio0pswjnm7•30m ago•0 comments

Coinbase steep first quarter loss after slide in crypto prices; shares fall 4%

https://www.cnbc.com/2026/05/07/coinbase-coin-earnings-q1-2026.html
2•1vuio0pswjnm7•31m ago•2 comments

Superintelligent Retrieval Agent: The Next Frontier of Information Retrieval

https://arxiv.org/abs/2605.06647
1•CharlesW•31m ago•0 comments

Opus 4.7 and DeepSeek V4-Pro select Buddhism as preferred religion

https://twitter.com/tszzl/status/2053022747765457005
4•momentmaker•34m ago•0 comments

Antitrust Remedies Order Takes Effect as US Judge Denies Google's Stay Motion

https://www.law.com/nationallawjournal/2026/05/08/antitrust-remedies-order-takes-effect-as-us-jud...
2•1vuio0pswjnm7•39m ago•0 comments

Silverback Imfura took a chance, and ended up alone

https://gorillafund.org/mountain-gorillas/silverback-imfura-took-a-chance-and-ended-up-alone/
2•alex000kim•41m ago•0 comments

Probe-Detected Grokking in Multi-Probe DPO

https://openinterp.org/research/papers/probe-detected-grokking-dpo
3•caiovicentino•45m ago•0 comments

Transpiler.us – dev tools platform with Solana Pay USDC on mainnet

https://transpiler.us
2•jeah84•47m ago•0 comments

Two-Tier Verbalization in Natural Language Autoencoders

https://openinterp.org/research/papers/nla-two-tier-verbalization
2•caiovicentino•48m ago•0 comments

Show HN: Generate a variety of ad creatives for your SaaS

https://zenduxai.com
2•total_plus•48m ago•0 comments

Why 'quantum proteins' could be the next big thing in biology

https://www.nature.com/articles/d41586-026-00662-1
3•bookofjoe•49m ago•1 comments

Implementing a Virtual Filesystem over Elasticsearch

https://leoniemonigatti.com/blog/virtual-filesystem-elasticsearch.html
2•eigenBasis•52m ago•0 comments

Sparse Cholesky Elimination Tree

https://www.reidatcheson.com/sparse/linear/cholesky/2026/04/09/etree.html
3•selimthegrim•55m ago•0 comments

Palette Masters: 46 Zed themes derived from master painter color palettes

https://github.com/regnull/palette-masters-zed
2•regnull•56m ago•1 comments

Abstract Machines for Logic Programs

https://chrisistyping.bearblog.dev/abstract-machines-for-logic-programs/
4•surprisetalk•58m ago•0 comments

Rex is a secure script execution engine that uses Cedar policies

https://github.com/trusted-remote-execution/trusted-remote-execution
2•mooreds•1h ago•0 comments

Do houseplants improve air quality?

https://www.economist.com/science-and-technology/2026/05/08/do-houseplants-improve-air-quality
4•andsoitis•1h ago•0 comments

Analysis points to a unexpected cause of reading difficulties

https://phys.org/news/2026-05-years-struggles-obvious-massive-analysis.html
2•wglb•1h ago•1 comments

Grok 4.3

https://docs.x.ai/developers/models
3•webninja•1h ago•0 comments

AI creates a fearsome cold-war-style dilemma

https://www.economist.com/china/2026/05/07/ai-creates-a-fearsome-cold-war-style-dilemma
3•andsoitis•1h ago•0 comments

Visit a Mosque in video game format and learn things about Islam

https://islamicsystems.itch.io/the-mosque-visit
3•JSLegendDev•1h ago•1 comments