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•7mo ago

Comments

nine_k•7mo 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•7mo ago
We are always reinventing wheels. If we didn't, they'd all still be made of wood.
Zolomon•7mo ago
They mention this in the article.
spockz•7mo ago
It reminds me more of flat buffers though. Does protobuf also have zero allocation (beyond initial ingestion) and no pointer jumps?
cstrahan•7mo ago
No, one example of why being variable sized integers.

See https://protobuf.dev/programming-guides/encoding/

carterschonwald•7mo ago
One thing that sometimes gets tricky in these things is handling Sub term sharing. I wonder how they implemented it.
tlb•7mo 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•7mo 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•7mo 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•7mo ago
honestly i wish more stuff worked this way - fewer hops in memory always makes me happy
lordleft•7mo ago
This was very well written. Excellent article!
NetOpWibby•7mo ago
Is this like MessagePack for Haskell?

Nature's many attempts to evolve a Nostr

https://newsletter.squishy.computer/p/natures-many-attempts-to-evolve-a
1•fiatjaf•42s ago•0 comments

Scientists Uncover Why the World's Most Common Heart Drug Causes Muscle Pain

https://scitechdaily.com/scientists-finally-uncover-why-the-worlds-most-common-heart-drug-causes-...
1•bookofjoe•6m ago•0 comments

Disguised and in Danger: How a Nobel Peace Prize Winner Escaped Venezuela

https://www.wsj.com/world/americas/disguised-and-in-danger-how-a-nobel-peace-prize-winner-escaped...
3•JumpCrisscross•9m ago•0 comments

Show HN: I made a social media bot maker

https://makesocialbots.com
1•quadVision•12m ago•1 comments

The Logic of Cue

https://cuelang.org/docs/concept/the-logic-of-cue/
2•PaulHoule•12m ago•0 comments

The Seven-Minute Visit Cannot Understand a Human Body

https://markatwood.substack.com/p/the-seven-minute-visit-cannot-understand
1•coloneltcb•14m ago•0 comments

AI Is Breakin' the Law

https://buildcognitiveresonance.substack.com/p/ai-is-breakin-the-law
1•mgrayson•15m ago•0 comments

Let AI find you the perfect gf/bf

https://www.dateonzing.com/
1•zachperkel•16m ago•0 comments

Deconstructing the `CAP theorem' for CM and DevOps

https://markburgess.org/blog_cap.html
1•evacchi•20m ago•0 comments

Ask HN: Why do people trust ChatGPT with their money but not transparent algos?

2•mattglossop•21m ago•1 comments

Nanoremote, Cousin of Finaldraft

https://www.elastic.co/security-labs/nanoremote
1•dakrone•22m ago•0 comments

Why We Need to Know LR and Recursive Descent Parsing Techniques

https://tratt.net/laurie/blog/2023/why_we_need_to_know_lr_and_recursive_descent_parsing_technique...
1•shoo•23m ago•0 comments

Ask HN: Why do people trust ChatGPT with their money but not transparent algos?

1•mattglossop•23m ago•1 comments

ClassicPress Version 2.6.0 is Out

https://www.classicpress.net/classicpress-version-2-6-0-is-out/
1•ethanpil•24m ago•0 comments

FixBot: We Built an AI That Knows How to Fix Things

https://www.ifixit.com/News/114700/introducing-fixbot
1•walterbell•26m ago•0 comments

The LinkedQL engineering paper – the Live Queries engine

https://linked-ql.netlify.app/engineering/realtime-engine
1•phrasecode•30m ago•0 comments

Show HN: Glogos: a consensus-free attestation proposal

1•vnlemanhthanh•30m ago•0 comments

Gatekeepers: The Traffic Controllers of the Gnome Village

https://www.happihacking.com/blog/posts/2025/gatekeepers/
1•gpi•31m ago•0 comments

Kiwis travelling to US could soon face new social media screening

https://www.1news.co.nz/2025/12/11/kiwis-travelling-to-us-could-soon-face-new-social-media-screen...
1•keithnz•32m ago•0 comments

Reframing AI Alignment

https://andys.blog/misalignment/
1•andytratt•33m ago•0 comments

Lazard CEO says a Washington strategy now essential to get deals done

https://www.reuters.com/business/finance/lazard-ceo-says-washington-strategy-now-essential-get-de...
1•petethomas•33m ago•0 comments

MacKenzie Scott Announces $7B of Charitable Giving This Year

https://www.nytimes.com/2025/12/09/business/mackenzie-scott-philanthropy.html
1•bookofjoe•35m ago•1 comments

Zoom AI Achieves SotA 48% on Humanity's Last Exam

https://www.zoom.com/en/blog/humanitys-last-exam-zoom-ai-breakthrough/?cms_guid=false
1•elinear•35m ago•0 comments

The ultra-rich are claiming an increasing share of global wealth

https://www.lemonde.fr/en/economy/article/2025/12/10/the-ultra-rich-are-claiming-an-increasing-sh...
3•geox•36m ago•0 comments

RedisPlay

https://github.com/benkenhobbit/redisplay
1•benkenhobbit•38m ago•0 comments

Debugging TLS failures in distroless containers

https://lucabaggi.com/posts/ssl-docker/
1•asaiacai•38m ago•0 comments

Library of Time

https://libraryoftime.xyz/
2•bryanrasmussen•39m ago•0 comments

Axiom-X: A GPU-Accelerated Evolutionary Engine

https://github.com/BMV-AI/AXIOM-X
1•BMV-AI•40m ago•1 comments

Show HN: Tiny web app to draw on a knitted sweater

https://aegte.dev/xmas
1•aegte•41m ago•0 comments

NASA loses contact with Maven – spacecraft orbiting Mars for more than a decade

https://www.theguardian.com/science/2025/dec/10/nasa-loses-contact-maven-spacecraft-mars
9•tzmlab•42m ago•3 comments