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?

Show HN: Nod – Mac meeting notes that don't join the call or store audio

https://hellonod.app/
1•dbarabashdev•49s ago•0 comments

A Brief Introduction to q and KDB-X

https://code.kx.com/kdb-x/learn/brief-introduction.html
1•tosh•1m ago•0 comments

Improvements to Web for AI Should Benefit All Users

https://cloudfour.com/thinks/improvements-to-web-for-ai-should-benefit-all-users/
2•speckx•4m ago•0 comments

Ukraine hits Moscow with largest-ever drone attack

http://ft.com/content/c2514fd8-d5d8-4bde-ad64-1167638d188b
2•mmarian•4m ago•0 comments

VSE II: Serial protocol achieving 89.93% line load reduction

https://github.com/Morphsec88/VSE-Engine-II-Protocol
3•Morphsec88•6m ago•0 comments

Show HN: Vessel – Portable app files (UI, FastAPI, SQLite) like .xlsx for tools

https://getvessel.dev
3•apollo_orbit•6m ago•1 comments

The Future of the Con Is Here, It's Just Not Evenly Distributed

https://manishearth.github.io/blog/2026/06/17/the-future-of-the-con-is-already-here/
3•Manishearth•8m ago•0 comments

Legacy Update – community-run Windows Update

https://legacyupdate.net/
3•jasoncartwright•8m ago•0 comments

Sourcehut Disrupted by LLM Crawlers

https://status.sr.ht/issues/2026-06-06-llms-again/
4•tovej•8m ago•0 comments

Eve Content Agent Template

https://github.com/vercel-labs/eve-content-agent-template
3•flashbrew•8m ago•0 comments

Human Dignity and the Perils of Indifference

https://www.nubero.ch/blog/017/
3•nubero•10m ago•0 comments

The Roadmap to Mastering AI Agent Evaluation

https://machinelearningmastery.com/the-roadmap-to-mastering-ai-agent-evaluation/
3•eigenBasis•11m ago•0 comments

Guardian Angels

https://gwern.net/guardian-angel
3•rishabhaiover•12m ago•0 comments

Six months on the Strix Halo chip AMD now markets as "first-class ROCm"

https://thefrontierlab.ai/first-class-rocm-strix-halo-six-months/
2•thefrontierlab•12m ago•0 comments

The Open Source Alternative to Claude Design

https://www.motionscript.dev/
3•kevinoliveira•15m ago•0 comments

15-minute at-home Lyme disease tick test

https://www.bostonglobe.com/2026/06/17/business/lyme-disease-tick-test/
3•bookofjoe•19m ago•1 comments

Europe must choose between AI and climate goals, data center lobby says

https://www.politico.eu/article/europe-choose-ai-climate-goals-data-center-chief-warns/
4•hamburgererror•19m ago•0 comments

Trump's Anthropic restrictions may be illegal

https://www.politico.com/news/2026/06/18/trump-anthropic-ai-export-controls-00966118
3•JumpCrisscross•19m ago•1 comments

A Drone Barrage on Moscow Escalates Ukraine's Push to Take the War to Russia

https://www.nytimes.com/2026/06/18/world/europe/moscow-ukraine-drone-attack-fire.html
2•JumpCrisscross•21m ago•0 comments

Rankpad – AI Visibility Tracking for Brands

https://www.rankpad.app/
2•MattAtBlkk•21m ago•0 comments

Offline Ablation Predicted -0.19pp. Production Delivered +1.11pp

https://flyback.ai/engineering/ablation-said-ship
2•flyback•21m ago•0 comments

Excel in 100 lines of F# (2018)

https://tomasp.net/blog/2018/write-your-own-excel/
1•tosh•22m ago•0 comments

Microsoft new Outlook takes 10 seconds to do what Outlook Classic does instantly

https://www.windowslatest.com/2026/06/15/microsofts-new-outlook-takes-10-seconds-to-do-what-outlo...
7•Adam-Hincu•23m ago•3 comments

The Welding Torch That Feels for the Seam – Industrial and Manufacturing

https://atomsfrontier.substack.com/p/the-welding-torch-that-feels-for
1•jpatel3•23m ago•0 comments

Grok Imagine Video 1.5

https://x.ai/news/grok-imagine-video-1-5
2•peterspath•24m ago•0 comments

Technical Dimensions of Programming Systems

https://tomasp.net/techdims/
2•tosh•26m ago•0 comments

I'm building a drone for the DARPA lift challenge [video]

https://www.youtube.com/watch?v=tohImHa4f5U
1•surprisetalk•27m ago•0 comments

Traumatic brain injury and risk of attempted suicide and violent crime (2023)

https://www.cambridge.org/core/journals/psychological-medicine/article/abs/traumatic-brain-injury...
2•tokai•27m ago•0 comments

Show HN: Reverse engineering user queries for ChatGPT/Gemini

https://github.com/syntropicsignal-ai/ai-visibility-audit
1•biduskamil•29m ago•1 comments

AI therapy chatbots in 2026: what Replika, Woebot, and ChatGPT get right

https://medium.com/@6thMind/ai-therapy-chatbots-in-2026-what-replika-woebot-and-chatgpt-get-right...
1•smanuel•29m ago•0 comments