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?

Your VPS Is a Sitting Duck

https://github.com/rockballslab/vps-secure
1•rockballslab•43s ago•0 comments

Is Bitwarden Getting Enshitified?

https://www.fastcompany.com/91542655/bitwarden-scrubs-always-free-and-inclusion-values-from-its-w...
1•bobek•7m ago•1 comments

Experience Layer for AI

https://cortexdb.ai/blog/v1
1•prmalik•10m ago•0 comments

Pretext – pure-arithmetic text measurement for proportional fonts

https://somnai-dreams.github.io/pretext-demos/
1•Teever•15m ago•0 comments

TunnelForge, a L2TP client for Android 12

https://github.com/evokelektrique/tunnel-forge
1•femdiya•15m ago•0 comments

The Whitepaper Thunderdome: HAGE vs. Storage Is Not Memory

https://medium.com/@vektormemory/the-whitepaper-thunderdome-hage-vs-storage-is-not-memory-8a76fd6...
1•vektormemory•22m ago•0 comments

Why birth rates are falling everywhere all at once

https://www.ft.com/content/fba35eca-df3a-4ad6-b42d-eb08eb7c9ad3
2•quick_brown_fox•26m ago•0 comments

Trump warns Taiwan against declaring independence

https://www.bbc.com/news/articles/ce8p61v7l68o
2•vrganj•27m ago•0 comments

$2B Conflict: Sam Altman "Side Hustles" Are Now Center of a Legal Warzone

https://www.gadgetreview.com/the-2-billion-conflict-sam-altmans-side-hustles-are-now-the-center-o...
1•g42gregory•28m ago•0 comments

Sense Humans with WiFi – Ruview

https://cognitum.one/RuView#capabilities
1•unixhero•29m ago•0 comments

Goodbye Travel Agents, Hello AI Agents

https://blog.denv.it/posts/goodbye-travel-agents-hello-ai-agents/
2•denysvitali•29m ago•0 comments

Do High-Quality EDC Knives Justify Their Price Gap?

https://www.paragon-knives.com/
1•bgzlsxaz•31m ago•0 comments

Jjw: A Workspace Manager for Jj

https://aran.dev/posts/introducing-jjw-jj-workspace-manager/
1•aranw•36m ago•0 comments

Show HN: New release of jd-GUI-duo 2.0.112 is out

https://github.com/nbauma109/jd-gui-duo/releases/tag/2.0.112
1•nbauma109•36m ago•0 comments

InclusionAI/Ring-2.6-1T is now open-sourced

https://huggingface.co/inclusionAI/Ring-2.6-1T
1•gainsurier•37m ago•0 comments

The Quiet Renovation at Bitwarden

https://blog.ppb1701.com/the-quiet-renovation-at-bitwarden
1•RyeCombinator•39m ago•0 comments

OXP – Write one WASM extension, run natively in VS Code, JetBrains, and Neovim

https://oxp.sh/
2•aldgar•40m ago•0 comments

The Download: deepfake porn's stolen bodies and AI sharing private numbers

https://www.technologyreview.com/2026/05/14/1137257/the-download-deepfake-porn-bodies-ai-exposing...
3•joozio•41m ago•0 comments

The CTF scene is dead

https://kabir.au/blog/the-ctf-scene-is-dead
31•frays•44m ago•7 comments

QuantumGuard – Free Quantum

https://quantumguard.site
1•pavan6599•48m ago•0 comments

Nested Callbacks (2013)

https://blog.michellebu.com/2013/03/21-nested-callbacks/
1•cod1r•56m ago•0 comments

Global News Reporting Briefs

https://www.worldbrief.info
1•reader9274•1h ago•0 comments

Asynchronicity in Continuous Batching

https://huggingface.co/blog/continuous_async
1•eigenBasis•1h ago•0 comments

MiniPlasma, a Powerful LPE

https://deadeclipse666.blogspot.com/2026/05/miniplasma-powerful-lpe.html
1•geekone•1h ago•0 comments

SpaceX Is Aiming to Go Public on June 12 in What Stands to Be Biggest IPO

https://www.wsj.com/finance/spacex-is-aiming-to-go-public-on-june-12-in-what-stands-to-be-biggest...
3•tzury•1h ago•0 comments

Inside Number 0

http://johnfinnemore.blogspot.com/2025/10/inside-number-0.html
2•tobr•1h ago•0 comments

Why Is Debian Called the Universal Operating System?

https://itsfoss.com/debian-universal-operating-system/
1•susam•1h ago•0 comments

Smalltalk: The Software Industry's Greatest Failure

http://richardkulisz.blogspot.com/2011/02/smalltalk-software-industrys-greatest.html
2•parallelminds•1h ago•1 comments

F.03 Livestream [video]

https://www.youtube.com/watch?v=luU57hMhkak
1•anonymousiam•1h ago•1 comments

Desire Paths

https://en.wikipedia.org/wiki/Desire_path
1•guidedlight•1h ago•0 comments