frontpage.
newsnewestaskshowjobs

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?

The Joy of Kintsugi

https://www.autodidacts.io/the-joy-of-kintsugi/
1•Curiositry•2m ago•0 comments

How the US Economy Works – an interactive map

https://economy.fogpier.com/
1•Indian_in_US•9m ago•0 comments

Only 1 in 500 Visitors Is an AI Agent (So Far)

https://www.quantable.com/analytics/how-much-agentic-traffic/
2•jhpacker•10m ago•0 comments

Russia's War Transforms Ukraine into a World-Leading Military Producer

https://jamestown.org/russias-war-transforms-ukraine-into-a-world-leading-military-producer/
1•prmph•13m ago•0 comments

I wanted to sleep without my phone. But what if someone needed me?

https://www.rnz.co.nz/life/wellbeing/i-wanted-to-sleep-without-my-phone-but-what-if-someone-neede...
3•billybuckwheat•15m ago•0 comments

iPod Nano Can Run iOS

https://www.macrumors.com/2026/11/29/ipod-nano-can-finally-run-ios/
1•thm•16m ago•0 comments

I Cloned Their Plugin with AI...Then They Found Out

https://www.youtube.com/watch?v=ACAfH5uez9Y
1•Betelbuddy•17m ago•0 comments

Former Stasi Officer on the NSA domestic surveillance (2013)

https://www.businessinsider.com/stasi-talks-about-nsa-surveillance-state-2013-6
1•niemandhier•17m ago•0 comments

Gesstimate, a daily number-guessing game with hot-or-cold feedback

https://gesstimate.co.uk/
1•mcroberts•19m ago•0 comments

Show HN: On Simulating LLMs on Optical Hardware

https://huggingface.co/spaces/ritabratamaiti/optical-weight-simulator
1•hoopla_ching•19m ago•0 comments

Knowing What Belongs

https://riccardobusetti.me/posts/knowing-what-belongs
1•Pamar•20m ago•0 comments

Managing Context Window with Pi /Tree: Branches Summaries Subagentlike Workflows

https://stacktoheap.com/blog/2026/02/26/pi-tree-context-window-management/
1•jason_s•21m ago•1 comments

Scientists Discover Most Neurons Are Jacks-of-All-Trades

https://zuckermaninstitute.columbia.edu/upending-decades-debate-scientists-discover-most-neurons-...
1•ersinesen•24m ago•0 comments

What formal verification is in reality

https://formalverification.fail/
2•sspehr•24m ago•0 comments

Open-source database IDE in the browser, with an agent that runs on local models

https://github.com/libredb/libredb-studio
1•abdullahk0634•24m ago•0 comments

Why Every Frontier Lab Uses Our Webhook Standard

https://www.svix.com/blog/why-every-frontier-lab-uses-our-webhook-standard/
1•mooreds•27m ago•0 comments

Proof of the Extended Riemann Hypothesis from Axiom Math

https://github.com/AxiomMath/erh-totally-real
3•nb-t•31m ago•0 comments

Integrating Factor

https://susam.net/integrating-factor.html
2•susam•31m ago•0 comments

Anthropic has made a major breakthrough in theoretical cryptanalysis

https://twitter.com/AndrewCurran_/status/2127127873802911864
29•bifftastic•31m ago•7 comments

Sidenotes with CSS Anchor Positioning

https://vincent.bernat.ch/en/blog/2026-css-sidenotes
3•jez•32m ago•0 comments

Show HN: An IRC Bouncer for Meshtastic

https://github.com/fiskeben/meshtastik
1•fiskeben•35m ago•0 comments

This 'linear' clock cleverly reimagines how to tell time

https://www.fastcompany.com/91644896/linear-clock-johannes-van-ginkel
2•grsmvg•36m ago•0 comments

FDA Phonetic and Orthographic Computer Analysis (POCA)

https://poca-public.fda.gov/name_search
1•Clamchop•36m ago•0 comments

Why College Towns Are Booming

https://www.theatlantic.com/ideas/2026/11/housing-yimby-college-towns/689596/
1•littlexsparkee•38m ago•0 comments

Scout: $25 Wi-Fi camera to show any agent what's happening at home

https://usenym.com/scout
2•nateb2022•42m ago•0 comments

GPT Sol 6.2 feels Nerfed

https://taoofmac.com/space/notes/2026/11/29/1133
6•rcarmo•44m ago•0 comments

The Keychron B11 Pro

https://taoofmac.com/space/reviews/2026/11/29/1927
3•rcarmo•44m ago•0 comments

Robot Data Pipelines: Filtering, Autolabeling, and Training Processors

https://www.ghussein.org/blog/inside-robotic-systems/robot-data-pipelines
1•GashonHussein•47m ago•0 comments

SettlyGo – Local Help for Everyday Life in Germany

https://www.settlygo.app/en
1•mrvarmazyar•48m ago•1 comments

40-Mac Studio Cluster in an Attic Crawl Space (Spanish) [video]

https://www.youtube.com/watch?v=C8SAvjiMFNo
2•soci•49m ago•0 comments