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?

10x More Selective (2013)

https://yosefk.com/blog/10x-more-selective.html
1•tosh•2m ago•0 comments

Superficie – Surface Syntax for Clojure to Help Exposition/Onboarding

https://github.com/replikativ/superficie
1•TheWiggles•3m ago•0 comments

Mistral AI Acquires EU Physics AI Startup Emmi AI

https://www.reuters.com/business/autos-transportation/mistral-ai-buys-austrian-physics-ai-startup...
1•ottomengis•6m ago•0 comments

Claude Code in a Loop

https://github.com/quazardous/aiball
1•quazarzero•10m ago•0 comments

Portability Is a Myth: Why the Best AI Stacks Will Never Be Hardware-Agnostic

https://twitter.com/PatrickToulme/status/2055709800986780028
2•pretext•10m ago•0 comments

Show HN: Viberia – Civ/Polytopia-like command center for AI agents (BYOK/BYOS)

https://getviberia.com/
1•bhu8•12m ago•0 comments

Pizza Hut's AI system caused 'cascading' problems and $100M in damages

https://www.businessinsider.com/pizza-hut-ai-system-dragontail-lawsuit-franchisee-2026-5
1•kombookcha•15m ago•2 comments

Free crypto toolbox with 900 online tools

https://sevendiv.com/
1•m_mgkh•18m ago•0 comments

The Definitive Guide to Helping People Trapped in a Cult

https://www.psychologytoday.com/us/blog/freedom-mind/202104/the-definitive-guide-helping-people-t...
1•jacquesm•18m ago•0 comments

The cut in the Mixture of Experts compute graph

https://idlemachines.co.uk/essays/mixture-of-experts
1•smaddrellmander•24m ago•0 comments

State of AI 2026 survey results

https://2026.stateofai.dev/en-US
1•mycroft_4221•25m ago•0 comments

Evolving specs (2025)

https://github.com/github/spec-kit/discussions/152
1•pramodbiligiri•26m ago•0 comments

CISA Admin Leaked AWS GovCloud Keys on GitHub

https://krebsonsecurity.com/2026/05/cisa-admin-leaked-aws-govcloud-keys-on-github/
2•LelouBil•28m ago•0 comments

Hyperpolyglot ML Dialects and Haskell: SML, OCaml, F#, Haskell

https://hyperpolyglot.org/ml
1•lambertsimnel•32m ago•0 comments

AI agents for regulatory use cases: competition on the EU AI Act

https://regenold.com/landing/ai/eu-ai-act-competition
1•marco_virgolin•33m ago•2 comments

The just-say-no engineer was a ZIRP phenomenon

https://www.seangoedecke.com/the-just-say-no-engineer-was-a-zirp-phenomenon/
2•theanonymousone•40m ago•0 comments

Governments are ruining the internet to protect kids

https://www.neowin.net/editorials/governments-are-ruining-the-internet-to-protect-kids-but-there-...
3•bundie•41m ago•0 comments

Mounting Git commits as folders with NFS

https://jvns.ca/blog/2023/12/04/mounting-git-commits-as-folders-with-nfs/
2•pvtmert•41m ago•1 comments

Korean bill seeks strict watermark mandate on AI-generated content

https://www.koreatimes.co.kr/business/tech-science/20260517/korean-bill-seeks-strict-watermark-ma...
3•01-_-•43m ago•0 comments

A new EDIT tool for LLM agents

https://antirez.com/news/166
4•surprisetalk•44m ago•1 comments

Darwin Family: MRI-Trust-Weighted Evolutionary Merging

https://arxiv.org/abs/2605.14386
1•cheuv•44m ago•0 comments

Brain "Bypass" Technology Could Transform Treatment for Neurological Disorders

https://scitechdaily.com/new-brain-bypass-technology-could-transform-treatment-for-neurological-d...
2•01-_-•45m ago•0 comments

My domain got abused on GitHub Pages

https://meertens.dev/blog/github-enables-domain-abuse/
3•rmeertens•45m ago•0 comments

How We Hacked Our Way to Free 4.0s and Took Over a uWaterloo & UofT Grading Tool

https://xtra.sh/blog/markus/
1•xtra1•46m ago•0 comments

How to Select a Mobile OS

https://blog.gridranger.dev/mobile-oses-featuring-fairphone-5/
1•vinhnx•48m ago•0 comments

Why Elon Musk lost his suit against OpenAI

https://www.technologyreview.com/2026/05/18/1137488/elon-musk-suit-openai-verdict/
3•joozio•48m ago•0 comments

Topological Relativity Theory: A Quantum Gauge Field Framework

https://zenodo.org/records/20262720
1•kisnorbert•49m ago•0 comments

Meta lays out details of May 20 restructuring in internal document

https://www.reuters.com/world/meta-lays-out-plans-may-20-layoffs-restructuring-internal-document-...
3•theonionspeaks•50m ago•0 comments

My 40-liter backpack travel guide

https://vitalik.eth.limo/general/2022/06/20/backpack.html
2•bushwart•55m ago•2 comments

Kerf (Kerf1)

https://github.com/kevinlawler/kerf1
1•tosh•55m ago•0 comments