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?

Machine-Generated and Checked Proofs for a Verified Compiler (Experience Report)

https://dl.acm.org/doi/10.1145/3828700
1•matt_d•1m ago•0 comments

What my dad taught me about AI coding in the 90s

https://askmike.org/articles/ai-coding-lessons-in-the-90s-from-my-dad/
1•askmike•2m ago•0 comments

How Far Can NYC Transit Take You?

https://subway.fyi/60minutes
1•thunderbong•5m ago•0 comments

Playing whack-a-mole is losing

https://dadrian.io/blog/posts/whack-a-mole-is-losing/
1•tabletcorry•10m ago•0 comments

Pluralistic: How Canada can help Americans and defeat America

https://pluralistic.net/2026/08/24/elbows-really-up/
1•A_D_E_P_T•10m ago•0 comments

Handling 8 thousand mouse refreshes per second in Godot Engine

https://godotengine.org/article/fixing-high-polling-rate-mice-on-windows/
2•jaimex2•11m ago•0 comments

UK will use Ukraine battlefield data to train AI and use it againsts protesters

https://www.theguardian.com/politics/2026/aug/24/uk-to-use-ukraine-battlefield-data-to-train-ai-t...
2•skor•13m ago•0 comments

FreeToken: Efficient Edge-Native Moe Serving with Bandwidth-Adaptive Execution

https://arxiv.org/abs/2608.16157
1•Anon84•15m ago•0 comments

Iran Is Using Foreign Criminals to Attack Its Critics Overseas

https://www.newyorker.com/news/letter-from-the-uk/iran-is-using-foreign-criminals-to-attack-its-c...
1•firefax•19m ago•0 comments

The cost of today's "smart" devices

https://www.fsf.org/blogs/community/2026-the-hidden-cost-of-todays-smart-devices
2•smitty1e•20m ago•0 comments

The Official Ig Nobel Card Game Is Born, Improbably

https://improbable.com/2026/08/24/the-official-ig-nobel-card-game-is-born/
2•sohkamyung•24m ago•0 comments

Bookshelf – Self-hosted eBook library that runs on object storage

https://github.com/murerkinn/bookshelf
3•arbayi•25m ago•0 comments

Tiny, fast Windows Notepad replacement (source available)

https://liquidninja.com/metapad/
2•bananaboy•25m ago•1 comments

SQLite as a Document Database (2020)

https://dgl.cx/2020/06/sqlite-json-support
2•lioeters•25m ago•0 comments

The text mode lie: why modern TUIs are a nightmare for accessibility

https://www.osnews.com/story/144892/the-text-mode-lie-why-modern-tuis-are-a-nightmare-for-accessi...
4•birdculture•28m ago•0 comments

Evaluating Shrinking (Experience Report)

https://dl.acm.org/doi/10.1145/3830439.3831271
2•matt_d•29m ago•0 comments

From Gradients to ChatGPT

https://mister-meeseeks.github.io/g2c/
2•simonpure•30m ago•0 comments

Show HN: AiSyncing – Back up your AI coding assistant memories to GitHub

https://github.com/DiegoSalazar/AiSyncing
1•mastermindxs•33m ago•0 comments

Directory navigator that doesn't require you to visit a folder first

https://github.com/RudySource/Dirgo
2•rudus•34m ago•0 comments

War Machines: Netflix Confirms Sequel to Hit Sci-Fi Movie War Machine

https://moztako.me/war-machines-netflix-war-machine-sequel/
2•cecyev•35m ago•0 comments

Characterizing the spiral: potential mechanisms in AI-associated delusions

https://www.nature.com/articles/s44277-026-00065-0
4•jambalaya8•36m ago•0 comments

Mission impossible? Quantifying military emissions

https://thebulletin.org/2026/08/mission-impossible-quantifying-military-emissions/
2•measurablefunc•37m ago•0 comments

Show HN: Flostep – Diagrams people can actually walkthrough

https://flostep.dev/
1•pandurang90•40m ago•0 comments

Lean: Postmortem for the Kernel Soundness Bug Hunt

https://leodemoura.github.io/blog/2026-8-24-postmortem-for-the-kernel-soundness-bug-hunt/
3•matt_d•41m ago•0 comments

Epigenetic aging biomarker responsiveness to longevity interventions in humans

https://www.nature.com/articles/s41591-026-04562-9
3•bookofjoe•42m ago•0 comments

Show HN: Mainly – a self-hosted mail client built for your multiple domains

https://mainly.crnst8.com/
1•flowerpil•49m ago•0 comments

Equations explained colorfully with KaTeX and Markdown

https://github.com/stared/equations-explained-colorfully
1•lioeters•51m ago•1 comments

Codeanywhere Is Sunsetting

https://codeanywhere.com/blog/codeanywhere-is-sunsetting
3•jcbhmr•52m ago•1 comments

Show HN: Stigmergy, a Karpathy-style LLM wiki for a team, not one person

https://github.com/sturlese/stigmergy
1•sturlese•53m ago•0 comments

OpenDryFire – 10x cheaper laser dry-fire scoring from a webcam and mic

https://github.com/aysark/opendryfire
1•infinitone•53m ago•0 comments