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?

Thoughts on memory layers like mem0

1•anshmalik2002•4m ago•0 comments

Codex is deprecating plan mode

https://github.com/openai/codex/issues/18490#issuecomment-6890525683
1•EnnioEvo•6m ago•0 comments

Hacker News Daily

https://lopespm.com/hackernews-daily/
1•lopespm•7m ago•0 comments

TingLongWu – local, offline meeting translation (listen and speak)

https://github.com/sunososobro-hub/tinglongwu
1•sosobro•12m ago•0 comments

Show HN: Diagnosed with diabetes at 16, I built Diabic for World Diabetes Day

https://diabic.com
2•shahriarpshuvo•12m ago•0 comments

Terence Tao and Peter L.: Live Math with Open Math OS [video]

https://www.youtube.com/watch?v=rCZFomL5WBg
1•vismit2000•14m ago•0 comments

Blog on Multiagent Interaction Protocols

https://masr.gitlab.io/blog/
1•ioper•18m ago•0 comments

Show HN: Kasa, simplest budgeting app you can find

https://kasafinance.online/
1•emirhanozsoy•21m ago•0 comments

Open Source Motorcycle Infotainment

https://gitlab.com/FalkF/hackasaki-spinbridge
2•usernam33•21m ago•1 comments

Most of AI moats are just fuel

https://adlrocha.substack.com/p/adlrocha-most-of-ai-moats-are-just
1•iLuddite•25m ago•0 comments

Gitly: lightweight, self-hosted GitHub/GitLab alternative written in V

https://github.com/vlang/gitly
1•modinfo•27m ago•0 comments

A Pile of MCP Connectors Is Not a Context Engine

https://getunblocked.com/blog/mcp-connectors-are-not-a-context-engine/
1•fagnerbrack•30m ago•0 comments

Leo gets a birthday bash, 75 years after clocking in

https://www.theregister.com/offbeat/2026/11/15/leo-gets-a-birthday-bash-75-years-after-clocking-i...
1•defrost•37m ago•0 comments

Turn any image into emoji art, in the browser

https://www.thousandtools.com/image-to-emoji/
1•vaibhavvudayagi•37m ago•0 comments

Show HN: Vantage-V-AI – 2-bit ternary KV-cache with attention sinks

https://github.com/khoadev-vn/VANTAGE-V-AI
1•Anh_khoa•41m ago•0 comments

Periodic-Oriented Programming for First Robotics

https://bvisness.me/periodic-oriented-programming/
1•joshcsimmons•43m ago•0 comments

Skyfall Attack: Microarchitectural Data Sampling on AMD

https://skyfall-attack.github.io/
1•ersinesen•44m ago•0 comments

Israel: Making the Holy Land Burn

https://www.aljazeera.com/opinions/2026/11/15/israel-making-the-holy-land-burn
3•hebelehubele•44m ago•0 comments

Show HN: Can a VPN be decentralised.. I think it's the best for homelabs

https://github.com/CLoaKY233/kith
5•laysheth•45m ago•0 comments

Proof Number search: exhaustively search a game tree to prove win or lose

https://minimax.dev/docs/ultimate/pn-search/
1•fanf2•49m ago•0 comments

India's voter-roll software flags twins but lets two men be each other's father

https://diagramchasing.fun/2026/karnataka-sir
2•amnbh•50m ago•0 comments

King Æthelstan founded England in927. Why don't we celebrate that anniversary?

https://www.theguardian.com/commentisfree/2026/nov/14/king-athelstan-england-1100-anniversary-2027
3•YeGoblynQueenne•52m ago•0 comments

SS United States

https://en.wikipedia.org/wiki/SS_United_States
1•tosh•54m ago•0 comments

Earliest known writing dates back over 40k years

https://www.popsci.com/science/earliest-human-writing-germany/
2•tosh•55m ago•0 comments

The Christian Nationalists Have a Plan

https://www.theatlantic.com/politics/2026/11/christian-nationalism-trump-elections/689373/
2•rbanffy•58m ago•0 comments

My Adventure in Economics

https://wilsoniumite.com/2026/11/12/my-adventure-in-economics/
1•Wilsoniumite•59m ago•0 comments

A comprehensive guide to the bank of Nvidia

https://hntrbrk.com/investigations/nvidia
6•porridgeraisin•1h ago•0 comments

Inkling 2 Small Scores 31 on AAII v5.0.1, best-in-class among "US" open weights

https://artificialanalysis.ai/evaluations/artificial-analysis-intelligence-index
1•namjh•1h ago•1 comments

Kessler Syndrome

https://en.wikipedia.org/wiki/Kessler_syndrome
3•tosh•1h ago•0 comments

Korea's top tax accountant exam scorer confesses to cheating with AI

https://inlevel9.com/en/issues/top-score-under-suspicion
2•haebom•1h ago•0 comments