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?

Social dynamics of toxic metal industry in medieval Europe

https://www.cambridge.org/core/journals/antiquity/article/social-dynamics-of-toxic-metal-industry...
1•XzetaU8•1m ago•0 comments

Gradium open-sourced its on-device TTS

https://gradium.ai/phonon
1•IsaacZerh•2m ago•0 comments

Show HN: Hackingscreenfake.com- Fake Hacking Screen Simulator/Prank Tool

https://hackingscreenfake.com/
1•TechDevArchitec•3m ago•1 comments

SoloMCN – Claude Code as the runtime for a one-person video studio

https://github.com/ymybxx/SoloMCN
1•noequal666•4m ago•0 comments

Is it possible to be bigger than a Blue Whale?

https://www.reddit.com/r/askscience/comments/1x6umva/comment/ph5u2bh/
1•mooreds•4m ago•0 comments

Show HN: Skillsync – Coding agent memory but it's just search

https://skillsync.com
1•cat-whisperer•4m ago•0 comments

My Thinking about School Reform Has Changed over Decades (Part 1)

https://larrycuban.wordpress.com/2026/10/20/how-my-thinking-about-school-reform-has-changed-over-...
1•Tomte•4m ago•0 comments

The Technopolitics of Ad-Tech

https://pluralistic.net/2026/10/19/spying-v-context/
1•hn_acker•4m ago•0 comments

Kash Patel's FBI stats are bolstered by arrests made by state and local agencies

https://www.ms.now/news/crime-stats-touted-kash-patel-arrests-state-local-agencies
2•hn_acker•5m ago•1 comments

A photo of a patient's face could predict whether they'll survive cancer

https://www.washingtonpost.com/health/2026/10/20/how-photo-patients-face-could-predict-whether-th...
1•elo2000•5m ago•0 comments

The Gospel According to Peter (Thiel)

https://www.theverge.com/tech/1014252/peter-thiel-antichrist-lectures-analysis
1•pavel_lishin•5m ago•0 comments

The Download: the claim shaking up AI and the internet's agent problem

https://www.technologyreview.com/2026/10/20/1147355/the-download-claim-shaking-up-ai-internet-age...
1•joozio•6m ago•0 comments

Show HN: Contrack – Self-hosted contact manager and people search

https://github.com/arvarik/contrack
2•arvarik•7m ago•0 comments

Go Conventions That Clicked Too Late for an AI Engineer

https://towardsdev.com/10-go-conventions-that-clicked-too-late-for-an-ai-engineer-78319f2d538f?sk...
2•cheikhdev•9m ago•0 comments

Parametric Error Rendering and Interactive Diagnostics

https://gavinleroy.com/writings/posts/errors-diagnostics-interaction/
1•yorelnivag•9m ago•0 comments

Stop Waiting on a Failed Build

https://devblogs.microsoft.com/visualstudio/stop-waiting-on-a-failed-build/
1•ibobev•10m ago•0 comments

Scope Creep

https://www.gridbugs.org/scope-creep/
2•ibobev•11m ago•0 comments

Alignment is correct, safe, reproducible behavior under explicit constraints

https://getswiftapi.com
2•rayanpal_•11m ago•0 comments

Show HN: My attempt to get Claude to run a business

https://pagecritic.app/
1•diegoaad•11m ago•0 comments

Roguelike Tutorial 2020

https://www.gridbugs.org/roguelike-tutorial-2020/
1•ibobev•12m ago•0 comments

Compound Memory Models

https://www.sigarch.org/compound-memory-models/
1•matt_d•20m ago•0 comments

Citrini Therapeutics

https://www.citriniresearch.com/p/citrini-therapeutics
1•nycdatasci•20m ago•0 comments

Whoops: Grok Bot Spills Tech CEO's Bank Data in Public Slack

https://www.techdirt.com/2026/10/19/whoops-grok-bot-spills-tech-ceos-bank-data-in-public-slack/
5•speckx•20m ago•0 comments

Patch your Plex media server before someone hacks it

https://arstechnica.com/security/2026/10/recently-fixed-plex-media-vulnerabilities-are-being-expl...
2•PaulHoule•21m ago•0 comments

Ask HN: What is/was your strategy which landed you a JOB in this market?

1•shivang2607•21m ago•0 comments

Show HN: we made every cloud work like one giant computer

https://getovercast.com/
2•jperryjperry•22m ago•0 comments

Datacenters 2027: The Year of Acceleration, +50GW in a Single Year

https://newsletter.semianalysis.com/p/datacenters-2027-the-year-of-acceleration
2•bigwheels•22m ago•0 comments

Getting Agents to Tell on Themselves

https://blog.thinkst.com/2026/09/getting-agents-to-tell-on-themselves.html
1•mooreds•22m ago•0 comments

Show HN: Megapop – a Populous-style god game in the browser, WebGPU, no engine

https://waldtier.itch.io/megapop
2•xdbx•23m ago•0 comments

Managing Agents in Shifts

https://galvered.com/blog/managing-agents-in-shifts/
1•Bootstrapper909•23m ago•0 comments