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?

Martin Picard's Mitochondrial Theory of Mind

https://www.quantamagazine.org/martin-picards-mitochondrial-theory-of-mind-20260717/
1•bookofjoe•48s ago•0 comments

A quarter of EU power came from solar for the first time in June 2026

https://ember-energy.org/latest-insights/a-quarter-of-eu-power-came-from-solar-for-the-first-time...
1•giuliomagnifico•1m ago•0 comments

MX3D Bridge (3D printed bridge in Amsterdam)

https://archello.com/es/project/mx3d-bridge
1•eamag•2m ago•0 comments

Show HN: Scaffold a raw idea into something ship-ready in under a minute

1•xnslx•4m ago•0 comments

Show HN: iMessage is the best interface, so I built TypeScript SDK for it

https://github.com/jmisilo/imessage-sdk
1•misilojakub•10m ago•0 comments

Meta scales back plan to track keystrokes, mouse movements after staff uproar

https://nypost.com/2026/06/02/business/mark-zuckerbergs-meta-scales-back-plan-to-track-keystrokes...
1•chbint•13m ago•0 comments

Show HN: A Back end-as-a-Service for collaborative SaaS applications

https://linkedrecords.com/
1•WolfOliver•13m ago•0 comments

A Companion Robot Company Just Landed a Classroom

https://jgcarpenter.com/blog.html?blogPost=a-companion-robot-company-just-landed-a-classroom
1•MaysonL•15m ago•0 comments

Memetic transfer: ecosystem of information exchange, and the attention economy

https://suriya.cc/essays/memetic/
1•subygan•16m ago•0 comments

How can a dugnad save the web?

https://vivaldi.com/blog/how-can-a-dugnad-save-the-web/
1•filippoalbertin•16m ago•0 comments

Show HN: Leenar – Tell us what you're building, we deploy your infra

https://leenar.net/
2•Leenar_AI•21m ago•0 comments

Pareidolia

https://en.wikipedia.org/wiki/Pareidolia
1•tomasyany•23m ago•0 comments

OpenAI Makes ChatGPT ChatGPT Again

https://daringfireball.net/linked/2026/07/17/chatgpt-siegler
1•tosh•23m ago•0 comments

Show HN: Design Skills Directory – curated agent skills for UI taste and craft

https://www.designskills.directory/
1•tungtbt•23m ago•0 comments

British coder who revolutionised Ukraine's drone army on paternity leave

https://www.thetimes.com/world/russia-ukraine-war/article/russia-ukraine-war-drones-occamx-softwa...
1•wyclif•24m ago•0 comments

Abliterated Kimi K3 for blackbox software red teaming

https://huggingface.co/audnai/penclaw-Kimi-K3.0-abliterated-GGUF
1•ozgurozkan999•27m ago•0 comments

I vibe coded a free offline Math game for kids

https://github.com/abhas9/escape-run
2•redcat99•27m ago•0 comments

Show HN: Race to AGI – a simulation browser game about running a frontier AI lab

https://rtagi.online
1•zameermfm•30m ago•0 comments

Ask HN: What Is Best for Marketing YouTube or Other Social Media

1•HSK11•31m ago•1 comments

China's A.I. Play Is Different from America's

https://www.nytimes.com/2026/07/18/opinion/china-united-states-artificial-intelligence.html
2•eigenhombre•31m ago•0 comments

Font uses an optical illusion to hide from AI

https://www.popsci.com/technology/font-optical-illusion-hide-ai/
1•MaysonL•34m ago•0 comments

Show HN: I built a browser workbench for generating and comparing AI music

https://imaginevid.io/ai-music-generator
1•wushi•37m ago•0 comments

Roger Summit, Who Invented an Early Online Search Service DIALOG, Dies at 95

https://www.nytimes.com/2026/07/17/technology/roger-summit-dead.html
1•1vuio0pswjnm7•39m ago•0 comments

Enterprise Haskell at H-E-B

https://blog.haskell.org/enterprise-haskell-at-h-e-b/
2•birdculture•42m ago•0 comments

The Voice of Google

https://www.newyorker.com/culture/the-weekend-essay/the-voice-of-google
2•cjcenizal•42m ago•1 comments

Chinese CXMT to Match Micron's DRAM Manufacturing Capacity This Year

https://www.techpowerup.com/350726/chinese-cxmt-to-match-microns-dram-manufacturing-capacity-this...
1•akyuu•43m ago•0 comments

Show HN: Turn a Suno song into a music video with beat-synced auto-editing

https://aivideogenerator.so/
1•Austinit•44m ago•1 comments

Cleaning a 120 Notebook Mess

https://davidhaggstrom.dev/posts/how-i-cleaned-a-notebook-mess/
1•davidhaggstrom•44m ago•0 comments

Print a Stencil – SVG to 3D Printing PCB solder paste stencil

https://printastencil.com
1•ingen0s•45m ago•2 comments

Kevin O'Leary claimed opposition to Utah data center was fueled by Chinese money

https://fortune.com/2026/07/17/kevin-oleary-defamation-lawsuit-chinese-communist-party-utah-data-...
2•1vuio0pswjnm7•45m ago•0 comments