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?

Gnosh.ai – super intelligent AI harness

https://gnosh.ai
1•jaekwon•1m ago•1 comments

Archtoys – a fast, PowerToys-style color picker for Linux (Rust and Slint)

https://github.com/Mujtaba1i/Archtoys
1•Mujtaba1i•1m ago•1 comments

Turn your RSS/blog feed into social videos

https://vidfiddle.com/
1•zellerhaus•4m ago•1 comments

Show HN: Magical Share - Share files with light

https://apps.zincirx.com/magicalshare/
1•zincirx•4m ago•0 comments

Show HN: I Vibe Coded Orkut.com

https://aurkut.fun/login
1•heyarviind2•5m ago•0 comments

RISC-V Has a Nice Portable Performance Optimization with Linux 7.4

https://www.phoronix.com/news/Linux-7.4-RISC-V
1•fork-bomber•7m ago•0 comments

Meta schemed 'whisper strategy' to discredit social media critic Jonathan Haidt

https://nypost.com/2026/10/27/business/meta-schemed-whisper-strategy-to-discredit-influential-soc...
1•fortran77•8m ago•0 comments

Show HN: CourtlyGo – open database of tennis, pickleball, padel courts and MCP

https://courtlygo.com/
1•Skrripa•9m ago•0 comments

Dogana: A protocol for trusting tables copied from other systems

https://github.com/fpiped/dogana
1•pippo995•10m ago•0 comments

Show HN: MCP for Your Mac Hardware

https://github.com/primemindai/macmonitor
2•titusblair•18m ago•1 comments

ExLisp: A Lisp implementation running on Elixir / BEAM

https://github.com/nakagami/exlisp
3•mariuz•18m ago•0 comments

Giant eagles once ruled the skies

https://www.bbc.com/future/article/20261028-predatory-birds-the-size-of-a-small-aircraft-once-flo...
2•tosh•19m ago•0 comments

Bend 2: Is formal verification the future of AI coding? [video]

https://www.youtube.com/watch?v=9ahgxINOJlo
1•tanaykarnik•21m ago•0 comments

AI "Ghost Students" Steal Millions in Student Loans, DOJ Says

https://arstechnica.com/tech-policy/2026/10/doj-exposes-ghost-students-using-ai-to-complete-cours...
2•entryleveljobsc•21m ago•0 comments

Robert Caro: The master biographer reflects at 91 [video]

https://www.youtube.com/watch?v=f0J_EeW42Lo
1•brandonb•23m ago•0 comments

Show HN: Bot_board – A message board for code harnesses collaboration

https://github.com/jalemieux/bot_board
1•sybhn•24m ago•1 comments

The Developer Productivity Illusion

https://ishanm.org/blog/the-developer-productivity-illusion
1•ishyfishyy•24m ago•0 comments

Literary Museum Prize "400 Years of History"

https://www.mnhn.fr/fr/concours-litteraire-artistes
1•Eridanus2•25m ago•0 comments

An open-source firewall for the next LiteLLM attack

https://www.strix.ai/blog/firewall-announcement
1•iacgm•26m ago•0 comments

How we detect frontier model misalignment

https://openai.com/index/how-we-detect-frontier-model-misalignment/
1•giuliomagnifico•26m ago•0 comments

Survivor

1•NAMUGONASIARJI•27m ago•0 comments

GitHub Incident with Actions, Pages, and Webhooks

https://www.githubstatus.com/incidents/pwxsjgnvrk6b
21•damontal•30m ago•11 comments

Understanding Open-Ended Work from a Data Perspective

https://www.fig.inc/blog/understanding-open-ended-work-from-a-data-perspective/
1•joehabeebs•30m ago•0 comments

Show HN: Pollsight – a simple tool to aid ballot research

https://pollsight.napsty.com
1•gaieges•31m ago•0 comments

Show HN: Offense – Security tools for your agents

https://github.com/offense-research/offense
1•imranye•32m ago•0 comments

Truth, Bullshit and Reputation

https://blog.happyfellow.dev/truth-bullshit-and-reputation/
1•thehappyfellow•32m ago•1 comments

The Biggest Crypto Theft in History [video]

https://www.youtube.com/watch?v=m7hL3bVoUuQ
4•Bender•34m ago•0 comments

AI review of the research of Emmanuel Saez and Gabriel Zucman

https://saez-zucman-audit-replication.vercel.app/
1•sreeix•34m ago•0 comments

Trusted code is one bad update away from malware

https://photostructure.com/coding/malicious-editor-extensions/
1•mceachen•34m ago•0 comments

Altman says 'quite terrible' for your PCs to have RAM

https://www.tomshardware.com/tech-industry/data-centers/openai-ceo-says-its-quite-terrible-for-yo...
2•theanonymousone•35m ago•1 comments