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?

Daintreehq/daintree: A delegation environment for orchestrating AI coding agents

https://github.com/daintreehq/daintree
1•ankitg12•1m ago•0 comments

Setting Up Server Monitoring for a Rails App on Hatchbox

https://blog.appsignal.com/2026/04/30/setting-up-server-monitoring-for-a-rails-app-on-hatchbox.html
1•andreigaspar•6m ago•0 comments

GameStop makes $55.5B takeover offer for eBay

https://www.bbc.co.uk/news/articles/cn0p8yled1do
3•n1b0m•6m ago•0 comments

Banks seek to offload risk to avoid 'choking' on data centre debt

https://www.ft.com/content/08aba5e4-5834-4e79-a48d-989a2c5bad0f
2•mindracer•8m ago•0 comments

The Clippy Paradox: How Note-Taking Became Its Own Irritation

https://medium.com/@vektormemory/the-clippy-paradox-how-note-taking-became-its-own-irritation-592...
1•vektormemory•9m ago•0 comments

Evals Skills for AI Agents

https://github.com/latitude-dev/eval-skills
1•paulaq•10m ago•0 comments

Are AI agents a scam? [video]

https://www.youtube.com/watch?v=IOoLqw4n4_g
2•mgh2•17m ago•0 comments

I developed an alternative to Jira with Claude in 8 days, all by myself.

https://is.team
5•spotlayn•19m ago•3 comments

Tractors, beige boxes and what's next

https://agourlay.github.io/the-transmission/
1•agourlay•19m ago•0 comments

MiniMovie: An Anti-IMDB

https://minimovie.info/
3•ghostbit•21m ago•0 comments

Friendlier LLMs tell users what they want to hear – even when it is wrong

https://www.nature.com/articles/d41586-026-01153-z
2•takyamoto•22m ago•0 comments

Chinese hospitals are selling de-identified patient data to fuel the AI boom

https://asia.nikkei.com/spotlight/caixin/chinese-hospitals-are-selling-patient-data-to-fuel-the-a...
1•giuliomagnifico•29m ago•0 comments

How does your team handle cloud cost review – dedicated process or ad hoc?

https://www.kloudaudit.eu/
1•leumasj•32m ago•0 comments

Control AI Risk with Pre-Built Frameworks and Ready-to-Run Evaluations

https://atlas.latticeflow.ai/
1•duguyue100•38m ago•1 comments

Screw You, Realtek

https://www.growse.com/2026/05/02/screw-you-realtek.html
2•growse•42m ago•1 comments

China's Rare Defiance of US Sanctions Sparks Showdown over Banks

https://finance.yahoo.com/news/chinas-rare-defiance-of-us-sanctions-sparks-showdown-over-banks-02...
2•akyuu•42m ago•0 comments

Richard Feynman on Teaching (1986)

https://sites.pitt.edu/~druzdzel/feynman.html
4•lucidplot•42m ago•0 comments

When did stories become so centred on good battling evil? And why? [video]

https://aeon.co/videos/when-did-stories-become-so-centred-on-good-battling-evil-and-why
1•mblome•42m ago•0 comments

I have had this M5 Mac <48 hours and this happened when I moved the hinge

https://old.reddit.com/r/mac/comments/1t1qgqe/i_have_had_this_m5_mac_for_less_than_48_hours_and/
2•croes•46m ago•0 comments

I'm a contractor – I built a $9.99/mo Bluebeam alternative for Mac

https://clankoot.ai/studio
1•_abinesh_•52m ago•0 comments

Personal AI Health and Therapy Companion

https://hanahealth.co.uk/
1•jamesawallner•54m ago•0 comments

A Russian Family Was Isolated for 40 Years, Unaware of WWII (2013)

https://www.smithsonianmag.com/history/this-russian-family-lived-alone-in-the-siberian-wilderness...
2•downbad_•55m ago•1 comments

What went into the machine and what came out: single-line fonts and engraving

https://www.205.tf/articles/what-went-into-the-machine-and-what-came-out
1•fanf2•56m ago•0 comments

Over 8M Thermos jars and bottles recalled after 3 people lost vision

https://www.goodmorningamerica.com/living/story/8-million-thermos-jars-bottles-recalled-after-3-1...
16•taubek•57m ago•5 comments

The piracy paradox at Udemy (2015)

https://www.troyhunt.com/the-piracy-paradox-at-udemy/
1•downbad_•58m ago•1 comments

Amazon EC2 Beta (2006)

https://aws.amazon.com/blogs/aws/amazon_ec2_beta/
1•downbad_•1h ago•1 comments

The End of Violence

https://www.barnesandnoble.com/w/the-end-of-violence-gary-slutkin-md/1148640975
1•rendx•1h ago•0 comments

Blink – AI powered Search. A knowledge destination

https://blink-oi.vercel.app
1•Pascal1997•1h ago•1 comments

Google Says Prompt Injection Moving from Theory into Real Abuse

https://www.searchengineworld.com/google-says-prompt-injection-moving-from-theory-into-real-abuse
1•cromulent•1h ago•0 comments

How Does SaintQuant's AI Bot Enable 24/7 Crypto Trading?

https://www.bitdeal.net/crypto-trading-bot-development
1•harrisonrichrd•1h ago•0 comments