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?

Walmart Makes It Possible for Agents to Shop on Behalf of Customers

https://corporate.walmart.com/news/2026/10/Making-It-Possible-for-Agents-to-Shop-on-Behalf-of-Cus...
1•mooreds•2m ago•0 comments

Average People in Paintings

https://blog.willmeye.rs/average-people-in-paintings/
1•willmeyers•6m ago•0 comments

Nu: The personal agent that runs on your rules

https://github.com/rebuno/nu
1•nnww•7m ago•0 comments

KillSwitch-Bench

https://bench.killswitch-lang.org/
1•ijidak•11m ago•1 comments

The Search for Better Learning Algorithms – Yaroslav Bulatov [video]

https://www.youtube.com/watch?v=qgNeImtcykQ
1•latentoracle•11m ago•0 comments

Pylance and Pyrefly: bring your preferred type checker to Visual Studio Code

https://devblogs.microsoft.com/python/announcing-tsp/
1•Ravencentric•15m ago•0 comments

Analyzing Rust Programs with Charon

https://lwn.net/Articles/1097198/
1•fanf2•17m ago•0 comments

The one time we break the LLM cache on purpose

https://www.induction.ai/blog/benchmark-cache-isolation
1•bleonard•18m ago•0 comments

Gaps and islands in streaming SQL: four ways to define an island

https://www.timeplus.com/post/solving-gaps-and-islands
1•tingfirst•19m ago•0 comments

Firecrawl vs. Tavily vs. Exa vs. DeepSeek

https://techstackups.com/comparisons/firecrawl-vs-tavily-vs-exa-vs-deepseek/
2•sixhobbits•19m ago•0 comments

A first for CRISPR: powerful prime editing alters DNA directly in the human body

https://www.nature.com/articles/d41586-026-03371-x
2•bookofjoe•20m ago•1 comments

No Source Code? No Problem

https://queue.acm.org/doi/10.1145/945131.945155
2•ibobev•21m ago•0 comments

A whirlwind tour of systemd-nspawn containers

https://quantum5.ca/2025/03/22/whirlwind-tour-of-systemd-nspawn-containers/
1•ibobev•22m ago•1 comments

Next-Concept Modeling: Fast, Parallel Coarse-to-Fine Text Generation

https://arxiv.org/abs/2610.14162
1•ibobev•23m ago•0 comments

World Wars I and II Military Aviation Museum Collection

https://www.militaryaviationmuseum.org/our-collection/
1•NaOH•24m ago•0 comments

Turning VS Code into a control panel with custom extensions

https://medium.com/@davidmonterocrespo24/turning-vs-code-into-the-control-panel-for-my-work-fcc67...
1•dmonterocrespo•24m ago•0 comments

What are some free AI education platforms to learn AI? [video]

https://www.youtube.com/watch?v=4iTqvHrzzAw
1•aicc•26m ago•0 comments

UAE Paid Swiss Intelligence Firm to Compile Database of "Hostile" Facebook Users

https://www.dropsitenews.com/p/uae-alp-services-facebook-crackdown
2•DeepLogin•28m ago•0 comments

Semi-Cursive Pen Calligraphy

https://raccoonbend.com/YingBiXingFa.html
1•skogstokig•30m ago•0 comments

Tell HN: The Amount of Irrelevant Content on Here Is Insane

3•alephnerd•36m ago•3 comments

A Note from Our CEO on the PingCAP Security Incident

https://www.pingcap.com/trust-hub/security/ceo-note-october-2026/
1•weinzierl•38m ago•0 comments

WTF Is Agent Experience

https://usecommune.com/n/the-weekly-interface/a/2026-10-15-wtf-is-agent-experience
1•amzil•43m ago•0 comments

Artificial Intimacy Erodes Autonomy

https://civicpivot.blogspot.com/2026/10/the-artificialization-of-intimacy-when.html
2•civicpivot•43m ago•0 comments

Kimi K3.1 Pro puts open-source AI a month behind the best

https://www.modelcompare.ai/blog/china-open-source-ai
8•rakannimer•44m ago•0 comments

Tell HN: Claude CLI doesn't exit anymore, not even with CTRL-C

5•cromka•45m ago•0 comments

SF's shuttered former Westfield Mall has a buyer

https://www.kron4.com/news/bay-area/sfs-shuttered-former-westfield-mall-has-a-buyer/
2•mikhael•45m ago•0 comments

Show HN: Audio Splitter – Split long MP3 files at silence in the browser

https://audio-splitter.org/
1•liweipt•47m ago•0 comments

Ask HN: When did you last visit or use stackoverflow?

3•njx•47m ago•4 comments

Crows can evaluate visual info twice as fast as mammals

https://arstechnica.com/science/2026/10/crows-can-evaluate-visual-info-twice-as-fast-as-mammals/
3•khalidkhair•47m ago•0 comments

Show HN: Translate Human Speech into Birdsong

https://birdspeech.mitpit.com/
1•MitPitt•48m ago•0 comments