frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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?

Why Canadians can now get cheaper generic Ozempic – and Americans can't

https://www.bbc.com/news/articles/c142y4p2eyxo
1•amichail•22s ago•0 comments

California – Lowest Wholesale Electricity Prices in USA

https://cleantechnica.com/2026/05/30/california-lowest-wholesale-electricity-prices-in-usa/
3•toomuchtodo•1m ago•1 comments

Fear and Social Pressure Are 'Overarming' the U.S.

https://home.dartmouth.edu/news/2026/06/how-fear-and-social-pressure-are-overarming-us
1•achristmascarl•2m ago•0 comments

The Quiet Numbers Station: Decoding Nineteen Years of GPS Cryptography

https://www.benthamsgaze.org/2026/06/02/the-quiet-numbers-station-decoding-nineteen-years-of-gps-...
2•DaRealGraybeard•5m ago•0 comments

Academic-Brain vs. Founder-Brain

https://fchaubard.github.io/academic_brain_vs_founder_brain.html
1•atomicnature•5m ago•0 comments

Software Quality Is Not Goal Anymore

https://blog.numericcitizen.me/2026/06/04/software-quality-is-not-goal.html
1•speckx•6m ago•0 comments

Show HN: Claude-o-meter, a tachometer for your Claude use

https://github.com/joshcarter/claude-o-meter
1•jdcarter•9m ago•0 comments

Airlines Uses AI to Fake Empathy Rather Than Fix Problems: Passenger Sent Prompt

https://viewfromthewing.com/airlines-are-using-ai-to-manufacture-empathy-instead-of-solving-probl...
3•crescit_eundo•9m ago•0 comments

The Desperation of NYTimes

https://rozumem.xyz/posts/16
2•rozumem•10m ago•0 comments

Anno 1800 Cured my Chronic Pain

https://hiddeinplain.site/2026/06/04/anno-1800-cured-my-chronic-pain/
2•hidd•10m ago•0 comments

Instagram Launches Plus

https://about.instagram.com/blog/announcements/introducing-instagram-plus
1•dockerd•14m ago•1 comments

Kea >= 1:3.0.3-6 update requires manual intervention

https://archlinux.org/news/kea-1303-6-update-requires-manual-intervention/
1•daesorin•14m ago•0 comments

"Visually math concepts which are easy to explain"

https://math.stackexchange.com/questions/733754/visually-stunning-math-concepts-which-are-easy-to...
1•aragonite•14m ago•0 comments

Single Responsibility, the Distorted Principle

https://www.truehenrique.com/en/2021/10/27/single-responsibility-the-distorted-principle/
1•birdculture•15m ago•0 comments

Goodbye Flow State

https://jry.io/writing/goodbye-flow-state/
1•evakhoury•15m ago•0 comments

Double Ender

https://www.theincomparable.com/doubleender/
1•tosh•16m ago•0 comments

Ask HN: Why do my Show HN submissions get flagged immediately?

1•scorpion888•16m ago•3 comments

Goldman Sachs expects SpaceX's AI revenue to increase 100-fold by 2030

https://www.ft.com/content/516cd0e5-a402-4b6c-8035-d688dc5f0cf4
1•JumpCrisscross•17m ago•0 comments

Hacker News Security

https://news.ycombinator.com/security.html
1•gurjeet•17m ago•0 comments

The AI-Driven Resurgence of Native Mac App Development

https://daringfireball.net/linked/2026/06/04/the-ai-driven-resurgence-of-mac-app-development
1•tosh•18m ago•0 comments

MCP Needs an Approval Button

https://simianwords.bearblog.dev/mcp-needs-an-approval-button/
1•simianwords•19m ago•0 comments

Show HN: Clickfyre Ping – send app notifications to yourself

https://ping.clickfyre.com
1•yashg•19m ago•0 comments

Agent Arena: Causal Evaluation of Agents in the Real World

https://arena.ai/blog/agent-arena-methodology/
1•matt_d•19m ago•0 comments

Ad Free Alberta Learner Practice Test

https://driversedhub.com/tests/ad-free-alberta-learner-practice-test/
1•Daeman•20m ago•0 comments

Multi-stage distributed query execution in ClickHouse Cloud

https://clickhouse.com/blog/multi-stage-distributed-query-execution-clickhouse-cloud
1•samaysharma•20m ago•0 comments

Astronomers just solved a 50-year-old mystery about the Milky Way's black hole

https://www.scientificamerican.com/article/astronomers-just-solved-a-50-year-old-mystery-about-th...
1•beardyw•20m ago•0 comments

Your 401(k) is about to become Elon Musk's exit liquidity

https://twitter.com/ThierryBorgeat/status/2060820406840271145
5•root-parent•21m ago•1 comments

Cargo Cult Process

https://lamis73.substack.com/p/cargo-cult-process
1•Lamis-A•22m ago•0 comments

Parallelize yourself, not your agents

https://twitter.com/mag_sven/status/2062561425915023824
1•charliejeppsson•23m ago•1 comments

Show HN: Resume – manage Claude and codex sessions in one CLI

https://pennyroyaltea.github.io/resume/
1•ktoyame•24m ago•0 comments