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?

Resyl – AI memory that ties your notes to people instead of folders (Android)

https://play.google.com/store/apps/details?id=com.muragun.resyl&hl=en_US
1•thisisaman408•1m ago•0 comments

Zerostack v1.3.2 Released

https://github.com/gi-dellav/zerostack/releases/tag/v1.3.2
1•gidellav•3m ago•0 comments

Building Pi with Pi

https://lucumr.pocoo.org/2026/5/24/pi-oss/
1•mplanchard•5m ago•0 comments

Life with locked-in syndrome: 'Despite everything, you are alive'

https://www.thetimes.com/uk/healthcare/article/life-with-locked-in-syndrome-despite-eveything-you...
1•bookofjoe•5m ago•1 comments

Does the human still make the decision?

https://benjosaur.substack.com/p/does-the-human-still-make-the-decision
1•benjosaur•6m ago•0 comments

Don't know where your data is from? Bayesian modeling for unknown coordinates

https://christopherkrapu.com/blog/2026/dont-know-where-your-data-is-from/
1•ckrapu•9m ago•0 comments

Preventing AI agents from executing destructive terminal commands

https://github.com/7Majesty-M/terminal-guardian-mcp
1•majesty-m•12m ago•0 comments

Enhanced Games CEO insists 'Doping Olympics' is safer than traditional sport

https://www.dailymail.com/sport/othersports/article-15844011/enhanced-games-maximilian-martin-dop...
1•Bender•14m ago•0 comments

The Wizard with the Defensible Pond

https://worksonmymachine.ai/p/the-wizard-with-the-very-defensible
1•pkilgore•16m ago•0 comments

Advancing Mathematics Research with AI-Driven Formal Proof Search

https://arxiv.org/abs/2605.22763
1•tamnd•18m ago•0 comments

Agents Dont Want VMs

https://zachsmith.ai/blog/agents-dont-want-vms/
3•zachdev1•23m ago•1 comments

The Energy Transition Is Happrning Faster Than You Think

https://www.youtube.com/watch?v=HgBTARXEfxU
1•InitialBP•23m ago•1 comments

Topo Designs Rover Trail Pack Is the Best Backpack I've Ever Used

https://www.wired.com/story/topo-designs-rover-trail-pack/
1•joozio•25m ago•0 comments

A Dual-Node Home NAS Cluster for $210

https://laser-coder.net/articles/home-nas/index.html
1•lasercoder•27m ago•1 comments

Hitler as a Unit of Measurement

https://hermitome.wordpress.com/2013/08/30/hitler-as-a-unit-of-measurement/
3•lisper•29m ago•0 comments

When Canada's Metric Switch Left a New Boeing 767 with Half the Fuel It Needed

https://viewfromthewing.com/both-engines-died-at-41000-feet-canadas-metric-switch-left-a-brand-ne...
1•crescit_eundo•30m ago•1 comments

Active supply chain attack across NPM, PyPI, and Crates. io

https://twitter.com/socketsecurity/status/2058565153138844043
1•rob•33m ago•0 comments

An Introduction to Objectivist-C

https://fdiv.net/2012/04/01/introduction-objectivist-c
1•pcfwik•36m ago•0 comments

New Rocket League is using Unreal Engine 6

https://twitter.com/QNDZYcom/status/2058586983656726640
5•astlouis44•39m ago•2 comments

Can't they get the small science stuff right?

https://www.theguardian.com/commentisfree/2026/may/24/hill-i-will-die-on-hollywood-blockbusters-s...
4•pjbk•41m ago•0 comments

What Gets Kept

https://www.newyorker.com/culture/the-weekend-essay/what-jack-kerouac-left-behind
2•lermontov•42m ago•0 comments

Oss.zone, a Pubnix Running on NixOS

https://oss.zone
1•f1nniboy•43m ago•1 comments

Apple Preparing New 'Gen AI' Website Ahead of WWDC

https://www.macrumors.com/2026/05/23/apple-gen-ai-subdomain/
3•Brajeshwar•43m ago•0 comments

FieldStation42 – Turn your computer into a vintage TV cable system

https://fieldstation42.com/
2•indigodaddy•47m ago•0 comments

Beating C with Dyalog APL: wc

https://ummaycoc.github.io/wc.apl/
1•tosh•48m ago•0 comments

Dynamical Governed Topology Engine with 3D Viewer

https://pub-6f95fcb400b34d7290952c160671872b.r2.dev/Screenshot%202026-05-24%20093053.png
1•verhash•50m ago•1 comments

FreeBSD Foundation Executive Director Tries Daily Driving FreeBSD on Laptop

https://www.phoronix.com/news/FreeBSD-On-Laptop-Driver
16•Bender•52m ago•12 comments

First ever Cray T3D Supercomputer goes up for auction with $81,000 reserve

https://www.tomshardware.com/tech-industry/supercomputers/first-ever-cray-t3d-supercomputer-goes-...
3•LorenDB•52m ago•1 comments

AT&T sues to ditch Cali copper phone lines to save billions

https://www.theregister.com/networks/2026/05/22/att-sues-to-ditch-cali-copper-phone-lines-to-save...
1•Bender•52m ago•0 comments

HP investigating BIOS updates that leave premium laptop users in boot loop limbo

https://www.theregister.com/personal-tech/2026/05/24/hp-investigating-bios-updates-that-leave-pre...
3•Bender•53m ago•0 comments