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?

AA-Briefcase: a frontier knowledge work evaluation

https://artificialanalysis.ai/articles/aa-briefcase
1•theanonymousone•24s ago•0 comments

Sheaves in Haskell

https://www.tweag.io/blog/2026-06-18-sheaves-in-haskell/
1•ingve•1m ago•0 comments

Steady States in Dyson's Theory of the Cell

https://chillphysicsenjoyer.substack.com/p/steady-states-in-dysons-theory-of
1•crescit_eundo•2m ago•0 comments

US court rules Ohio can restrict children's use of social media

https://www.reuters.com/world/us/us-court-rules-ohio-can-restrict-childrens-use-social-media-2026...
1•1vuio0pswjnm7•5m ago•0 comments

Meta lobbies Congress for protection from child-harm lawsuits

https://www.reuters.com/world/meta-lobbies-congress-protection-child-harm-lawsuits-2026-06-18/
1•1vuio0pswjnm7•6m ago•0 comments

SpaceX shares fall as post-IPO frenzy loses steam

https://www.reuters.com/legal/transactional/spacex-shares-tumble-post-ipo-frenzy-loses-steam-2026...
1•1vuio0pswjnm7•6m ago•0 comments

Bitcoin Has Lost Nearly Half Its Value in 11 Months

https://www.cnbc.com/2026/06/12/bitcoins-price-drop-is-forcing-investors-to-revisit-why-they-own-...
1•throw0101a•6m ago•0 comments

Show HN: Wolffish – An OS personal desktop AI agent

https://www.wolffi.sh/
1•younes-alturkey•8m ago•0 comments

Ask Ad Manager by Google Ads

https://blog.google/products/admanager/ask-ad-manager/
1•czeizel•10m ago•0 comments

Shutting Down Fornjot

https://fornjot.app/blog/shutting-down-fornjot/
2•ilreb•11m ago•0 comments

Bun (the JavaScript runtime) is being vibe-ported from Zig to rust

https://github.com/oven-sh/bun/blob/claude/phase-a-port/docs/PORTING.md
2•birdculture•12m ago•0 comments

TrophyLab - Access to aggressor equipment and its analysis

https://trophylab.mod.gov.ua/en/
2•Anon84•14m ago•0 comments

Too much Chinese science is ignored by the West

https://www.economist.com/science-and-technology/2026/06/10/too-much-chinese-science-is-ignored-b...
3•tzury•14m ago•0 comments

Human Dignity

https://www.nubero.ch/blog/017/
1•fmkamchatka•17m ago•0 comments

Long-term remission of neuromyelitis optica w hematopoietic stem cell transplant

https://www.cell.com/med/abstract/S2666-6340(26)00182-0?_returnURL=https%3A%2F%2Flinkinghub.elsev...
1•bookofjoe•17m ago•0 comments

Please Stop Talking About AGI (2025)

https://blog.jxmo.io/p/we-should-stop-talking-about-agi
1•root-parent•17m ago•0 comments

AI Tool That Analyzes Reddit Complaints and Suggests Micro-SaaS Ideas

https://ideavault-alpha.vercel.app/
1•awsaqh•18m ago•0 comments

Europe's Cloud Problem Isn't the Tech. It's the Mindset

https://julien.danjou.info/blog/europes-cloud-problem-isnt-the-tech/
3•enz•20m ago•0 comments

Indian IT stocks slump up to 7% as Accenture cuts revenue outlook

https://www.cnbc.com/2026/06/19/india-it-stocks-fall-accenture-cuts-revenue-forecast.html
2•root-parent•23m ago•1 comments

Where Multi-Agent teams outperform Single Agent runs (and where they don't)

https://www.youtube.com/watch?v=LJ6gdvoekDs
1•jorgemv•24m ago•0 comments

The hard part begins after the lab experiments end

https://rochansinha.com/posts/2026-06-15-The%20hard%20part%20begins%20after%20the%20lab%20experim...
1•rochansinha•24m ago•0 comments

Co/Core – An AI Cooperative

https://console.cocore.dev/
2•tobr•25m ago•0 comments

AI Development Company

1•alexsebastianoo•30m ago•0 comments

Non-Terrifying Spirituality for Children

https://mrmarket.lol/non-terrifying-spirituality-for-children/
1•mrmarket•32m ago•0 comments

My Mathematical Regression

https://blog.dahl.dev/posts/my-mathematical-regression/
2•aleda145•34m ago•0 comments

Whatever Recall – Local AI-knowledge embedded directly within your code

https://whatever-recall.com
1•ChristianMcCain•35m ago•0 comments

The FreeBSD-Update(8) Screensaver

https://vermaden.wordpress.com/2026/06/19/freebsd-update-screensaver/
2•vermaden•35m ago•0 comments

Show HN: Speechmark – On-device meeting notes for Mac (no bot, no cloud)

https://www.speechmark.co/
1•theone•36m ago•0 comments

A startup claims it broke through a bottleneck that's holding back LLMs

https://www.technologyreview.com/2026/06/19/1139313/a-startup-claims-it-broke-through-a-bottlenec...
1•joozio•37m ago•0 comments

Samsung Demonstrates 3D Stacked FETs with Triple Nanosheet Channels at 42nm

https://semiconductor.samsung.com/news-events/tech-blog/from-gaa-to-3d-stacked-fet-expanding-the-...
1•its_ajseven•37m ago•0 comments